diff --git a/.github/workflows/quality-checks.yml b/.github/workflows/quality-checks.yml index 4f683c18..e13713ef 100644 --- a/.github/workflows/quality-checks.yml +++ b/.github/workflows/quality-checks.yml @@ -17,14 +17,19 @@ jobs: with: fetch-depth: 0 # Need full history for version comparison + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: '10' + - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: '18' - cache: 'npm' + node-version-file: '.nvmrc' + cache: 'pnpm' - name: Install dependencies - run: npm ci --legacy-peer-deps + run: pnpm i --frozen-lockfile - name: Check for Claude signatures run: | @@ -83,31 +88,22 @@ jobs: run: | echo "🔨 Verifying dist is up-to-date..." - # Check if src files were changed - if git diff --name-only HEAD~1 HEAD | grep -qE "^src/.*\.(ts|js)$"; then - echo "đŸ“Ļ Source files changed, verifying dist..." - - # Build dist - npm run clean || npx rimraf dist* - npx rollup -c rollup.config.mjs - npx copyfiles package.json LICENSE README.md ./dist - npx rimraf ./dist/ts - - # Check if there are differences - if ! git diff --quiet dist/; then - echo "❌ ERROR: dist is out of date!" - echo "The following files in dist/ are not up-to-date:" - git diff --name-only dist/ - echo "" - echo "Please run 'npm run build' and commit the changes" - exit 1 - fi - - echo "✅ dist is up-to-date" - else - echo "â„šī¸ No source changes, skipping dist check" + # Always rebuild. A conditional check keyed on "did HEAD~1..HEAD touch + # src/" cannot see drift introduced by a merge commit, which is exactly + # how the committed dist lost the VTODO API in f8d5561. + pnpm build + + if ! git diff --quiet dist/; then + echo "❌ ERROR: dist does not match a fresh build from src!" + echo "The following files in dist/ are out of date:" + git diff --name-only dist/ + echo "" + echo "Please run 'pnpm build' and commit the changes" + exit 1 fi + echo "✅ dist matches a fresh build from src" + - name: Summary if: success() run: | diff --git a/.husky/pre-commit b/.husky/pre-commit index 5a52d3fa..3ddca96d 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -36,7 +36,7 @@ echo "✅ No Claude signatures found" echo "đŸ“Ļ Checking package.json version..." # Check if package.json is being modified -if echo "$STAGED_FILES" | grep -q "package.json"; then +if echo "$STAGED_FILES" | grep -qx "package.json"; then # Get current version from HEAD OLD_VERSION=$(git show HEAD:package.json 2>/dev/null | grep '"version"' | head -1 | sed 's/.*"version": "\(.*\)".*/\1/') diff --git a/dist/index.d.ts b/dist/index.d.ts index d552fa90..88581673 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -8,7 +8,8 @@ export { createAccount } from './account'; export { davRequest, propfind, createObject, updateObject, deleteObject } from './request'; export { collectionQuery, supportedReportSet, isCollectionDirty, syncCollection, smartCollectionSync, } from './collection'; export { calendarQuery, calendarMultiGet, makeCalendar, fetchCalendars, fetchCalendarUserAddresses, fetchCalendarObjects, createCalendarObject, updateCalendarObject, deleteCalendarObject, syncCalendars, freeBusyQuery, } from './calendar'; -export { addressBookQuery, addressBookMultiGet, fetchAddressBooks, fetchVCards, createVCard, updateVCard, deleteVCard, } from './addressBook'; +export { addressBookQuery, addressBookMultiGet, fetchAddressBooks, fetchVCards, createVCard, updateVCard, deleteVCard, makeAddressBook, } from './addressBook'; +export { todoQuery, todoMultiGet, fetchTodos, createTodo, updateTodo, deleteTodo, } from './todo'; export { getBasicAuthHeaders, getBearerAuthHeaders, getOauthHeaders, fetchOauthTokens, refreshAccessToken, } from './util/authHelpers'; export { urlContains, urlEquals, getDAVAttribute, cleanupFalsy } from './util/requestHelpers'; export { DAVNamespace, DAVAttributeMap, DAVNamespaceShort } from './consts'; @@ -23,6 +24,8 @@ declare const _default: { [key: string]: T; }; excludeHeaders: (headers: Record | undefined, headersToExclude: string[] | undefined) => Record; + defaultIcsFilter: (url: string) => boolean; + validateISO8601TimeRange: (start: string, end: string) => void; defaultParam: any>(fn: F, params: Partial[0]>) => (...args: Parameters) => ReturnType; getBasicAuthHeaders: (credentials: import("./types/models").DAVCredentials) => { authorization?: string; @@ -41,6 +44,62 @@ declare const _default: { authorization?: string; }; }>; + todoQuery: (params: { + url: string; + props: import("xml-js/types").ElementCompact; + filters?: import("xml-js/types").ElementCompact; + timezone?: string; + depth?: import("./types/DAVTypes").DAVDepth; + headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; + }) => Promise; + todoMultiGet: (params: { + url: string; + props: import("xml-js/types").ElementCompact; + objectUrls?: string[]; + timezone?: string; + depth: import("./types/DAVTypes").DAVDepth; + filters?: import("xml-js/types").ElementCompact; + headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; + }) => Promise; + fetchTodos: (params: { + calendar: import("./types/models").DAVCalendar; + objectUrls?: string[]; + filters?: import("xml-js/types").ElementCompact; + timeRange?: { + start: string; + end: string; + }; + expand?: boolean; + urlFilter?: (url: string) => boolean; + headers?: Record; + headersToExclude?: string[]; + useMultiGet?: boolean; + fetchOptions?: RequestInit; + }) => Promise; + createTodo: (params: { + calendar: import("./types/models").DAVCalendar; + iCalString: string; + filename: string; + headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; + }) => Promise; + updateTodo: (params: { + calendarObject: import("./types/models").DAVCalendarObject; + headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; + }) => Promise; + deleteTodo: (params: { + calendarObject: import("./types/models").DAVCalendarObject; + headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; + }) => Promise; fetchCalendarUserAddresses: (params: { account: import("./types/models").DAVAccount; headers?: Record; @@ -202,6 +261,14 @@ declare const _default: { fetchOptions?: RequestInit; fetch?: typeof fetch; }) => Promise; + makeAddressBook: (params: { + url: string; + props: import("xml-js/types").ElementCompact; + depth?: import("./types/DAVTypes").DAVDepth; + headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; + }) => Promise; serviceDiscovery: (params: { account: import("./types/models").DAVAccount; headers?: Record; @@ -540,6 +607,14 @@ declare const _default: { fetchOptions?: RequestInit; fetch?: typeof fetch; }) => Promise; + makeAddressBook: (params: { + url: string; + props: import("xml-js/types").ElementCompact; + depth?: import("./types/DAVTypes").DAVDepth; + headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; + }) => Promise; fetchVCards: (params: { addressBook: import("./types/models").DAVAddressBook; headers?: Record; @@ -573,6 +648,62 @@ declare const _default: { fetchOptions?: RequestInit; fetch?: typeof fetch; }) => Promise; + todoQuery: (params: { + url: string; + props: import("xml-js/types").ElementCompact; + filters?: import("xml-js/types").ElementCompact; + timezone?: string; + depth?: import("./types/DAVTypes").DAVDepth; + headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; + }) => Promise; + todoMultiGet: (params: { + url: string; + props: import("xml-js/types").ElementCompact; + objectUrls?: string[]; + timezone?: string; + depth: import("./types/DAVTypes").DAVDepth; + filters?: import("xml-js/types").ElementCompact; + headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; + }) => Promise; + fetchTodos: (params: { + calendar: import("./types/models").DAVCalendar; + objectUrls?: string[]; + filters?: import("xml-js/types").ElementCompact; + timeRange?: { + start: string; + end: string; + }; + expand?: boolean; + urlFilter?: (url: string) => boolean; + headers?: Record; + headersToExclude?: string[]; + useMultiGet?: boolean; + fetchOptions?: RequestInit; + }) => Promise; + createTodo: (params: { + calendar: import("./types/models").DAVCalendar; + iCalString: string; + filename: string; + headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; + }) => Promise; + updateTodo: (params: { + calendarObject: import("./types/models").DAVCalendarObject; + headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; + }) => Promise; + deleteTodo: (params: { + calendarObject: import("./types/models").DAVCalendarObject; + headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; + }) => Promise; }>; DAVClient: typeof client.DAVClient; DAVNamespace: typeof DAVNamespace; diff --git a/dist/package.json b/dist/package.json index 5ff9c38a..71146925 100644 --- a/dist/package.json +++ b/dist/package.json @@ -1,6 +1,6 @@ { "name": "tsdav", - "version": "2.1.8", + "version": "2.3.1", "description": "WebDAV, CALDAV, and CARDDAV client for Nodejs and the Browser", "keywords": [ "dav", @@ -31,7 +31,7 @@ "package.json" ], "scripts": { - "build": "pnpm -s clean && rollup -c rollup.config.mjs && copyfiles package.json LICENSE README.md ./dist && rimraf ./dist/ts", + "build": "rimraf dist* && rollup -c rollup.config.mjs && copyfiles package.json LICENSE README.md ./dist && rimraf ./dist/ts", "lint": "eslint --ext .ts,.tsx src --ignore-pattern src/__tests__ --ignore-pattern src/util/__tests__", "clean": "rimraf dist*", "prepublishOnly": "pnpm build", @@ -44,7 +44,8 @@ "test:unit": "jest --testPathPatterns=src/__tests__/unit", "test:zoho": "jest --testPathPatterns=src/__tests__/integration/zoho --runInBand", "typecheck": "tsc --noEmit", - "watch": "tsc --watch --outDir ./dist" + "watch": "tsc --watch --outDir ./dist", + "prepare": "husky && npm run build" }, "dependencies": { "base-64": "1.0.0", @@ -73,6 +74,7 @@ "eslint-module-utils": "2.12.1", "eslint-plugin-import": "2.32.0", "eslint-plugin-prettier": "5.5.5", + "husky": "^9.1.7", "jest": "30.2.0", "prettier": "3.8.0", "rimraf": "6.1.2", @@ -86,6 +88,6 @@ "typescript": "5.9.3" }, "engines": { - "node": ">=10" + "node": ">=18" } } diff --git a/dist/tsdav.cjs b/dist/tsdav.cjs index 26659554..3baa48a0 100644 --- a/dist/tsdav.cjs +++ b/dist/tsdav.cjs @@ -122,18 +122,30 @@ const excludeHeaders = (headers, headersToExclude) => { } return Object.fromEntries(Object.entries(headers).filter(([key]) => !headersToExclude.includes(key))); }; +const DEFAULT_ICAL_EXTENSION = '.ics'; +const defaultIcsFilter = (url) => Boolean(url === null || url === void 0 ? void 0 : url.includes(DEFAULT_ICAL_EXTENSION)); +const validateISO8601TimeRange = (start, end) => { + const ISO_8601 = /^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i; + const ISO_8601_FULL = /^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i; + if ((!ISO_8601.test(start) || !ISO_8601.test(end)) && + (!ISO_8601_FULL.test(start) || !ISO_8601_FULL.test(end))) { + throw new Error('invalid timeRange format, not in ISO8601'); + } +}; var requestHelpers = /*#__PURE__*/Object.freeze({ __proto__: null, cleanupFalsy: cleanupFalsy, conditionalParam: conditionalParam, + defaultIcsFilter: defaultIcsFilter, excludeHeaders: excludeHeaders, getDAVAttribute: getDAVAttribute, urlContains: urlContains, - urlEquals: urlEquals + urlEquals: urlEquals, + validateISO8601TimeRange: validateISO8601TimeRange }); -const debug$5 = getLogger('tsdav:request'); +const debug$6 = getLogger('tsdav:request'); const davRequest = async (params) => { var _a; const { url, init, convertIncoming = true, parseOutgoing = true, fetchOptions = {}, fetch: fetchOverride, } = params; @@ -225,7 +237,7 @@ const davRequest = async (params) => { } } catch (e) { - debug$5(e.stack); + debug$6(e.stack); } }, // remove namespace & camelCase @@ -344,7 +356,7 @@ function hasFields(obj, fields) { const findMissingFieldNames = (obj, fields) => fields.reduce((prev, curr) => (obj[curr] ? prev : `${prev.length ? `${prev},` : ''}${curr.toString()}`), ''); /* eslint-disable no-underscore-dangle */ -const debug$4 = getLogger('tsdav:collection'); +const debug$5 = getLogger('tsdav:collection'); const collectionQuery = async (params) => { const { url, body, depth, defaultNamespace = exports.DAVNamespaceShort.DAV, headers, headersToExclude, fetchOptions = {}, fetch: fetchOverride, } = params; const queryResults = await davRequest({ @@ -470,7 +482,7 @@ const smartCollectionSync = async (params) => { throw new Error(`account must have ${findMissingFieldNames(account, requiredFields)} before smartCollectionSync`); } const syncMethod = method !== null && method !== void 0 ? method : (((_a = collection.reports) === null || _a === void 0 ? void 0 : _a.includes('syncCollection')) ? 'webdav' : 'basic'); - debug$4(`smart collection sync with type ${account.accountType} and method ${syncMethod}`); + debug$5(`smart collection sync with type ${account.accountType} and method ${syncMethod}`); if (syncMethod === 'webdav') { const result = await syncCollection({ url: collection.url, @@ -609,7 +621,7 @@ var collection = /*#__PURE__*/Object.freeze({ }); /* eslint-disable no-underscore-dangle */ -const debug$3 = getLogger('tsdav:addressBook'); +const debug$4 = getLogger('tsdav:addressBook'); const addressBookQuery = async (params) => { const { url, props, filters, depth, headers, headersToExclude, fetchOptions = {}, fetch: fetchOverride, } = params; return collectionQuery({ @@ -679,7 +691,7 @@ const fetchAddressBooks = async (params) => { .map((rs) => { var _a, _b, _c, _d, _e, _f, _g, _h, _j; const displayName = (_c = (_b = (_a = rs.props) === null || _a === void 0 ? void 0 : _a.displayname) === null || _b === void 0 ? void 0 : _b._cdata) !== null && _c !== void 0 ? _c : (_d = rs.props) === null || _d === void 0 ? void 0 : _d.displayname; - debug$3(`Found address book named ${typeof displayName === 'string' ? displayName : ''}, + debug$4(`Found address book named ${typeof displayName === 'string' ? displayName : ''}, props: ${JSON.stringify(rs.props)}`); return { url: new URL((_e = rs.href) !== null && _e !== void 0 ? _e : '', (_f = account.rootUrl) !== null && _f !== void 0 ? _f : '').href, @@ -701,7 +713,7 @@ const fetchAddressBooks = async (params) => { }; const fetchVCards = async (params) => { const { addressBook, headers, objectUrls, headersToExclude, urlFilter = (url) => url, useMultiGet = true, fetchOptions = {}, fetch: fetchOverride, } = params; - debug$3(`Fetching vcards from ${addressBook === null || addressBook === void 0 ? void 0 : addressBook.url}`); + debug$4(`Fetching vcards from ${addressBook === null || addressBook === void 0 ? void 0 : addressBook.url}`); const requiredFields = ['url']; if (!addressBook || !hasFields(addressBook, requiredFields)) { if (!addressBook) { @@ -800,6 +812,31 @@ const deleteVCard = async (params) => { fetch: fetchOverride, }); }; +const makeAddressBook = async (params) => { + const { url, props, depth, headers, headersToExclude, fetchOptions = {} } = params; + return davRequest({ + url, + init: { + method: 'MKCOL', + headers: excludeHeaders(cleanupFalsy({ depth, ...headers }), headersToExclude), + namespace: exports.DAVNamespaceShort.DAV, + body: props + ? { + mkcol: { + _attributes: getDAVAttribute([ + exports.DAVNamespace.DAV, + exports.DAVNamespace.CARDDAV, + ]), + set: { + prop: props, + }, + }, + } + : undefined, + }, + fetchOptions, + }); +}; var addressBook = /*#__PURE__*/Object.freeze({ __proto__: null, @@ -809,11 +846,12 @@ var addressBook = /*#__PURE__*/Object.freeze({ deleteVCard: deleteVCard, fetchAddressBooks: fetchAddressBooks, fetchVCards: fetchVCards, + makeAddressBook: makeAddressBook, updateVCard: updateVCard }); /* eslint-disable no-underscore-dangle */ -const debug$2 = getLogger('tsdav:calendar'); +const debug$3 = getLogger('tsdav:calendar'); const fetchCalendarUserAddresses = async (params) => { var _a, _b, _c; const { account, headers, headersToExclude, fetchOptions = {}, fetch: fetchOverride } = params; @@ -821,7 +859,7 @@ const fetchCalendarUserAddresses = async (params) => { if (!hasFields(account, requiredFields)) { throw new Error(`account must have ${findMissingFieldNames(account, requiredFields)} before fetchUserAddresses`); } - debug$2(`Fetch user addresses from ${account.principalUrl}`); + debug$3(`Fetch user addresses from ${account.principalUrl}`); const responses = await propfind({ url: account.principalUrl, props: { [`${exports.DAVNamespaceShort.CALDAV}:calendar-user-address-set`]: {} }, @@ -835,7 +873,7 @@ const fetchCalendarUserAddresses = async (params) => { throw new Error('cannot find calendarUserAddresses'); } const addresses = ((_c = (_b = (_a = matched === null || matched === void 0 ? void 0 : matched.props) === null || _a === void 0 ? void 0 : _a.calendarUserAddressSet) === null || _b === void 0 ? void 0 : _b.href) === null || _c === void 0 ? void 0 : _c.filter(Boolean)) || []; - debug$2(`Fetched calendar user addresses ${addresses}`); + debug$3(`Fetched calendar user addresses ${addresses}`); return addresses; }; const calendarQuery = async (params) => { @@ -974,17 +1012,11 @@ const fetchCalendars = async (params) => { }))); }; const fetchCalendarObjects = async (params) => { - const { calendar, objectUrls, filters: customFilters, timeRange, headers, expand, urlFilter = (url) => Boolean(url === null || url === void 0 ? void 0 : url.includes('.ics')), useMultiGet = true, headersToExclude, fetchOptions = {}, fetch: fetchOverride, } = params; + const { calendar, objectUrls, filters: customFilters, timeRange, headers, expand, urlFilter = defaultIcsFilter, useMultiGet = true, headersToExclude, fetchOptions = {}, fetch: fetchOverride, } = params; if (timeRange) { - // validate timeRange - const ISO_8601 = /^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i; - const ISO_8601_FULL = /^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i; - if ((!ISO_8601.test(timeRange.start) || !ISO_8601.test(timeRange.end)) && - (!ISO_8601_FULL.test(timeRange.start) || !ISO_8601_FULL.test(timeRange.end))) { - throw new Error('invalid timeRange format, not in ISO8601'); - } + validateISO8601TimeRange(timeRange.start, timeRange.end); } - debug$2(`Fetching calendar objects from ${calendar === null || calendar === void 0 ? void 0 : calendar.url}`); + debug$3(`Fetching calendar objects from ${calendar === null || calendar === void 0 ? void 0 : calendar.url}`); const requiredFields = ['url']; if (!calendar || !hasFields(calendar, requiredFields)) { if (!calendar) { @@ -1197,7 +1229,7 @@ const syncCalendars = async (params) => { }); // no existing url const created = remoteCalendars.filter((rc) => localCalendars.every((lc) => !urlContains(lc.url, rc.url))); - debug$2(`new calendars: ${created.map((cc) => cc.displayName)}`); + debug$3(`new calendars: ${created.map((cc) => cc.displayName)}`); // have same url, but syncToken/ctag different const updated = localCalendars.reduce((prev, curr) => { const found = remoteCalendars.find((rc) => urlContains(rc.url, curr.url)); @@ -1208,7 +1240,7 @@ const syncCalendars = async (params) => { } return prev; }, []); - debug$2(`updated calendars: ${updated.map((cc) => cc.displayName)}`); + debug$3(`updated calendars: ${updated.map((cc) => cc.displayName)}`); const updatedWithObjects = await Promise.all(updated.map(async (u) => { const result = await smartCollectionSync({ collection: { ...u, objectMultiGet: calendarMultiGet }, @@ -1222,7 +1254,7 @@ const syncCalendars = async (params) => { })); // does not present in remote const deleted = localCalendars.filter((cal) => remoteCalendars.every((rc) => !urlContains(rc.url, cal.url))); - debug$2(`deleted calendars: ${deleted.map((cc) => cc.displayName)}`); + debug$3(`deleted calendars: ${deleted.map((cc) => cc.displayName)}`); const unchanged = localCalendars.filter((cal) => remoteCalendars.some((rc) => urlContains(rc.url, cal.url) && ((rc.syncToken && `${rc.syncToken}` !== `${cal.syncToken}`) || (rc.ctag && `${rc.ctag}` !== `${cal.ctag}`)))); @@ -1238,13 +1270,7 @@ const syncCalendars = async (params) => { const freeBusyQuery = async (params) => { const { url, timeRange, depth, headers, headersToExclude, fetchOptions = {}, fetch: fetchOverride, } = params; if (timeRange) { - // validate timeRange - const ISO_8601 = /^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i; - const ISO_8601_FULL = /^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i; - if ((!ISO_8601.test(timeRange.start) || !ISO_8601.test(timeRange.end)) && - (!ISO_8601_FULL.test(timeRange.start) || !ISO_8601_FULL.test(timeRange.end))) { - throw new Error('invalid timeRange format, not in ISO8601'); - } + validateISO8601TimeRange(timeRange.start, timeRange.end); } else { throw new Error('timeRange is required'); @@ -1286,10 +1312,10 @@ var calendar = /*#__PURE__*/Object.freeze({ updateCalendarObject: updateCalendarObject }); -const debug$1 = getLogger('tsdav:account'); +const debug$2 = getLogger('tsdav:account'); const serviceDiscovery = async (params) => { var _a, _b; - debug$1('Service discovery...'); + debug$2('Service discovery...'); const { account, headers, headersToExclude, fetchOptions = {}, fetch: fetchOverride } = params; const requestFetch = fetchOverride !== null && fetchOverride !== void 0 ? fetchOverride : fetch; const endpoint = new URL(account.serverUrl); @@ -1315,7 +1341,7 @@ const serviceDiscovery = async (params) => { // http redirect. const location = response.headers.get('Location'); if (typeof location === 'string' && location.length) { - debug$1(`Service discovery redirected to ${location}`); + debug$2(`Service discovery redirected to ${location}`); const serviceURL = new URL(location, endpoint); if (serviceURL.hostname === uri.hostname && uri.port && !serviceURL.port) { serviceURL.port = uri.port; @@ -1326,7 +1352,7 @@ const serviceDiscovery = async (params) => { } } catch (err) { - debug$1(`Service discovery failed: ${err.stack}`); + debug$2(`Service discovery failed: ${err.stack}`); } return endpoint.href; }; @@ -1337,7 +1363,7 @@ const fetchPrincipalUrl = async (params) => { if (!hasFields(account, requiredFields)) { throw new Error(`account must have ${findMissingFieldNames(account, requiredFields)} before fetchPrincipalUrl`); } - debug$1(`Fetching principal url from path ${account.rootUrl}`); + debug$2(`Fetching principal url from path ${account.rootUrl}`); const [response] = await propfind({ url: account.rootUrl, props: { @@ -1349,12 +1375,12 @@ const fetchPrincipalUrl = async (params) => { fetch: fetchOverride, }); if (!response.ok) { - debug$1(`Fetch principal url failed: ${response.statusText}`); + debug$2(`Fetch principal url failed: ${response.statusText}`); if (response.status === 401) { throw new Error('Invalid credentials'); } } - debug$1(`Fetched principal url ${(_b = (_a = response.props) === null || _a === void 0 ? void 0 : _a.currentUserPrincipal) === null || _b === void 0 ? void 0 : _b.href}`); + debug$2(`Fetched principal url ${(_b = (_a = response.props) === null || _a === void 0 ? void 0 : _a.currentUserPrincipal) === null || _b === void 0 ? void 0 : _b.href}`); return new URL((_e = (_d = (_c = response.props) === null || _c === void 0 ? void 0 : _c.currentUserPrincipal) === null || _d === void 0 ? void 0 : _d.href) !== null && _e !== void 0 ? _e : '', account.rootUrl).href; }; const fetchHomeUrl = async (params) => { @@ -1364,7 +1390,7 @@ const fetchHomeUrl = async (params) => { if (!hasFields(account, requiredFields)) { throw new Error(`account must have ${findMissingFieldNames(account, requiredFields)} before fetchHomeUrl`); } - debug$1(`Fetch home url from ${account.principalUrl}`); + debug$2(`Fetch home url from ${account.principalUrl}`); const responses = await propfind({ url: account.principalUrl, props: account.accountType === 'caldav' @@ -1377,13 +1403,13 @@ const fetchHomeUrl = async (params) => { }); const matched = responses.find((r) => urlContains(account.principalUrl, r.href)); if (!matched || !matched.ok) { - debug$1(`Fetch home url failed with status ${matched === null || matched === void 0 ? void 0 : matched.statusText} and error ${JSON.stringify(responses.map((r) => r.error))}`); + debug$2(`Fetch home url failed with status ${matched === null || matched === void 0 ? void 0 : matched.statusText} and error ${JSON.stringify(responses.map((r) => r.error))}`); throw new Error('cannot find homeUrl'); } const result = new URL(account.accountType === 'caldav' ? (_a = matched === null || matched === void 0 ? void 0 : matched.props) === null || _a === void 0 ? void 0 : _a.calendarHomeSet.href : (_b = matched === null || matched === void 0 ? void 0 : matched.props) === null || _b === void 0 ? void 0 : _b.addressbookHomeSet.href, account.rootUrl).href; - debug$1(`Fetched home url ${result}`); + debug$2(`Fetched home url ${result}`); return result; }; const createAccount = async (params) => { @@ -1461,6 +1487,291 @@ var account = /*#__PURE__*/Object.freeze({ serviceDiscovery: serviceDiscovery }); +/* eslint-disable no-underscore-dangle */ +const debug$1 = getLogger('tsdav:todo'); +/** + * Helper function to build expand property for calendar-data + */ +const buildExpandProp = (timeRange) => ({ + [`${exports.DAVNamespaceShort.CALDAV}:expand`]: { + _attributes: { + start: `${new Date(timeRange.start).toISOString().slice(0, 19).replace(/[-:.]/g, '')}Z`, + end: `${new Date(timeRange.end).toISOString().slice(0, 19).replace(/[-:.]/g, '')}Z`, + }, + }, +}); +/** + * Query todos using CalDAV REPORT calendar-query + * + * @param params.url - Calendar URL to query + * @param params.props - Properties to request + * @param params.filters - Optional CalDAV filters + * @param params.timezone - Optional timezone + * @param params.depth - Depth header value + * @param params.headers - Request headers + * @param params.headersToExclude - Headers to exclude + * @param params.fetchOptions - Fetch options + * @returns Array of DAV responses + */ +const todoQuery = async (params) => { + const { url, props, filters, timezone, depth, headers, headersToExclude, fetchOptions = {}, } = params; + return collectionQuery({ + url, + body: { + 'calendar-query': cleanupFalsy({ + _attributes: getDAVAttribute([ + exports.DAVNamespace.CALDAV, + exports.DAVNamespace.CALENDAR_SERVER, + exports.DAVNamespace.CALDAV_APPLE, + exports.DAVNamespace.DAV, + ]), + [`${exports.DAVNamespaceShort.DAV}:prop`]: props, + filter: filters, + timezone, + }), + }, + defaultNamespace: exports.DAVNamespaceShort.CALDAV, + depth, + headers: excludeHeaders(headers, headersToExclude), + fetchOptions, + }); +}; +/** + * Fetch multiple todos by URL using CalDAV calendar-multiget + * + * @param params.url - Calendar URL + * @param params.props - Properties to request + * @param params.objectUrls - Array of todo object URLs to fetch + * @param params.timezone - Optional timezone + * @param params.depth - Depth header value + * @param params.filters - Optional CalDAV filters + * @param params.headers - Request headers + * @param params.headersToExclude - Headers to exclude + * @param params.fetchOptions - Fetch options + * @returns Array of DAV responses + */ +const todoMultiGet = async (params) => { + const { url, props, objectUrls, filters, timezone, depth, headers, headersToExclude, fetchOptions = {}, } = params; + return collectionQuery({ + url, + body: { + 'calendar-multiget': cleanupFalsy({ + _attributes: getDAVAttribute([exports.DAVNamespace.DAV, exports.DAVNamespace.CALDAV]), + [`${exports.DAVNamespaceShort.DAV}:prop`]: props, + [`${exports.DAVNamespaceShort.DAV}:href`]: objectUrls, + filter: filters, + timezone, + }), + }, + defaultNamespace: exports.DAVNamespaceShort.CALDAV, + depth, + headers: excludeHeaders(headers, headersToExclude), + fetchOptions, + }); +}; +/** + * Fetch VTODO objects from a CalDAV calendar with optional filtering + * + * @param params.calendar - Calendar to fetch todos from + * @param params.objectUrls - Optional array of specific todo URLs to fetch + * @param params.filters - Optional custom CalDAV filters + * @param params.timeRange - Optional time range filter in ISO8601 format + * @param params.expand - Whether to expand recurring todos + * @param params.urlFilter - Custom filter function for todo object URLs + * @param params.headers - Request headers + * @param params.headersToExclude - Headers to exclude + * @param params.useMultiGet - Whether to use multiget (default: true) + * @param params.fetchOptions - Fetch options + * @returns Array of todo objects with url, etag, and iCalendar data + * @throws Error if calendar URL is missing or timeRange format is invalid + */ +const fetchTodos = async (params) => { + const { calendar, objectUrls, filters: customFilters, timeRange, headers, expand, urlFilter = defaultIcsFilter, useMultiGet = true, headersToExclude, fetchOptions = {}, } = params; + if (timeRange) { + validateISO8601TimeRange(timeRange.start, timeRange.end); + } + debug$1(`Fetching todo objects from ${calendar === null || calendar === void 0 ? void 0 : calendar.url}`); + const requiredFields = ['url']; + if (!calendar || !hasFields(calendar, requiredFields)) { + if (!calendar) { + throw new Error('cannot fetchTodos for undefined calendar'); + } + throw new Error(`calendar must have ${findMissingFieldNames(calendar, requiredFields)} before fetchTodos`); + } + // Build CalDAV filter for VTODO components + // Structure: VCALENDAR -> VTODO -> optional time-range + const filters = customFilters !== null && customFilters !== void 0 ? customFilters : [ + { + 'comp-filter': { + _attributes: { + name: 'VCALENDAR', + }, + 'comp-filter': { + _attributes: { + name: 'VTODO', + }, + ...(timeRange + ? { + 'time-range': { + _attributes: { + start: `${new Date(timeRange.start) + .toISOString() + .slice(0, 19) + .replace(/[-:.]/g, '')}Z`, + end: `${new Date(timeRange.end) + .toISOString() + .slice(0, 19) + .replace(/[-:.]/g, '')}Z`, + }, + }, + } + : {}), + }, + }, + }, + ]; + const todoObjectUrls = (objectUrls !== null && objectUrls !== void 0 ? objectUrls : + // fetch all todo objects of the calendar + (await todoQuery({ + url: calendar.url, + props: { + [`${exports.DAVNamespaceShort.DAV}:getetag`]: { + ...(expand && timeRange ? buildExpandProp(timeRange) : {}), + }, + }, + filters, + depth: '1', + headers: excludeHeaders(headers, headersToExclude), + fetchOptions, + })).map((res) => { var _a; return (_a = res.href) !== null && _a !== void 0 ? _a : ''; })) + .map((url) => (url.startsWith('http') || !url ? url : new URL(url, calendar.url).href)) + .filter(urlFilter) + .map((url) => new URL(url).pathname); + let todoObjectResults = []; + if (todoObjectUrls.length > 0) { + if (!useMultiGet || expand) { + todoObjectResults = await todoQuery({ + url: calendar.url, + props: { + [`${exports.DAVNamespaceShort.DAV}:getetag`]: {}, + [`${exports.DAVNamespaceShort.CALDAV}:calendar-data`]: { + ...(expand && timeRange ? buildExpandProp(timeRange) : {}), + }, + }, + filters, + depth: '1', + headers: excludeHeaders(headers, headersToExclude), + fetchOptions, + }); + } + else { + todoObjectResults = await todoMultiGet({ + url: calendar.url, + props: { + [`${exports.DAVNamespaceShort.DAV}:getetag`]: {}, + [`${exports.DAVNamespaceShort.CALDAV}:calendar-data`]: { + ...(expand && timeRange ? buildExpandProp(timeRange) : {}), + }, + }, + objectUrls: todoObjectUrls, + depth: '1', + headers: excludeHeaders(headers, headersToExclude), + fetchOptions, + }); + } + } + return todoObjectResults.map((res) => { + var _a, _b, _c, _d, _e, _f; + return ({ + url: new URL((_a = res.href) !== null && _a !== void 0 ? _a : '', calendar.url).href, + etag: `${(_b = res.props) === null || _b === void 0 ? void 0 : _b.getetag}`, + data: (_e = (_d = (_c = res.props) === null || _c === void 0 ? void 0 : _c.calendarData) === null || _d === void 0 ? void 0 : _d._cdata) !== null && _e !== void 0 ? _e : (_f = res.props) === null || _f === void 0 ? void 0 : _f.calendarData, + }); + }); +}; +/** + * Create a new VTODO object in a CalDAV calendar + * + * @param params.calendar - Calendar to create the todo in + * @param params.iCalString - iCalendar data string (must contain UID) + * @param params.filename - Filename for the todo object + * @param params.headers - Request headers + * @param params.headersToExclude - Headers to exclude + * @param params.fetchOptions - Fetch options + * @returns Response from the server + * @throws Error if iCalString does not contain a UID + */ +const createTodo = async (params) => { + const { calendar, iCalString, filename, headers, headersToExclude, fetchOptions = {} } = params; + if (!iCalString.includes('UID:')) { + throw new Error('iCalString must contain a UID'); + } + return createObject({ + url: new URL(filename, calendar.url).href, + data: iCalString, + headers: excludeHeaders({ + 'content-type': 'text/calendar; charset=utf-8', + 'If-None-Match': '*', + ...headers, + }, headersToExclude), + fetchOptions, + }); +}; +/** + * Update an existing VTODO object in a CalDAV calendar + * + * @param params.calendarObject - Todo object to update (must have etag) + * @param params.headers - Request headers + * @param params.headersToExclude - Headers to exclude + * @param params.fetchOptions - Fetch options + * @returns Response from the server + * @throws Error if calendarObject does not have an etag + */ +const updateTodo = async (params) => { + const { calendarObject, headers, headersToExclude, fetchOptions = {} } = params; + if (!calendarObject.etag) { + throw new Error('calendarObject must have etag for update - fetch todo first'); + } + return updateObject({ + url: calendarObject.url, + data: calendarObject.data, + etag: calendarObject.etag, + headers: excludeHeaders({ + 'content-type': 'text/calendar; charset=utf-8', + ...headers, + }, headersToExclude), + fetchOptions, + }); +}; +/** + * Delete a VTODO object from a CalDAV calendar + * + * @param params.calendarObject - Todo object to delete + * @param params.headers - Request headers + * @param params.headersToExclude - Headers to exclude + * @param params.fetchOptions - Fetch options + * @returns Response from the server + */ +const deleteTodo = async (params) => { + const { calendarObject, headers, headersToExclude, fetchOptions = {} } = params; + return deleteObject({ + url: calendarObject.url, + etag: calendarObject.etag, + headers: excludeHeaders(headers, headersToExclude), + fetchOptions, + }); +}; + +var todo = /*#__PURE__*/Object.freeze({ + __proto__: null, + createTodo: createTodo, + deleteTodo: deleteTodo, + fetchTodos: fetchTodos, + todoMultiGet: todoMultiGet, + todoQuery: todoQuery, + updateTodo: updateTodo +}); + const debug = getLogger('tsdav:authHelper'); /** * Provide given params as default params to given function with optional params. @@ -1739,6 +2050,10 @@ const createDAVClient = async (params) => { headers: authHeaders, fetch: fetchOverride, }); + const makeAddressBook$1 = defaultParam(makeAddressBook, { + headers: authHeaders, + fetch: fetchOverride, + }); const fetchAddressBooks$1 = defaultParam(fetchAddressBooks, { account: defaultAccount, headers: authHeaders, @@ -1760,6 +2075,13 @@ const createDAVClient = async (params) => { headers: authHeaders, fetch: fetchOverride, }); + // todo + const todoQuery$1 = defaultParam(todoQuery, { headers: authHeaders }); + const todoMultiGet$1 = defaultParam(todoMultiGet, { headers: authHeaders }); + const fetchTodos$1 = defaultParam(fetchTodos, { headers: authHeaders }); + const createTodo$1 = defaultParam(createTodo, { headers: authHeaders }); + const updateTodo$1 = defaultParam(updateTodo, { headers: authHeaders }); + const deleteTodo$1 = defaultParam(deleteTodo, { headers: authHeaders }); return { davRequest: davRequest$1, propfind: propfind$1, @@ -1786,10 +2108,17 @@ const createDAVClient = async (params) => { syncCalendars: syncCalendars$1, fetchAddressBooks: fetchAddressBooks$1, addressBookMultiGet: addressBookMultiGet$1, + makeAddressBook: makeAddressBook$1, fetchVCards: fetchVCards$1, createVCard: createVCard$1, updateVCard: updateVCard$1, deleteVCard: deleteVCard$1, + todoQuery: todoQuery$1, + todoMultiGet: todoMultiGet$1, + fetchTodos: fetchTodos$1, + createTodo: createTodo$1, + updateTodo: updateTodo$1, + deleteTodo: deleteTodo$1, }; }; class DAVClient { @@ -2027,6 +2356,9 @@ class DAVClient { fetch: this.fetchOverride, })(params[0]); } + async makeAddressBook(...params) { + return defaultParam(makeAddressBook, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); + } async fetchAddressBooks(...params) { return defaultParam(fetchAddressBooks, { headers: this.authHeaders, @@ -2063,6 +2395,24 @@ class DAVClient { fetch: this.fetchOverride, })(params[0]); } + async todoQuery(...params) { + return defaultParam(todoQuery, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); + } + async todoMultiGet(...params) { + return defaultParam(todoMultiGet, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); + } + async fetchTodos(...params) { + return defaultParam(fetchTodos, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); + } + async createTodo(...params) { + return defaultParam(createTodo, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); + } + async updateTodo(...params) { + return defaultParam(updateTodo, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); + } + async deleteTodo(...params) { + return defaultParam(deleteTodo, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); + } } var client = /*#__PURE__*/Object.freeze({ @@ -2081,6 +2431,7 @@ var index = { ...account, ...addressBook, ...calendar, + ...todo, ...authHelpers, ...requestHelpers, }; @@ -2097,17 +2448,20 @@ exports.createAccount = createAccount; exports.createCalendarObject = createCalendarObject; exports.createDAVClient = createDAVClient; exports.createObject = createObject; +exports.createTodo = createTodo; exports.createVCard = createVCard; exports.davRequest = davRequest; exports.default = index; exports.deleteCalendarObject = deleteCalendarObject; exports.deleteObject = deleteObject; +exports.deleteTodo = deleteTodo; exports.deleteVCard = deleteVCard; exports.fetchAddressBooks = fetchAddressBooks; exports.fetchCalendarObjects = fetchCalendarObjects; exports.fetchCalendarUserAddresses = fetchCalendarUserAddresses; exports.fetchCalendars = fetchCalendars; exports.fetchOauthTokens = fetchOauthTokens; +exports.fetchTodos = fetchTodos; exports.fetchVCards = fetchVCards; exports.freeBusyQuery = freeBusyQuery; exports.getBasicAuthHeaders = getBasicAuthHeaders; @@ -2115,6 +2469,7 @@ exports.getBearerAuthHeaders = getBearerAuthHeaders; exports.getDAVAttribute = getDAVAttribute; exports.getOauthHeaders = getOauthHeaders; exports.isCollectionDirty = isCollectionDirty; +exports.makeAddressBook = makeAddressBook; exports.makeCalendar = makeCalendar; exports.propfind = propfind; exports.refreshAccessToken = refreshAccessToken; @@ -2122,8 +2477,11 @@ exports.smartCollectionSync = smartCollectionSync; exports.supportedReportSet = supportedReportSet; exports.syncCalendars = syncCalendars; exports.syncCollection = syncCollection; +exports.todoMultiGet = todoMultiGet; +exports.todoQuery = todoQuery; exports.updateCalendarObject = updateCalendarObject; exports.updateObject = updateObject; +exports.updateTodo = updateTodo; exports.updateVCard = updateVCard; exports.urlContains = urlContains; exports.urlEquals = urlEquals; diff --git a/dist/tsdav.cjs.js b/dist/tsdav.cjs.js index 26659554..3baa48a0 100644 --- a/dist/tsdav.cjs.js +++ b/dist/tsdav.cjs.js @@ -122,18 +122,30 @@ const excludeHeaders = (headers, headersToExclude) => { } return Object.fromEntries(Object.entries(headers).filter(([key]) => !headersToExclude.includes(key))); }; +const DEFAULT_ICAL_EXTENSION = '.ics'; +const defaultIcsFilter = (url) => Boolean(url === null || url === void 0 ? void 0 : url.includes(DEFAULT_ICAL_EXTENSION)); +const validateISO8601TimeRange = (start, end) => { + const ISO_8601 = /^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i; + const ISO_8601_FULL = /^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i; + if ((!ISO_8601.test(start) || !ISO_8601.test(end)) && + (!ISO_8601_FULL.test(start) || !ISO_8601_FULL.test(end))) { + throw new Error('invalid timeRange format, not in ISO8601'); + } +}; var requestHelpers = /*#__PURE__*/Object.freeze({ __proto__: null, cleanupFalsy: cleanupFalsy, conditionalParam: conditionalParam, + defaultIcsFilter: defaultIcsFilter, excludeHeaders: excludeHeaders, getDAVAttribute: getDAVAttribute, urlContains: urlContains, - urlEquals: urlEquals + urlEquals: urlEquals, + validateISO8601TimeRange: validateISO8601TimeRange }); -const debug$5 = getLogger('tsdav:request'); +const debug$6 = getLogger('tsdav:request'); const davRequest = async (params) => { var _a; const { url, init, convertIncoming = true, parseOutgoing = true, fetchOptions = {}, fetch: fetchOverride, } = params; @@ -225,7 +237,7 @@ const davRequest = async (params) => { } } catch (e) { - debug$5(e.stack); + debug$6(e.stack); } }, // remove namespace & camelCase @@ -344,7 +356,7 @@ function hasFields(obj, fields) { const findMissingFieldNames = (obj, fields) => fields.reduce((prev, curr) => (obj[curr] ? prev : `${prev.length ? `${prev},` : ''}${curr.toString()}`), ''); /* eslint-disable no-underscore-dangle */ -const debug$4 = getLogger('tsdav:collection'); +const debug$5 = getLogger('tsdav:collection'); const collectionQuery = async (params) => { const { url, body, depth, defaultNamespace = exports.DAVNamespaceShort.DAV, headers, headersToExclude, fetchOptions = {}, fetch: fetchOverride, } = params; const queryResults = await davRequest({ @@ -470,7 +482,7 @@ const smartCollectionSync = async (params) => { throw new Error(`account must have ${findMissingFieldNames(account, requiredFields)} before smartCollectionSync`); } const syncMethod = method !== null && method !== void 0 ? method : (((_a = collection.reports) === null || _a === void 0 ? void 0 : _a.includes('syncCollection')) ? 'webdav' : 'basic'); - debug$4(`smart collection sync with type ${account.accountType} and method ${syncMethod}`); + debug$5(`smart collection sync with type ${account.accountType} and method ${syncMethod}`); if (syncMethod === 'webdav') { const result = await syncCollection({ url: collection.url, @@ -609,7 +621,7 @@ var collection = /*#__PURE__*/Object.freeze({ }); /* eslint-disable no-underscore-dangle */ -const debug$3 = getLogger('tsdav:addressBook'); +const debug$4 = getLogger('tsdav:addressBook'); const addressBookQuery = async (params) => { const { url, props, filters, depth, headers, headersToExclude, fetchOptions = {}, fetch: fetchOverride, } = params; return collectionQuery({ @@ -679,7 +691,7 @@ const fetchAddressBooks = async (params) => { .map((rs) => { var _a, _b, _c, _d, _e, _f, _g, _h, _j; const displayName = (_c = (_b = (_a = rs.props) === null || _a === void 0 ? void 0 : _a.displayname) === null || _b === void 0 ? void 0 : _b._cdata) !== null && _c !== void 0 ? _c : (_d = rs.props) === null || _d === void 0 ? void 0 : _d.displayname; - debug$3(`Found address book named ${typeof displayName === 'string' ? displayName : ''}, + debug$4(`Found address book named ${typeof displayName === 'string' ? displayName : ''}, props: ${JSON.stringify(rs.props)}`); return { url: new URL((_e = rs.href) !== null && _e !== void 0 ? _e : '', (_f = account.rootUrl) !== null && _f !== void 0 ? _f : '').href, @@ -701,7 +713,7 @@ const fetchAddressBooks = async (params) => { }; const fetchVCards = async (params) => { const { addressBook, headers, objectUrls, headersToExclude, urlFilter = (url) => url, useMultiGet = true, fetchOptions = {}, fetch: fetchOverride, } = params; - debug$3(`Fetching vcards from ${addressBook === null || addressBook === void 0 ? void 0 : addressBook.url}`); + debug$4(`Fetching vcards from ${addressBook === null || addressBook === void 0 ? void 0 : addressBook.url}`); const requiredFields = ['url']; if (!addressBook || !hasFields(addressBook, requiredFields)) { if (!addressBook) { @@ -800,6 +812,31 @@ const deleteVCard = async (params) => { fetch: fetchOverride, }); }; +const makeAddressBook = async (params) => { + const { url, props, depth, headers, headersToExclude, fetchOptions = {} } = params; + return davRequest({ + url, + init: { + method: 'MKCOL', + headers: excludeHeaders(cleanupFalsy({ depth, ...headers }), headersToExclude), + namespace: exports.DAVNamespaceShort.DAV, + body: props + ? { + mkcol: { + _attributes: getDAVAttribute([ + exports.DAVNamespace.DAV, + exports.DAVNamespace.CARDDAV, + ]), + set: { + prop: props, + }, + }, + } + : undefined, + }, + fetchOptions, + }); +}; var addressBook = /*#__PURE__*/Object.freeze({ __proto__: null, @@ -809,11 +846,12 @@ var addressBook = /*#__PURE__*/Object.freeze({ deleteVCard: deleteVCard, fetchAddressBooks: fetchAddressBooks, fetchVCards: fetchVCards, + makeAddressBook: makeAddressBook, updateVCard: updateVCard }); /* eslint-disable no-underscore-dangle */ -const debug$2 = getLogger('tsdav:calendar'); +const debug$3 = getLogger('tsdav:calendar'); const fetchCalendarUserAddresses = async (params) => { var _a, _b, _c; const { account, headers, headersToExclude, fetchOptions = {}, fetch: fetchOverride } = params; @@ -821,7 +859,7 @@ const fetchCalendarUserAddresses = async (params) => { if (!hasFields(account, requiredFields)) { throw new Error(`account must have ${findMissingFieldNames(account, requiredFields)} before fetchUserAddresses`); } - debug$2(`Fetch user addresses from ${account.principalUrl}`); + debug$3(`Fetch user addresses from ${account.principalUrl}`); const responses = await propfind({ url: account.principalUrl, props: { [`${exports.DAVNamespaceShort.CALDAV}:calendar-user-address-set`]: {} }, @@ -835,7 +873,7 @@ const fetchCalendarUserAddresses = async (params) => { throw new Error('cannot find calendarUserAddresses'); } const addresses = ((_c = (_b = (_a = matched === null || matched === void 0 ? void 0 : matched.props) === null || _a === void 0 ? void 0 : _a.calendarUserAddressSet) === null || _b === void 0 ? void 0 : _b.href) === null || _c === void 0 ? void 0 : _c.filter(Boolean)) || []; - debug$2(`Fetched calendar user addresses ${addresses}`); + debug$3(`Fetched calendar user addresses ${addresses}`); return addresses; }; const calendarQuery = async (params) => { @@ -974,17 +1012,11 @@ const fetchCalendars = async (params) => { }))); }; const fetchCalendarObjects = async (params) => { - const { calendar, objectUrls, filters: customFilters, timeRange, headers, expand, urlFilter = (url) => Boolean(url === null || url === void 0 ? void 0 : url.includes('.ics')), useMultiGet = true, headersToExclude, fetchOptions = {}, fetch: fetchOverride, } = params; + const { calendar, objectUrls, filters: customFilters, timeRange, headers, expand, urlFilter = defaultIcsFilter, useMultiGet = true, headersToExclude, fetchOptions = {}, fetch: fetchOverride, } = params; if (timeRange) { - // validate timeRange - const ISO_8601 = /^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i; - const ISO_8601_FULL = /^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i; - if ((!ISO_8601.test(timeRange.start) || !ISO_8601.test(timeRange.end)) && - (!ISO_8601_FULL.test(timeRange.start) || !ISO_8601_FULL.test(timeRange.end))) { - throw new Error('invalid timeRange format, not in ISO8601'); - } + validateISO8601TimeRange(timeRange.start, timeRange.end); } - debug$2(`Fetching calendar objects from ${calendar === null || calendar === void 0 ? void 0 : calendar.url}`); + debug$3(`Fetching calendar objects from ${calendar === null || calendar === void 0 ? void 0 : calendar.url}`); const requiredFields = ['url']; if (!calendar || !hasFields(calendar, requiredFields)) { if (!calendar) { @@ -1197,7 +1229,7 @@ const syncCalendars = async (params) => { }); // no existing url const created = remoteCalendars.filter((rc) => localCalendars.every((lc) => !urlContains(lc.url, rc.url))); - debug$2(`new calendars: ${created.map((cc) => cc.displayName)}`); + debug$3(`new calendars: ${created.map((cc) => cc.displayName)}`); // have same url, but syncToken/ctag different const updated = localCalendars.reduce((prev, curr) => { const found = remoteCalendars.find((rc) => urlContains(rc.url, curr.url)); @@ -1208,7 +1240,7 @@ const syncCalendars = async (params) => { } return prev; }, []); - debug$2(`updated calendars: ${updated.map((cc) => cc.displayName)}`); + debug$3(`updated calendars: ${updated.map((cc) => cc.displayName)}`); const updatedWithObjects = await Promise.all(updated.map(async (u) => { const result = await smartCollectionSync({ collection: { ...u, objectMultiGet: calendarMultiGet }, @@ -1222,7 +1254,7 @@ const syncCalendars = async (params) => { })); // does not present in remote const deleted = localCalendars.filter((cal) => remoteCalendars.every((rc) => !urlContains(rc.url, cal.url))); - debug$2(`deleted calendars: ${deleted.map((cc) => cc.displayName)}`); + debug$3(`deleted calendars: ${deleted.map((cc) => cc.displayName)}`); const unchanged = localCalendars.filter((cal) => remoteCalendars.some((rc) => urlContains(rc.url, cal.url) && ((rc.syncToken && `${rc.syncToken}` !== `${cal.syncToken}`) || (rc.ctag && `${rc.ctag}` !== `${cal.ctag}`)))); @@ -1238,13 +1270,7 @@ const syncCalendars = async (params) => { const freeBusyQuery = async (params) => { const { url, timeRange, depth, headers, headersToExclude, fetchOptions = {}, fetch: fetchOverride, } = params; if (timeRange) { - // validate timeRange - const ISO_8601 = /^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i; - const ISO_8601_FULL = /^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i; - if ((!ISO_8601.test(timeRange.start) || !ISO_8601.test(timeRange.end)) && - (!ISO_8601_FULL.test(timeRange.start) || !ISO_8601_FULL.test(timeRange.end))) { - throw new Error('invalid timeRange format, not in ISO8601'); - } + validateISO8601TimeRange(timeRange.start, timeRange.end); } else { throw new Error('timeRange is required'); @@ -1286,10 +1312,10 @@ var calendar = /*#__PURE__*/Object.freeze({ updateCalendarObject: updateCalendarObject }); -const debug$1 = getLogger('tsdav:account'); +const debug$2 = getLogger('tsdav:account'); const serviceDiscovery = async (params) => { var _a, _b; - debug$1('Service discovery...'); + debug$2('Service discovery...'); const { account, headers, headersToExclude, fetchOptions = {}, fetch: fetchOverride } = params; const requestFetch = fetchOverride !== null && fetchOverride !== void 0 ? fetchOverride : fetch; const endpoint = new URL(account.serverUrl); @@ -1315,7 +1341,7 @@ const serviceDiscovery = async (params) => { // http redirect. const location = response.headers.get('Location'); if (typeof location === 'string' && location.length) { - debug$1(`Service discovery redirected to ${location}`); + debug$2(`Service discovery redirected to ${location}`); const serviceURL = new URL(location, endpoint); if (serviceURL.hostname === uri.hostname && uri.port && !serviceURL.port) { serviceURL.port = uri.port; @@ -1326,7 +1352,7 @@ const serviceDiscovery = async (params) => { } } catch (err) { - debug$1(`Service discovery failed: ${err.stack}`); + debug$2(`Service discovery failed: ${err.stack}`); } return endpoint.href; }; @@ -1337,7 +1363,7 @@ const fetchPrincipalUrl = async (params) => { if (!hasFields(account, requiredFields)) { throw new Error(`account must have ${findMissingFieldNames(account, requiredFields)} before fetchPrincipalUrl`); } - debug$1(`Fetching principal url from path ${account.rootUrl}`); + debug$2(`Fetching principal url from path ${account.rootUrl}`); const [response] = await propfind({ url: account.rootUrl, props: { @@ -1349,12 +1375,12 @@ const fetchPrincipalUrl = async (params) => { fetch: fetchOverride, }); if (!response.ok) { - debug$1(`Fetch principal url failed: ${response.statusText}`); + debug$2(`Fetch principal url failed: ${response.statusText}`); if (response.status === 401) { throw new Error('Invalid credentials'); } } - debug$1(`Fetched principal url ${(_b = (_a = response.props) === null || _a === void 0 ? void 0 : _a.currentUserPrincipal) === null || _b === void 0 ? void 0 : _b.href}`); + debug$2(`Fetched principal url ${(_b = (_a = response.props) === null || _a === void 0 ? void 0 : _a.currentUserPrincipal) === null || _b === void 0 ? void 0 : _b.href}`); return new URL((_e = (_d = (_c = response.props) === null || _c === void 0 ? void 0 : _c.currentUserPrincipal) === null || _d === void 0 ? void 0 : _d.href) !== null && _e !== void 0 ? _e : '', account.rootUrl).href; }; const fetchHomeUrl = async (params) => { @@ -1364,7 +1390,7 @@ const fetchHomeUrl = async (params) => { if (!hasFields(account, requiredFields)) { throw new Error(`account must have ${findMissingFieldNames(account, requiredFields)} before fetchHomeUrl`); } - debug$1(`Fetch home url from ${account.principalUrl}`); + debug$2(`Fetch home url from ${account.principalUrl}`); const responses = await propfind({ url: account.principalUrl, props: account.accountType === 'caldav' @@ -1377,13 +1403,13 @@ const fetchHomeUrl = async (params) => { }); const matched = responses.find((r) => urlContains(account.principalUrl, r.href)); if (!matched || !matched.ok) { - debug$1(`Fetch home url failed with status ${matched === null || matched === void 0 ? void 0 : matched.statusText} and error ${JSON.stringify(responses.map((r) => r.error))}`); + debug$2(`Fetch home url failed with status ${matched === null || matched === void 0 ? void 0 : matched.statusText} and error ${JSON.stringify(responses.map((r) => r.error))}`); throw new Error('cannot find homeUrl'); } const result = new URL(account.accountType === 'caldav' ? (_a = matched === null || matched === void 0 ? void 0 : matched.props) === null || _a === void 0 ? void 0 : _a.calendarHomeSet.href : (_b = matched === null || matched === void 0 ? void 0 : matched.props) === null || _b === void 0 ? void 0 : _b.addressbookHomeSet.href, account.rootUrl).href; - debug$1(`Fetched home url ${result}`); + debug$2(`Fetched home url ${result}`); return result; }; const createAccount = async (params) => { @@ -1461,6 +1487,291 @@ var account = /*#__PURE__*/Object.freeze({ serviceDiscovery: serviceDiscovery }); +/* eslint-disable no-underscore-dangle */ +const debug$1 = getLogger('tsdav:todo'); +/** + * Helper function to build expand property for calendar-data + */ +const buildExpandProp = (timeRange) => ({ + [`${exports.DAVNamespaceShort.CALDAV}:expand`]: { + _attributes: { + start: `${new Date(timeRange.start).toISOString().slice(0, 19).replace(/[-:.]/g, '')}Z`, + end: `${new Date(timeRange.end).toISOString().slice(0, 19).replace(/[-:.]/g, '')}Z`, + }, + }, +}); +/** + * Query todos using CalDAV REPORT calendar-query + * + * @param params.url - Calendar URL to query + * @param params.props - Properties to request + * @param params.filters - Optional CalDAV filters + * @param params.timezone - Optional timezone + * @param params.depth - Depth header value + * @param params.headers - Request headers + * @param params.headersToExclude - Headers to exclude + * @param params.fetchOptions - Fetch options + * @returns Array of DAV responses + */ +const todoQuery = async (params) => { + const { url, props, filters, timezone, depth, headers, headersToExclude, fetchOptions = {}, } = params; + return collectionQuery({ + url, + body: { + 'calendar-query': cleanupFalsy({ + _attributes: getDAVAttribute([ + exports.DAVNamespace.CALDAV, + exports.DAVNamespace.CALENDAR_SERVER, + exports.DAVNamespace.CALDAV_APPLE, + exports.DAVNamespace.DAV, + ]), + [`${exports.DAVNamespaceShort.DAV}:prop`]: props, + filter: filters, + timezone, + }), + }, + defaultNamespace: exports.DAVNamespaceShort.CALDAV, + depth, + headers: excludeHeaders(headers, headersToExclude), + fetchOptions, + }); +}; +/** + * Fetch multiple todos by URL using CalDAV calendar-multiget + * + * @param params.url - Calendar URL + * @param params.props - Properties to request + * @param params.objectUrls - Array of todo object URLs to fetch + * @param params.timezone - Optional timezone + * @param params.depth - Depth header value + * @param params.filters - Optional CalDAV filters + * @param params.headers - Request headers + * @param params.headersToExclude - Headers to exclude + * @param params.fetchOptions - Fetch options + * @returns Array of DAV responses + */ +const todoMultiGet = async (params) => { + const { url, props, objectUrls, filters, timezone, depth, headers, headersToExclude, fetchOptions = {}, } = params; + return collectionQuery({ + url, + body: { + 'calendar-multiget': cleanupFalsy({ + _attributes: getDAVAttribute([exports.DAVNamespace.DAV, exports.DAVNamespace.CALDAV]), + [`${exports.DAVNamespaceShort.DAV}:prop`]: props, + [`${exports.DAVNamespaceShort.DAV}:href`]: objectUrls, + filter: filters, + timezone, + }), + }, + defaultNamespace: exports.DAVNamespaceShort.CALDAV, + depth, + headers: excludeHeaders(headers, headersToExclude), + fetchOptions, + }); +}; +/** + * Fetch VTODO objects from a CalDAV calendar with optional filtering + * + * @param params.calendar - Calendar to fetch todos from + * @param params.objectUrls - Optional array of specific todo URLs to fetch + * @param params.filters - Optional custom CalDAV filters + * @param params.timeRange - Optional time range filter in ISO8601 format + * @param params.expand - Whether to expand recurring todos + * @param params.urlFilter - Custom filter function for todo object URLs + * @param params.headers - Request headers + * @param params.headersToExclude - Headers to exclude + * @param params.useMultiGet - Whether to use multiget (default: true) + * @param params.fetchOptions - Fetch options + * @returns Array of todo objects with url, etag, and iCalendar data + * @throws Error if calendar URL is missing or timeRange format is invalid + */ +const fetchTodos = async (params) => { + const { calendar, objectUrls, filters: customFilters, timeRange, headers, expand, urlFilter = defaultIcsFilter, useMultiGet = true, headersToExclude, fetchOptions = {}, } = params; + if (timeRange) { + validateISO8601TimeRange(timeRange.start, timeRange.end); + } + debug$1(`Fetching todo objects from ${calendar === null || calendar === void 0 ? void 0 : calendar.url}`); + const requiredFields = ['url']; + if (!calendar || !hasFields(calendar, requiredFields)) { + if (!calendar) { + throw new Error('cannot fetchTodos for undefined calendar'); + } + throw new Error(`calendar must have ${findMissingFieldNames(calendar, requiredFields)} before fetchTodos`); + } + // Build CalDAV filter for VTODO components + // Structure: VCALENDAR -> VTODO -> optional time-range + const filters = customFilters !== null && customFilters !== void 0 ? customFilters : [ + { + 'comp-filter': { + _attributes: { + name: 'VCALENDAR', + }, + 'comp-filter': { + _attributes: { + name: 'VTODO', + }, + ...(timeRange + ? { + 'time-range': { + _attributes: { + start: `${new Date(timeRange.start) + .toISOString() + .slice(0, 19) + .replace(/[-:.]/g, '')}Z`, + end: `${new Date(timeRange.end) + .toISOString() + .slice(0, 19) + .replace(/[-:.]/g, '')}Z`, + }, + }, + } + : {}), + }, + }, + }, + ]; + const todoObjectUrls = (objectUrls !== null && objectUrls !== void 0 ? objectUrls : + // fetch all todo objects of the calendar + (await todoQuery({ + url: calendar.url, + props: { + [`${exports.DAVNamespaceShort.DAV}:getetag`]: { + ...(expand && timeRange ? buildExpandProp(timeRange) : {}), + }, + }, + filters, + depth: '1', + headers: excludeHeaders(headers, headersToExclude), + fetchOptions, + })).map((res) => { var _a; return (_a = res.href) !== null && _a !== void 0 ? _a : ''; })) + .map((url) => (url.startsWith('http') || !url ? url : new URL(url, calendar.url).href)) + .filter(urlFilter) + .map((url) => new URL(url).pathname); + let todoObjectResults = []; + if (todoObjectUrls.length > 0) { + if (!useMultiGet || expand) { + todoObjectResults = await todoQuery({ + url: calendar.url, + props: { + [`${exports.DAVNamespaceShort.DAV}:getetag`]: {}, + [`${exports.DAVNamespaceShort.CALDAV}:calendar-data`]: { + ...(expand && timeRange ? buildExpandProp(timeRange) : {}), + }, + }, + filters, + depth: '1', + headers: excludeHeaders(headers, headersToExclude), + fetchOptions, + }); + } + else { + todoObjectResults = await todoMultiGet({ + url: calendar.url, + props: { + [`${exports.DAVNamespaceShort.DAV}:getetag`]: {}, + [`${exports.DAVNamespaceShort.CALDAV}:calendar-data`]: { + ...(expand && timeRange ? buildExpandProp(timeRange) : {}), + }, + }, + objectUrls: todoObjectUrls, + depth: '1', + headers: excludeHeaders(headers, headersToExclude), + fetchOptions, + }); + } + } + return todoObjectResults.map((res) => { + var _a, _b, _c, _d, _e, _f; + return ({ + url: new URL((_a = res.href) !== null && _a !== void 0 ? _a : '', calendar.url).href, + etag: `${(_b = res.props) === null || _b === void 0 ? void 0 : _b.getetag}`, + data: (_e = (_d = (_c = res.props) === null || _c === void 0 ? void 0 : _c.calendarData) === null || _d === void 0 ? void 0 : _d._cdata) !== null && _e !== void 0 ? _e : (_f = res.props) === null || _f === void 0 ? void 0 : _f.calendarData, + }); + }); +}; +/** + * Create a new VTODO object in a CalDAV calendar + * + * @param params.calendar - Calendar to create the todo in + * @param params.iCalString - iCalendar data string (must contain UID) + * @param params.filename - Filename for the todo object + * @param params.headers - Request headers + * @param params.headersToExclude - Headers to exclude + * @param params.fetchOptions - Fetch options + * @returns Response from the server + * @throws Error if iCalString does not contain a UID + */ +const createTodo = async (params) => { + const { calendar, iCalString, filename, headers, headersToExclude, fetchOptions = {} } = params; + if (!iCalString.includes('UID:')) { + throw new Error('iCalString must contain a UID'); + } + return createObject({ + url: new URL(filename, calendar.url).href, + data: iCalString, + headers: excludeHeaders({ + 'content-type': 'text/calendar; charset=utf-8', + 'If-None-Match': '*', + ...headers, + }, headersToExclude), + fetchOptions, + }); +}; +/** + * Update an existing VTODO object in a CalDAV calendar + * + * @param params.calendarObject - Todo object to update (must have etag) + * @param params.headers - Request headers + * @param params.headersToExclude - Headers to exclude + * @param params.fetchOptions - Fetch options + * @returns Response from the server + * @throws Error if calendarObject does not have an etag + */ +const updateTodo = async (params) => { + const { calendarObject, headers, headersToExclude, fetchOptions = {} } = params; + if (!calendarObject.etag) { + throw new Error('calendarObject must have etag for update - fetch todo first'); + } + return updateObject({ + url: calendarObject.url, + data: calendarObject.data, + etag: calendarObject.etag, + headers: excludeHeaders({ + 'content-type': 'text/calendar; charset=utf-8', + ...headers, + }, headersToExclude), + fetchOptions, + }); +}; +/** + * Delete a VTODO object from a CalDAV calendar + * + * @param params.calendarObject - Todo object to delete + * @param params.headers - Request headers + * @param params.headersToExclude - Headers to exclude + * @param params.fetchOptions - Fetch options + * @returns Response from the server + */ +const deleteTodo = async (params) => { + const { calendarObject, headers, headersToExclude, fetchOptions = {} } = params; + return deleteObject({ + url: calendarObject.url, + etag: calendarObject.etag, + headers: excludeHeaders(headers, headersToExclude), + fetchOptions, + }); +}; + +var todo = /*#__PURE__*/Object.freeze({ + __proto__: null, + createTodo: createTodo, + deleteTodo: deleteTodo, + fetchTodos: fetchTodos, + todoMultiGet: todoMultiGet, + todoQuery: todoQuery, + updateTodo: updateTodo +}); + const debug = getLogger('tsdav:authHelper'); /** * Provide given params as default params to given function with optional params. @@ -1739,6 +2050,10 @@ const createDAVClient = async (params) => { headers: authHeaders, fetch: fetchOverride, }); + const makeAddressBook$1 = defaultParam(makeAddressBook, { + headers: authHeaders, + fetch: fetchOverride, + }); const fetchAddressBooks$1 = defaultParam(fetchAddressBooks, { account: defaultAccount, headers: authHeaders, @@ -1760,6 +2075,13 @@ const createDAVClient = async (params) => { headers: authHeaders, fetch: fetchOverride, }); + // todo + const todoQuery$1 = defaultParam(todoQuery, { headers: authHeaders }); + const todoMultiGet$1 = defaultParam(todoMultiGet, { headers: authHeaders }); + const fetchTodos$1 = defaultParam(fetchTodos, { headers: authHeaders }); + const createTodo$1 = defaultParam(createTodo, { headers: authHeaders }); + const updateTodo$1 = defaultParam(updateTodo, { headers: authHeaders }); + const deleteTodo$1 = defaultParam(deleteTodo, { headers: authHeaders }); return { davRequest: davRequest$1, propfind: propfind$1, @@ -1786,10 +2108,17 @@ const createDAVClient = async (params) => { syncCalendars: syncCalendars$1, fetchAddressBooks: fetchAddressBooks$1, addressBookMultiGet: addressBookMultiGet$1, + makeAddressBook: makeAddressBook$1, fetchVCards: fetchVCards$1, createVCard: createVCard$1, updateVCard: updateVCard$1, deleteVCard: deleteVCard$1, + todoQuery: todoQuery$1, + todoMultiGet: todoMultiGet$1, + fetchTodos: fetchTodos$1, + createTodo: createTodo$1, + updateTodo: updateTodo$1, + deleteTodo: deleteTodo$1, }; }; class DAVClient { @@ -2027,6 +2356,9 @@ class DAVClient { fetch: this.fetchOverride, })(params[0]); } + async makeAddressBook(...params) { + return defaultParam(makeAddressBook, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); + } async fetchAddressBooks(...params) { return defaultParam(fetchAddressBooks, { headers: this.authHeaders, @@ -2063,6 +2395,24 @@ class DAVClient { fetch: this.fetchOverride, })(params[0]); } + async todoQuery(...params) { + return defaultParam(todoQuery, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); + } + async todoMultiGet(...params) { + return defaultParam(todoMultiGet, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); + } + async fetchTodos(...params) { + return defaultParam(fetchTodos, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); + } + async createTodo(...params) { + return defaultParam(createTodo, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); + } + async updateTodo(...params) { + return defaultParam(updateTodo, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); + } + async deleteTodo(...params) { + return defaultParam(deleteTodo, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); + } } var client = /*#__PURE__*/Object.freeze({ @@ -2081,6 +2431,7 @@ var index = { ...account, ...addressBook, ...calendar, + ...todo, ...authHelpers, ...requestHelpers, }; @@ -2097,17 +2448,20 @@ exports.createAccount = createAccount; exports.createCalendarObject = createCalendarObject; exports.createDAVClient = createDAVClient; exports.createObject = createObject; +exports.createTodo = createTodo; exports.createVCard = createVCard; exports.davRequest = davRequest; exports.default = index; exports.deleteCalendarObject = deleteCalendarObject; exports.deleteObject = deleteObject; +exports.deleteTodo = deleteTodo; exports.deleteVCard = deleteVCard; exports.fetchAddressBooks = fetchAddressBooks; exports.fetchCalendarObjects = fetchCalendarObjects; exports.fetchCalendarUserAddresses = fetchCalendarUserAddresses; exports.fetchCalendars = fetchCalendars; exports.fetchOauthTokens = fetchOauthTokens; +exports.fetchTodos = fetchTodos; exports.fetchVCards = fetchVCards; exports.freeBusyQuery = freeBusyQuery; exports.getBasicAuthHeaders = getBasicAuthHeaders; @@ -2115,6 +2469,7 @@ exports.getBearerAuthHeaders = getBearerAuthHeaders; exports.getDAVAttribute = getDAVAttribute; exports.getOauthHeaders = getOauthHeaders; exports.isCollectionDirty = isCollectionDirty; +exports.makeAddressBook = makeAddressBook; exports.makeCalendar = makeCalendar; exports.propfind = propfind; exports.refreshAccessToken = refreshAccessToken; @@ -2122,8 +2477,11 @@ exports.smartCollectionSync = smartCollectionSync; exports.supportedReportSet = supportedReportSet; exports.syncCalendars = syncCalendars; exports.syncCollection = syncCollection; +exports.todoMultiGet = todoMultiGet; +exports.todoQuery = todoQuery; exports.updateCalendarObject = updateCalendarObject; exports.updateObject = updateObject; +exports.updateTodo = updateTodo; exports.updateVCard = updateVCard; exports.urlContains = urlContains; exports.urlEquals = urlEquals; diff --git a/dist/tsdav.d.ts b/dist/tsdav.d.ts index 1b2dea3c..e9b033a0 100644 --- a/dist/tsdav.d.ts +++ b/dist/tsdav.d.ts @@ -247,6 +247,14 @@ declare const deleteVCard: (params: { fetchOptions?: RequestInit; fetch?: typeof fetch; }) => Promise; +declare const makeAddressBook: (params: { + url: string; + props: ElementCompact; + depth?: DAVDepth; + headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; +}) => Promise; declare const fetchCalendarUserAddresses: (params: { account: DAVAccount; @@ -447,6 +455,137 @@ declare const deleteObject: (params: { fetch?: typeof fetch$1; }) => Promise; +/** + * Query todos using CalDAV REPORT calendar-query + * + * @param params.url - Calendar URL to query + * @param params.props - Properties to request + * @param params.filters - Optional CalDAV filters + * @param params.timezone - Optional timezone + * @param params.depth - Depth header value + * @param params.headers - Request headers + * @param params.headersToExclude - Headers to exclude + * @param params.fetchOptions - Fetch options + * @returns Array of DAV responses + */ +declare const todoQuery: (params: { + url: string; + props: ElementCompact; + filters?: ElementCompact; + timezone?: string; + depth?: DAVDepth; + headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; +}) => Promise; +/** + * Fetch multiple todos by URL using CalDAV calendar-multiget + * + * @param params.url - Calendar URL + * @param params.props - Properties to request + * @param params.objectUrls - Array of todo object URLs to fetch + * @param params.timezone - Optional timezone + * @param params.depth - Depth header value + * @param params.filters - Optional CalDAV filters + * @param params.headers - Request headers + * @param params.headersToExclude - Headers to exclude + * @param params.fetchOptions - Fetch options + * @returns Array of DAV responses + */ +declare const todoMultiGet: (params: { + url: string; + props: ElementCompact; + objectUrls?: string[]; + timezone?: string; + depth: DAVDepth; + filters?: ElementCompact; + headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; +}) => Promise; +/** + * Fetch VTODO objects from a CalDAV calendar with optional filtering + * + * @param params.calendar - Calendar to fetch todos from + * @param params.objectUrls - Optional array of specific todo URLs to fetch + * @param params.filters - Optional custom CalDAV filters + * @param params.timeRange - Optional time range filter in ISO8601 format + * @param params.expand - Whether to expand recurring todos + * @param params.urlFilter - Custom filter function for todo object URLs + * @param params.headers - Request headers + * @param params.headersToExclude - Headers to exclude + * @param params.useMultiGet - Whether to use multiget (default: true) + * @param params.fetchOptions - Fetch options + * @returns Array of todo objects with url, etag, and iCalendar data + * @throws Error if calendar URL is missing or timeRange format is invalid + */ +declare const fetchTodos: (params: { + calendar: DAVCalendar; + objectUrls?: string[]; + filters?: ElementCompact; + timeRange?: { + start: string; + end: string; + }; + expand?: boolean; + urlFilter?: (url: string) => boolean; + headers?: Record; + headersToExclude?: string[]; + useMultiGet?: boolean; + fetchOptions?: RequestInit; +}) => Promise; +/** + * Create a new VTODO object in a CalDAV calendar + * + * @param params.calendar - Calendar to create the todo in + * @param params.iCalString - iCalendar data string (must contain UID) + * @param params.filename - Filename for the todo object + * @param params.headers - Request headers + * @param params.headersToExclude - Headers to exclude + * @param params.fetchOptions - Fetch options + * @returns Response from the server + * @throws Error if iCalString does not contain a UID + */ +declare const createTodo: (params: { + calendar: DAVCalendar; + iCalString: string; + filename: string; + headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; +}) => Promise; +/** + * Update an existing VTODO object in a CalDAV calendar + * + * @param params.calendarObject - Todo object to update (must have etag) + * @param params.headers - Request headers + * @param params.headersToExclude - Headers to exclude + * @param params.fetchOptions - Fetch options + * @returns Response from the server + * @throws Error if calendarObject does not have an etag + */ +declare const updateTodo: (params: { + calendarObject: DAVCalendarObject; + headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; +}) => Promise; +/** + * Delete a VTODO object from a CalDAV calendar + * + * @param params.calendarObject - Todo object to delete + * @param params.headers - Request headers + * @param params.headersToExclude - Headers to exclude + * @param params.fetchOptions - Fetch options + * @returns Response from the server + */ +declare const deleteTodo: (params: { + calendarObject: DAVCalendarObject; + headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; +}) => Promise; + declare const createDAVClient: (params: { serverUrl: string; credentials: DAVCredentials; @@ -666,6 +805,14 @@ declare const createDAVClient: (params: { fetchOptions?: RequestInit; fetch?: typeof fetch; }) => Promise; + makeAddressBook: (params: { + url: string; + props: xml_js_types.ElementCompact; + depth?: DAVDepth; + headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; + }) => Promise; fetchVCards: (params: { addressBook: DAVAddressBook; headers?: Record; @@ -699,6 +846,62 @@ declare const createDAVClient: (params: { fetchOptions?: RequestInit; fetch?: typeof fetch; }) => Promise; + todoQuery: (params: { + url: string; + props: xml_js_types.ElementCompact; + filters?: xml_js_types.ElementCompact; + timezone?: string; + depth?: DAVDepth; + headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; + }) => Promise; + todoMultiGet: (params: { + url: string; + props: xml_js_types.ElementCompact; + objectUrls?: string[]; + timezone?: string; + depth: DAVDepth; + filters?: xml_js_types.ElementCompact; + headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; + }) => Promise; + fetchTodos: (params: { + calendar: DAVCalendar; + objectUrls?: string[]; + filters?: xml_js_types.ElementCompact; + timeRange?: { + start: string; + end: string; + }; + expand?: boolean; + urlFilter?: (url: string) => boolean; + headers?: Record; + headersToExclude?: string[]; + useMultiGet?: boolean; + fetchOptions?: RequestInit; + }) => Promise; + createTodo: (params: { + calendar: DAVCalendar; + iCalString: string; + filename: string; + headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; + }) => Promise; + updateTodo: (params: { + calendarObject: DAVCalendarObject; + headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; + }) => Promise; + deleteTodo: (params: { + calendarObject: DAVCalendarObject; + headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; + }) => Promise; }>; declare class DAVClient { serverUrl: string; @@ -784,11 +987,18 @@ declare class DAVClient { syncCalendars(...params: Parameters): Promise>; addressBookQuery(...params: Parameters): Promise; addressBookMultiGet(...params: Parameters): Promise; + makeAddressBook(...params: Parameters): Promise; fetchAddressBooks(...params: Parameters): Promise; fetchVCards(...params: Parameters): Promise; createVCard(...params: Parameters): Promise; updateVCard(...params: Parameters): Promise; deleteVCard(...params: Parameters): Promise; + todoQuery(...params: Parameters): Promise; + todoMultiGet(...params: Parameters): Promise; + fetchTodos(...params: Parameters): Promise; + createTodo(...params: Parameters): Promise; + updateTodo(...params: Parameters): Promise; + deleteTodo(...params: Parameters): Promise; } declare const createAccount: (params: { @@ -837,6 +1047,8 @@ declare const _default: { [key: string]: T; }; excludeHeaders: (headers: Record | undefined, headersToExclude: string[] | undefined) => Record; + defaultIcsFilter: (url: string) => boolean; + validateISO8601TimeRange: (start: string, end: string) => void; defaultParam: any>(fn: F, params: Partial[0]>) => (...args: Parameters) => ReturnType; getBasicAuthHeaders: (credentials: DAVCredentials) => { authorization?: string; @@ -855,6 +1067,62 @@ declare const _default: { authorization?: string; }; }>; + todoQuery: (params: { + url: string; + props: xml_js_types.ElementCompact; + filters?: xml_js_types.ElementCompact; + timezone?: string; + depth?: DAVDepth; + headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; + }) => Promise; + todoMultiGet: (params: { + url: string; + props: xml_js_types.ElementCompact; + objectUrls?: string[]; + timezone?: string; + depth: DAVDepth; + filters?: xml_js_types.ElementCompact; + headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; + }) => Promise; + fetchTodos: (params: { + calendar: DAVCalendar; + objectUrls?: string[]; + filters?: xml_js_types.ElementCompact; + timeRange?: { + start: string; + end: string; + }; + expand?: boolean; + urlFilter?: (url: string) => boolean; + headers?: Record; + headersToExclude?: string[]; + useMultiGet?: boolean; + fetchOptions?: RequestInit; + }) => Promise; + createTodo: (params: { + calendar: DAVCalendar; + iCalString: string; + filename: string; + headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; + }) => Promise; + updateTodo: (params: { + calendarObject: DAVCalendarObject; + headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; + }) => Promise; + deleteTodo: (params: { + calendarObject: DAVCalendarObject; + headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; + }) => Promise; fetchCalendarUserAddresses: (params: { account: DAVAccount; headers?: Record; @@ -1016,6 +1284,14 @@ declare const _default: { fetchOptions?: RequestInit; fetch?: typeof fetch; }) => Promise; + makeAddressBook: (params: { + url: string; + props: xml_js_types.ElementCompact; + depth?: DAVDepth; + headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; + }) => Promise; serviceDiscovery: (params: { account: DAVAccount; headers?: Record; @@ -1354,6 +1630,14 @@ declare const _default: { fetchOptions?: RequestInit; fetch?: typeof fetch; }) => Promise; + makeAddressBook: (params: { + url: string; + props: xml_js_types.ElementCompact; + depth?: DAVDepth; + headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; + }) => Promise; fetchVCards: (params: { addressBook: DAVAddressBook; headers?: Record; @@ -1387,6 +1671,62 @@ declare const _default: { fetchOptions?: RequestInit; fetch?: typeof fetch; }) => Promise; + todoQuery: (params: { + url: string; + props: xml_js_types.ElementCompact; + filters?: xml_js_types.ElementCompact; + timezone?: string; + depth?: DAVDepth; + headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; + }) => Promise; + todoMultiGet: (params: { + url: string; + props: xml_js_types.ElementCompact; + objectUrls?: string[]; + timezone?: string; + depth: DAVDepth; + filters?: xml_js_types.ElementCompact; + headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; + }) => Promise; + fetchTodos: (params: { + calendar: DAVCalendar; + objectUrls?: string[]; + filters?: xml_js_types.ElementCompact; + timeRange?: { + start: string; + end: string; + }; + expand?: boolean; + urlFilter?: (url: string) => boolean; + headers?: Record; + headersToExclude?: string[]; + useMultiGet?: boolean; + fetchOptions?: RequestInit; + }) => Promise; + createTodo: (params: { + calendar: DAVCalendar; + iCalString: string; + filename: string; + headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; + }) => Promise; + updateTodo: (params: { + calendarObject: DAVCalendarObject; + headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; + }) => Promise; + deleteTodo: (params: { + calendarObject: DAVCalendarObject; + headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; + }) => Promise; }>; DAVClient: typeof DAVClient; DAVNamespace: typeof DAVNamespace; @@ -1400,5 +1740,5 @@ declare const _default: { }; }; -export { DAVAttributeMap, DAVClient, DAVNamespace, DAVNamespaceShort, addressBookMultiGet, addressBookQuery, calendarMultiGet, calendarQuery, cleanupFalsy, collectionQuery, createAccount, createCalendarObject, createDAVClient, createObject, createVCard, davRequest, _default as default, deleteCalendarObject, deleteObject, deleteVCard, fetchAddressBooks, fetchCalendarObjects, fetchCalendarUserAddresses, fetchCalendars, fetchOauthTokens, fetchVCards, freeBusyQuery, getBasicAuthHeaders, getBearerAuthHeaders, getDAVAttribute, getOauthHeaders, isCollectionDirty, makeCalendar, propfind, refreshAccessToken, smartCollectionSync, supportedReportSet, syncCalendars, syncCollection, updateCalendarObject, updateObject, updateVCard, urlContains, urlEquals }; +export { DAVAttributeMap, DAVClient, DAVNamespace, DAVNamespaceShort, addressBookMultiGet, addressBookQuery, calendarMultiGet, calendarQuery, cleanupFalsy, collectionQuery, createAccount, createCalendarObject, createDAVClient, createObject, createTodo, createVCard, davRequest, _default as default, deleteCalendarObject, deleteObject, deleteTodo, deleteVCard, fetchAddressBooks, fetchCalendarObjects, fetchCalendarUserAddresses, fetchCalendars, fetchOauthTokens, fetchTodos, fetchVCards, freeBusyQuery, getBasicAuthHeaders, getBearerAuthHeaders, getDAVAttribute, getOauthHeaders, isCollectionDirty, makeAddressBook, makeCalendar, propfind, refreshAccessToken, smartCollectionSync, supportedReportSet, syncCalendars, syncCollection, todoMultiGet, todoQuery, updateCalendarObject, updateObject, updateTodo, updateVCard, urlContains, urlEquals }; export type { DAVAccount, DAVAddressBook, DAVCalendar, DAVCalendarObject, DAVCollection, DAVCredentials, DAVDepth, DAVMethods, DAVObject, DAVRequest, DAVResponse, DAVTokens, DAVVCard }; diff --git a/dist/tsdav.esm.js b/dist/tsdav.esm.js index 2450aaa4..641c681b 100644 --- a/dist/tsdav.esm.js +++ b/dist/tsdav.esm.js @@ -118,18 +118,30 @@ const excludeHeaders = (headers, headersToExclude) => { } return Object.fromEntries(Object.entries(headers).filter(([key]) => !headersToExclude.includes(key))); }; +const DEFAULT_ICAL_EXTENSION = '.ics'; +const defaultIcsFilter = (url) => Boolean(url === null || url === void 0 ? void 0 : url.includes(DEFAULT_ICAL_EXTENSION)); +const validateISO8601TimeRange = (start, end) => { + const ISO_8601 = /^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i; + const ISO_8601_FULL = /^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i; + if ((!ISO_8601.test(start) || !ISO_8601.test(end)) && + (!ISO_8601_FULL.test(start) || !ISO_8601_FULL.test(end))) { + throw new Error('invalid timeRange format, not in ISO8601'); + } +}; var requestHelpers = /*#__PURE__*/Object.freeze({ __proto__: null, cleanupFalsy: cleanupFalsy, conditionalParam: conditionalParam, + defaultIcsFilter: defaultIcsFilter, excludeHeaders: excludeHeaders, getDAVAttribute: getDAVAttribute, urlContains: urlContains, - urlEquals: urlEquals + urlEquals: urlEquals, + validateISO8601TimeRange: validateISO8601TimeRange }); -const debug$5 = getLogger('tsdav:request'); +const debug$6 = getLogger('tsdav:request'); const davRequest = async (params) => { var _a; const { url, init, convertIncoming = true, parseOutgoing = true, fetchOptions = {}, fetch: fetchOverride, } = params; @@ -221,7 +233,7 @@ const davRequest = async (params) => { } } catch (e) { - debug$5(e.stack); + debug$6(e.stack); } }, // remove namespace & camelCase @@ -340,7 +352,7 @@ function hasFields(obj, fields) { const findMissingFieldNames = (obj, fields) => fields.reduce((prev, curr) => (obj[curr] ? prev : `${prev.length ? `${prev},` : ''}${curr.toString()}`), ''); /* eslint-disable no-underscore-dangle */ -const debug$4 = getLogger('tsdav:collection'); +const debug$5 = getLogger('tsdav:collection'); const collectionQuery = async (params) => { const { url, body, depth, defaultNamespace = DAVNamespaceShort.DAV, headers, headersToExclude, fetchOptions = {}, fetch: fetchOverride, } = params; const queryResults = await davRequest({ @@ -466,7 +478,7 @@ const smartCollectionSync = async (params) => { throw new Error(`account must have ${findMissingFieldNames(account, requiredFields)} before smartCollectionSync`); } const syncMethod = method !== null && method !== void 0 ? method : (((_a = collection.reports) === null || _a === void 0 ? void 0 : _a.includes('syncCollection')) ? 'webdav' : 'basic'); - debug$4(`smart collection sync with type ${account.accountType} and method ${syncMethod}`); + debug$5(`smart collection sync with type ${account.accountType} and method ${syncMethod}`); if (syncMethod === 'webdav') { const result = await syncCollection({ url: collection.url, @@ -605,7 +617,7 @@ var collection = /*#__PURE__*/Object.freeze({ }); /* eslint-disable no-underscore-dangle */ -const debug$3 = getLogger('tsdav:addressBook'); +const debug$4 = getLogger('tsdav:addressBook'); const addressBookQuery = async (params) => { const { url, props, filters, depth, headers, headersToExclude, fetchOptions = {}, fetch: fetchOverride, } = params; return collectionQuery({ @@ -675,7 +687,7 @@ const fetchAddressBooks = async (params) => { .map((rs) => { var _a, _b, _c, _d, _e, _f, _g, _h, _j; const displayName = (_c = (_b = (_a = rs.props) === null || _a === void 0 ? void 0 : _a.displayname) === null || _b === void 0 ? void 0 : _b._cdata) !== null && _c !== void 0 ? _c : (_d = rs.props) === null || _d === void 0 ? void 0 : _d.displayname; - debug$3(`Found address book named ${typeof displayName === 'string' ? displayName : ''}, + debug$4(`Found address book named ${typeof displayName === 'string' ? displayName : ''}, props: ${JSON.stringify(rs.props)}`); return { url: new URL((_e = rs.href) !== null && _e !== void 0 ? _e : '', (_f = account.rootUrl) !== null && _f !== void 0 ? _f : '').href, @@ -697,7 +709,7 @@ const fetchAddressBooks = async (params) => { }; const fetchVCards = async (params) => { const { addressBook, headers, objectUrls, headersToExclude, urlFilter = (url) => url, useMultiGet = true, fetchOptions = {}, fetch: fetchOverride, } = params; - debug$3(`Fetching vcards from ${addressBook === null || addressBook === void 0 ? void 0 : addressBook.url}`); + debug$4(`Fetching vcards from ${addressBook === null || addressBook === void 0 ? void 0 : addressBook.url}`); const requiredFields = ['url']; if (!addressBook || !hasFields(addressBook, requiredFields)) { if (!addressBook) { @@ -796,6 +808,31 @@ const deleteVCard = async (params) => { fetch: fetchOverride, }); }; +const makeAddressBook = async (params) => { + const { url, props, depth, headers, headersToExclude, fetchOptions = {} } = params; + return davRequest({ + url, + init: { + method: 'MKCOL', + headers: excludeHeaders(cleanupFalsy({ depth, ...headers }), headersToExclude), + namespace: DAVNamespaceShort.DAV, + body: props + ? { + mkcol: { + _attributes: getDAVAttribute([ + DAVNamespace.DAV, + DAVNamespace.CARDDAV, + ]), + set: { + prop: props, + }, + }, + } + : undefined, + }, + fetchOptions, + }); +}; var addressBook = /*#__PURE__*/Object.freeze({ __proto__: null, @@ -805,11 +842,12 @@ var addressBook = /*#__PURE__*/Object.freeze({ deleteVCard: deleteVCard, fetchAddressBooks: fetchAddressBooks, fetchVCards: fetchVCards, + makeAddressBook: makeAddressBook, updateVCard: updateVCard }); /* eslint-disable no-underscore-dangle */ -const debug$2 = getLogger('tsdav:calendar'); +const debug$3 = getLogger('tsdav:calendar'); const fetchCalendarUserAddresses = async (params) => { var _a, _b, _c; const { account, headers, headersToExclude, fetchOptions = {}, fetch: fetchOverride } = params; @@ -817,7 +855,7 @@ const fetchCalendarUserAddresses = async (params) => { if (!hasFields(account, requiredFields)) { throw new Error(`account must have ${findMissingFieldNames(account, requiredFields)} before fetchUserAddresses`); } - debug$2(`Fetch user addresses from ${account.principalUrl}`); + debug$3(`Fetch user addresses from ${account.principalUrl}`); const responses = await propfind({ url: account.principalUrl, props: { [`${DAVNamespaceShort.CALDAV}:calendar-user-address-set`]: {} }, @@ -831,7 +869,7 @@ const fetchCalendarUserAddresses = async (params) => { throw new Error('cannot find calendarUserAddresses'); } const addresses = ((_c = (_b = (_a = matched === null || matched === void 0 ? void 0 : matched.props) === null || _a === void 0 ? void 0 : _a.calendarUserAddressSet) === null || _b === void 0 ? void 0 : _b.href) === null || _c === void 0 ? void 0 : _c.filter(Boolean)) || []; - debug$2(`Fetched calendar user addresses ${addresses}`); + debug$3(`Fetched calendar user addresses ${addresses}`); return addresses; }; const calendarQuery = async (params) => { @@ -970,17 +1008,11 @@ const fetchCalendars = async (params) => { }))); }; const fetchCalendarObjects = async (params) => { - const { calendar, objectUrls, filters: customFilters, timeRange, headers, expand, urlFilter = (url) => Boolean(url === null || url === void 0 ? void 0 : url.includes('.ics')), useMultiGet = true, headersToExclude, fetchOptions = {}, fetch: fetchOverride, } = params; + const { calendar, objectUrls, filters: customFilters, timeRange, headers, expand, urlFilter = defaultIcsFilter, useMultiGet = true, headersToExclude, fetchOptions = {}, fetch: fetchOverride, } = params; if (timeRange) { - // validate timeRange - const ISO_8601 = /^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i; - const ISO_8601_FULL = /^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i; - if ((!ISO_8601.test(timeRange.start) || !ISO_8601.test(timeRange.end)) && - (!ISO_8601_FULL.test(timeRange.start) || !ISO_8601_FULL.test(timeRange.end))) { - throw new Error('invalid timeRange format, not in ISO8601'); - } + validateISO8601TimeRange(timeRange.start, timeRange.end); } - debug$2(`Fetching calendar objects from ${calendar === null || calendar === void 0 ? void 0 : calendar.url}`); + debug$3(`Fetching calendar objects from ${calendar === null || calendar === void 0 ? void 0 : calendar.url}`); const requiredFields = ['url']; if (!calendar || !hasFields(calendar, requiredFields)) { if (!calendar) { @@ -1193,7 +1225,7 @@ const syncCalendars = async (params) => { }); // no existing url const created = remoteCalendars.filter((rc) => localCalendars.every((lc) => !urlContains(lc.url, rc.url))); - debug$2(`new calendars: ${created.map((cc) => cc.displayName)}`); + debug$3(`new calendars: ${created.map((cc) => cc.displayName)}`); // have same url, but syncToken/ctag different const updated = localCalendars.reduce((prev, curr) => { const found = remoteCalendars.find((rc) => urlContains(rc.url, curr.url)); @@ -1204,7 +1236,7 @@ const syncCalendars = async (params) => { } return prev; }, []); - debug$2(`updated calendars: ${updated.map((cc) => cc.displayName)}`); + debug$3(`updated calendars: ${updated.map((cc) => cc.displayName)}`); const updatedWithObjects = await Promise.all(updated.map(async (u) => { const result = await smartCollectionSync({ collection: { ...u, objectMultiGet: calendarMultiGet }, @@ -1218,7 +1250,7 @@ const syncCalendars = async (params) => { })); // does not present in remote const deleted = localCalendars.filter((cal) => remoteCalendars.every((rc) => !urlContains(rc.url, cal.url))); - debug$2(`deleted calendars: ${deleted.map((cc) => cc.displayName)}`); + debug$3(`deleted calendars: ${deleted.map((cc) => cc.displayName)}`); const unchanged = localCalendars.filter((cal) => remoteCalendars.some((rc) => urlContains(rc.url, cal.url) && ((rc.syncToken && `${rc.syncToken}` !== `${cal.syncToken}`) || (rc.ctag && `${rc.ctag}` !== `${cal.ctag}`)))); @@ -1234,13 +1266,7 @@ const syncCalendars = async (params) => { const freeBusyQuery = async (params) => { const { url, timeRange, depth, headers, headersToExclude, fetchOptions = {}, fetch: fetchOverride, } = params; if (timeRange) { - // validate timeRange - const ISO_8601 = /^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i; - const ISO_8601_FULL = /^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i; - if ((!ISO_8601.test(timeRange.start) || !ISO_8601.test(timeRange.end)) && - (!ISO_8601_FULL.test(timeRange.start) || !ISO_8601_FULL.test(timeRange.end))) { - throw new Error('invalid timeRange format, not in ISO8601'); - } + validateISO8601TimeRange(timeRange.start, timeRange.end); } else { throw new Error('timeRange is required'); @@ -1282,10 +1308,10 @@ var calendar = /*#__PURE__*/Object.freeze({ updateCalendarObject: updateCalendarObject }); -const debug$1 = getLogger('tsdav:account'); +const debug$2 = getLogger('tsdav:account'); const serviceDiscovery = async (params) => { var _a, _b; - debug$1('Service discovery...'); + debug$2('Service discovery...'); const { account, headers, headersToExclude, fetchOptions = {}, fetch: fetchOverride } = params; const requestFetch = fetchOverride !== null && fetchOverride !== void 0 ? fetchOverride : fetch; const endpoint = new URL(account.serverUrl); @@ -1311,7 +1337,7 @@ const serviceDiscovery = async (params) => { // http redirect. const location = response.headers.get('Location'); if (typeof location === 'string' && location.length) { - debug$1(`Service discovery redirected to ${location}`); + debug$2(`Service discovery redirected to ${location}`); const serviceURL = new URL(location, endpoint); if (serviceURL.hostname === uri.hostname && uri.port && !serviceURL.port) { serviceURL.port = uri.port; @@ -1322,7 +1348,7 @@ const serviceDiscovery = async (params) => { } } catch (err) { - debug$1(`Service discovery failed: ${err.stack}`); + debug$2(`Service discovery failed: ${err.stack}`); } return endpoint.href; }; @@ -1333,7 +1359,7 @@ const fetchPrincipalUrl = async (params) => { if (!hasFields(account, requiredFields)) { throw new Error(`account must have ${findMissingFieldNames(account, requiredFields)} before fetchPrincipalUrl`); } - debug$1(`Fetching principal url from path ${account.rootUrl}`); + debug$2(`Fetching principal url from path ${account.rootUrl}`); const [response] = await propfind({ url: account.rootUrl, props: { @@ -1345,12 +1371,12 @@ const fetchPrincipalUrl = async (params) => { fetch: fetchOverride, }); if (!response.ok) { - debug$1(`Fetch principal url failed: ${response.statusText}`); + debug$2(`Fetch principal url failed: ${response.statusText}`); if (response.status === 401) { throw new Error('Invalid credentials'); } } - debug$1(`Fetched principal url ${(_b = (_a = response.props) === null || _a === void 0 ? void 0 : _a.currentUserPrincipal) === null || _b === void 0 ? void 0 : _b.href}`); + debug$2(`Fetched principal url ${(_b = (_a = response.props) === null || _a === void 0 ? void 0 : _a.currentUserPrincipal) === null || _b === void 0 ? void 0 : _b.href}`); return new URL((_e = (_d = (_c = response.props) === null || _c === void 0 ? void 0 : _c.currentUserPrincipal) === null || _d === void 0 ? void 0 : _d.href) !== null && _e !== void 0 ? _e : '', account.rootUrl).href; }; const fetchHomeUrl = async (params) => { @@ -1360,7 +1386,7 @@ const fetchHomeUrl = async (params) => { if (!hasFields(account, requiredFields)) { throw new Error(`account must have ${findMissingFieldNames(account, requiredFields)} before fetchHomeUrl`); } - debug$1(`Fetch home url from ${account.principalUrl}`); + debug$2(`Fetch home url from ${account.principalUrl}`); const responses = await propfind({ url: account.principalUrl, props: account.accountType === 'caldav' @@ -1373,13 +1399,13 @@ const fetchHomeUrl = async (params) => { }); const matched = responses.find((r) => urlContains(account.principalUrl, r.href)); if (!matched || !matched.ok) { - debug$1(`Fetch home url failed with status ${matched === null || matched === void 0 ? void 0 : matched.statusText} and error ${JSON.stringify(responses.map((r) => r.error))}`); + debug$2(`Fetch home url failed with status ${matched === null || matched === void 0 ? void 0 : matched.statusText} and error ${JSON.stringify(responses.map((r) => r.error))}`); throw new Error('cannot find homeUrl'); } const result = new URL(account.accountType === 'caldav' ? (_a = matched === null || matched === void 0 ? void 0 : matched.props) === null || _a === void 0 ? void 0 : _a.calendarHomeSet.href : (_b = matched === null || matched === void 0 ? void 0 : matched.props) === null || _b === void 0 ? void 0 : _b.addressbookHomeSet.href, account.rootUrl).href; - debug$1(`Fetched home url ${result}`); + debug$2(`Fetched home url ${result}`); return result; }; const createAccount = async (params) => { @@ -1457,6 +1483,291 @@ var account = /*#__PURE__*/Object.freeze({ serviceDiscovery: serviceDiscovery }); +/* eslint-disable no-underscore-dangle */ +const debug$1 = getLogger('tsdav:todo'); +/** + * Helper function to build expand property for calendar-data + */ +const buildExpandProp = (timeRange) => ({ + [`${DAVNamespaceShort.CALDAV}:expand`]: { + _attributes: { + start: `${new Date(timeRange.start).toISOString().slice(0, 19).replace(/[-:.]/g, '')}Z`, + end: `${new Date(timeRange.end).toISOString().slice(0, 19).replace(/[-:.]/g, '')}Z`, + }, + }, +}); +/** + * Query todos using CalDAV REPORT calendar-query + * + * @param params.url - Calendar URL to query + * @param params.props - Properties to request + * @param params.filters - Optional CalDAV filters + * @param params.timezone - Optional timezone + * @param params.depth - Depth header value + * @param params.headers - Request headers + * @param params.headersToExclude - Headers to exclude + * @param params.fetchOptions - Fetch options + * @returns Array of DAV responses + */ +const todoQuery = async (params) => { + const { url, props, filters, timezone, depth, headers, headersToExclude, fetchOptions = {}, } = params; + return collectionQuery({ + url, + body: { + 'calendar-query': cleanupFalsy({ + _attributes: getDAVAttribute([ + DAVNamespace.CALDAV, + DAVNamespace.CALENDAR_SERVER, + DAVNamespace.CALDAV_APPLE, + DAVNamespace.DAV, + ]), + [`${DAVNamespaceShort.DAV}:prop`]: props, + filter: filters, + timezone, + }), + }, + defaultNamespace: DAVNamespaceShort.CALDAV, + depth, + headers: excludeHeaders(headers, headersToExclude), + fetchOptions, + }); +}; +/** + * Fetch multiple todos by URL using CalDAV calendar-multiget + * + * @param params.url - Calendar URL + * @param params.props - Properties to request + * @param params.objectUrls - Array of todo object URLs to fetch + * @param params.timezone - Optional timezone + * @param params.depth - Depth header value + * @param params.filters - Optional CalDAV filters + * @param params.headers - Request headers + * @param params.headersToExclude - Headers to exclude + * @param params.fetchOptions - Fetch options + * @returns Array of DAV responses + */ +const todoMultiGet = async (params) => { + const { url, props, objectUrls, filters, timezone, depth, headers, headersToExclude, fetchOptions = {}, } = params; + return collectionQuery({ + url, + body: { + 'calendar-multiget': cleanupFalsy({ + _attributes: getDAVAttribute([DAVNamespace.DAV, DAVNamespace.CALDAV]), + [`${DAVNamespaceShort.DAV}:prop`]: props, + [`${DAVNamespaceShort.DAV}:href`]: objectUrls, + filter: filters, + timezone, + }), + }, + defaultNamespace: DAVNamespaceShort.CALDAV, + depth, + headers: excludeHeaders(headers, headersToExclude), + fetchOptions, + }); +}; +/** + * Fetch VTODO objects from a CalDAV calendar with optional filtering + * + * @param params.calendar - Calendar to fetch todos from + * @param params.objectUrls - Optional array of specific todo URLs to fetch + * @param params.filters - Optional custom CalDAV filters + * @param params.timeRange - Optional time range filter in ISO8601 format + * @param params.expand - Whether to expand recurring todos + * @param params.urlFilter - Custom filter function for todo object URLs + * @param params.headers - Request headers + * @param params.headersToExclude - Headers to exclude + * @param params.useMultiGet - Whether to use multiget (default: true) + * @param params.fetchOptions - Fetch options + * @returns Array of todo objects with url, etag, and iCalendar data + * @throws Error if calendar URL is missing or timeRange format is invalid + */ +const fetchTodos = async (params) => { + const { calendar, objectUrls, filters: customFilters, timeRange, headers, expand, urlFilter = defaultIcsFilter, useMultiGet = true, headersToExclude, fetchOptions = {}, } = params; + if (timeRange) { + validateISO8601TimeRange(timeRange.start, timeRange.end); + } + debug$1(`Fetching todo objects from ${calendar === null || calendar === void 0 ? void 0 : calendar.url}`); + const requiredFields = ['url']; + if (!calendar || !hasFields(calendar, requiredFields)) { + if (!calendar) { + throw new Error('cannot fetchTodos for undefined calendar'); + } + throw new Error(`calendar must have ${findMissingFieldNames(calendar, requiredFields)} before fetchTodos`); + } + // Build CalDAV filter for VTODO components + // Structure: VCALENDAR -> VTODO -> optional time-range + const filters = customFilters !== null && customFilters !== void 0 ? customFilters : [ + { + 'comp-filter': { + _attributes: { + name: 'VCALENDAR', + }, + 'comp-filter': { + _attributes: { + name: 'VTODO', + }, + ...(timeRange + ? { + 'time-range': { + _attributes: { + start: `${new Date(timeRange.start) + .toISOString() + .slice(0, 19) + .replace(/[-:.]/g, '')}Z`, + end: `${new Date(timeRange.end) + .toISOString() + .slice(0, 19) + .replace(/[-:.]/g, '')}Z`, + }, + }, + } + : {}), + }, + }, + }, + ]; + const todoObjectUrls = (objectUrls !== null && objectUrls !== void 0 ? objectUrls : + // fetch all todo objects of the calendar + (await todoQuery({ + url: calendar.url, + props: { + [`${DAVNamespaceShort.DAV}:getetag`]: { + ...(expand && timeRange ? buildExpandProp(timeRange) : {}), + }, + }, + filters, + depth: '1', + headers: excludeHeaders(headers, headersToExclude), + fetchOptions, + })).map((res) => { var _a; return (_a = res.href) !== null && _a !== void 0 ? _a : ''; })) + .map((url) => (url.startsWith('http') || !url ? url : new URL(url, calendar.url).href)) + .filter(urlFilter) + .map((url) => new URL(url).pathname); + let todoObjectResults = []; + if (todoObjectUrls.length > 0) { + if (!useMultiGet || expand) { + todoObjectResults = await todoQuery({ + url: calendar.url, + props: { + [`${DAVNamespaceShort.DAV}:getetag`]: {}, + [`${DAVNamespaceShort.CALDAV}:calendar-data`]: { + ...(expand && timeRange ? buildExpandProp(timeRange) : {}), + }, + }, + filters, + depth: '1', + headers: excludeHeaders(headers, headersToExclude), + fetchOptions, + }); + } + else { + todoObjectResults = await todoMultiGet({ + url: calendar.url, + props: { + [`${DAVNamespaceShort.DAV}:getetag`]: {}, + [`${DAVNamespaceShort.CALDAV}:calendar-data`]: { + ...(expand && timeRange ? buildExpandProp(timeRange) : {}), + }, + }, + objectUrls: todoObjectUrls, + depth: '1', + headers: excludeHeaders(headers, headersToExclude), + fetchOptions, + }); + } + } + return todoObjectResults.map((res) => { + var _a, _b, _c, _d, _e, _f; + return ({ + url: new URL((_a = res.href) !== null && _a !== void 0 ? _a : '', calendar.url).href, + etag: `${(_b = res.props) === null || _b === void 0 ? void 0 : _b.getetag}`, + data: (_e = (_d = (_c = res.props) === null || _c === void 0 ? void 0 : _c.calendarData) === null || _d === void 0 ? void 0 : _d._cdata) !== null && _e !== void 0 ? _e : (_f = res.props) === null || _f === void 0 ? void 0 : _f.calendarData, + }); + }); +}; +/** + * Create a new VTODO object in a CalDAV calendar + * + * @param params.calendar - Calendar to create the todo in + * @param params.iCalString - iCalendar data string (must contain UID) + * @param params.filename - Filename for the todo object + * @param params.headers - Request headers + * @param params.headersToExclude - Headers to exclude + * @param params.fetchOptions - Fetch options + * @returns Response from the server + * @throws Error if iCalString does not contain a UID + */ +const createTodo = async (params) => { + const { calendar, iCalString, filename, headers, headersToExclude, fetchOptions = {} } = params; + if (!iCalString.includes('UID:')) { + throw new Error('iCalString must contain a UID'); + } + return createObject({ + url: new URL(filename, calendar.url).href, + data: iCalString, + headers: excludeHeaders({ + 'content-type': 'text/calendar; charset=utf-8', + 'If-None-Match': '*', + ...headers, + }, headersToExclude), + fetchOptions, + }); +}; +/** + * Update an existing VTODO object in a CalDAV calendar + * + * @param params.calendarObject - Todo object to update (must have etag) + * @param params.headers - Request headers + * @param params.headersToExclude - Headers to exclude + * @param params.fetchOptions - Fetch options + * @returns Response from the server + * @throws Error if calendarObject does not have an etag + */ +const updateTodo = async (params) => { + const { calendarObject, headers, headersToExclude, fetchOptions = {} } = params; + if (!calendarObject.etag) { + throw new Error('calendarObject must have etag for update - fetch todo first'); + } + return updateObject({ + url: calendarObject.url, + data: calendarObject.data, + etag: calendarObject.etag, + headers: excludeHeaders({ + 'content-type': 'text/calendar; charset=utf-8', + ...headers, + }, headersToExclude), + fetchOptions, + }); +}; +/** + * Delete a VTODO object from a CalDAV calendar + * + * @param params.calendarObject - Todo object to delete + * @param params.headers - Request headers + * @param params.headersToExclude - Headers to exclude + * @param params.fetchOptions - Fetch options + * @returns Response from the server + */ +const deleteTodo = async (params) => { + const { calendarObject, headers, headersToExclude, fetchOptions = {} } = params; + return deleteObject({ + url: calendarObject.url, + etag: calendarObject.etag, + headers: excludeHeaders(headers, headersToExclude), + fetchOptions, + }); +}; + +var todo = /*#__PURE__*/Object.freeze({ + __proto__: null, + createTodo: createTodo, + deleteTodo: deleteTodo, + fetchTodos: fetchTodos, + todoMultiGet: todoMultiGet, + todoQuery: todoQuery, + updateTodo: updateTodo +}); + const debug = getLogger('tsdav:authHelper'); /** * Provide given params as default params to given function with optional params. @@ -1735,6 +2046,10 @@ const createDAVClient = async (params) => { headers: authHeaders, fetch: fetchOverride, }); + const makeAddressBook$1 = defaultParam(makeAddressBook, { + headers: authHeaders, + fetch: fetchOverride, + }); const fetchAddressBooks$1 = defaultParam(fetchAddressBooks, { account: defaultAccount, headers: authHeaders, @@ -1756,6 +2071,13 @@ const createDAVClient = async (params) => { headers: authHeaders, fetch: fetchOverride, }); + // todo + const todoQuery$1 = defaultParam(todoQuery, { headers: authHeaders }); + const todoMultiGet$1 = defaultParam(todoMultiGet, { headers: authHeaders }); + const fetchTodos$1 = defaultParam(fetchTodos, { headers: authHeaders }); + const createTodo$1 = defaultParam(createTodo, { headers: authHeaders }); + const updateTodo$1 = defaultParam(updateTodo, { headers: authHeaders }); + const deleteTodo$1 = defaultParam(deleteTodo, { headers: authHeaders }); return { davRequest: davRequest$1, propfind: propfind$1, @@ -1782,10 +2104,17 @@ const createDAVClient = async (params) => { syncCalendars: syncCalendars$1, fetchAddressBooks: fetchAddressBooks$1, addressBookMultiGet: addressBookMultiGet$1, + makeAddressBook: makeAddressBook$1, fetchVCards: fetchVCards$1, createVCard: createVCard$1, updateVCard: updateVCard$1, deleteVCard: deleteVCard$1, + todoQuery: todoQuery$1, + todoMultiGet: todoMultiGet$1, + fetchTodos: fetchTodos$1, + createTodo: createTodo$1, + updateTodo: updateTodo$1, + deleteTodo: deleteTodo$1, }; }; class DAVClient { @@ -2023,6 +2352,9 @@ class DAVClient { fetch: this.fetchOverride, })(params[0]); } + async makeAddressBook(...params) { + return defaultParam(makeAddressBook, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); + } async fetchAddressBooks(...params) { return defaultParam(fetchAddressBooks, { headers: this.authHeaders, @@ -2059,6 +2391,24 @@ class DAVClient { fetch: this.fetchOverride, })(params[0]); } + async todoQuery(...params) { + return defaultParam(todoQuery, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); + } + async todoMultiGet(...params) { + return defaultParam(todoMultiGet, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); + } + async fetchTodos(...params) { + return defaultParam(fetchTodos, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); + } + async createTodo(...params) { + return defaultParam(createTodo, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); + } + async updateTodo(...params) { + return defaultParam(updateTodo, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); + } + async deleteTodo(...params) { + return defaultParam(deleteTodo, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); + } } var client = /*#__PURE__*/Object.freeze({ @@ -2077,8 +2427,9 @@ var index = { ...account, ...addressBook, ...calendar, + ...todo, ...authHelpers, ...requestHelpers, }; -export { DAVAttributeMap, DAVClient, DAVNamespace, DAVNamespaceShort, addressBookMultiGet, addressBookQuery, calendarMultiGet, calendarQuery, cleanupFalsy, collectionQuery, createAccount, createCalendarObject, createDAVClient, createObject, createVCard, davRequest, index as default, deleteCalendarObject, deleteObject, deleteVCard, fetchAddressBooks, fetchCalendarObjects, fetchCalendarUserAddresses, fetchCalendars, fetchOauthTokens, fetchVCards, freeBusyQuery, getBasicAuthHeaders, getBearerAuthHeaders, getDAVAttribute, getOauthHeaders, isCollectionDirty, makeCalendar, propfind, refreshAccessToken, smartCollectionSync, supportedReportSet, syncCalendars, syncCollection, updateCalendarObject, updateObject, updateVCard, urlContains, urlEquals }; +export { DAVAttributeMap, DAVClient, DAVNamespace, DAVNamespaceShort, addressBookMultiGet, addressBookQuery, calendarMultiGet, calendarQuery, cleanupFalsy, collectionQuery, createAccount, createCalendarObject, createDAVClient, createObject, createTodo, createVCard, davRequest, index as default, deleteCalendarObject, deleteObject, deleteTodo, deleteVCard, fetchAddressBooks, fetchCalendarObjects, fetchCalendarUserAddresses, fetchCalendars, fetchOauthTokens, fetchTodos, fetchVCards, freeBusyQuery, getBasicAuthHeaders, getBearerAuthHeaders, getDAVAttribute, getOauthHeaders, isCollectionDirty, makeAddressBook, makeCalendar, propfind, refreshAccessToken, smartCollectionSync, supportedReportSet, syncCalendars, syncCollection, todoMultiGet, todoQuery, updateCalendarObject, updateObject, updateTodo, updateVCard, urlContains, urlEquals }; diff --git a/dist/tsdav.js b/dist/tsdav.js index 0f1343ca..790613fa 100644 --- a/dist/tsdav.js +++ b/dist/tsdav.js @@ -4287,7 +4287,7 @@ function base64DetectIncompleteChar(buffer) { Readable.ReadableState = ReadableState; -var debug$6 = debuglog('stream'); +var debug$7 = debuglog('stream'); inherits(Readable, EventEmitter); function prependListener(emitter, event, fn) { @@ -4526,7 +4526,7 @@ function howMuchToRead(n, state) { // you can override either this method, or the async _read(n) below. Readable.prototype.read = function (n) { - debug$6('read', n); + debug$7('read', n); n = parseInt(n, 10); var state = this._readableState; var nOrig = n; @@ -4537,7 +4537,7 @@ Readable.prototype.read = function (n) { // already have a bunch of data in the buffer, then just trigger // the 'readable' event and move on. if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { - debug$6('read: emitReadable', state.length, state.ended); + debug$7('read: emitReadable', state.length, state.ended); if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); return null; } @@ -4574,21 +4574,21 @@ Readable.prototype.read = function (n) { // if we need a readable event, then we need to do some reading. var doRead = state.needReadable; - debug$6('need readable', doRead); + debug$7('need readable', doRead); // if we currently have less than the highWaterMark, then also read some if (state.length === 0 || state.length - n < state.highWaterMark) { doRead = true; - debug$6('length less than watermark', doRead); + debug$7('length less than watermark', doRead); } // however, if we've ended, then there's no point, and if we're already // reading, then it's unnecessary. if (state.ended || state.reading) { doRead = false; - debug$6('reading or ended', doRead); + debug$7('reading or ended', doRead); } else if (doRead) { - debug$6('do read'); + debug$7('do read'); state.reading = true; state.sync = true; // if the length is currently zero, then we *need* a readable event. @@ -4655,14 +4655,14 @@ function emitReadable(stream) { var state = stream._readableState; state.needReadable = false; if (!state.emittedReadable) { - debug$6('emitReadable', state.flowing); + debug$7('emitReadable', state.flowing); state.emittedReadable = true; if (state.sync) nextTick(emitReadable_, stream);else emitReadable_(stream); } } function emitReadable_(stream) { - debug$6('emit readable'); + debug$7('emit readable'); stream.emit('readable'); flow(stream); } @@ -4683,7 +4683,7 @@ function maybeReadMore(stream, state) { function maybeReadMore_(stream, state) { var len = state.length; while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { - debug$6('maybeReadMore read 0'); + debug$7('maybeReadMore read 0'); stream.read(0); if (len === state.length) // didn't get any data, stop spinning. @@ -4716,7 +4716,7 @@ Readable.prototype.pipe = function (dest, pipeOpts) { break; } state.pipesCount += 1; - debug$6('pipe count=%d opts=%j', state.pipesCount, pipeOpts); + debug$7('pipe count=%d opts=%j', state.pipesCount, pipeOpts); var doEnd = (!pipeOpts || pipeOpts.end !== false); @@ -4725,14 +4725,14 @@ Readable.prototype.pipe = function (dest, pipeOpts) { dest.on('unpipe', onunpipe); function onunpipe(readable) { - debug$6('onunpipe'); + debug$7('onunpipe'); if (readable === src) { cleanup(); } } function onend() { - debug$6('onend'); + debug$7('onend'); dest.end(); } @@ -4745,7 +4745,7 @@ Readable.prototype.pipe = function (dest, pipeOpts) { var cleanedUp = false; function cleanup() { - debug$6('cleanup'); + debug$7('cleanup'); // cleanup event handlers once the pipe is broken dest.removeListener('close', onclose); dest.removeListener('finish', onfinish); @@ -4773,7 +4773,7 @@ Readable.prototype.pipe = function (dest, pipeOpts) { var increasedAwaitDrain = false; src.on('data', ondata); function ondata(chunk) { - debug$6('ondata'); + debug$7('ondata'); increasedAwaitDrain = false; var ret = dest.write(chunk); if (false === ret && !increasedAwaitDrain) { @@ -4782,7 +4782,7 @@ Readable.prototype.pipe = function (dest, pipeOpts) { // also returned false. // => Check whether `dest` is still a piping destination. if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { - debug$6('false write response, pause', src._readableState.awaitDrain); + debug$7('false write response, pause', src._readableState.awaitDrain); src._readableState.awaitDrain++; increasedAwaitDrain = true; } @@ -4793,7 +4793,7 @@ Readable.prototype.pipe = function (dest, pipeOpts) { // if the dest has an error, then stop piping into it. // however, don't suppress the throwing behavior for this. function onerror(er) { - debug$6('onerror', er); + debug$7('onerror', er); unpipe(); dest.removeListener('error', onerror); if (listenerCount(dest, 'error') === 0) dest.emit('error', er); @@ -4809,14 +4809,14 @@ Readable.prototype.pipe = function (dest, pipeOpts) { } dest.once('close', onclose); function onfinish() { - debug$6('onfinish'); + debug$7('onfinish'); dest.removeListener('close', onclose); unpipe(); } dest.once('finish', onfinish); function unpipe() { - debug$6('unpipe'); + debug$7('unpipe'); src.unpipe(dest); } @@ -4825,7 +4825,7 @@ Readable.prototype.pipe = function (dest, pipeOpts) { // start the flow if it hasn't been started already. if (!state.flowing) { - debug$6('pipe resume'); + debug$7('pipe resume'); src.resume(); } @@ -4835,7 +4835,7 @@ Readable.prototype.pipe = function (dest, pipeOpts) { function pipeOnDrain(src) { return function () { var state = src._readableState; - debug$6('pipeOnDrain', state.awaitDrain); + debug$7('pipeOnDrain', state.awaitDrain); if (state.awaitDrain) state.awaitDrain--; if (state.awaitDrain === 0 && src.listeners('data').length) { state.flowing = true; @@ -4919,7 +4919,7 @@ Readable.prototype.on = function (ev, fn) { Readable.prototype.addListener = Readable.prototype.on; function nReadingNextTick(self) { - debug$6('readable nexttick read 0'); + debug$7('readable nexttick read 0'); self.read(0); } @@ -4928,7 +4928,7 @@ function nReadingNextTick(self) { Readable.prototype.resume = function () { var state = this._readableState; if (!state.flowing) { - debug$6('resume'); + debug$7('resume'); state.flowing = true; resume(this, state); } @@ -4944,7 +4944,7 @@ function resume(stream, state) { function resume_(stream, state) { if (!state.reading) { - debug$6('resume read 0'); + debug$7('resume read 0'); stream.read(0); } @@ -4956,9 +4956,9 @@ function resume_(stream, state) { } Readable.prototype.pause = function () { - debug$6('call pause flowing=%j', this._readableState.flowing); + debug$7('call pause flowing=%j', this._readableState.flowing); if (false !== this._readableState.flowing) { - debug$6('pause'); + debug$7('pause'); this._readableState.flowing = false; this.emit('pause'); } @@ -4967,7 +4967,7 @@ Readable.prototype.pause = function () { function flow(stream) { var state = stream._readableState; - debug$6('flow', state.flowing); + debug$7('flow', state.flowing); while (state.flowing && stream.read() !== null) {} } @@ -4980,7 +4980,7 @@ Readable.prototype.wrap = function (stream) { var self = this; stream.on('end', function () { - debug$6('wrapped end'); + debug$7('wrapped end'); if (state.decoder && !state.ended) { var chunk = state.decoder.end(); if (chunk && chunk.length) self.push(chunk); @@ -4990,7 +4990,7 @@ Readable.prototype.wrap = function (stream) { }); stream.on('data', function (chunk) { - debug$6('wrapped data'); + debug$7('wrapped data'); if (state.decoder) chunk = state.decoder.write(chunk); // don't skip over falsy values in objectMode @@ -5024,7 +5024,7 @@ Readable.prototype.wrap = function (stream) { // when we try to consume some more bytes, simply unpause the // underlying stream. self._read = function (n) { - debug$6('wrapped _read', n); + debug$7('wrapped _read', n); if (paused) { paused = false; stream.resume(); @@ -9312,18 +9312,30 @@ const excludeHeaders = (headers, headersToExclude) => { } return Object.fromEntries(Object.entries(headers).filter(([key]) => !headersToExclude.includes(key))); }; +const DEFAULT_ICAL_EXTENSION = '.ics'; +const defaultIcsFilter = (url) => Boolean(url === null || url === void 0 ? void 0 : url.includes(DEFAULT_ICAL_EXTENSION)); +const validateISO8601TimeRange = (start, end) => { + const ISO_8601 = /^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i; + const ISO_8601_FULL = /^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i; + if ((!ISO_8601.test(start) || !ISO_8601.test(end)) && + (!ISO_8601_FULL.test(start) || !ISO_8601_FULL.test(end))) { + throw new Error('invalid timeRange format, not in ISO8601'); + } +}; var requestHelpers = /*#__PURE__*/Object.freeze({ __proto__: null, cleanupFalsy: cleanupFalsy, conditionalParam: conditionalParam, + defaultIcsFilter: defaultIcsFilter, excludeHeaders: excludeHeaders, getDAVAttribute: getDAVAttribute, urlContains: urlContains, - urlEquals: urlEquals + urlEquals: urlEquals, + validateISO8601TimeRange: validateISO8601TimeRange }); -const debug$5 = getLogger('tsdav:request'); +const debug$6 = getLogger('tsdav:request'); const davRequest = async (params) => { var _a; const { url, init, convertIncoming = true, parseOutgoing = true, fetchOptions = {}, fetch: fetchOverride, } = params; @@ -9415,7 +9427,7 @@ const davRequest = async (params) => { } } catch (e) { - debug$5(e.stack); + debug$6(e.stack); } }, // remove namespace & camelCase @@ -9534,7 +9546,7 @@ function hasFields(obj, fields) { const findMissingFieldNames = (obj, fields) => fields.reduce((prev, curr) => (obj[curr] ? prev : `${prev.length ? `${prev},` : ''}${curr.toString()}`), ''); /* eslint-disable no-underscore-dangle */ -const debug$4 = getLogger('tsdav:collection'); +const debug$5 = getLogger('tsdav:collection'); const collectionQuery = async (params) => { const { url, body, depth, defaultNamespace = DAVNamespaceShort.DAV, headers, headersToExclude, fetchOptions = {}, fetch: fetchOverride, } = params; const queryResults = await davRequest({ @@ -9660,7 +9672,7 @@ const smartCollectionSync = async (params) => { throw new Error(`account must have ${findMissingFieldNames(account, requiredFields)} before smartCollectionSync`); } const syncMethod = method !== null && method !== void 0 ? method : (((_a = collection.reports) === null || _a === void 0 ? void 0 : _a.includes('syncCollection')) ? 'webdav' : 'basic'); - debug$4(`smart collection sync with type ${account.accountType} and method ${syncMethod}`); + debug$5(`smart collection sync with type ${account.accountType} and method ${syncMethod}`); if (syncMethod === 'webdav') { const result = await syncCollection({ url: collection.url, @@ -9799,7 +9811,7 @@ var collection = /*#__PURE__*/Object.freeze({ }); /* eslint-disable no-underscore-dangle */ -const debug$3 = getLogger('tsdav:addressBook'); +const debug$4 = getLogger('tsdav:addressBook'); const addressBookQuery = async (params) => { const { url, props, filters, depth, headers, headersToExclude, fetchOptions = {}, fetch: fetchOverride, } = params; return collectionQuery({ @@ -9869,7 +9881,7 @@ const fetchAddressBooks = async (params) => { .map((rs) => { var _a, _b, _c, _d, _e, _f, _g, _h, _j; const displayName = (_c = (_b = (_a = rs.props) === null || _a === void 0 ? void 0 : _a.displayname) === null || _b === void 0 ? void 0 : _b._cdata) !== null && _c !== void 0 ? _c : (_d = rs.props) === null || _d === void 0 ? void 0 : _d.displayname; - debug$3(`Found address book named ${typeof displayName === 'string' ? displayName : ''}, + debug$4(`Found address book named ${typeof displayName === 'string' ? displayName : ''}, props: ${JSON.stringify(rs.props)}`); return { url: new URL((_e = rs.href) !== null && _e !== void 0 ? _e : '', (_f = account.rootUrl) !== null && _f !== void 0 ? _f : '').href, @@ -9891,7 +9903,7 @@ const fetchAddressBooks = async (params) => { }; const fetchVCards = async (params) => { const { addressBook, headers, objectUrls, headersToExclude, urlFilter = (url) => url, useMultiGet = true, fetchOptions = {}, fetch: fetchOverride, } = params; - debug$3(`Fetching vcards from ${addressBook === null || addressBook === void 0 ? void 0 : addressBook.url}`); + debug$4(`Fetching vcards from ${addressBook === null || addressBook === void 0 ? void 0 : addressBook.url}`); const requiredFields = ['url']; if (!addressBook || !hasFields(addressBook, requiredFields)) { if (!addressBook) { @@ -9990,6 +10002,31 @@ const deleteVCard = async (params) => { fetch: fetchOverride, }); }; +const makeAddressBook = async (params) => { + const { url, props, depth, headers, headersToExclude, fetchOptions = {} } = params; + return davRequest({ + url, + init: { + method: 'MKCOL', + headers: excludeHeaders(cleanupFalsy({ depth, ...headers }), headersToExclude), + namespace: DAVNamespaceShort.DAV, + body: props + ? { + mkcol: { + _attributes: getDAVAttribute([ + DAVNamespace.DAV, + DAVNamespace.CARDDAV, + ]), + set: { + prop: props, + }, + }, + } + : undefined, + }, + fetchOptions, + }); +}; var addressBook = /*#__PURE__*/Object.freeze({ __proto__: null, @@ -9999,11 +10036,12 @@ var addressBook = /*#__PURE__*/Object.freeze({ deleteVCard: deleteVCard, fetchAddressBooks: fetchAddressBooks, fetchVCards: fetchVCards, + makeAddressBook: makeAddressBook, updateVCard: updateVCard }); /* eslint-disable no-underscore-dangle */ -const debug$2 = getLogger('tsdav:calendar'); +const debug$3 = getLogger('tsdav:calendar'); const fetchCalendarUserAddresses = async (params) => { var _a, _b, _c; const { account, headers, headersToExclude, fetchOptions = {}, fetch: fetchOverride } = params; @@ -10011,7 +10049,7 @@ const fetchCalendarUserAddresses = async (params) => { if (!hasFields(account, requiredFields)) { throw new Error(`account must have ${findMissingFieldNames(account, requiredFields)} before fetchUserAddresses`); } - debug$2(`Fetch user addresses from ${account.principalUrl}`); + debug$3(`Fetch user addresses from ${account.principalUrl}`); const responses = await propfind({ url: account.principalUrl, props: { [`${DAVNamespaceShort.CALDAV}:calendar-user-address-set`]: {} }, @@ -10025,7 +10063,7 @@ const fetchCalendarUserAddresses = async (params) => { throw new Error('cannot find calendarUserAddresses'); } const addresses = ((_c = (_b = (_a = matched === null || matched === void 0 ? void 0 : matched.props) === null || _a === void 0 ? void 0 : _a.calendarUserAddressSet) === null || _b === void 0 ? void 0 : _b.href) === null || _c === void 0 ? void 0 : _c.filter(Boolean)) || []; - debug$2(`Fetched calendar user addresses ${addresses}`); + debug$3(`Fetched calendar user addresses ${addresses}`); return addresses; }; const calendarQuery = async (params) => { @@ -10164,17 +10202,11 @@ const fetchCalendars = async (params) => { }))); }; const fetchCalendarObjects = async (params) => { - const { calendar, objectUrls, filters: customFilters, timeRange, headers, expand, urlFilter = (url) => Boolean(url === null || url === void 0 ? void 0 : url.includes('.ics')), useMultiGet = true, headersToExclude, fetchOptions = {}, fetch: fetchOverride, } = params; + const { calendar, objectUrls, filters: customFilters, timeRange, headers, expand, urlFilter = defaultIcsFilter, useMultiGet = true, headersToExclude, fetchOptions = {}, fetch: fetchOverride, } = params; if (timeRange) { - // validate timeRange - const ISO_8601 = /^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i; - const ISO_8601_FULL = /^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i; - if ((!ISO_8601.test(timeRange.start) || !ISO_8601.test(timeRange.end)) && - (!ISO_8601_FULL.test(timeRange.start) || !ISO_8601_FULL.test(timeRange.end))) { - throw new Error('invalid timeRange format, not in ISO8601'); - } + validateISO8601TimeRange(timeRange.start, timeRange.end); } - debug$2(`Fetching calendar objects from ${calendar === null || calendar === void 0 ? void 0 : calendar.url}`); + debug$3(`Fetching calendar objects from ${calendar === null || calendar === void 0 ? void 0 : calendar.url}`); const requiredFields = ['url']; if (!calendar || !hasFields(calendar, requiredFields)) { if (!calendar) { @@ -10387,7 +10419,7 @@ const syncCalendars = async (params) => { }); // no existing url const created = remoteCalendars.filter((rc) => localCalendars.every((lc) => !urlContains(lc.url, rc.url))); - debug$2(`new calendars: ${created.map((cc) => cc.displayName)}`); + debug$3(`new calendars: ${created.map((cc) => cc.displayName)}`); // have same url, but syncToken/ctag different const updated = localCalendars.reduce((prev, curr) => { const found = remoteCalendars.find((rc) => urlContains(rc.url, curr.url)); @@ -10398,7 +10430,7 @@ const syncCalendars = async (params) => { } return prev; }, []); - debug$2(`updated calendars: ${updated.map((cc) => cc.displayName)}`); + debug$3(`updated calendars: ${updated.map((cc) => cc.displayName)}`); const updatedWithObjects = await Promise.all(updated.map(async (u) => { const result = await smartCollectionSync({ collection: { ...u, objectMultiGet: calendarMultiGet }, @@ -10412,7 +10444,7 @@ const syncCalendars = async (params) => { })); // does not present in remote const deleted = localCalendars.filter((cal) => remoteCalendars.every((rc) => !urlContains(rc.url, cal.url))); - debug$2(`deleted calendars: ${deleted.map((cc) => cc.displayName)}`); + debug$3(`deleted calendars: ${deleted.map((cc) => cc.displayName)}`); const unchanged = localCalendars.filter((cal) => remoteCalendars.some((rc) => urlContains(rc.url, cal.url) && ((rc.syncToken && `${rc.syncToken}` !== `${cal.syncToken}`) || (rc.ctag && `${rc.ctag}` !== `${cal.ctag}`)))); @@ -10428,13 +10460,7 @@ const syncCalendars = async (params) => { const freeBusyQuery = async (params) => { const { url, timeRange, depth, headers, headersToExclude, fetchOptions = {}, fetch: fetchOverride, } = params; if (timeRange) { - // validate timeRange - const ISO_8601 = /^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i; - const ISO_8601_FULL = /^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i; - if ((!ISO_8601.test(timeRange.start) || !ISO_8601.test(timeRange.end)) && - (!ISO_8601_FULL.test(timeRange.start) || !ISO_8601_FULL.test(timeRange.end))) { - throw new Error('invalid timeRange format, not in ISO8601'); - } + validateISO8601TimeRange(timeRange.start, timeRange.end); } else { throw new Error('timeRange is required'); @@ -10476,10 +10502,10 @@ var calendar = /*#__PURE__*/Object.freeze({ updateCalendarObject: updateCalendarObject }); -const debug$1 = getLogger('tsdav:account'); +const debug$2 = getLogger('tsdav:account'); const serviceDiscovery = async (params) => { var _a, _b; - debug$1('Service discovery...'); + debug$2('Service discovery...'); const { account, headers, headersToExclude, fetchOptions = {}, fetch: fetchOverride } = params; const requestFetch = fetchOverride !== null && fetchOverride !== void 0 ? fetchOverride : fetch; const endpoint = new URL(account.serverUrl); @@ -10505,7 +10531,7 @@ const serviceDiscovery = async (params) => { // http redirect. const location = response.headers.get('Location'); if (typeof location === 'string' && location.length) { - debug$1(`Service discovery redirected to ${location}`); + debug$2(`Service discovery redirected to ${location}`); const serviceURL = new URL(location, endpoint); if (serviceURL.hostname === uri.hostname && uri.port && !serviceURL.port) { serviceURL.port = uri.port; @@ -10516,7 +10542,7 @@ const serviceDiscovery = async (params) => { } } catch (err) { - debug$1(`Service discovery failed: ${err.stack}`); + debug$2(`Service discovery failed: ${err.stack}`); } return endpoint.href; }; @@ -10527,7 +10553,7 @@ const fetchPrincipalUrl = async (params) => { if (!hasFields(account, requiredFields)) { throw new Error(`account must have ${findMissingFieldNames(account, requiredFields)} before fetchPrincipalUrl`); } - debug$1(`Fetching principal url from path ${account.rootUrl}`); + debug$2(`Fetching principal url from path ${account.rootUrl}`); const [response] = await propfind({ url: account.rootUrl, props: { @@ -10539,12 +10565,12 @@ const fetchPrincipalUrl = async (params) => { fetch: fetchOverride, }); if (!response.ok) { - debug$1(`Fetch principal url failed: ${response.statusText}`); + debug$2(`Fetch principal url failed: ${response.statusText}`); if (response.status === 401) { throw new Error('Invalid credentials'); } } - debug$1(`Fetched principal url ${(_b = (_a = response.props) === null || _a === void 0 ? void 0 : _a.currentUserPrincipal) === null || _b === void 0 ? void 0 : _b.href}`); + debug$2(`Fetched principal url ${(_b = (_a = response.props) === null || _a === void 0 ? void 0 : _a.currentUserPrincipal) === null || _b === void 0 ? void 0 : _b.href}`); return new URL((_e = (_d = (_c = response.props) === null || _c === void 0 ? void 0 : _c.currentUserPrincipal) === null || _d === void 0 ? void 0 : _d.href) !== null && _e !== void 0 ? _e : '', account.rootUrl).href; }; const fetchHomeUrl = async (params) => { @@ -10554,7 +10580,7 @@ const fetchHomeUrl = async (params) => { if (!hasFields(account, requiredFields)) { throw new Error(`account must have ${findMissingFieldNames(account, requiredFields)} before fetchHomeUrl`); } - debug$1(`Fetch home url from ${account.principalUrl}`); + debug$2(`Fetch home url from ${account.principalUrl}`); const responses = await propfind({ url: account.principalUrl, props: account.accountType === 'caldav' @@ -10567,13 +10593,13 @@ const fetchHomeUrl = async (params) => { }); const matched = responses.find((r) => urlContains(account.principalUrl, r.href)); if (!matched || !matched.ok) { - debug$1(`Fetch home url failed with status ${matched === null || matched === void 0 ? void 0 : matched.statusText} and error ${JSON.stringify(responses.map((r) => r.error))}`); + debug$2(`Fetch home url failed with status ${matched === null || matched === void 0 ? void 0 : matched.statusText} and error ${JSON.stringify(responses.map((r) => r.error))}`); throw new Error('cannot find homeUrl'); } const result = new URL(account.accountType === 'caldav' ? (_a = matched === null || matched === void 0 ? void 0 : matched.props) === null || _a === void 0 ? void 0 : _a.calendarHomeSet.href : (_b = matched === null || matched === void 0 ? void 0 : matched.props) === null || _b === void 0 ? void 0 : _b.addressbookHomeSet.href, account.rootUrl).href; - debug$1(`Fetched home url ${result}`); + debug$2(`Fetched home url ${result}`); return result; }; const createAccount = async (params) => { @@ -10651,6 +10677,291 @@ var account = /*#__PURE__*/Object.freeze({ serviceDiscovery: serviceDiscovery }); +/* eslint-disable no-underscore-dangle */ +const debug$1 = getLogger('tsdav:todo'); +/** + * Helper function to build expand property for calendar-data + */ +const buildExpandProp = (timeRange) => ({ + [`${DAVNamespaceShort.CALDAV}:expand`]: { + _attributes: { + start: `${new Date(timeRange.start).toISOString().slice(0, 19).replace(/[-:.]/g, '')}Z`, + end: `${new Date(timeRange.end).toISOString().slice(0, 19).replace(/[-:.]/g, '')}Z`, + }, + }, +}); +/** + * Query todos using CalDAV REPORT calendar-query + * + * @param params.url - Calendar URL to query + * @param params.props - Properties to request + * @param params.filters - Optional CalDAV filters + * @param params.timezone - Optional timezone + * @param params.depth - Depth header value + * @param params.headers - Request headers + * @param params.headersToExclude - Headers to exclude + * @param params.fetchOptions - Fetch options + * @returns Array of DAV responses + */ +const todoQuery = async (params) => { + const { url, props, filters, timezone, depth, headers, headersToExclude, fetchOptions = {}, } = params; + return collectionQuery({ + url, + body: { + 'calendar-query': cleanupFalsy({ + _attributes: getDAVAttribute([ + DAVNamespace.CALDAV, + DAVNamespace.CALENDAR_SERVER, + DAVNamespace.CALDAV_APPLE, + DAVNamespace.DAV, + ]), + [`${DAVNamespaceShort.DAV}:prop`]: props, + filter: filters, + timezone, + }), + }, + defaultNamespace: DAVNamespaceShort.CALDAV, + depth, + headers: excludeHeaders(headers, headersToExclude), + fetchOptions, + }); +}; +/** + * Fetch multiple todos by URL using CalDAV calendar-multiget + * + * @param params.url - Calendar URL + * @param params.props - Properties to request + * @param params.objectUrls - Array of todo object URLs to fetch + * @param params.timezone - Optional timezone + * @param params.depth - Depth header value + * @param params.filters - Optional CalDAV filters + * @param params.headers - Request headers + * @param params.headersToExclude - Headers to exclude + * @param params.fetchOptions - Fetch options + * @returns Array of DAV responses + */ +const todoMultiGet = async (params) => { + const { url, props, objectUrls, filters, timezone, depth, headers, headersToExclude, fetchOptions = {}, } = params; + return collectionQuery({ + url, + body: { + 'calendar-multiget': cleanupFalsy({ + _attributes: getDAVAttribute([DAVNamespace.DAV, DAVNamespace.CALDAV]), + [`${DAVNamespaceShort.DAV}:prop`]: props, + [`${DAVNamespaceShort.DAV}:href`]: objectUrls, + filter: filters, + timezone, + }), + }, + defaultNamespace: DAVNamespaceShort.CALDAV, + depth, + headers: excludeHeaders(headers, headersToExclude), + fetchOptions, + }); +}; +/** + * Fetch VTODO objects from a CalDAV calendar with optional filtering + * + * @param params.calendar - Calendar to fetch todos from + * @param params.objectUrls - Optional array of specific todo URLs to fetch + * @param params.filters - Optional custom CalDAV filters + * @param params.timeRange - Optional time range filter in ISO8601 format + * @param params.expand - Whether to expand recurring todos + * @param params.urlFilter - Custom filter function for todo object URLs + * @param params.headers - Request headers + * @param params.headersToExclude - Headers to exclude + * @param params.useMultiGet - Whether to use multiget (default: true) + * @param params.fetchOptions - Fetch options + * @returns Array of todo objects with url, etag, and iCalendar data + * @throws Error if calendar URL is missing or timeRange format is invalid + */ +const fetchTodos = async (params) => { + const { calendar, objectUrls, filters: customFilters, timeRange, headers, expand, urlFilter = defaultIcsFilter, useMultiGet = true, headersToExclude, fetchOptions = {}, } = params; + if (timeRange) { + validateISO8601TimeRange(timeRange.start, timeRange.end); + } + debug$1(`Fetching todo objects from ${calendar === null || calendar === void 0 ? void 0 : calendar.url}`); + const requiredFields = ['url']; + if (!calendar || !hasFields(calendar, requiredFields)) { + if (!calendar) { + throw new Error('cannot fetchTodos for undefined calendar'); + } + throw new Error(`calendar must have ${findMissingFieldNames(calendar, requiredFields)} before fetchTodos`); + } + // Build CalDAV filter for VTODO components + // Structure: VCALENDAR -> VTODO -> optional time-range + const filters = customFilters !== null && customFilters !== void 0 ? customFilters : [ + { + 'comp-filter': { + _attributes: { + name: 'VCALENDAR', + }, + 'comp-filter': { + _attributes: { + name: 'VTODO', + }, + ...(timeRange + ? { + 'time-range': { + _attributes: { + start: `${new Date(timeRange.start) + .toISOString() + .slice(0, 19) + .replace(/[-:.]/g, '')}Z`, + end: `${new Date(timeRange.end) + .toISOString() + .slice(0, 19) + .replace(/[-:.]/g, '')}Z`, + }, + }, + } + : {}), + }, + }, + }, + ]; + const todoObjectUrls = (objectUrls !== null && objectUrls !== void 0 ? objectUrls : + // fetch all todo objects of the calendar + (await todoQuery({ + url: calendar.url, + props: { + [`${DAVNamespaceShort.DAV}:getetag`]: { + ...(expand && timeRange ? buildExpandProp(timeRange) : {}), + }, + }, + filters, + depth: '1', + headers: excludeHeaders(headers, headersToExclude), + fetchOptions, + })).map((res) => { var _a; return (_a = res.href) !== null && _a !== void 0 ? _a : ''; })) + .map((url) => (url.startsWith('http') || !url ? url : new URL(url, calendar.url).href)) + .filter(urlFilter) + .map((url) => new URL(url).pathname); + let todoObjectResults = []; + if (todoObjectUrls.length > 0) { + if (!useMultiGet || expand) { + todoObjectResults = await todoQuery({ + url: calendar.url, + props: { + [`${DAVNamespaceShort.DAV}:getetag`]: {}, + [`${DAVNamespaceShort.CALDAV}:calendar-data`]: { + ...(expand && timeRange ? buildExpandProp(timeRange) : {}), + }, + }, + filters, + depth: '1', + headers: excludeHeaders(headers, headersToExclude), + fetchOptions, + }); + } + else { + todoObjectResults = await todoMultiGet({ + url: calendar.url, + props: { + [`${DAVNamespaceShort.DAV}:getetag`]: {}, + [`${DAVNamespaceShort.CALDAV}:calendar-data`]: { + ...(expand && timeRange ? buildExpandProp(timeRange) : {}), + }, + }, + objectUrls: todoObjectUrls, + depth: '1', + headers: excludeHeaders(headers, headersToExclude), + fetchOptions, + }); + } + } + return todoObjectResults.map((res) => { + var _a, _b, _c, _d, _e, _f; + return ({ + url: new URL((_a = res.href) !== null && _a !== void 0 ? _a : '', calendar.url).href, + etag: `${(_b = res.props) === null || _b === void 0 ? void 0 : _b.getetag}`, + data: (_e = (_d = (_c = res.props) === null || _c === void 0 ? void 0 : _c.calendarData) === null || _d === void 0 ? void 0 : _d._cdata) !== null && _e !== void 0 ? _e : (_f = res.props) === null || _f === void 0 ? void 0 : _f.calendarData, + }); + }); +}; +/** + * Create a new VTODO object in a CalDAV calendar + * + * @param params.calendar - Calendar to create the todo in + * @param params.iCalString - iCalendar data string (must contain UID) + * @param params.filename - Filename for the todo object + * @param params.headers - Request headers + * @param params.headersToExclude - Headers to exclude + * @param params.fetchOptions - Fetch options + * @returns Response from the server + * @throws Error if iCalString does not contain a UID + */ +const createTodo = async (params) => { + const { calendar, iCalString, filename, headers, headersToExclude, fetchOptions = {} } = params; + if (!iCalString.includes('UID:')) { + throw new Error('iCalString must contain a UID'); + } + return createObject({ + url: new URL(filename, calendar.url).href, + data: iCalString, + headers: excludeHeaders({ + 'content-type': 'text/calendar; charset=utf-8', + 'If-None-Match': '*', + ...headers, + }, headersToExclude), + fetchOptions, + }); +}; +/** + * Update an existing VTODO object in a CalDAV calendar + * + * @param params.calendarObject - Todo object to update (must have etag) + * @param params.headers - Request headers + * @param params.headersToExclude - Headers to exclude + * @param params.fetchOptions - Fetch options + * @returns Response from the server + * @throws Error if calendarObject does not have an etag + */ +const updateTodo = async (params) => { + const { calendarObject, headers, headersToExclude, fetchOptions = {} } = params; + if (!calendarObject.etag) { + throw new Error('calendarObject must have etag for update - fetch todo first'); + } + return updateObject({ + url: calendarObject.url, + data: calendarObject.data, + etag: calendarObject.etag, + headers: excludeHeaders({ + 'content-type': 'text/calendar; charset=utf-8', + ...headers, + }, headersToExclude), + fetchOptions, + }); +}; +/** + * Delete a VTODO object from a CalDAV calendar + * + * @param params.calendarObject - Todo object to delete + * @param params.headers - Request headers + * @param params.headersToExclude - Headers to exclude + * @param params.fetchOptions - Fetch options + * @returns Response from the server + */ +const deleteTodo = async (params) => { + const { calendarObject, headers, headersToExclude, fetchOptions = {} } = params; + return deleteObject({ + url: calendarObject.url, + etag: calendarObject.etag, + headers: excludeHeaders(headers, headersToExclude), + fetchOptions, + }); +}; + +var todo = /*#__PURE__*/Object.freeze({ + __proto__: null, + createTodo: createTodo, + deleteTodo: deleteTodo, + fetchTodos: fetchTodos, + todoMultiGet: todoMultiGet, + todoQuery: todoQuery, + updateTodo: updateTodo +}); + var base64$1 = {exports: {}}; /*! https://mths.be/base64 v1.0.0 by @mathias | MIT license */ @@ -11101,6 +11412,10 @@ const createDAVClient = async (params) => { headers: authHeaders, fetch: fetchOverride, }); + const makeAddressBook$1 = defaultParam(makeAddressBook, { + headers: authHeaders, + fetch: fetchOverride, + }); const fetchAddressBooks$1 = defaultParam(fetchAddressBooks, { account: defaultAccount, headers: authHeaders, @@ -11122,6 +11437,13 @@ const createDAVClient = async (params) => { headers: authHeaders, fetch: fetchOverride, }); + // todo + const todoQuery$1 = defaultParam(todoQuery, { headers: authHeaders }); + const todoMultiGet$1 = defaultParam(todoMultiGet, { headers: authHeaders }); + const fetchTodos$1 = defaultParam(fetchTodos, { headers: authHeaders }); + const createTodo$1 = defaultParam(createTodo, { headers: authHeaders }); + const updateTodo$1 = defaultParam(updateTodo, { headers: authHeaders }); + const deleteTodo$1 = defaultParam(deleteTodo, { headers: authHeaders }); return { davRequest: davRequest$1, propfind: propfind$1, @@ -11148,10 +11470,17 @@ const createDAVClient = async (params) => { syncCalendars: syncCalendars$1, fetchAddressBooks: fetchAddressBooks$1, addressBookMultiGet: addressBookMultiGet$1, + makeAddressBook: makeAddressBook$1, fetchVCards: fetchVCards$1, createVCard: createVCard$1, updateVCard: updateVCard$1, deleteVCard: deleteVCard$1, + todoQuery: todoQuery$1, + todoMultiGet: todoMultiGet$1, + fetchTodos: fetchTodos$1, + createTodo: createTodo$1, + updateTodo: updateTodo$1, + deleteTodo: deleteTodo$1, }; }; class DAVClient { @@ -11389,6 +11718,9 @@ class DAVClient { fetch: this.fetchOverride, })(params[0]); } + async makeAddressBook(...params) { + return defaultParam(makeAddressBook, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); + } async fetchAddressBooks(...params) { return defaultParam(fetchAddressBooks, { headers: this.authHeaders, @@ -11425,6 +11757,24 @@ class DAVClient { fetch: this.fetchOverride, })(params[0]); } + async todoQuery(...params) { + return defaultParam(todoQuery, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); + } + async todoMultiGet(...params) { + return defaultParam(todoMultiGet, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); + } + async fetchTodos(...params) { + return defaultParam(fetchTodos, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); + } + async createTodo(...params) { + return defaultParam(createTodo, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); + } + async updateTodo(...params) { + return defaultParam(updateTodo, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); + } + async deleteTodo(...params) { + return defaultParam(deleteTodo, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); + } } var client = /*#__PURE__*/Object.freeze({ @@ -11443,8 +11793,9 @@ var index = { ...account, ...addressBook, ...calendar, + ...todo, ...authHelpers, ...requestHelpers, }; -export { DAVAttributeMap, DAVClient, DAVNamespace, DAVNamespaceShort, addressBookMultiGet, addressBookQuery, calendarMultiGet, calendarQuery, cleanupFalsy, collectionQuery, createAccount, createCalendarObject, createDAVClient, createObject, createVCard, davRequest, index as default, deleteCalendarObject, deleteObject, deleteVCard, fetchAddressBooks, fetchCalendarObjects, fetchCalendarUserAddresses, fetchCalendars, fetchOauthTokens, fetchVCards, freeBusyQuery, getBasicAuthHeaders, getBearerAuthHeaders, getDAVAttribute, getOauthHeaders, isCollectionDirty, makeCalendar, propfind, refreshAccessToken, smartCollectionSync, supportedReportSet, syncCalendars, syncCollection, updateCalendarObject, updateObject, updateVCard, urlContains, urlEquals }; +export { DAVAttributeMap, DAVClient, DAVNamespace, DAVNamespaceShort, addressBookMultiGet, addressBookQuery, calendarMultiGet, calendarQuery, cleanupFalsy, collectionQuery, createAccount, createCalendarObject, createDAVClient, createObject, createTodo, createVCard, davRequest, index as default, deleteCalendarObject, deleteObject, deleteTodo, deleteVCard, fetchAddressBooks, fetchCalendarObjects, fetchCalendarUserAddresses, fetchCalendars, fetchOauthTokens, fetchTodos, fetchVCards, freeBusyQuery, getBasicAuthHeaders, getBearerAuthHeaders, getDAVAttribute, getOauthHeaders, isCollectionDirty, makeAddressBook, makeCalendar, propfind, refreshAccessToken, smartCollectionSync, supportedReportSet, syncCalendars, syncCollection, todoMultiGet, todoQuery, updateCalendarObject, updateObject, updateTodo, updateVCard, urlContains, urlEquals }; diff --git a/dist/tsdav.min.cjs b/dist/tsdav.min.cjs index 22a2e7ba..2cbcff1b 100644 --- a/dist/tsdav.min.cjs +++ b/dist/tsdav.min.cjs @@ -1 +1 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("debug"),r=require("xml-js"),a=require("cross-fetch"),s=require("base-64");exports.DAVNamespace=void 0,(e=exports.DAVNamespace||(exports.DAVNamespace={})).CALENDAR_SERVER="http://calendarserver.org/ns/",e.CALDAV_APPLE="http://apple.com/ns/ical/",e.CALDAV="urn:ietf:params:xml:ns:caldav",e.CARDDAV="urn:ietf:params:xml:ns:carddav",e.DAV="DAV:";const o={[exports.DAVNamespace.CALDAV]:"xmlns:c",[exports.DAVNamespace.CARDDAV]:"xmlns:card",[exports.DAVNamespace.CALENDAR_SERVER]:"xmlns:cs",[exports.DAVNamespace.CALDAV_APPLE]:"xmlns:ca",[exports.DAVNamespace.DAV]:"xmlns:d"};var c,n;exports.DAVNamespaceShort=void 0,(c=exports.DAVNamespaceShort||(exports.DAVNamespaceShort={})).CALDAV="c",c.CARDDAV="card",c.CALENDAR_SERVER="cs",c.CALDAV_APPLE="ca",c.DAV="d",function(e){e.VEVENT="VEVENT",e.VTODO="VTODO",e.VJOURNAL="VJOURNAL",e.VFREEBUSY="VFREEBUSY",e.VTIMEZONE="VTIMEZONE",e.VALARM="VALARM"}(n||(n={}));const d="undefined"!=typeof globalThis&&"function"==typeof globalThis.fetch?globalThis.fetch.bind(globalThis):a,i=e=>{const t=Number(e);if(!Number.isNaN(t))return t;const r=e.toLowerCase();return"true"===r||"false"!==r&&e},l=(e,t)=>{if(!e&&!t)return!0;if(!e||!t)return!1;const r=e.trim(),a=t.trim();if(Math.abs(r.length-a.length)>1)return!1;const s="/"===r.slice(-1)?r.slice(0,-1):r,o="/"===a.slice(-1)?a.slice(0,-1):a;return e.includes(o)||t.includes(s)},h=(e,t)=>{if(!e&&!t)return!0;if(!e||!t)return!1;const r=e.trim(),a=t.trim(),s="/"===r.slice(-1)?r.slice(0,-1):r,o="/"===a.slice(-1)?a.slice(0,-1):a;return e.includes(o)||t.includes(s)},p=e=>e.reduce((e,t)=>({...e,[o[t]]:t}),{}),u=e=>Object.entries(e).reduce((e,[t,r])=>r?{...e,[t]:r}:e,{}),f=(e,t)=>t?{[e]:t}:{},v=(e,t)=>e?t&&0!==t.length?Object.fromEntries(Object.entries(e).filter(([e])=>!t.includes(e))):e:{};var m=Object.freeze({__proto__:null,cleanupFalsy:u,conditionalParam:f,excludeHeaders:v,getDAVAttribute:p,urlContains:h,urlEquals:l});const A=t("tsdav:request"),O=async e=>{var t;const{url:a,init:s,convertIncoming:o=!0,parseOutgoing:c=!0,fetchOptions:n={},fetch:l}=e,h=null!=l?l:d,{headers:p={},body:f,namespace:v,method:m,attributes:O}=s,y=o?r.js2xml({_declaration:{_attributes:{version:"1.0",encoding:"utf-8"}},...f,_attributes:O},{compact:!0,spaces:2,elementNameFn:e=>v&&!/^.+:.+/.test(e)?`${v}:${e}`:e}):f,D={...n};delete D.headers;const V=await h(a,{headers:{"Content-Type":"text/xml;charset=UTF-8",...u(p),...n.headers||{}},body:y,method:m,...D}),x=await V.text();if(!(V.ok&&(null===(t=V.headers.get("content-type"))||void 0===t?void 0:t.includes("xml"))&&c&&x))return[{href:V.url,ok:V.ok,status:V.status,statusText:V.statusText,raw:x}];const C=r.xml2js(x,{compact:!0,trim:!0,textFn:(e,t)=>{try{const r=t._parent,a=Object.keys(r),s=a[a.length-1],o=r[s];if(o.length>0){o[o.length-1]=i(e)}else r[s]=i(e)}catch(e){A(e.stack)}},elementNameFn:e=>e.replace(/^.+:/,"").replace(/([-_]\w)/g,e=>e[1].toUpperCase()),attributesFn:e=>{const t={...e};return delete t.xmlns,t},ignoreDeclaration:!0});return(Array.isArray(C.multistatus.response)?C.multistatus.response:[C.multistatus.response]).map(e=>{var t,r;if(!e)return{status:V.status,statusText:V.statusText,ok:V.ok};const a=/^\S+\s(?\d+)\s(?.+)$/.exec(e.status);return{raw:C,href:e.href,status:(null==a?void 0:a.groups)?Number.parseInt(null==a?void 0:a.groups.status,10):V.status,statusText:null!==(r=null===(t=null==a?void 0:a.groups)||void 0===t?void 0:t.statusText)&&void 0!==r?r:V.statusText,ok:!e.error,error:e.error,responsedescription:e.responsedescription,props:(Array.isArray(e.propstat)?e.propstat:[e.propstat]).reduce((e,t)=>({...e,...null==t?void 0:t.prop}),{})}})},y=async e=>{const{url:t,props:r,depth:a,headers:s,headersToExclude:o,fetchOptions:c={},fetch:n}=e;return O({url:t,init:{method:"PROPFIND",headers:v(u({depth:a,...s}),o),namespace:exports.DAVNamespaceShort.DAV,body:{propfind:{_attributes:p([exports.DAVNamespace.CALDAV,exports.DAVNamespace.CALDAV_APPLE,exports.DAVNamespace.CALENDAR_SERVER,exports.DAVNamespace.CARDDAV,exports.DAVNamespace.DAV]),prop:r}}},fetchOptions:c,fetch:n})},D=async e=>{const{url:t,data:r,headers:a,headersToExclude:s,fetchOptions:o={},fetch:c}=e;return(null!=c?c:d)(t,{method:"PUT",body:r,headers:v(a,s),...o})},V=async e=>{const{url:t,data:r,etag:a,headers:s,headersToExclude:o,fetchOptions:c={},fetch:n}=e;return(null!=n?n:d)(t,{method:"PUT",body:r,headers:v(u({"If-Match":a,...s}),o),...c})},x=async e=>{const{url:t,headers:r,etag:a,headersToExclude:s,fetchOptions:o={},fetch:c}=e;return(null!=c?c:d)(t,{method:"DELETE",headers:v(u({"If-Match":a,...r}),s),...o})};var C=Object.freeze({__proto__:null,createObject:D,davRequest:O,deleteObject:x,propfind:y,updateObject:V});function g(e,t){const r=e=>t.every(t=>e[t]);return Array.isArray(e)?e.every(e=>r(e)):r(e)}const b=(e,t)=>t.reduce((t,r)=>e[r]?t:`${t.length?`${t},`:""}${r.toString()}`,""),w=t("tsdav:collection"),S=async e=>{const{url:t,body:r,depth:a,defaultNamespace:s=exports.DAVNamespaceShort.DAV,headers:o,headersToExclude:c,fetchOptions:n={},fetch:d}=e,i=await O({url:t,init:{method:"REPORT",headers:v(u({depth:a,...o}),c),namespace:s,body:r},fetchOptions:n,fetch:d}),l=i.find(e=>!e.ok||e.status&&e.status>=400);if(l)throw new Error(`Collection query failed: ${l.status} ${l.statusText}. ${l.raw?`Raw response: ${l.raw}`:""}`);return 1===i.length&&!i[0].raw&&i[0].status&&i[0].status<300?[]:i},N=async e=>{const{url:t,props:r,depth:a,headers:s,headersToExclude:o,fetchOptions:c={},fetch:n}=e;return O({url:t,init:{method:"MKCOL",headers:v(u({depth:a,...s}),o),namespace:exports.DAVNamespaceShort.DAV,body:r?{mkcol:{set:{prop:r}}}:void 0},fetchOptions:c,fetch:n})},$=async e=>{var t,r,a,s,o;const{collection:c,headers:n,headersToExclude:d,fetchOptions:i={},fetch:l}=e;return null!==(o=null===(s=null===(a=null===(r=null===(t=(await y({url:c.url,props:{[`${exports.DAVNamespaceShort.DAV}:supported-report-set`]:{}},depth:"0",headers:v(n,d),fetchOptions:i,fetch:l}))[0])||void 0===t?void 0:t.props)||void 0===r?void 0:r.supportedReportSet)||void 0===a?void 0:a.supportedReport)||void 0===s?void 0:s.map(e=>Object.keys(e.report)[0]))&&void 0!==o?o:[]},T=async e=>{var t,r,a;const{collection:s,headers:o,headersToExclude:c,fetchOptions:n={},fetch:d}=e,i=(await y({url:s.url,props:{[`${exports.DAVNamespaceShort.CALENDAR_SERVER}:getctag`]:{}},depth:"0",headers:v(o,c),fetchOptions:n,fetch:d})).filter(e=>h(s.url,e.href))[0];if(!i)throw new Error("Collection does not exist on server");return{isDirty:`${s.ctag}`!=`${null===(t=i.props)||void 0===t?void 0:t.getctag}`,newCtag:null===(a=null===(r=i.props)||void 0===r?void 0:r.getctag)||void 0===a?void 0:a.toString()}},E=e=>{const{url:t,props:r,headers:a,syncLevel:s,syncToken:o,headersToExclude:c,fetchOptions:n,fetch:d}=e;return O({url:t,init:{method:"REPORT",namespace:exports.DAVNamespaceShort.DAV,headers:v({...a},c),body:{"sync-collection":{_attributes:p([exports.DAVNamespace.CALDAV,exports.DAVNamespace.CARDDAV,exports.DAVNamespace.DAV]),"sync-level":s,"sync-token":o,[`${exports.DAVNamespaceShort.DAV}:prop`]:r}}},fetchOptions:n,fetch:d})},k=async e=>{var t,r,a,s,o,c,n,d,i,l,p,u;const{collection:f,method:m,headers:A,headersToExclude:O,account:y,detailedResult:D,fetchOptions:V={},fetch:x}=e,C=["accountType","homeUrl"];if(!y||!g(y,C)){if(!y)throw new Error("no account for smartCollectionSync");throw new Error(`account must have ${b(y,C)} before smartCollectionSync`)}const S=null!=m?m:(null===(t=f.reports)||void 0===t?void 0:t.includes("syncCollection"))?"webdav":"basic";if(w(`smart collection sync with type ${y.accountType} and method ${S}`),"webdav"===S){const e=await E({url:f.url,props:{[`${exports.DAVNamespaceShort.DAV}:getetag`]:{},[`${"caldav"===y.accountType?exports.DAVNamespaceShort.CALDAV:exports.DAVNamespaceShort.CARDDAV}:${"caldav"===y.accountType?"calendar-data":"address-data"}`]:{},[`${exports.DAVNamespaceShort.DAV}:displayname`]:{}},syncLevel:1,syncToken:f.syncToken,headers:v(A,O),fetchOptions:V,fetch:x}),t=e.filter(e=>{var t;const r="caldav"===y.accountType?".ics":".vcf";return(null===(t=e.href)||void 0===t?void 0:t.slice(-4))===r}),i=t.filter(e=>404!==e.status).map(e=>e.href),l=t.filter(e=>404===e.status).map(e=>e.href),p=(i.length&&null!==(a=await(null===(r=null==f?void 0:f.objectMultiGet)||void 0===r?void 0:r.call(f,{url:f.url,props:{[`${exports.DAVNamespaceShort.DAV}:getetag`]:{},[`${"caldav"===y.accountType?exports.DAVNamespaceShort.CALDAV:exports.DAVNamespaceShort.CARDDAV}:${"caldav"===y.accountType?"calendar-data":"address-data"}`]:{}},objectUrls:i,depth:"1",headers:v(A,O),fetchOptions:V,fetch:x})))&&void 0!==a?a:[]).map(e=>{var t,r,a,s,o,c,n,d,i,l;return{url:null!==(t=e.href)&&void 0!==t?t:"",etag:null===(r=e.props)||void 0===r?void 0:r.getetag,data:"caldav"===(null==y?void 0:y.accountType)?null!==(o=null===(s=null===(a=e.props)||void 0===a?void 0:a.calendarData)||void 0===s?void 0:s._cdata)&&void 0!==o?o:null===(c=e.props)||void 0===c?void 0:c.calendarData:null!==(i=null===(d=null===(n=e.props)||void 0===n?void 0:n.addressData)||void 0===d?void 0:d._cdata)&&void 0!==i?i:null===(l=e.props)||void 0===l?void 0:l.addressData}}),u=null!==(s=f.objects)&&void 0!==s?s:[],m=p.filter(e=>u.every(t=>!h(t.url,e.url))),C=u.reduce((e,t)=>{const r=p.find(e=>h(e.url,t.url));return r&&r.etag&&r.etag!==t.etag?[...e,r]:e},[]),g=l.map(e=>({url:e,etag:""})),b=u.filter(e=>p.some(t=>h(e.url,t.url)&&t.etag===e.etag));return{...f,objects:D?{created:m,updated:C,deleted:g}:[...b,...m,...C],syncToken:null!==(d=null===(n=null===(c=null===(o=e[0])||void 0===o?void 0:o.raw)||void 0===c?void 0:c.multistatus)||void 0===n?void 0:n.syncToken)&&void 0!==d?d:f.syncToken}}if("basic"===S){const{isDirty:e,newCtag:t}=await T({collection:f,headers:v(A,O),fetchOptions:V,fetch:x}),r=null!==(i=f.objects)&&void 0!==i?i:[],a=null!==(u=await(null===(p=(l=f).fetchObjects)||void 0===p?void 0:p.call(l,{collection:f,headers:v(A,O),fetchOptions:V,fetch:x})))&&void 0!==u?u:[],s=a.filter(e=>r.every(t=>!h(t.url,e.url))),o=r.reduce((e,t)=>{const r=a.find(e=>h(e.url,t.url));return r&&r.etag&&r.etag!==t.etag?[...e,r]:e},[]),c=r.filter(e=>a.every(t=>!h(t.url,e.url))),n=r.filter(e=>a.some(t=>h(e.url,t.url)&&t.etag===e.etag));if(e)return{...f,objects:D?{created:s,updated:o,deleted:c}:[...n,...s,...o],ctag:t}}return D?{...f,objects:{created:[],updated:[],deleted:[]}}:f};var U=Object.freeze({__proto__:null,collectionQuery:S,isCollectionDirty:T,makeCollection:N,smartCollectionSync:k,supportedReportSet:$,syncCollection:E});const _=t("tsdav:addressBook"),R=async e=>{const{url:t,props:r,filters:a,depth:s,headers:o,headersToExclude:c,fetchOptions:n={},fetch:d}=e;return S({url:t,body:{"addressbook-query":u({_attributes:p([exports.DAVNamespace.CARDDAV,exports.DAVNamespace.DAV]),[`${exports.DAVNamespaceShort.DAV}:prop`]:r,filter:null!=a?a:{"prop-filter":{_attributes:{name:"FN"}}}})},defaultNamespace:exports.DAVNamespaceShort.CARDDAV,depth:s,headers:v(o,c),fetchOptions:n,fetch:d})},j=async e=>{const{url:t,props:r,objectUrls:a,depth:s,headers:o,headersToExclude:c,fetchOptions:n={},fetch:d}=e;return S({url:t,body:{"addressbook-multiget":u({_attributes:p([exports.DAVNamespace.DAV,exports.DAVNamespace.CARDDAV]),[`${exports.DAVNamespaceShort.DAV}:prop`]:r,[`${exports.DAVNamespaceShort.DAV}:href`]:a})},defaultNamespace:exports.DAVNamespaceShort.CARDDAV,depth:s,headers:v(o,c),fetchOptions:n,fetch:d})},L=async e=>{const{account:t,headers:r,props:a,headersToExclude:s,fetchOptions:o={},fetch:c}=null!=e?e:{},n=["homeUrl","rootUrl"];if(!t||!g(t,n)){if(!t)throw new Error("no account for fetchAddressBooks");throw new Error(`account must have ${b(t,n)} before fetchAddressBooks`)}const d=await y({url:t.homeUrl,props:null!=a?a:{[`${exports.DAVNamespaceShort.DAV}:displayname`]:{},[`${exports.DAVNamespaceShort.CALENDAR_SERVER}:getctag`]:{},[`${exports.DAVNamespaceShort.DAV}:resourcetype`]:{},[`${exports.DAVNamespaceShort.DAV}:sync-token`]:{}},depth:"1",headers:v(r,s),fetchOptions:o,fetch:c});return Promise.all(d.filter(e=>{var t,r;return Object.keys(null!==(r=null===(t=e.props)||void 0===t?void 0:t.resourcetype)&&void 0!==r?r:{}).includes("addressbook")}).map(e=>{var r,a,s,o,c,n,d,i,l;const h=null!==(s=null===(a=null===(r=e.props)||void 0===r?void 0:r.displayname)||void 0===a?void 0:a._cdata)&&void 0!==s?s:null===(o=e.props)||void 0===o?void 0:o.displayname;return _(`Found address book named ${"string"==typeof h?h:""},\n props: ${JSON.stringify(e.props)}`),{url:new URL(null!==(c=e.href)&&void 0!==c?c:"",null!==(n=t.rootUrl)&&void 0!==n?n:"").href,ctag:null===(d=e.props)||void 0===d?void 0:d.getctag,displayName:"string"==typeof h?h:"",resourcetype:Object.keys(null===(i=e.props)||void 0===i?void 0:i.resourcetype),syncToken:null===(l=e.props)||void 0===l?void 0:l.syncToken}}).map(async e=>({...e,reports:await $({collection:e,headers:v(r,s),fetchOptions:o,fetch:c})})))},H=async e=>{const{addressBook:t,headers:r,objectUrls:a,headersToExclude:s,urlFilter:o=e=>e,useMultiGet:c=!0,fetchOptions:n={},fetch:d}=e;_(`Fetching vcards from ${null==t?void 0:t.url}`);const i=["url"];if(!t||!g(t,i)){if(!t)throw new Error("cannot fetchVCards for undefined addressBook");throw new Error(`addressBook must have ${b(t,i)} before fetchVCards`)}const h=(null!=a?a:(await R({url:t.url,props:{[`${exports.DAVNamespaceShort.DAV}:getetag`]:{}},depth:"1",headers:v(r,s),fetchOptions:n,fetch:d})).map(e=>{var t;return null!==(t=e.href)&&void 0!==t?t:""})).map(e=>e.startsWith("http")||!e?e:new URL(e,t.url).href).filter(e=>e&&!l(e,t.url)).filter(o).map(e=>new URL(e).pathname);let p=[];return h.length>0&&(p=c?await j({url:t.url,props:{[`${exports.DAVNamespaceShort.DAV}:getetag`]:{},[`${exports.DAVNamespaceShort.CARDDAV}:address-data`]:{}},objectUrls:h,depth:"1",headers:v(r,s),fetchOptions:n,fetch:d}):await R({url:t.url,props:{[`${exports.DAVNamespaceShort.DAV}:getetag`]:{},[`${exports.DAVNamespaceShort.CARDDAV}:address-data`]:{}},depth:"1",headers:v(r,s),fetchOptions:n,fetch:d})),p.map(e=>{var r,a,s,o,c,n;return{url:new URL(null!==(r=e.href)&&void 0!==r?r:"",t.url).href,etag:null===(a=e.props)||void 0===a?void 0:a.getetag,data:null!==(c=null===(o=null===(s=e.props)||void 0===s?void 0:s.addressData)||void 0===o?void 0:o._cdata)&&void 0!==c?c:null===(n=e.props)||void 0===n?void 0:n.addressData}})},B=async e=>{const{addressBook:t,vCardString:r,filename:a,headers:s,headersToExclude:o,fetchOptions:c={},fetch:n}=e;return D({url:new URL(a,t.url).href,data:r,headers:v({"content-type":"text/vcard; charset=utf-8","If-None-Match":"*",...s},o),fetchOptions:c,fetch:n})},P=async e=>{const{vCard:t,headers:r,headersToExclude:a,fetchOptions:s={},fetch:o}=e;return V({url:t.url,data:t.data,etag:t.etag,headers:v({"content-type":"text/vcard; charset=utf-8",...r},a),fetchOptions:s,fetch:o})},F=async e=>{const{vCard:t,headers:r,headersToExclude:a,fetchOptions:s={},fetch:o}=e;return x({url:t.url,etag:t.etag,headers:v(r,a),fetchOptions:s,fetch:o})};var M=Object.freeze({__proto__:null,addressBookMultiGet:j,addressBookQuery:R,createVCard:B,deleteVCard:F,fetchAddressBooks:L,fetchVCards:H,updateVCard:P});const I=t("tsdav:calendar"),z=async e=>{var t,r,a;const{account:s,headers:o,headersToExclude:c,fetchOptions:n={},fetch:d}=e,i=["principalUrl","rootUrl"];if(!g(s,i))throw new Error(`account must have ${b(s,i)} before fetchUserAddresses`);I(`Fetch user addresses from ${s.principalUrl}`);const l=(await y({url:s.principalUrl,props:{[`${exports.DAVNamespaceShort.CALDAV}:calendar-user-address-set`]:{}},depth:"0",headers:v(o,c),fetchOptions:n,fetch:d})).find(e=>h(s.principalUrl,e.href));if(!l||!l.ok)throw new Error("cannot find calendarUserAddresses");const p=(null===(a=null===(r=null===(t=null==l?void 0:l.props)||void 0===t?void 0:t.calendarUserAddressSet)||void 0===r?void 0:r.href)||void 0===a?void 0:a.filter(Boolean))||[];return I(`Fetched calendar user addresses ${p}`),p},q=async e=>{const{url:t,props:r,filters:a,timezone:s,depth:o,headers:c,headersToExclude:n,fetchOptions:d={},fetch:i}=e;return S({url:t,body:{"calendar-query":u({_attributes:p([exports.DAVNamespace.CALDAV,exports.DAVNamespace.CALENDAR_SERVER,exports.DAVNamespace.CALDAV_APPLE,exports.DAVNamespace.DAV]),[`${exports.DAVNamespaceShort.DAV}:prop`]:r,filter:a,timezone:s})},defaultNamespace:exports.DAVNamespaceShort.CALDAV,depth:o,headers:v(c,n),fetchOptions:d,fetch:i})},Z=async e=>{const{url:t,props:r,objectUrls:a,filters:s,timezone:o,depth:c,headers:n,headersToExclude:d,fetchOptions:i={},fetch:l}=e;return S({url:t,body:{"calendar-multiget":u({_attributes:p([exports.DAVNamespace.DAV,exports.DAVNamespace.CALDAV]),[`${exports.DAVNamespaceShort.DAV}:prop`]:r,[`${exports.DAVNamespaceShort.DAV}:href`]:a,filter:s,timezone:o})},defaultNamespace:exports.DAVNamespaceShort.CALDAV,depth:c,headers:v(n,d),fetchOptions:i,fetch:l})},Q=async e=>{const{url:t,props:r,depth:a,headers:s,headersToExclude:o,fetchOptions:c={},fetch:n}=e;return O({url:t,init:{method:"MKCALENDAR",headers:v(u({depth:a,...s}),o),namespace:exports.DAVNamespaceShort.DAV,body:{[`${exports.DAVNamespaceShort.CALDAV}:mkcalendar`]:{_attributes:p([exports.DAVNamespace.DAV,exports.DAVNamespace.CALDAV,exports.DAVNamespace.CALDAV_APPLE]),set:{prop:r}}}},fetchOptions:c,fetch:n})},G=async e=>{const{headers:t,account:r,props:a,projectedProps:s,headersToExclude:o,fetchOptions:c={},fetch:d}=null!=e?e:{},i=["homeUrl","rootUrl"];if(!r||!g(r,i)){if(!r)throw new Error("no account for fetchCalendars");throw new Error(`account must have ${b(r,i)} before fetchCalendars`)}const l=await y({url:r.homeUrl,props:null!=a?a:{[`${exports.DAVNamespaceShort.CALDAV}:calendar-description`]:{},[`${exports.DAVNamespaceShort.CALDAV}:calendar-timezone`]:{},[`${exports.DAVNamespaceShort.DAV}:displayname`]:{},[`${exports.DAVNamespaceShort.CALDAV_APPLE}:calendar-color`]:{},[`${exports.DAVNamespaceShort.CALENDAR_SERVER}:getctag`]:{},[`${exports.DAVNamespaceShort.DAV}:resourcetype`]:{},[`${exports.DAVNamespaceShort.CALDAV}:supported-calendar-component-set`]:{},[`${exports.DAVNamespaceShort.DAV}:sync-token`]:{}},depth:"1",headers:v(t,o),fetchOptions:c,fetch:d});return Promise.all(l.filter(e=>{var t,r;return Object.keys(null!==(r=null===(t=e.props)||void 0===t?void 0:t.resourcetype)&&void 0!==r?r:{}).includes("calendar")}).filter(e=>{var t,r,a,s,o,c;return(Array.isArray(null===(r=null===(t=e.props)||void 0===t?void 0:t.supportedCalendarComponentSet)||void 0===r?void 0:r.comp)?null===(a=e.props)||void 0===a?void 0:a.supportedCalendarComponentSet.comp.map(e=>e._attributes.name):[null===(c=null===(o=null===(s=e.props)||void 0===s?void 0:s.supportedCalendarComponentSet)||void 0===o?void 0:o.comp)||void 0===c?void 0:c._attributes.name]).some(e=>Object.values(n).includes(e))}).map(e=>{var t,a,o,c,n,d,i,l,h,p,u,v,m,A,O,y;const D=null===(t=e.props)||void 0===t?void 0:t.calendarDescription,V=null===(a=e.props)||void 0===a?void 0:a.calendarTimezone;return{description:"string"==typeof D?D:"",timezone:"string"==typeof V?V:"",url:new URL(null!==(o=e.href)&&void 0!==o?o:"",null!==(c=r.rootUrl)&&void 0!==c?c:"").href,ctag:null===(n=e.props)||void 0===n?void 0:n.getctag,calendarColor:null===(d=e.props)||void 0===d?void 0:d.calendarColor,displayName:null!==(l=null===(i=e.props)||void 0===i?void 0:i.displayname._cdata)&&void 0!==l?l:null===(h=e.props)||void 0===h?void 0:h.displayname,components:Array.isArray(null===(p=e.props)||void 0===p?void 0:p.supportedCalendarComponentSet.comp)?null===(u=e.props)||void 0===u?void 0:u.supportedCalendarComponentSet.comp.map(e=>e._attributes.name):[null===(m=null===(v=e.props)||void 0===v?void 0:v.supportedCalendarComponentSet.comp)||void 0===m?void 0:m._attributes.name],resourcetype:Object.keys(null===(A=e.props)||void 0===A?void 0:A.resourcetype),syncToken:null===(O=e.props)||void 0===O?void 0:O.syncToken,...f("projectedProps",Object.fromEntries(Object.entries(null!==(y=e.props)&&void 0!==y?y:{}).filter(([e])=>null==s?void 0:s[e])))}}).map(async e=>({...e,reports:await $({collection:e,headers:v(t,o),fetchOptions:c,fetch:d})})))},J=async e=>{const{calendar:t,objectUrls:r,filters:a,timeRange:s,headers:o,expand:c,urlFilter:n=e=>Boolean(null==e?void 0:e.includes(".ics")),useMultiGet:d=!0,headersToExclude:i,fetchOptions:l={},fetch:h}=e;if(s){const e=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,t=/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i;if(!(e.test(s.start)&&e.test(s.end)||t.test(s.start)&&t.test(s.end)))throw new Error("invalid timeRange format, not in ISO8601")}I(`Fetching calendar objects from ${null==t?void 0:t.url}`);const p=["url"];if(!t||!g(t,p)){if(!t)throw new Error("cannot fetchCalendarObjects for undefined calendar");throw new Error(`calendar must have ${b(t,p)} before fetchCalendarObjects`)}const u=null!=a?a:[{"comp-filter":{_attributes:{name:"VCALENDAR"},"comp-filter":{_attributes:{name:"VEVENT"},...s?{"time-range":{_attributes:{start:`${new Date(s.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(s.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}}}];let f=[];const m=(null!=r?r:(f=await q({url:t.url,props:{[`${exports.DAVNamespaceShort.DAV}:getetag`]:{},...c&&s?{[`${exports.DAVNamespaceShort.CALDAV}:calendar-data`]:{[`${exports.DAVNamespaceShort.CALDAV}:expand`]:{_attributes:{start:`${new Date(s.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(s.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}}:{}},filters:u,depth:"1",headers:v(o,i),fetchOptions:l,fetch:h})).map(e=>{var t;return null!==(t=e.href)&&void 0!==t?t:""})).map(e=>e.startsWith("http")||!e?e:new URL(e,t.url).href).filter(n).map(e=>new URL(e).pathname);let A=[];return m.length>0&&(A=c&&!r?f.filter(e=>{var r,a;const s=(null!==(r=e.href)&&void 0!==r?r:"").startsWith("http")?e.href:new URL(null!==(a=e.href)&&void 0!==a?a:"",t.url).href;return n(null!=s?s:"")}):d?await Z({url:t.url,props:{[`${exports.DAVNamespaceShort.DAV}:getetag`]:{},[`${exports.DAVNamespaceShort.CALDAV}:calendar-data`]:{...c&&s?{[`${exports.DAVNamespaceShort.CALDAV}:expand`]:{_attributes:{start:`${new Date(s.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(s.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}},objectUrls:m,depth:"1",headers:v(o,i),fetchOptions:l,fetch:h}):await q({url:t.url,props:{[`${exports.DAVNamespaceShort.DAV}:getetag`]:{},[`${exports.DAVNamespaceShort.CALDAV}:calendar-data`]:{...c&&s?{[`${exports.DAVNamespaceShort.CALDAV}:expand`]:{_attributes:{start:`${new Date(s.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(s.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}},filters:u,depth:"1",headers:v(o,i),fetchOptions:l,fetch:h})),A.map(e=>{var r,a,s,o,c,n;return{url:new URL(null!==(r=e.href)&&void 0!==r?r:"",t.url).href,etag:`${null===(a=e.props)||void 0===a?void 0:a.getetag}`,data:null!==(c=null===(o=null===(s=e.props)||void 0===s?void 0:s.calendarData)||void 0===o?void 0:o._cdata)&&void 0!==c?c:null===(n=e.props)||void 0===n?void 0:n.calendarData}})},W=async e=>{const{calendar:t,iCalString:r,filename:a,headers:s,headersToExclude:o,fetchOptions:c={},fetch:n}=e;return D({url:new URL(a,t.url).href,data:r,headers:v({"content-type":"text/calendar; charset=utf-8","If-None-Match":"*",...s},o),fetchOptions:c,fetch:n})},K=async e=>{const{calendarObject:t,headers:r,headersToExclude:a,fetchOptions:s={},fetch:o}=e;return V({url:t.url,data:t.data,etag:t.etag,headers:v({"content-type":"text/calendar; charset=utf-8",...r},a),fetchOptions:s,fetch:o})},Y=async e=>{const{calendarObject:t,headers:r,headersToExclude:a,fetchOptions:s={},fetch:o}=e;return x({url:t.url,etag:t.etag,headers:v(r,a),fetchOptions:s,fetch:o})},X=async e=>{var t;const{oldCalendars:r,account:a,detailedResult:s,headers:o,headersToExclude:c,fetchOptions:n={},fetch:d}=e;if(!a)throw new Error("Must have account before syncCalendars");const i=null!==(t=null!=r?r:a.calendars)&&void 0!==t?t:[],l=await G({account:a,headers:v(o,c),fetchOptions:n,fetch:d}),p=l.filter(e=>i.every(t=>!h(t.url,e.url)));I(`new calendars: ${p.map(e=>e.displayName)}`);const u=i.reduce((e,t)=>{const r=l.find(e=>h(e.url,t.url));return r&&(r.syncToken&&`${r.syncToken}`!=`${t.syncToken}`||r.ctag&&`${r.ctag}`!=`${t.ctag}`)?[...e,r]:e},[]);I(`updated calendars: ${u.map(e=>e.displayName)}`);const f=await Promise.all(u.map(async e=>await k({collection:{...e,objectMultiGet:Z},method:"webdav",headers:v(o,c),account:a,fetchOptions:n,fetch:d}))),m=i.filter(e=>l.every(t=>!h(t.url,e.url)));I(`deleted calendars: ${m.map(e=>e.displayName)}`);const A=i.filter(e=>l.some(t=>h(t.url,e.url)&&(t.syncToken&&`${t.syncToken}`!=`${e.syncToken}`||t.ctag&&`${t.ctag}`!=`${e.ctag}`)));return s?{created:p,updated:u,deleted:m}:[...A,...p,...f]},ee=async e=>{const{url:t,timeRange:r,depth:a,headers:s,headersToExclude:o,fetchOptions:c={},fetch:n}=e;if(!r)throw new Error("timeRange is required");{const e=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,t=/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i;if(!(e.test(r.start)&&e.test(r.end)||t.test(r.start)&&t.test(r.end)))throw new Error("invalid timeRange format, not in ISO8601")}return(await S({url:t,body:{"free-busy-query":u({_attributes:p([exports.DAVNamespace.CALDAV]),[`${exports.DAVNamespaceShort.CALDAV}:time-range`]:{_attributes:{start:`${new Date(r.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(r.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}})},defaultNamespace:exports.DAVNamespaceShort.CALDAV,depth:a,headers:v(s,o),fetchOptions:c,fetch:n}))[0]};var te=Object.freeze({__proto__:null,calendarMultiGet:Z,calendarQuery:q,createCalendarObject:W,deleteCalendarObject:Y,fetchCalendarObjects:J,fetchCalendarUserAddresses:z,fetchCalendars:G,freeBusyQuery:ee,makeCalendar:Q,syncCalendars:X,updateCalendarObject:K});const re=t("tsdav:account"),ae=async e=>{var t,r;re("Service discovery...");const{account:a,headers:s,headersToExclude:o,fetchOptions:c={},fetch:n}=e,i=null!=n?n:d,l=new URL(a.serverUrl),h=new URL(`/.well-known/${a.accountType}`,l);h.protocol=null!==(t=l.protocol)&&void 0!==t?t:"http";try{const e=await i(h.href,{headers:{...v(s,o),"Content-Type":"text/xml;charset=UTF-8"},method:"PROPFIND",body:'\n\n \n \n \n',redirect:"manual",...c});if(e.status>=300&&e.status<400){const t=e.headers.get("Location");if("string"==typeof t&&t.length){re(`Service discovery redirected to ${t}`);const e=new URL(t,l);return e.hostname===h.hostname&&h.port&&!e.port&&(e.port=h.port),e.protocol=null!==(r=l.protocol)&&void 0!==r?r:"http",e.href}}}catch(e){re(`Service discovery failed: ${e.stack}`)}return l.href},se=async e=>{var t,r,a,s,o;const{account:c,headers:n,headersToExclude:d,fetchOptions:i={},fetch:l}=e,h=["rootUrl"];if(!g(c,h))throw new Error(`account must have ${b(c,h)} before fetchPrincipalUrl`);re(`Fetching principal url from path ${c.rootUrl}`);const[p]=await y({url:c.rootUrl,props:{[`${exports.DAVNamespaceShort.DAV}:current-user-principal`]:{}},depth:"0",headers:v(n,d),fetchOptions:i,fetch:l});if(!p.ok&&(re(`Fetch principal url failed: ${p.statusText}`),401===p.status))throw new Error("Invalid credentials");return re(`Fetched principal url ${null===(r=null===(t=p.props)||void 0===t?void 0:t.currentUserPrincipal)||void 0===r?void 0:r.href}`),new URL(null!==(o=null===(s=null===(a=p.props)||void 0===a?void 0:a.currentUserPrincipal)||void 0===s?void 0:s.href)&&void 0!==o?o:"",c.rootUrl).href},oe=async e=>{var t,r;const{account:a,headers:s,headersToExclude:o,fetchOptions:c={},fetch:n}=e,d=["principalUrl","rootUrl"];if(!g(a,d))throw new Error(`account must have ${b(a,d)} before fetchHomeUrl`);re(`Fetch home url from ${a.principalUrl}`);const i=await y({url:a.principalUrl,props:"caldav"===a.accountType?{[`${exports.DAVNamespaceShort.CALDAV}:calendar-home-set`]:{}}:{[`${exports.DAVNamespaceShort.CARDDAV}:addressbook-home-set`]:{}},depth:"0",headers:v(s,o),fetchOptions:c,fetch:n}),l=i.find(e=>h(a.principalUrl,e.href));if(!l||!l.ok)throw re(`Fetch home url failed with status ${null==l?void 0:l.statusText} and error ${JSON.stringify(i.map(e=>e.error))}`),new Error("cannot find homeUrl");const p=new URL("caldav"===a.accountType?null===(t=null==l?void 0:l.props)||void 0===t?void 0:t.calendarHomeSet.href:null===(r=null==l?void 0:l.props)||void 0===r?void 0:r.addressbookHomeSet.href,a.rootUrl).href;return re(`Fetched home url ${p}`),p},ce=async e=>{const{account:t,headers:r,loadCollections:a=!1,loadObjects:s=!1,headersToExclude:o,fetchOptions:c={},fetch:n}=e,d={...t};return d.rootUrl=await ae({account:t,headers:v(r,o),fetchOptions:c,fetch:n}),d.principalUrl=await se({account:d,headers:v(r,o),fetchOptions:c,fetch:n}),d.homeUrl=await oe({account:d,headers:v(r,o),fetchOptions:c,fetch:n}),(a||s)&&("caldav"===t.accountType?d.calendars=await G({headers:v(r,o),account:d,fetchOptions:c,fetch:n}):"carddav"===t.accountType&&(d.addressBooks=await L({headers:v(r,o),account:d,fetchOptions:c,fetch:n}))),s&&("caldav"===t.accountType&&d.calendars?d.calendars=await Promise.all(d.calendars.map(async e=>({...e,objects:await J({calendar:e,headers:v(r,o),fetchOptions:c,fetch:n})}))):"carddav"===t.accountType&&d.addressBooks&&(d.addressBooks=await Promise.all(d.addressBooks.map(async e=>({...e,objects:await H({addressBook:e,headers:v(r,o),fetchOptions:c,fetch:n})}))))),d};var ne=Object.freeze({__proto__:null,createAccount:ce,fetchHomeUrl:oe,fetchPrincipalUrl:se,serviceDiscovery:ae});const de=t("tsdav:authHelper"),ie=(e,t)=>(...r)=>e({...t,...r[0]}),le=e=>(de(`Basic auth token generated: ${s.encode(`${e.username}:${e.password}`)}`),{authorization:`Basic ${s.encode(`${e.username}:${e.password}`)}`}),he=e=>({authorization:`Bearer ${e.accessToken}`}),pe=async(e,t,r)=>{const a=["authorizationCode","redirectUrl","clientId","clientSecret","tokenUrl"];if(!g(e,a))throw new Error(`Oauth credentials missing: ${b(e,a)}`);const s=new URLSearchParams({grant_type:"authorization_code",code:e.authorizationCode,redirect_uri:e.redirectUrl,client_id:e.clientId,client_secret:e.clientSecret});de(e.tokenUrl),de(s.toString());const o=null!=r?r:d,c=await o(e.tokenUrl,{method:"POST",body:s.toString(),headers:{"content-length":`${s.toString().length}`,"content-type":"application/x-www-form-urlencoded"},...null!=t?t:{}});if(c.ok){return await c.json()}return de(`Fetch Oauth tokens failed: ${await c.text()}`),{}},ue=async(e,t,r)=>{const a=["refreshToken","clientId","clientSecret","tokenUrl"];if(!g(e,a))throw new Error(`Oauth credentials missing: ${b(e,a)}`);const s=new URLSearchParams({client_id:e.clientId,client_secret:e.clientSecret,refresh_token:e.refreshToken,grant_type:"refresh_token"}),o=null!=r?r:d,c=await o(e.tokenUrl,{method:"POST",body:s.toString(),headers:{"Content-Type":"application/x-www-form-urlencoded"},...null!=t?t:{}});if(c.ok){return await c.json()}return de(`Refresh access token failed: ${await c.text()}`),{}},fe=async(e,t,r)=>{var a;de("Fetching oauth headers");let s={};return e.refreshToken?(e.refreshToken&&!e.accessToken||Date.now()>(null!==(a=e.expiration)&&void 0!==a?a:0))&&(s=await ue(e,t,r)):s=await pe(e,t,r),de(`Oauth tokens fetched: ${s.access_token}`),{tokens:s,headers:{authorization:`Bearer ${s.access_token}`}}};var ve=Object.freeze({__proto__:null,defaultParam:ie,fetchOauthTokens:pe,getBasicAuthHeaders:le,getBearerAuthHeaders:he,getOauthHeaders:fe,refreshAccessToken:ue});const me=async e=>{var t;const{serverUrl:r,credentials:a,authMethod:s,defaultAccountType:o,authFunction:c,fetch:n}=e;let d={};switch(s){case"Basic":d=le(a);break;case"Bearer":d=he(a);break;case"Oauth":d=(await fe(a,void 0,n)).headers;break;case"Digest":d={Authorization:`Digest ${a.digestString}`};break;case"Custom":d=null!==(t=await(null==c?void 0:c(a)))&&void 0!==t?t:{};break;default:throw new Error("Invalid auth method")}const i=o?await ce({account:{serverUrl:r,credentials:a,accountType:o},headers:d,fetch:n}):void 0,l=ie(D,{url:r,headers:d,fetch:n}),h=ie(V,{headers:d,url:r,fetch:n}),p=ie(x,{headers:d,url:r,fetch:n}),u=ie(y,{headers:d,fetch:n}),f=ie(S,{headers:d,fetch:n}),v=ie(N,{headers:d,fetch:n}),m=ie(E,{headers:d,fetch:n}),A=ie($,{headers:d,fetch:n}),C=ie(T,{headers:d,fetch:n}),g=ie(k,{headers:d,account:i,fetch:n}),b=ie(q,{headers:d,fetch:n}),w=ie(Z,{headers:d,fetch:n}),U=ie(Q,{headers:d,fetch:n}),_=ie(G,{headers:d,account:i,fetch:n}),M=ie(z,{headers:d,account:i,fetch:n}),I=ie(J,{headers:d,fetch:n}),ee=ie(W,{headers:d,fetch:n}),te=ie(K,{headers:d,fetch:n}),re=ie(Y,{headers:d,fetch:n}),ae=ie(X,{account:i,headers:d,fetch:n}),se=ie(R,{headers:d,fetch:n}),oe=ie(j,{headers:d,fetch:n});return{davRequest:async e=>{const{init:t,fetch:r,...a}=e,{headers:s,...o}=t;return O({...a,init:{...o,headers:{...d,...s}},fetch:null!=r?r:n})},propfind:u,createAccount:async e=>{const{account:t,headers:s,loadCollections:o,loadObjects:c,fetch:i}=e;return ce({account:{serverUrl:r,credentials:a,...t},headers:{...d,...s},loadCollections:o,loadObjects:c,fetch:null!=i?i:n})},createObject:l,updateObject:h,deleteObject:p,calendarQuery:b,addressBookQuery:se,collectionQuery:f,makeCollection:v,calendarMultiGet:w,makeCalendar:U,syncCollection:m,supportedReportSet:A,isCollectionDirty:C,smartCollectionSync:g,fetchCalendars:_,fetchCalendarUserAddresses:M,fetchCalendarObjects:I,createCalendarObject:ee,updateCalendarObject:te,deleteCalendarObject:re,syncCalendars:ae,fetchAddressBooks:ie(L,{account:i,headers:d,fetch:n}),addressBookMultiGet:oe,fetchVCards:ie(H,{headers:d,fetch:n}),createVCard:ie(B,{headers:d,fetch:n}),updateVCard:ie(P,{headers:d,fetch:n}),deleteVCard:ie(F,{headers:d,fetch:n})}};class Ae{constructor(e){var t,r,a;this.serverUrl=e.serverUrl,this.credentials=e.credentials,this.authMethod=null!==(t=e.authMethod)&&void 0!==t?t:"Basic",this.accountType=null!==(r=e.defaultAccountType)&&void 0!==r?r:"caldav",this.authFunction=e.authFunction,this.fetchOptions=null!==(a=e.fetchOptions)&&void 0!==a?a:{},this.fetchOverride=e.fetch}async login(){var e;switch(this.authMethod){case"Basic":this.authHeaders=le(this.credentials);break;case"Bearer":this.authHeaders=he(this.credentials);break;case"Oauth":this.authHeaders=(await fe(this.credentials,this.fetchOptions,this.fetchOverride)).headers;break;case"Digest":this.authHeaders={Authorization:`Digest ${this.credentials.digestString}`};break;case"Custom":this.authHeaders=await(null===(e=this.authFunction)||void 0===e?void 0:e.call(this,this.credentials));break;default:throw new Error("Invalid auth method")}this.account=this.accountType?await ce({account:{serverUrl:this.serverUrl,credentials:this.credentials,accountType:this.accountType},headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride}):void 0}async davRequest(e){const{init:t,fetch:r,...a}=e,{headers:s,...o}=t;return O({...a,init:{...o,headers:{...this.authHeaders,...s}},fetchOptions:this.fetchOptions,fetch:null!=r?r:this.fetchOverride})}async createObject(...e){return ie(D,{url:this.serverUrl,headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async updateObject(...e){return ie(V,{url:this.serverUrl,headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async deleteObject(...e){return ie(x,{url:this.serverUrl,headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async propfind(...e){return ie(y,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async createAccount(e){const{account:t,headers:r,loadCollections:a,loadObjects:s,fetchOptions:o,fetch:c}=e;return ce({account:{serverUrl:this.serverUrl,credentials:this.credentials,...t},headers:{...this.authHeaders,...r},loadCollections:a,loadObjects:s,fetchOptions:null!=o?o:this.fetchOptions,fetch:null!=c?c:this.fetchOverride})}async collectionQuery(...e){return ie(S,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async makeCollection(...e){return ie(N,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async syncCollection(...e){return ie(E,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async supportedReportSet(...e){return ie($,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async isCollectionDirty(...e){return ie(T,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async smartCollectionSync(...e){return ie(k,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride,account:this.account})(e[0])}async calendarQuery(...e){return ie(q,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async makeCalendar(...e){return ie(Q,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async calendarMultiGet(...e){return ie(Z,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async fetchCalendars(...e){return ie(G,{headers:this.authHeaders,account:this.account,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(null==e?void 0:e[0])}async fetchCalendarUserAddresses(...e){return ie(z,{headers:this.authHeaders,account:this.account,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(null==e?void 0:e[0])}async fetchCalendarObjects(...e){return ie(J,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async createCalendarObject(...e){return ie(W,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async updateCalendarObject(...e){return ie(K,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async deleteCalendarObject(...e){return ie(Y,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async syncCalendars(...e){return ie(X,{headers:this.authHeaders,account:this.account,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async addressBookQuery(...e){return ie(R,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async addressBookMultiGet(...e){return ie(j,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async fetchAddressBooks(...e){return ie(L,{headers:this.authHeaders,account:this.account,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(null==e?void 0:e[0])}async fetchVCards(...e){return ie(H,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async createVCard(...e){return ie(B,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async updateVCard(...e){return ie(P,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async deleteVCard(...e){return ie(F,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}}var Oe=Object.freeze({__proto__:null,DAVClient:Ae,createDAVClient:me}),ye={DAVNamespace:exports.DAVNamespace,DAVNamespaceShort:exports.DAVNamespaceShort,DAVAttributeMap:o,...Oe,...C,...U,...ne,...M,...te,...ve,...m};exports.DAVAttributeMap=o,exports.DAVClient=Ae,exports.addressBookMultiGet=j,exports.addressBookQuery=R,exports.calendarMultiGet=Z,exports.calendarQuery=q,exports.cleanupFalsy=u,exports.collectionQuery=S,exports.createAccount=ce,exports.createCalendarObject=W,exports.createDAVClient=me,exports.createObject=D,exports.createVCard=B,exports.davRequest=O,exports.default=ye,exports.deleteCalendarObject=Y,exports.deleteObject=x,exports.deleteVCard=F,exports.fetchAddressBooks=L,exports.fetchCalendarObjects=J,exports.fetchCalendarUserAddresses=z,exports.fetchCalendars=G,exports.fetchOauthTokens=pe,exports.fetchVCards=H,exports.freeBusyQuery=ee,exports.getBasicAuthHeaders=le,exports.getBearerAuthHeaders=he,exports.getDAVAttribute=p,exports.getOauthHeaders=fe,exports.isCollectionDirty=T,exports.makeCalendar=Q,exports.propfind=y,exports.refreshAccessToken=ue,exports.smartCollectionSync=k,exports.supportedReportSet=$,exports.syncCalendars=X,exports.syncCollection=E,exports.updateCalendarObject=K,exports.updateObject=V,exports.updateVCard=P,exports.urlContains=h,exports.urlEquals=l; +"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("debug"),r=require("xml-js"),a=require("cross-fetch"),s=require("base-64");exports.DAVNamespace=void 0,(e=exports.DAVNamespace||(exports.DAVNamespace={})).CALENDAR_SERVER="http://calendarserver.org/ns/",e.CALDAV_APPLE="http://apple.com/ns/ical/",e.CALDAV="urn:ietf:params:xml:ns:caldav",e.CARDDAV="urn:ietf:params:xml:ns:carddav",e.DAV="DAV:";const o={[exports.DAVNamespace.CALDAV]:"xmlns:c",[exports.DAVNamespace.CARDDAV]:"xmlns:card",[exports.DAVNamespace.CALENDAR_SERVER]:"xmlns:cs",[exports.DAVNamespace.CALDAV_APPLE]:"xmlns:ca",[exports.DAVNamespace.DAV]:"xmlns:d"};var c,n;exports.DAVNamespaceShort=void 0,(c=exports.DAVNamespaceShort||(exports.DAVNamespaceShort={})).CALDAV="c",c.CARDDAV="card",c.CALENDAR_SERVER="cs",c.CALDAV_APPLE="ca",c.DAV="d",function(e){e.VEVENT="VEVENT",e.VTODO="VTODO",e.VJOURNAL="VJOURNAL",e.VFREEBUSY="VFREEBUSY",e.VTIMEZONE="VTIMEZONE",e.VALARM="VALARM"}(n||(n={}));const d="undefined"!=typeof globalThis&&"function"==typeof globalThis.fetch?globalThis.fetch.bind(globalThis):a,i=e=>{const t=Number(e);if(!Number.isNaN(t))return t;const r=e.toLowerCase();return"true"===r||"false"!==r&&e},h=(e,t)=>{if(!e&&!t)return!0;if(!e||!t)return!1;const r=e.trim(),a=t.trim();if(Math.abs(r.length-a.length)>1)return!1;const s="/"===r.slice(-1)?r.slice(0,-1):r,o="/"===a.slice(-1)?a.slice(0,-1):a;return e.includes(o)||t.includes(s)},l=(e,t)=>{if(!e&&!t)return!0;if(!e||!t)return!1;const r=e.trim(),a=t.trim(),s="/"===r.slice(-1)?r.slice(0,-1):r,o="/"===a.slice(-1)?a.slice(0,-1):a;return e.includes(o)||t.includes(s)},p=e=>e.reduce((e,t)=>({...e,[o[t]]:t}),{}),u=e=>Object.entries(e).reduce((e,[t,r])=>r?{...e,[t]:r}:e,{}),f=(e,t)=>t?{[e]:t}:{},A=(e,t)=>e?t&&0!==t.length?Object.fromEntries(Object.entries(e).filter(([e])=>!t.includes(e))):e:{},m=e=>Boolean(null==e?void 0:e.includes(".ics")),v=(e,t)=>{const r=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,a=/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i;if(!(r.test(e)&&r.test(t)||a.test(e)&&a.test(t)))throw new Error("invalid timeRange format, not in ISO8601")};var O=Object.freeze({__proto__:null,cleanupFalsy:u,conditionalParam:f,defaultIcsFilter:m,excludeHeaders:A,getDAVAttribute:p,urlContains:l,urlEquals:h,validateISO8601TimeRange:v});const D=t("tsdav:request"),y=async e=>{var t;const{url:a,init:s,convertIncoming:o=!0,parseOutgoing:c=!0,fetchOptions:n={},fetch:h}=e,l=null!=h?h:d,{headers:p={},body:f,namespace:A,method:m,attributes:v}=s,O=o?r.js2xml({_declaration:{_attributes:{version:"1.0",encoding:"utf-8"}},...f,_attributes:v},{compact:!0,spaces:2,elementNameFn:e=>A&&!/^.+:.+/.test(e)?`${A}:${e}`:e}):f,y={...n};delete y.headers;const V=await l(a,{headers:{"Content-Type":"text/xml;charset=UTF-8",...u(p),...n.headers||{}},body:O,method:m,...y}),x=await V.text();if(!(V.ok&&(null===(t=V.headers.get("content-type"))||void 0===t?void 0:t.includes("xml"))&&c&&x))return[{href:V.url,ok:V.ok,status:V.status,statusText:V.statusText,raw:x}];const g=r.xml2js(x,{compact:!0,trim:!0,textFn:(e,t)=>{try{const r=t._parent,a=Object.keys(r),s=a[a.length-1],o=r[s];if(o.length>0){o[o.length-1]=i(e)}else r[s]=i(e)}catch(e){D(e.stack)}},elementNameFn:e=>e.replace(/^.+:/,"").replace(/([-_]\w)/g,e=>e[1].toUpperCase()),attributesFn:e=>{const t={...e};return delete t.xmlns,t},ignoreDeclaration:!0});return(Array.isArray(g.multistatus.response)?g.multistatus.response:[g.multistatus.response]).map(e=>{var t,r;if(!e)return{status:V.status,statusText:V.statusText,ok:V.ok};const a=/^\S+\s(?\d+)\s(?.+)$/.exec(e.status);return{raw:g,href:e.href,status:(null==a?void 0:a.groups)?Number.parseInt(null==a?void 0:a.groups.status,10):V.status,statusText:null!==(r=null===(t=null==a?void 0:a.groups)||void 0===t?void 0:t.statusText)&&void 0!==r?r:V.statusText,ok:!e.error,error:e.error,responsedescription:e.responsedescription,props:(Array.isArray(e.propstat)?e.propstat:[e.propstat]).reduce((e,t)=>({...e,...null==t?void 0:t.prop}),{})}})},V=async e=>{const{url:t,props:r,depth:a,headers:s,headersToExclude:o,fetchOptions:c={},fetch:n}=e;return y({url:t,init:{method:"PROPFIND",headers:A(u({depth:a,...s}),o),namespace:exports.DAVNamespaceShort.DAV,body:{propfind:{_attributes:p([exports.DAVNamespace.CALDAV,exports.DAVNamespace.CALDAV_APPLE,exports.DAVNamespace.CALENDAR_SERVER,exports.DAVNamespace.CARDDAV,exports.DAVNamespace.DAV]),prop:r}}},fetchOptions:c,fetch:n})},x=async e=>{const{url:t,data:r,headers:a,headersToExclude:s,fetchOptions:o={},fetch:c}=e;return(null!=c?c:d)(t,{method:"PUT",body:r,headers:A(a,s),...o})},g=async e=>{const{url:t,data:r,etag:a,headers:s,headersToExclude:o,fetchOptions:c={},fetch:n}=e;return(null!=n?n:d)(t,{method:"PUT",body:r,headers:A(u({"If-Match":a,...s}),o),...c})},C=async e=>{const{url:t,headers:r,etag:a,headersToExclude:s,fetchOptions:o={},fetch:c}=e;return(null!=c?c:d)(t,{method:"DELETE",headers:A(u({"If-Match":a,...r}),s),...o})};var b=Object.freeze({__proto__:null,createObject:x,davRequest:y,deleteObject:C,propfind:V,updateObject:g});function w(e,t){const r=e=>t.every(t=>e[t]);return Array.isArray(e)?e.every(e=>r(e)):r(e)}const N=(e,t)=>t.reduce((t,r)=>e[r]?t:`${t.length?`${t},`:""}${r.toString()}`,""),S=t("tsdav:collection"),T=async e=>{const{url:t,body:r,depth:a,defaultNamespace:s=exports.DAVNamespaceShort.DAV,headers:o,headersToExclude:c,fetchOptions:n={},fetch:d}=e,i=await y({url:t,init:{method:"REPORT",headers:A(u({depth:a,...o}),c),namespace:s,body:r},fetchOptions:n,fetch:d}),h=i.find(e=>!e.ok||e.status&&e.status>=400);if(h)throw new Error(`Collection query failed: ${h.status} ${h.statusText}. ${h.raw?`Raw response: ${h.raw}`:""}`);return 1===i.length&&!i[0].raw&&i[0].status&&i[0].status<300?[]:i},$=async e=>{const{url:t,props:r,depth:a,headers:s,headersToExclude:o,fetchOptions:c={},fetch:n}=e;return y({url:t,init:{method:"MKCOL",headers:A(u({depth:a,...s}),o),namespace:exports.DAVNamespaceShort.DAV,body:r?{mkcol:{set:{prop:r}}}:void 0},fetchOptions:c,fetch:n})},E=async e=>{var t,r,a,s,o;const{collection:c,headers:n,headersToExclude:d,fetchOptions:i={},fetch:h}=e;return null!==(o=null===(s=null===(a=null===(r=null===(t=(await V({url:c.url,props:{[`${exports.DAVNamespaceShort.DAV}:supported-report-set`]:{}},depth:"0",headers:A(n,d),fetchOptions:i,fetch:h}))[0])||void 0===t?void 0:t.props)||void 0===r?void 0:r.supportedReportSet)||void 0===a?void 0:a.supportedReport)||void 0===s?void 0:s.map(e=>Object.keys(e.report)[0]))&&void 0!==o?o:[]},k=async e=>{var t,r,a;const{collection:s,headers:o,headersToExclude:c,fetchOptions:n={},fetch:d}=e,i=(await V({url:s.url,props:{[`${exports.DAVNamespaceShort.CALENDAR_SERVER}:getctag`]:{}},depth:"0",headers:A(o,c),fetchOptions:n,fetch:d})).filter(e=>l(s.url,e.href))[0];if(!i)throw new Error("Collection does not exist on server");return{isDirty:`${s.ctag}`!=`${null===(t=i.props)||void 0===t?void 0:t.getctag}`,newCtag:null===(a=null===(r=i.props)||void 0===r?void 0:r.getctag)||void 0===a?void 0:a.toString()}},_=e=>{const{url:t,props:r,headers:a,syncLevel:s,syncToken:o,headersToExclude:c,fetchOptions:n,fetch:d}=e;return y({url:t,init:{method:"REPORT",namespace:exports.DAVNamespaceShort.DAV,headers:A({...a},c),body:{"sync-collection":{_attributes:p([exports.DAVNamespace.CALDAV,exports.DAVNamespace.CARDDAV,exports.DAVNamespace.DAV]),"sync-level":s,"sync-token":o,[`${exports.DAVNamespaceShort.DAV}:prop`]:r}}},fetchOptions:n,fetch:d})},U=async e=>{var t,r,a,s,o,c,n,d,i,h,p,u;const{collection:f,method:m,headers:v,headersToExclude:O,account:D,detailedResult:y,fetchOptions:V={},fetch:x}=e,g=["accountType","homeUrl"];if(!D||!w(D,g)){if(!D)throw new Error("no account for smartCollectionSync");throw new Error(`account must have ${N(D,g)} before smartCollectionSync`)}const C=null!=m?m:(null===(t=f.reports)||void 0===t?void 0:t.includes("syncCollection"))?"webdav":"basic";if(S(`smart collection sync with type ${D.accountType} and method ${C}`),"webdav"===C){const e=await _({url:f.url,props:{[`${exports.DAVNamespaceShort.DAV}:getetag`]:{},[`${"caldav"===D.accountType?exports.DAVNamespaceShort.CALDAV:exports.DAVNamespaceShort.CARDDAV}:${"caldav"===D.accountType?"calendar-data":"address-data"}`]:{},[`${exports.DAVNamespaceShort.DAV}:displayname`]:{}},syncLevel:1,syncToken:f.syncToken,headers:A(v,O),fetchOptions:V,fetch:x}),t=e.filter(e=>{var t;const r="caldav"===D.accountType?".ics":".vcf";return(null===(t=e.href)||void 0===t?void 0:t.slice(-4))===r}),i=t.filter(e=>404!==e.status).map(e=>e.href),h=t.filter(e=>404===e.status).map(e=>e.href),p=(i.length&&null!==(a=await(null===(r=null==f?void 0:f.objectMultiGet)||void 0===r?void 0:r.call(f,{url:f.url,props:{[`${exports.DAVNamespaceShort.DAV}:getetag`]:{},[`${"caldav"===D.accountType?exports.DAVNamespaceShort.CALDAV:exports.DAVNamespaceShort.CARDDAV}:${"caldav"===D.accountType?"calendar-data":"address-data"}`]:{}},objectUrls:i,depth:"1",headers:A(v,O),fetchOptions:V,fetch:x})))&&void 0!==a?a:[]).map(e=>{var t,r,a,s,o,c,n,d,i,h;return{url:null!==(t=e.href)&&void 0!==t?t:"",etag:null===(r=e.props)||void 0===r?void 0:r.getetag,data:"caldav"===(null==D?void 0:D.accountType)?null!==(o=null===(s=null===(a=e.props)||void 0===a?void 0:a.calendarData)||void 0===s?void 0:s._cdata)&&void 0!==o?o:null===(c=e.props)||void 0===c?void 0:c.calendarData:null!==(i=null===(d=null===(n=e.props)||void 0===n?void 0:n.addressData)||void 0===d?void 0:d._cdata)&&void 0!==i?i:null===(h=e.props)||void 0===h?void 0:h.addressData}}),u=null!==(s=f.objects)&&void 0!==s?s:[],m=p.filter(e=>u.every(t=>!l(t.url,e.url))),g=u.reduce((e,t)=>{const r=p.find(e=>l(e.url,t.url));return r&&r.etag&&r.etag!==t.etag?[...e,r]:e},[]),C=h.map(e=>({url:e,etag:""})),b=u.filter(e=>p.some(t=>l(e.url,t.url)&&t.etag===e.etag));return{...f,objects:y?{created:m,updated:g,deleted:C}:[...b,...m,...g],syncToken:null!==(d=null===(n=null===(c=null===(o=e[0])||void 0===o?void 0:o.raw)||void 0===c?void 0:c.multistatus)||void 0===n?void 0:n.syncToken)&&void 0!==d?d:f.syncToken}}if("basic"===C){const{isDirty:e,newCtag:t}=await k({collection:f,headers:A(v,O),fetchOptions:V,fetch:x}),r=null!==(i=f.objects)&&void 0!==i?i:[],a=null!==(u=await(null===(p=(h=f).fetchObjects)||void 0===p?void 0:p.call(h,{collection:f,headers:A(v,O),fetchOptions:V,fetch:x})))&&void 0!==u?u:[],s=a.filter(e=>r.every(t=>!l(t.url,e.url))),o=r.reduce((e,t)=>{const r=a.find(e=>l(e.url,t.url));return r&&r.etag&&r.etag!==t.etag?[...e,r]:e},[]),c=r.filter(e=>a.every(t=>!l(t.url,e.url))),n=r.filter(e=>a.some(t=>l(e.url,t.url)&&t.etag===e.etag));if(e)return{...f,objects:y?{created:s,updated:o,deleted:c}:[...n,...s,...o],ctag:t}}return y?{...f,objects:{created:[],updated:[],deleted:[]}}:f};var R=Object.freeze({__proto__:null,collectionQuery:T,isCollectionDirty:k,makeCollection:$,smartCollectionSync:U,supportedReportSet:E,syncCollection:_});const L=t("tsdav:addressBook"),j=async e=>{const{url:t,props:r,filters:a,depth:s,headers:o,headersToExclude:c,fetchOptions:n={},fetch:d}=e;return T({url:t,body:{"addressbook-query":u({_attributes:p([exports.DAVNamespace.CARDDAV,exports.DAVNamespace.DAV]),[`${exports.DAVNamespaceShort.DAV}:prop`]:r,filter:null!=a?a:{"prop-filter":{_attributes:{name:"FN"}}}})},defaultNamespace:exports.DAVNamespaceShort.CARDDAV,depth:s,headers:A(o,c),fetchOptions:n,fetch:d})},H=async e=>{const{url:t,props:r,objectUrls:a,depth:s,headers:o,headersToExclude:c,fetchOptions:n={},fetch:d}=e;return T({url:t,body:{"addressbook-multiget":u({_attributes:p([exports.DAVNamespace.DAV,exports.DAVNamespace.CARDDAV]),[`${exports.DAVNamespaceShort.DAV}:prop`]:r,[`${exports.DAVNamespaceShort.DAV}:href`]:a})},defaultNamespace:exports.DAVNamespaceShort.CARDDAV,depth:s,headers:A(o,c),fetchOptions:n,fetch:d})},B=async e=>{const{account:t,headers:r,props:a,headersToExclude:s,fetchOptions:o={},fetch:c}=null!=e?e:{},n=["homeUrl","rootUrl"];if(!t||!w(t,n)){if(!t)throw new Error("no account for fetchAddressBooks");throw new Error(`account must have ${N(t,n)} before fetchAddressBooks`)}const d=await V({url:t.homeUrl,props:null!=a?a:{[`${exports.DAVNamespaceShort.DAV}:displayname`]:{},[`${exports.DAVNamespaceShort.CALENDAR_SERVER}:getctag`]:{},[`${exports.DAVNamespaceShort.DAV}:resourcetype`]:{},[`${exports.DAVNamespaceShort.DAV}:sync-token`]:{}},depth:"1",headers:A(r,s),fetchOptions:o,fetch:c});return Promise.all(d.filter(e=>{var t,r;return Object.keys(null!==(r=null===(t=e.props)||void 0===t?void 0:t.resourcetype)&&void 0!==r?r:{}).includes("addressbook")}).map(e=>{var r,a,s,o,c,n,d,i,h;const l=null!==(s=null===(a=null===(r=e.props)||void 0===r?void 0:r.displayname)||void 0===a?void 0:a._cdata)&&void 0!==s?s:null===(o=e.props)||void 0===o?void 0:o.displayname;return L(`Found address book named ${"string"==typeof l?l:""},\n props: ${JSON.stringify(e.props)}`),{url:new URL(null!==(c=e.href)&&void 0!==c?c:"",null!==(n=t.rootUrl)&&void 0!==n?n:"").href,ctag:null===(d=e.props)||void 0===d?void 0:d.getctag,displayName:"string"==typeof l?l:"",resourcetype:Object.keys(null===(i=e.props)||void 0===i?void 0:i.resourcetype),syncToken:null===(h=e.props)||void 0===h?void 0:h.syncToken}}).map(async e=>({...e,reports:await E({collection:e,headers:A(r,s),fetchOptions:o,fetch:c})})))},P=async e=>{const{addressBook:t,headers:r,objectUrls:a,headersToExclude:s,urlFilter:o=e=>e,useMultiGet:c=!0,fetchOptions:n={},fetch:d}=e;L(`Fetching vcards from ${null==t?void 0:t.url}`);const i=["url"];if(!t||!w(t,i)){if(!t)throw new Error("cannot fetchVCards for undefined addressBook");throw new Error(`addressBook must have ${N(t,i)} before fetchVCards`)}const l=(null!=a?a:(await j({url:t.url,props:{[`${exports.DAVNamespaceShort.DAV}:getetag`]:{}},depth:"1",headers:A(r,s),fetchOptions:n,fetch:d})).map(e=>{var t;return null!==(t=e.href)&&void 0!==t?t:""})).map(e=>e.startsWith("http")||!e?e:new URL(e,t.url).href).filter(e=>e&&!h(e,t.url)).filter(o).map(e=>new URL(e).pathname);let p=[];return l.length>0&&(p=c?await H({url:t.url,props:{[`${exports.DAVNamespaceShort.DAV}:getetag`]:{},[`${exports.DAVNamespaceShort.CARDDAV}:address-data`]:{}},objectUrls:l,depth:"1",headers:A(r,s),fetchOptions:n,fetch:d}):await j({url:t.url,props:{[`${exports.DAVNamespaceShort.DAV}:getetag`]:{},[`${exports.DAVNamespaceShort.CARDDAV}:address-data`]:{}},depth:"1",headers:A(r,s),fetchOptions:n,fetch:d})),p.map(e=>{var r,a,s,o,c,n;return{url:new URL(null!==(r=e.href)&&void 0!==r?r:"",t.url).href,etag:null===(a=e.props)||void 0===a?void 0:a.getetag,data:null!==(c=null===(o=null===(s=e.props)||void 0===s?void 0:s.addressData)||void 0===o?void 0:o._cdata)&&void 0!==c?c:null===(n=e.props)||void 0===n?void 0:n.addressData}})},M=async e=>{const{addressBook:t,vCardString:r,filename:a,headers:s,headersToExclude:o,fetchOptions:c={},fetch:n}=e;return x({url:new URL(a,t.url).href,data:r,headers:A({"content-type":"text/vcard; charset=utf-8","If-None-Match":"*",...s},o),fetchOptions:c,fetch:n})},I=async e=>{const{vCard:t,headers:r,headersToExclude:a,fetchOptions:s={},fetch:o}=e;return g({url:t.url,data:t.data,etag:t.etag,headers:A({"content-type":"text/vcard; charset=utf-8",...r},a),fetchOptions:s,fetch:o})},F=async e=>{const{vCard:t,headers:r,headersToExclude:a,fetchOptions:s={},fetch:o}=e;return C({url:t.url,etag:t.etag,headers:A(r,a),fetchOptions:s,fetch:o})},z=async e=>{const{url:t,props:r,depth:a,headers:s,headersToExclude:o,fetchOptions:c={}}=e;return y({url:t,init:{method:"MKCOL",headers:A(u({depth:a,...s}),o),namespace:exports.DAVNamespaceShort.DAV,body:r?{mkcol:{_attributes:p([exports.DAVNamespace.DAV,exports.DAVNamespace.CARDDAV]),set:{prop:r}}}:void 0},fetchOptions:c})};var Q=Object.freeze({__proto__:null,addressBookMultiGet:H,addressBookQuery:j,createVCard:M,deleteVCard:F,fetchAddressBooks:B,fetchVCards:P,makeAddressBook:z,updateVCard:I});const Z=t("tsdav:calendar"),q=async e=>{var t,r,a;const{account:s,headers:o,headersToExclude:c,fetchOptions:n={},fetch:d}=e,i=["principalUrl","rootUrl"];if(!w(s,i))throw new Error(`account must have ${N(s,i)} before fetchUserAddresses`);Z(`Fetch user addresses from ${s.principalUrl}`);const h=(await V({url:s.principalUrl,props:{[`${exports.DAVNamespaceShort.CALDAV}:calendar-user-address-set`]:{}},depth:"0",headers:A(o,c),fetchOptions:n,fetch:d})).find(e=>l(s.principalUrl,e.href));if(!h||!h.ok)throw new Error("cannot find calendarUserAddresses");const p=(null===(a=null===(r=null===(t=null==h?void 0:h.props)||void 0===t?void 0:t.calendarUserAddressSet)||void 0===r?void 0:r.href)||void 0===a?void 0:a.filter(Boolean))||[];return Z(`Fetched calendar user addresses ${p}`),p},G=async e=>{const{url:t,props:r,filters:a,timezone:s,depth:o,headers:c,headersToExclude:n,fetchOptions:d={},fetch:i}=e;return T({url:t,body:{"calendar-query":u({_attributes:p([exports.DAVNamespace.CALDAV,exports.DAVNamespace.CALENDAR_SERVER,exports.DAVNamespace.CALDAV_APPLE,exports.DAVNamespace.DAV]),[`${exports.DAVNamespaceShort.DAV}:prop`]:r,filter:a,timezone:s})},defaultNamespace:exports.DAVNamespaceShort.CALDAV,depth:o,headers:A(c,n),fetchOptions:d,fetch:i})},J=async e=>{const{url:t,props:r,objectUrls:a,filters:s,timezone:o,depth:c,headers:n,headersToExclude:d,fetchOptions:i={},fetch:h}=e;return T({url:t,body:{"calendar-multiget":u({_attributes:p([exports.DAVNamespace.DAV,exports.DAVNamespace.CALDAV]),[`${exports.DAVNamespaceShort.DAV}:prop`]:r,[`${exports.DAVNamespaceShort.DAV}:href`]:a,filter:s,timezone:o})},defaultNamespace:exports.DAVNamespaceShort.CALDAV,depth:c,headers:A(n,d),fetchOptions:i,fetch:h})},W=async e=>{const{url:t,props:r,depth:a,headers:s,headersToExclude:o,fetchOptions:c={},fetch:n}=e;return y({url:t,init:{method:"MKCALENDAR",headers:A(u({depth:a,...s}),o),namespace:exports.DAVNamespaceShort.DAV,body:{[`${exports.DAVNamespaceShort.CALDAV}:mkcalendar`]:{_attributes:p([exports.DAVNamespace.DAV,exports.DAVNamespace.CALDAV,exports.DAVNamespace.CALDAV_APPLE]),set:{prop:r}}}},fetchOptions:c,fetch:n})},K=async e=>{const{headers:t,account:r,props:a,projectedProps:s,headersToExclude:o,fetchOptions:c={},fetch:d}=null!=e?e:{},i=["homeUrl","rootUrl"];if(!r||!w(r,i)){if(!r)throw new Error("no account for fetchCalendars");throw new Error(`account must have ${N(r,i)} before fetchCalendars`)}const h=await V({url:r.homeUrl,props:null!=a?a:{[`${exports.DAVNamespaceShort.CALDAV}:calendar-description`]:{},[`${exports.DAVNamespaceShort.CALDAV}:calendar-timezone`]:{},[`${exports.DAVNamespaceShort.DAV}:displayname`]:{},[`${exports.DAVNamespaceShort.CALDAV_APPLE}:calendar-color`]:{},[`${exports.DAVNamespaceShort.CALENDAR_SERVER}:getctag`]:{},[`${exports.DAVNamespaceShort.DAV}:resourcetype`]:{},[`${exports.DAVNamespaceShort.CALDAV}:supported-calendar-component-set`]:{},[`${exports.DAVNamespaceShort.DAV}:sync-token`]:{}},depth:"1",headers:A(t,o),fetchOptions:c,fetch:d});return Promise.all(h.filter(e=>{var t,r;return Object.keys(null!==(r=null===(t=e.props)||void 0===t?void 0:t.resourcetype)&&void 0!==r?r:{}).includes("calendar")}).filter(e=>{var t,r,a,s,o,c;return(Array.isArray(null===(r=null===(t=e.props)||void 0===t?void 0:t.supportedCalendarComponentSet)||void 0===r?void 0:r.comp)?null===(a=e.props)||void 0===a?void 0:a.supportedCalendarComponentSet.comp.map(e=>e._attributes.name):[null===(c=null===(o=null===(s=e.props)||void 0===s?void 0:s.supportedCalendarComponentSet)||void 0===o?void 0:o.comp)||void 0===c?void 0:c._attributes.name]).some(e=>Object.values(n).includes(e))}).map(e=>{var t,a,o,c,n,d,i,h,l,p,u,A,m,v,O,D;const y=null===(t=e.props)||void 0===t?void 0:t.calendarDescription,V=null===(a=e.props)||void 0===a?void 0:a.calendarTimezone;return{description:"string"==typeof y?y:"",timezone:"string"==typeof V?V:"",url:new URL(null!==(o=e.href)&&void 0!==o?o:"",null!==(c=r.rootUrl)&&void 0!==c?c:"").href,ctag:null===(n=e.props)||void 0===n?void 0:n.getctag,calendarColor:null===(d=e.props)||void 0===d?void 0:d.calendarColor,displayName:null!==(h=null===(i=e.props)||void 0===i?void 0:i.displayname._cdata)&&void 0!==h?h:null===(l=e.props)||void 0===l?void 0:l.displayname,components:Array.isArray(null===(p=e.props)||void 0===p?void 0:p.supportedCalendarComponentSet.comp)?null===(u=e.props)||void 0===u?void 0:u.supportedCalendarComponentSet.comp.map(e=>e._attributes.name):[null===(m=null===(A=e.props)||void 0===A?void 0:A.supportedCalendarComponentSet.comp)||void 0===m?void 0:m._attributes.name],resourcetype:Object.keys(null===(v=e.props)||void 0===v?void 0:v.resourcetype),syncToken:null===(O=e.props)||void 0===O?void 0:O.syncToken,...f("projectedProps",Object.fromEntries(Object.entries(null!==(D=e.props)&&void 0!==D?D:{}).filter(([e])=>null==s?void 0:s[e])))}}).map(async e=>({...e,reports:await E({collection:e,headers:A(t,o),fetchOptions:c,fetch:d})})))},Y=async e=>{const{calendar:t,objectUrls:r,filters:a,timeRange:s,headers:o,expand:c,urlFilter:n=m,useMultiGet:d=!0,headersToExclude:i,fetchOptions:h={},fetch:l}=e;s&&v(s.start,s.end),Z(`Fetching calendar objects from ${null==t?void 0:t.url}`);const p=["url"];if(!t||!w(t,p)){if(!t)throw new Error("cannot fetchCalendarObjects for undefined calendar");throw new Error(`calendar must have ${N(t,p)} before fetchCalendarObjects`)}const u=null!=a?a:[{"comp-filter":{_attributes:{name:"VCALENDAR"},"comp-filter":{_attributes:{name:"VEVENT"},...s?{"time-range":{_attributes:{start:`${new Date(s.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(s.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}}}];let f=[];const O=(null!=r?r:(f=await G({url:t.url,props:{[`${exports.DAVNamespaceShort.DAV}:getetag`]:{},...c&&s?{[`${exports.DAVNamespaceShort.CALDAV}:calendar-data`]:{[`${exports.DAVNamespaceShort.CALDAV}:expand`]:{_attributes:{start:`${new Date(s.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(s.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}}:{}},filters:u,depth:"1",headers:A(o,i),fetchOptions:h,fetch:l})).map(e=>{var t;return null!==(t=e.href)&&void 0!==t?t:""})).map(e=>e.startsWith("http")||!e?e:new URL(e,t.url).href).filter(n).map(e=>new URL(e).pathname);let D=[];return O.length>0&&(D=c&&!r?f.filter(e=>{var r,a;const s=(null!==(r=e.href)&&void 0!==r?r:"").startsWith("http")?e.href:new URL(null!==(a=e.href)&&void 0!==a?a:"",t.url).href;return n(null!=s?s:"")}):d?await J({url:t.url,props:{[`${exports.DAVNamespaceShort.DAV}:getetag`]:{},[`${exports.DAVNamespaceShort.CALDAV}:calendar-data`]:{...c&&s?{[`${exports.DAVNamespaceShort.CALDAV}:expand`]:{_attributes:{start:`${new Date(s.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(s.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}},objectUrls:O,depth:"1",headers:A(o,i),fetchOptions:h,fetch:l}):await G({url:t.url,props:{[`${exports.DAVNamespaceShort.DAV}:getetag`]:{},[`${exports.DAVNamespaceShort.CALDAV}:calendar-data`]:{...c&&s?{[`${exports.DAVNamespaceShort.CALDAV}:expand`]:{_attributes:{start:`${new Date(s.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(s.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}},filters:u,depth:"1",headers:A(o,i),fetchOptions:h,fetch:l})),D.map(e=>{var r,a,s,o,c,n;return{url:new URL(null!==(r=e.href)&&void 0!==r?r:"",t.url).href,etag:`${null===(a=e.props)||void 0===a?void 0:a.getetag}`,data:null!==(c=null===(o=null===(s=e.props)||void 0===s?void 0:s.calendarData)||void 0===o?void 0:o._cdata)&&void 0!==c?c:null===(n=e.props)||void 0===n?void 0:n.calendarData}})},X=async e=>{const{calendar:t,iCalString:r,filename:a,headers:s,headersToExclude:o,fetchOptions:c={},fetch:n}=e;return x({url:new URL(a,t.url).href,data:r,headers:A({"content-type":"text/calendar; charset=utf-8","If-None-Match":"*",...s},o),fetchOptions:c,fetch:n})},ee=async e=>{const{calendarObject:t,headers:r,headersToExclude:a,fetchOptions:s={},fetch:o}=e;return g({url:t.url,data:t.data,etag:t.etag,headers:A({"content-type":"text/calendar; charset=utf-8",...r},a),fetchOptions:s,fetch:o})},te=async e=>{const{calendarObject:t,headers:r,headersToExclude:a,fetchOptions:s={},fetch:o}=e;return C({url:t.url,etag:t.etag,headers:A(r,a),fetchOptions:s,fetch:o})},re=async e=>{var t;const{oldCalendars:r,account:a,detailedResult:s,headers:o,headersToExclude:c,fetchOptions:n={},fetch:d}=e;if(!a)throw new Error("Must have account before syncCalendars");const i=null!==(t=null!=r?r:a.calendars)&&void 0!==t?t:[],h=await K({account:a,headers:A(o,c),fetchOptions:n,fetch:d}),p=h.filter(e=>i.every(t=>!l(t.url,e.url)));Z(`new calendars: ${p.map(e=>e.displayName)}`);const u=i.reduce((e,t)=>{const r=h.find(e=>l(e.url,t.url));return r&&(r.syncToken&&`${r.syncToken}`!=`${t.syncToken}`||r.ctag&&`${r.ctag}`!=`${t.ctag}`)?[...e,r]:e},[]);Z(`updated calendars: ${u.map(e=>e.displayName)}`);const f=await Promise.all(u.map(async e=>await U({collection:{...e,objectMultiGet:J},method:"webdav",headers:A(o,c),account:a,fetchOptions:n,fetch:d}))),m=i.filter(e=>h.every(t=>!l(t.url,e.url)));Z(`deleted calendars: ${m.map(e=>e.displayName)}`);const v=i.filter(e=>h.some(t=>l(t.url,e.url)&&(t.syncToken&&`${t.syncToken}`!=`${e.syncToken}`||t.ctag&&`${t.ctag}`!=`${e.ctag}`)));return s?{created:p,updated:u,deleted:m}:[...v,...p,...f]},ae=async e=>{const{url:t,timeRange:r,depth:a,headers:s,headersToExclude:o,fetchOptions:c={},fetch:n}=e;if(!r)throw new Error("timeRange is required");v(r.start,r.end);return(await T({url:t,body:{"free-busy-query":u({_attributes:p([exports.DAVNamespace.CALDAV]),[`${exports.DAVNamespaceShort.CALDAV}:time-range`]:{_attributes:{start:`${new Date(r.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(r.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}})},defaultNamespace:exports.DAVNamespaceShort.CALDAV,depth:a,headers:A(s,o),fetchOptions:c,fetch:n}))[0]};var se=Object.freeze({__proto__:null,calendarMultiGet:J,calendarQuery:G,createCalendarObject:X,deleteCalendarObject:te,fetchCalendarObjects:Y,fetchCalendarUserAddresses:q,fetchCalendars:K,freeBusyQuery:ae,makeCalendar:W,syncCalendars:re,updateCalendarObject:ee});const oe=t("tsdav:account"),ce=async e=>{var t,r;oe("Service discovery...");const{account:a,headers:s,headersToExclude:o,fetchOptions:c={},fetch:n}=e,i=null!=n?n:d,h=new URL(a.serverUrl),l=new URL(`/.well-known/${a.accountType}`,h);l.protocol=null!==(t=h.protocol)&&void 0!==t?t:"http";try{const e=await i(l.href,{headers:{...A(s,o),"Content-Type":"text/xml;charset=UTF-8"},method:"PROPFIND",body:'\n\n \n \n \n',redirect:"manual",...c});if(e.status>=300&&e.status<400){const t=e.headers.get("Location");if("string"==typeof t&&t.length){oe(`Service discovery redirected to ${t}`);const e=new URL(t,h);return e.hostname===l.hostname&&l.port&&!e.port&&(e.port=l.port),e.protocol=null!==(r=h.protocol)&&void 0!==r?r:"http",e.href}}}catch(e){oe(`Service discovery failed: ${e.stack}`)}return h.href},ne=async e=>{var t,r,a,s,o;const{account:c,headers:n,headersToExclude:d,fetchOptions:i={},fetch:h}=e,l=["rootUrl"];if(!w(c,l))throw new Error(`account must have ${N(c,l)} before fetchPrincipalUrl`);oe(`Fetching principal url from path ${c.rootUrl}`);const[p]=await V({url:c.rootUrl,props:{[`${exports.DAVNamespaceShort.DAV}:current-user-principal`]:{}},depth:"0",headers:A(n,d),fetchOptions:i,fetch:h});if(!p.ok&&(oe(`Fetch principal url failed: ${p.statusText}`),401===p.status))throw new Error("Invalid credentials");return oe(`Fetched principal url ${null===(r=null===(t=p.props)||void 0===t?void 0:t.currentUserPrincipal)||void 0===r?void 0:r.href}`),new URL(null!==(o=null===(s=null===(a=p.props)||void 0===a?void 0:a.currentUserPrincipal)||void 0===s?void 0:s.href)&&void 0!==o?o:"",c.rootUrl).href},de=async e=>{var t,r;const{account:a,headers:s,headersToExclude:o,fetchOptions:c={},fetch:n}=e,d=["principalUrl","rootUrl"];if(!w(a,d))throw new Error(`account must have ${N(a,d)} before fetchHomeUrl`);oe(`Fetch home url from ${a.principalUrl}`);const i=await V({url:a.principalUrl,props:"caldav"===a.accountType?{[`${exports.DAVNamespaceShort.CALDAV}:calendar-home-set`]:{}}:{[`${exports.DAVNamespaceShort.CARDDAV}:addressbook-home-set`]:{}},depth:"0",headers:A(s,o),fetchOptions:c,fetch:n}),h=i.find(e=>l(a.principalUrl,e.href));if(!h||!h.ok)throw oe(`Fetch home url failed with status ${null==h?void 0:h.statusText} and error ${JSON.stringify(i.map(e=>e.error))}`),new Error("cannot find homeUrl");const p=new URL("caldav"===a.accountType?null===(t=null==h?void 0:h.props)||void 0===t?void 0:t.calendarHomeSet.href:null===(r=null==h?void 0:h.props)||void 0===r?void 0:r.addressbookHomeSet.href,a.rootUrl).href;return oe(`Fetched home url ${p}`),p},ie=async e=>{const{account:t,headers:r,loadCollections:a=!1,loadObjects:s=!1,headersToExclude:o,fetchOptions:c={},fetch:n}=e,d={...t};return d.rootUrl=await ce({account:t,headers:A(r,o),fetchOptions:c,fetch:n}),d.principalUrl=await ne({account:d,headers:A(r,o),fetchOptions:c,fetch:n}),d.homeUrl=await de({account:d,headers:A(r,o),fetchOptions:c,fetch:n}),(a||s)&&("caldav"===t.accountType?d.calendars=await K({headers:A(r,o),account:d,fetchOptions:c,fetch:n}):"carddav"===t.accountType&&(d.addressBooks=await B({headers:A(r,o),account:d,fetchOptions:c,fetch:n}))),s&&("caldav"===t.accountType&&d.calendars?d.calendars=await Promise.all(d.calendars.map(async e=>({...e,objects:await Y({calendar:e,headers:A(r,o),fetchOptions:c,fetch:n})}))):"carddav"===t.accountType&&d.addressBooks&&(d.addressBooks=await Promise.all(d.addressBooks.map(async e=>({...e,objects:await P({addressBook:e,headers:A(r,o),fetchOptions:c,fetch:n})}))))),d};var he=Object.freeze({__proto__:null,createAccount:ie,fetchHomeUrl:de,fetchPrincipalUrl:ne,serviceDiscovery:ce});const le=t("tsdav:todo"),pe=e=>({[`${exports.DAVNamespaceShort.CALDAV}:expand`]:{_attributes:{start:`${new Date(e.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(e.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}),ue=async e=>{const{url:t,props:r,filters:a,timezone:s,depth:o,headers:c,headersToExclude:n,fetchOptions:d={}}=e;return T({url:t,body:{"calendar-query":u({_attributes:p([exports.DAVNamespace.CALDAV,exports.DAVNamespace.CALENDAR_SERVER,exports.DAVNamespace.CALDAV_APPLE,exports.DAVNamespace.DAV]),[`${exports.DAVNamespaceShort.DAV}:prop`]:r,filter:a,timezone:s})},defaultNamespace:exports.DAVNamespaceShort.CALDAV,depth:o,headers:A(c,n),fetchOptions:d})},fe=async e=>{const{url:t,props:r,objectUrls:a,filters:s,timezone:o,depth:c,headers:n,headersToExclude:d,fetchOptions:i={}}=e;return T({url:t,body:{"calendar-multiget":u({_attributes:p([exports.DAVNamespace.DAV,exports.DAVNamespace.CALDAV]),[`${exports.DAVNamespaceShort.DAV}:prop`]:r,[`${exports.DAVNamespaceShort.DAV}:href`]:a,filter:s,timezone:o})},defaultNamespace:exports.DAVNamespaceShort.CALDAV,depth:c,headers:A(n,d),fetchOptions:i})},Ae=async e=>{const{calendar:t,objectUrls:r,filters:a,timeRange:s,headers:o,expand:c,urlFilter:n=m,useMultiGet:d=!0,headersToExclude:i,fetchOptions:h={}}=e;s&&v(s.start,s.end),le(`Fetching todo objects from ${null==t?void 0:t.url}`);const l=["url"];if(!t||!w(t,l)){if(!t)throw new Error("cannot fetchTodos for undefined calendar");throw new Error(`calendar must have ${N(t,l)} before fetchTodos`)}const p=null!=a?a:[{"comp-filter":{_attributes:{name:"VCALENDAR"},"comp-filter":{_attributes:{name:"VTODO"},...s?{"time-range":{_attributes:{start:`${new Date(s.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(s.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}}}],u=(null!=r?r:(await ue({url:t.url,props:{[`${exports.DAVNamespaceShort.DAV}:getetag`]:{...c&&s?pe(s):{}}},filters:p,depth:"1",headers:A(o,i),fetchOptions:h})).map(e=>{var t;return null!==(t=e.href)&&void 0!==t?t:""})).map(e=>e.startsWith("http")||!e?e:new URL(e,t.url).href).filter(n).map(e=>new URL(e).pathname);let f=[];return u.length>0&&(f=!d||c?await ue({url:t.url,props:{[`${exports.DAVNamespaceShort.DAV}:getetag`]:{},[`${exports.DAVNamespaceShort.CALDAV}:calendar-data`]:{...c&&s?pe(s):{}}},filters:p,depth:"1",headers:A(o,i),fetchOptions:h}):await fe({url:t.url,props:{[`${exports.DAVNamespaceShort.DAV}:getetag`]:{},[`${exports.DAVNamespaceShort.CALDAV}:calendar-data`]:{...c&&s?pe(s):{}}},objectUrls:u,depth:"1",headers:A(o,i),fetchOptions:h})),f.map(e=>{var r,a,s,o,c,n;return{url:new URL(null!==(r=e.href)&&void 0!==r?r:"",t.url).href,etag:`${null===(a=e.props)||void 0===a?void 0:a.getetag}`,data:null!==(c=null===(o=null===(s=e.props)||void 0===s?void 0:s.calendarData)||void 0===o?void 0:o._cdata)&&void 0!==c?c:null===(n=e.props)||void 0===n?void 0:n.calendarData}})},me=async e=>{const{calendar:t,iCalString:r,filename:a,headers:s,headersToExclude:o,fetchOptions:c={}}=e;if(!r.includes("UID:"))throw new Error("iCalString must contain a UID");return x({url:new URL(a,t.url).href,data:r,headers:A({"content-type":"text/calendar; charset=utf-8","If-None-Match":"*",...s},o),fetchOptions:c})},ve=async e=>{const{calendarObject:t,headers:r,headersToExclude:a,fetchOptions:s={}}=e;if(!t.etag)throw new Error("calendarObject must have etag for update - fetch todo first");return g({url:t.url,data:t.data,etag:t.etag,headers:A({"content-type":"text/calendar; charset=utf-8",...r},a),fetchOptions:s})},Oe=async e=>{const{calendarObject:t,headers:r,headersToExclude:a,fetchOptions:s={}}=e;return C({url:t.url,etag:t.etag,headers:A(r,a),fetchOptions:s})};var De=Object.freeze({__proto__:null,createTodo:me,deleteTodo:Oe,fetchTodos:Ae,todoMultiGet:fe,todoQuery:ue,updateTodo:ve});const ye=t("tsdav:authHelper"),Ve=(e,t)=>(...r)=>e({...t,...r[0]}),xe=e=>(ye(`Basic auth token generated: ${s.encode(`${e.username}:${e.password}`)}`),{authorization:`Basic ${s.encode(`${e.username}:${e.password}`)}`}),ge=e=>({authorization:`Bearer ${e.accessToken}`}),Ce=async(e,t,r)=>{const a=["authorizationCode","redirectUrl","clientId","clientSecret","tokenUrl"];if(!w(e,a))throw new Error(`Oauth credentials missing: ${N(e,a)}`);const s=new URLSearchParams({grant_type:"authorization_code",code:e.authorizationCode,redirect_uri:e.redirectUrl,client_id:e.clientId,client_secret:e.clientSecret});ye(e.tokenUrl),ye(s.toString());const o=null!=r?r:d,c=await o(e.tokenUrl,{method:"POST",body:s.toString(),headers:{"content-length":`${s.toString().length}`,"content-type":"application/x-www-form-urlencoded"},...null!=t?t:{}});if(c.ok){return await c.json()}return ye(`Fetch Oauth tokens failed: ${await c.text()}`),{}},be=async(e,t,r)=>{const a=["refreshToken","clientId","clientSecret","tokenUrl"];if(!w(e,a))throw new Error(`Oauth credentials missing: ${N(e,a)}`);const s=new URLSearchParams({client_id:e.clientId,client_secret:e.clientSecret,refresh_token:e.refreshToken,grant_type:"refresh_token"}),o=null!=r?r:d,c=await o(e.tokenUrl,{method:"POST",body:s.toString(),headers:{"Content-Type":"application/x-www-form-urlencoded"},...null!=t?t:{}});if(c.ok){return await c.json()}return ye(`Refresh access token failed: ${await c.text()}`),{}},we=async(e,t,r)=>{var a;ye("Fetching oauth headers");let s={};return e.refreshToken?(e.refreshToken&&!e.accessToken||Date.now()>(null!==(a=e.expiration)&&void 0!==a?a:0))&&(s=await be(e,t,r)):s=await Ce(e,t,r),ye(`Oauth tokens fetched: ${s.access_token}`),{tokens:s,headers:{authorization:`Bearer ${s.access_token}`}}};var Ne=Object.freeze({__proto__:null,defaultParam:Ve,fetchOauthTokens:Ce,getBasicAuthHeaders:xe,getBearerAuthHeaders:ge,getOauthHeaders:we,refreshAccessToken:be});const Se=async e=>{var t;const{serverUrl:r,credentials:a,authMethod:s,defaultAccountType:o,authFunction:c,fetch:n}=e;let d={};switch(s){case"Basic":d=xe(a);break;case"Bearer":d=ge(a);break;case"Oauth":d=(await we(a,void 0,n)).headers;break;case"Digest":d={Authorization:`Digest ${a.digestString}`};break;case"Custom":d=null!==(t=await(null==c?void 0:c(a)))&&void 0!==t?t:{};break;default:throw new Error("Invalid auth method")}const i=o?await ie({account:{serverUrl:r,credentials:a,accountType:o},headers:d,fetch:n}):void 0,h=Ve(x,{url:r,headers:d,fetch:n}),l=Ve(g,{headers:d,url:r,fetch:n}),p=Ve(C,{headers:d,url:r,fetch:n}),u=Ve(V,{headers:d,fetch:n}),f=Ve(T,{headers:d,fetch:n}),A=Ve($,{headers:d,fetch:n}),m=Ve(_,{headers:d,fetch:n}),v=Ve(E,{headers:d,fetch:n}),O=Ve(k,{headers:d,fetch:n}),D=Ve(U,{headers:d,account:i,fetch:n}),b=Ve(G,{headers:d,fetch:n}),w=Ve(J,{headers:d,fetch:n}),N=Ve(W,{headers:d,fetch:n}),S=Ve(K,{headers:d,account:i,fetch:n}),R=Ve(q,{headers:d,account:i,fetch:n}),L=Ve(Y,{headers:d,fetch:n}),Q=Ve(X,{headers:d,fetch:n}),Z=Ve(ee,{headers:d,fetch:n}),ae=Ve(te,{headers:d,fetch:n}),se=Ve(re,{account:i,headers:d,fetch:n}),oe=Ve(j,{headers:d,fetch:n}),ce=Ve(H,{headers:d,fetch:n}),ne=Ve(z,{headers:d,fetch:n});return{davRequest:async e=>{const{init:t,fetch:r,...a}=e,{headers:s,...o}=t;return y({...a,init:{...o,headers:{...d,...s}},fetch:null!=r?r:n})},propfind:u,createAccount:async e=>{const{account:t,headers:s,loadCollections:o,loadObjects:c,fetch:i}=e;return ie({account:{serverUrl:r,credentials:a,...t},headers:{...d,...s},loadCollections:o,loadObjects:c,fetch:null!=i?i:n})},createObject:h,updateObject:l,deleteObject:p,calendarQuery:b,addressBookQuery:oe,collectionQuery:f,makeCollection:A,calendarMultiGet:w,makeCalendar:N,syncCollection:m,supportedReportSet:v,isCollectionDirty:O,smartCollectionSync:D,fetchCalendars:S,fetchCalendarUserAddresses:R,fetchCalendarObjects:L,createCalendarObject:Q,updateCalendarObject:Z,deleteCalendarObject:ae,syncCalendars:se,fetchAddressBooks:Ve(B,{account:i,headers:d,fetch:n}),addressBookMultiGet:ce,makeAddressBook:ne,fetchVCards:Ve(P,{headers:d,fetch:n}),createVCard:Ve(M,{headers:d,fetch:n}),updateVCard:Ve(I,{headers:d,fetch:n}),deleteVCard:Ve(F,{headers:d,fetch:n}),todoQuery:Ve(ue,{headers:d}),todoMultiGet:Ve(fe,{headers:d}),fetchTodos:Ve(Ae,{headers:d}),createTodo:Ve(me,{headers:d}),updateTodo:Ve(ve,{headers:d}),deleteTodo:Ve(Oe,{headers:d})}};class Te{constructor(e){var t,r,a;this.serverUrl=e.serverUrl,this.credentials=e.credentials,this.authMethod=null!==(t=e.authMethod)&&void 0!==t?t:"Basic",this.accountType=null!==(r=e.defaultAccountType)&&void 0!==r?r:"caldav",this.authFunction=e.authFunction,this.fetchOptions=null!==(a=e.fetchOptions)&&void 0!==a?a:{},this.fetchOverride=e.fetch}async login(){var e;switch(this.authMethod){case"Basic":this.authHeaders=xe(this.credentials);break;case"Bearer":this.authHeaders=ge(this.credentials);break;case"Oauth":this.authHeaders=(await we(this.credentials,this.fetchOptions,this.fetchOverride)).headers;break;case"Digest":this.authHeaders={Authorization:`Digest ${this.credentials.digestString}`};break;case"Custom":this.authHeaders=await(null===(e=this.authFunction)||void 0===e?void 0:e.call(this,this.credentials));break;default:throw new Error("Invalid auth method")}this.account=this.accountType?await ie({account:{serverUrl:this.serverUrl,credentials:this.credentials,accountType:this.accountType},headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride}):void 0}async davRequest(e){const{init:t,fetch:r,...a}=e,{headers:s,...o}=t;return y({...a,init:{...o,headers:{...this.authHeaders,...s}},fetchOptions:this.fetchOptions,fetch:null!=r?r:this.fetchOverride})}async createObject(...e){return Ve(x,{url:this.serverUrl,headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async updateObject(...e){return Ve(g,{url:this.serverUrl,headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async deleteObject(...e){return Ve(C,{url:this.serverUrl,headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async propfind(...e){return Ve(V,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async createAccount(e){const{account:t,headers:r,loadCollections:a,loadObjects:s,fetchOptions:o,fetch:c}=e;return ie({account:{serverUrl:this.serverUrl,credentials:this.credentials,...t},headers:{...this.authHeaders,...r},loadCollections:a,loadObjects:s,fetchOptions:null!=o?o:this.fetchOptions,fetch:null!=c?c:this.fetchOverride})}async collectionQuery(...e){return Ve(T,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async makeCollection(...e){return Ve($,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async syncCollection(...e){return Ve(_,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async supportedReportSet(...e){return Ve(E,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async isCollectionDirty(...e){return Ve(k,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async smartCollectionSync(...e){return Ve(U,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride,account:this.account})(e[0])}async calendarQuery(...e){return Ve(G,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async makeCalendar(...e){return Ve(W,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async calendarMultiGet(...e){return Ve(J,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async fetchCalendars(...e){return Ve(K,{headers:this.authHeaders,account:this.account,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(null==e?void 0:e[0])}async fetchCalendarUserAddresses(...e){return Ve(q,{headers:this.authHeaders,account:this.account,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(null==e?void 0:e[0])}async fetchCalendarObjects(...e){return Ve(Y,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async createCalendarObject(...e){return Ve(X,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async updateCalendarObject(...e){return Ve(ee,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async deleteCalendarObject(...e){return Ve(te,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async syncCalendars(...e){return Ve(re,{headers:this.authHeaders,account:this.account,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async addressBookQuery(...e){return Ve(j,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async addressBookMultiGet(...e){return Ve(H,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async makeAddressBook(...e){return Ve(z,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async fetchAddressBooks(...e){return Ve(B,{headers:this.authHeaders,account:this.account,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(null==e?void 0:e[0])}async fetchVCards(...e){return Ve(P,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async createVCard(...e){return Ve(M,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async updateVCard(...e){return Ve(I,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async deleteVCard(...e){return Ve(F,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async todoQuery(...e){return Ve(ue,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async todoMultiGet(...e){return Ve(fe,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async fetchTodos(...e){return Ve(Ae,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async createTodo(...e){return Ve(me,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async updateTodo(...e){return Ve(ve,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async deleteTodo(...e){return Ve(Oe,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}}var $e=Object.freeze({__proto__:null,DAVClient:Te,createDAVClient:Se}),Ee={DAVNamespace:exports.DAVNamespace,DAVNamespaceShort:exports.DAVNamespaceShort,DAVAttributeMap:o,...$e,...b,...R,...he,...Q,...se,...De,...Ne,...O};exports.DAVAttributeMap=o,exports.DAVClient=Te,exports.addressBookMultiGet=H,exports.addressBookQuery=j,exports.calendarMultiGet=J,exports.calendarQuery=G,exports.cleanupFalsy=u,exports.collectionQuery=T,exports.createAccount=ie,exports.createCalendarObject=X,exports.createDAVClient=Se,exports.createObject=x,exports.createTodo=me,exports.createVCard=M,exports.davRequest=y,exports.default=Ee,exports.deleteCalendarObject=te,exports.deleteObject=C,exports.deleteTodo=Oe,exports.deleteVCard=F,exports.fetchAddressBooks=B,exports.fetchCalendarObjects=Y,exports.fetchCalendarUserAddresses=q,exports.fetchCalendars=K,exports.fetchOauthTokens=Ce,exports.fetchTodos=Ae,exports.fetchVCards=P,exports.freeBusyQuery=ae,exports.getBasicAuthHeaders=xe,exports.getBearerAuthHeaders=ge,exports.getDAVAttribute=p,exports.getOauthHeaders=we,exports.isCollectionDirty=k,exports.makeAddressBook=z,exports.makeCalendar=W,exports.propfind=V,exports.refreshAccessToken=be,exports.smartCollectionSync=U,exports.supportedReportSet=E,exports.syncCalendars=re,exports.syncCollection=_,exports.todoMultiGet=fe,exports.todoQuery=ue,exports.updateCalendarObject=ee,exports.updateObject=g,exports.updateTodo=ve,exports.updateVCard=I,exports.urlContains=l,exports.urlEquals=h; diff --git a/dist/tsdav.min.js b/dist/tsdav.min.js index d04775ad..9c577c4a 100644 --- a/dist/tsdav.min.js +++ b/dist/tsdav.min.js @@ -1,2 +1,2 @@ -var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function r(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var r=function e(){var r=!1;try{r=this instanceof e}catch{}return r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}var n="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}var a=i,s=o;function c(e){if(a===setTimeout)return setTimeout(e,0);if((a===i||!a)&&setTimeout)return a=setTimeout,setTimeout(e,0);try{return a(e,0)}catch(t){try{return a.call(null,e,0)}catch(t){return a.call(this,e,0)}}}"function"==typeof n.setTimeout&&(a=setTimeout),"function"==typeof n.clearTimeout&&(s=clearTimeout);var u,l=[],h=!1,d=-1;function f(){h&&u&&(h=!1,u.length?l=u.concat(l):d=-1,l.length&&p())}function p(){if(!h){var e=c(f);h=!0;for(var t=l.length;t;){for(u=l,l=[];++d1)for(var r=1;r=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}return x=function(s,c){c=c||{};var u=typeof s;if("string"===u&&s.length>0)return function(a){if((a=String(a)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(a);if(!s)return;var c=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*o;case"weeks":case"week":case"w":return c*i;case"days":case"day":case"d":return c*n;case"hours":case"hour":case"hrs":case"hr":case"h":return c*r;case"minutes":case"minute":case"mins":case"min":case"m":return c*t;case"seconds":case"second":case"secs":case"sec":case"s":return c*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(s);if("number"===u&&isFinite(s))return c.long?function(i){var o=Math.abs(i);if(o>=n)return a(i,o,n,"day");if(o>=r)return a(i,o,r,"hour");if(o>=t)return a(i,o,t,"minute");if(o>=e)return a(i,o,e,"second");return i+" ms"}(s):function(i){var o=Math.abs(i);if(o>=n)return Math.round(i/n)+"d";if(o>=r)return Math.round(i/r)+"h";if(o>=t)return Math.round(i/t)+"m";if(o>=e)return Math.round(i/e)+"s";return i+"ms"}(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))}}var U,P=(N||(N=1,function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,i=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(n++,"%c"===e&&(i=n))}),t.splice(i,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch(e){}return!e&&"env"in L&&(e=L.env.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=(S||(S=1,F=function(e){function t(e){let n,i,o,a=null;function s(...e){if(!s.enabled)return;const r=s,i=Number(new Date),o=i-(n||i);r.diff=o,r.prev=n,r.curr=i,n=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(n,i)=>{if("%%"===n)return"%";a++;const o=t.formatters[i];if("function"==typeof o){const t=e[a];n=o.call(r,t),e.splice(a,1),a--}return n}),t.formatArgs.call(r,e),(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function n(e,t){let r=0,n=0,i=-1,o=0;for(;r"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const e of r)"-"===e[0]?t.skips.push(e.slice(1)):t.names.push(e)},t.enabled=function(e){for(const r of t.skips)if(n(e,r))return!1;for(const r of t.names)if(n(e,r))return!0;return!1},t.humanize=I(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(r=>{t[r]=e[r]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t>18&63]+$[e>>12&63]+$[e>>6&63]+$[63&e]}function G(e,t,r){for(var n,i=[],o=t;oc?c:s+a));return 1===n?(t=e[r-1],i+=$[t>>2],i+=$[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=$[t>>10],i+=$[t>>4&63],i+=$[t<<2&63],i+="="),o.push(i),o.join("")}function Q(e,t,r,n,i){var o,a,s=8*i-n-1,c=(1<>1,l=-7,h=r?i-1:0,d=r?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-l)-1,f>>=-l,l+=s;l>0;o=256*o+e[t+h],h+=d,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+e[t+h],h+=d,l-=8);if(0===o)o=1-u;else{if(o===c)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=u}return(f?-1:1)*a*Math.pow(2,o-n)}function X(e,t,r,n,i,o){var a,s,c,u=8*o-i-1,l=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,p=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+h>=1?d/c:d*Math.pow(2,1-h))*c>=2&&(a++,c/=2),a+h>=l?(s=0,a=l):a+h>=1?(s=(t*c-1)*Math.pow(2,i),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;e[r+f]=255&s,f+=p,s/=256,i-=8);for(a=a<0;e[r+f]=255&a,f+=p,a/=256,u-=8);e[r+f-p]|=128*y}var Z={}.toString,J=Array.isArray||function(e){return"[object Array]"==Z.call(e)};function ee(){return re.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function te(e,t){if(ee()=ee())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ee().toString(16)+" bytes");return 0|e}function ce(e){return!(null==e||!e._isBuffer)}function ue(e,t){if(ce(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Ue(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Pe(e).length;default:if(n)return Ue(e).length;t=(""+t).toLowerCase(),n=!0}}function le(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return Ce(this,t,r);case"utf8":case"utf-8":return Ee(this,t,r);case"ascii":return Te(this,t,r);case"latin1":case"binary":return _e(this,t,r);case"base64":return we(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Oe(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function he(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function de(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=re.from(t,n)),ce(t))return 0===t.length?-1:fe(e,t,r,n,i);if("number"==typeof t)return t&=255,re.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):fe(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function fe(e,t,r,n,i){var o,a=1,s=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,r/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var l=-1;for(o=r;os&&(r=s-c),o=r;o>=0;o--){for(var h=!0,d=0;di&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function we(e,t,r){return 0===t&&r===e.length?W(e):W(e.slice(t,r))}function Ee(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:u>223?3:u>191?2:1;if(i+h<=r)switch(h){case 1:u<128&&(l=u);break;case 2:128==(192&(o=e[i+1]))&&(c=(31&u)<<6|63&o)>127&&(l=c);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(c=(15&u)<<12|(63&o)<<6|63&a)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(c=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(l=c)}null===l?(l=65533,h=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=h}return function(e){var t=e.length;if(t<=Ae)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),""},re.prototype.compare=function(e,t,r,n,i){if(!ce(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(o,a),c=this.slice(n,i),u=e.slice(t,r),l=0;li)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return pe(this,e,t,r);case"utf8":case"utf-8":return ye(this,e,t,r);case"ascii":return ge(this,e,t,r);case"latin1":case"binary":return me(this,e,t,r);case"base64":return ve(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return be(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},re.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Ae=4096;function Te(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function xe(e,t,r,n,i,o){if(!ce(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function Re(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function Fe(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function Se(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Ne(e,t,r,n,i){return i||Se(e,0,r,4),X(e,t,r,n,23,4),r+4}function Le(e,t,r,n,i){return i||Se(e,0,r,8),X(e,t,r,n,52,8),r+8}re.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},re.prototype.readUInt8=function(e,t){return t||De(e,1,this.length),this[e]},re.prototype.readUInt16LE=function(e,t){return t||De(e,2,this.length),this[e]|this[e+1]<<8},re.prototype.readUInt16BE=function(e,t){return t||De(e,2,this.length),this[e]<<8|this[e+1]},re.prototype.readUInt32LE=function(e,t){return t||De(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},re.prototype.readUInt32BE=function(e,t){return t||De(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},re.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||De(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},re.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||De(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},re.prototype.readInt8=function(e,t){return t||De(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},re.prototype.readInt16LE=function(e,t){t||De(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},re.prototype.readInt16BE=function(e,t){t||De(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},re.prototype.readInt32LE=function(e,t){return t||De(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},re.prototype.readInt32BE=function(e,t){return t||De(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},re.prototype.readFloatLE=function(e,t){return t||De(e,4,this.length),Q(this,e,!0,23,4)},re.prototype.readFloatBE=function(e,t){return t||De(e,4,this.length),Q(this,e,!1,23,4)},re.prototype.readDoubleLE=function(e,t){return t||De(e,8,this.length),Q(this,e,!0,52,8)},re.prototype.readDoubleBE=function(e,t){return t||De(e,8,this.length),Q(this,e,!1,52,8)},re.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||xe(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+r},re.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||xe(this,e,t,1,255,0),re.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},re.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||xe(this,e,t,2,65535,0),re.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Re(this,e,t,!0),t+2},re.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||xe(this,e,t,2,65535,0),re.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Re(this,e,t,!1),t+2},re.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||xe(this,e,t,4,4294967295,0),re.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):Fe(this,e,t,!0),t+4},re.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||xe(this,e,t,4,4294967295,0),re.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Fe(this,e,t,!1),t+4},re.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);xe(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a|0)-s&255;return t+r},re.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||xe(this,e,t,1,127,-128),re.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},re.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||xe(this,e,t,2,32767,-32768),re.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Re(this,e,t,!0),t+2},re.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||xe(this,e,t,2,32767,-32768),re.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Re(this,e,t,!1),t+2},re.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||xe(this,e,t,4,2147483647,-2147483648),re.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):Fe(this,e,t,!0),t+4},re.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||xe(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),re.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Fe(this,e,t,!1),t+4},re.prototype.writeFloatLE=function(e,t,r){return Ne(this,e,t,!0,r)},re.prototype.writeFloatBE=function(e,t,r){return Ne(this,e,t,!1,r)},re.prototype.writeDoubleLE=function(e,t,r){return Le(this,e,t,!0,r)},re.prototype.writeDoubleBE=function(e,t,r){return Le(this,e,t,!1,r)},re.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(o<1e3||!re.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function Pe(e){return function(e){var t,r,n,i,o,a;Y||q();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===e[s-2]?2:"="===e[s-1]?1:0,a=new H(3*s/4-o),n=o>0?s-4:s;var c=0;for(t=0,r=0;t>16&255,a[c++]=i>>8&255,a[c++]=255&i;return 2===o?(i=K[e.charCodeAt(t)]<<2|K[e.charCodeAt(t+1)]>>4,a[c++]=255&i):1===o&&(i=K[e.charCodeAt(t)]<<10|K[e.charCodeAt(t+1)]<<4|K[e.charCodeAt(t+2)]>>2,a[c++]=i>>8&255,a[c++]=255&i),a}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(ke,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Be(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function je(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var Ve,Me,$e={};function Ke(){}function He(){He.init.call(this)}function Ye(e){return void 0===e._maxListeners?He.defaultMaxListeners:e._maxListeners}function qe(e,t,r,n){var i,o,a,s;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((o=e._events)?(o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),a=o[t]):(o=e._events=new Ke,e._eventsCount=0),a){if("function"==typeof a?a=o[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),!a.warned&&(i=Ye(e))&&i>0&&a.length>i){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,s=c,"function"==typeof console.warn?console.warn(s):console.log(s)}}else a=o[t]=r,++e._eventsCount;return e}function ze(e,t,r){var n=!1;function i(){e.removeListener(t,i),n||(n=!0,r.apply(e,arguments))}return i.listener=r,i}function Ge(e){var t=this._events;if(t){var r=t[e];if("function"==typeof r)return 1;if(r)return r.length}return 0}function We(e,t){for(var r=new Array(t);t--;)r[t]=e[t];return r}Ke.prototype=Object.create(null),He.EventEmitter=He,He.usingDomains=!1,He.prototype.domain=void 0,He.prototype._events=void 0,He.prototype._maxListeners=void 0,He.defaultMaxListeners=10,He.init=function(){this.domain=null,He.usingDomains&&(!Ve.active||this instanceof Ve.Domain||(this.domain=Ve.active)),this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new Ke,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},He.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},He.prototype.getMaxListeners=function(){return Ye(this)},He.prototype.emit=function(e){var t,r,n,i,o,a,s,c="error"===e;if(a=this._events)c=c&&null==a.error;else if(!c)return!1;if(s=this.domain,c){if(t=arguments[1],!s){if(t instanceof Error)throw t;var u=new Error('Uncaught, unspecified "error" event. ('+t+")");throw u.context=t,u}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=s,t.domainThrown=!1,s.emit("error",t),!1}if(!(r=a[e]))return!1;var l="function"==typeof r;switch(n=arguments.length){case 1:!function(e,t,r){if(t)e.call(r);else for(var n=e.length,i=We(e,n),o=0;o0;)if(r[o]===t||r[o].listener&&r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;if(1===r.length){if(r[0]=void 0,0===--this._eventsCount)return this._events=new Ke,this;delete n[e]}else!function(e,t){for(var r=t,n=r+1,i=e.length;n0?Reflect.ownKeys(this._events):[]},Me="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e};var Qe=/%[sdj%]/g;function Xe(e){if(!ut(e)){for(var t=[],r=0;r=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),a=n[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),st(t)?r.showHidden=t:t&&function(e,t){if(!t||!dt(t))return e;var r=Object.keys(t),n=r.length;for(;n--;)e[r[n]]=t[r[n]]}(r,t),lt(r.showHidden)&&(r.showHidden=!1),lt(r.depth)&&(r.depth=2),lt(r.colors)&&(r.colors=!1),lt(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=rt),it(r,e,r.depth)}function rt(e,t){var r=tt.styles[t];return r?"["+tt.colors[r][0]+"m"+e+"["+tt.colors[r][1]+"m":e}function nt(e,t){return e}function it(e,t,r){if(e.customInspect&&t&&yt(t.inspect)&&t.inspect!==tt&&(!t.constructor||t.constructor.prototype!==t)){var n=t.inspect(r,e);return ut(n)||(n=it(e,n,r)),n}var i=function(e,t){if(lt(t))return e.stylize("undefined","undefined");if(ut(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(n=t,"number"==typeof n)return e.stylize(""+t,"number");var n;if(st(t))return e.stylize(""+t,"boolean");if(ct(t))return e.stylize("null","null")}(e,t);if(i)return i;var o=Object.keys(t),a=function(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),pt(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return ot(t);if(0===o.length){if(yt(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(ht(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(ft(t))return e.stylize(Date.prototype.toString.call(t),"date");if(pt(t))return ot(t)}var c,u,l="",h=!1,d=["{","}"];(c=t,Array.isArray(c)&&(h=!0,d=["[","]"]),yt(t))&&(l=" [Function"+(t.name?": "+t.name:"")+"]");return ht(t)&&(l=" "+RegExp.prototype.toString.call(t)),ft(t)&&(l=" "+Date.prototype.toUTCString.call(t)),pt(t)&&(l=" "+ot(t)),0!==o.length||h&&0!=t.length?r<0?ht(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),u=h?function(e,t,r,n,i){for(var o=[],a=0,s=t.length;a60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(u,l,d)):d[0]+l+d[1]}function ot(e){return"["+Error.prototype.toString.call(e)+"]"}function at(e,t,r,n,i,o){var a,s,c;if((c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),mt(n,i)||(a="["+i+"]"),s||(e.seen.indexOf(c.value)<0?(s=ct(r)?it(e,c.value,null):it(e,c.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n")):s=e.stylize("[Circular]","special")),lt(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function st(e){return"boolean"==typeof e}function ct(e){return null===e}function ut(e){return"string"==typeof e}function lt(e){return void 0===e}function ht(e){return dt(e)&&"[object RegExp]"===gt(e)}function dt(e){return"object"==typeof e&&null!==e}function ft(e){return dt(e)&&"[object Date]"===gt(e)}function pt(e){return dt(e)&&("[object Error]"===gt(e)||e instanceof Error)}function yt(e){return"function"==typeof e}function gt(e){return Object.prototype.toString.call(e)}function mt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function vt(){this.head=null,this.tail=null,this.length=0}tt.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},tt.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},vt.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},vt.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},vt.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},vt.prototype.clear=function(){this.head=this.tail=null,this.length=0},vt.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},vt.prototype.concat=function(e){if(0===this.length)return re.alloc(0);if(1===this.length)return this.head.data;for(var t=re.allocUnsafe(e>>>0),r=this.head,n=0;r;)r.data.copy(t,n),n+=r.data.length,r=r.next;return t};var bt=re.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function wt(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(e){if(e&&!bt(e))throw new Error("Unknown encoding: "+e)}(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=At;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=Tt;break;default:return void(this.write=Et)}this.charBuffer=new re(6),this.charReceived=0,this.charLength=0}function Et(e){return e.toString(this.encoding)}function At(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function Tt(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}wt.prototype.write=function(e){for(var t="";this.charLength;){var r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived=55296&&i<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var n=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,n),n-=this.charReceived);var i;n=(t+=e.toString(this.encoding,0,n)).length-1;if((i=t.charCodeAt(n))>=55296&&i<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,n)}return t},wt.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var r=e[e.length-t];if(1==t&&r>>5==6){this.charLength=2;break}if(t<=2&&r>>4==14){this.charLength=3;break}if(t<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=t},wt.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;t+=n.slice(0,r).toString(i)}return t},Ot.ReadableState=Ct;var _t=function(e){if(lt(Je)&&(Je=L.env.NODE_DEBUG||""),e=e.toUpperCase(),!et[e])if(new RegExp("\\b"+e+"\\b","i").test(Je)){et[e]=function(){var t=Xe.apply(null,arguments);console.error("%s %d: %s",e,0,t)}}else et[e]=function(){};return et[e]}("stream");function Ct(e,t){e=e||{},this.objectMode=!!e.objectMode,t instanceof er&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,n=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:n,this.highWaterMark=~~this.highWaterMark,this.buffer=new vt,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(this.decoder=new wt(e.encoding),this.encoding=e.encoding)}function Ot(e){if(!(this instanceof Ot))return new Ot(e);this._readableState=new Ct(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),He.call(this)}function Dt(e,t,r,n,i){var o=function(e,t){var r=null;re.isBuffer(t)||"string"==typeof t||null==t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));return r}(t,r);if(o)e.emit("error",o);else if(null===r)t.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,Ft(e)}(e,t);else if(t.objectMode||r&&r.length>0)if(t.ended&&!i){var a=new Error("stream.push() after EOF");e.emit("error",a)}else if(t.endEmitted&&i){var s=new Error("stream.unshift() after end event");e.emit("error",s)}else{var c;!t.decoder||i||n||(r=t.decoder.write(r),c=!t.objectMode&&0===r.length),i||(t.reading=!1),c||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&Ft(e))),function(e,t){t.readingMore||(t.readingMore=!0,y(Nt,e,t))}(e,t)}else i||(t.reading=!1);return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=xt?e=xt:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function Ft(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(_t("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?y(St,e):St(e))}function St(e){_t("emit readable"),e.emit("readable"),It(e)}function Nt(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;eo.length?o.length:e;if(a===o.length?i+=o:i+=o.slice(0,e),0===(e-=a)){a===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=re.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var o=n.data,a=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,a),0===(e-=a)){a===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function Pt(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,y(Bt,t,e))}function Bt(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function jt(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return _t("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?Pt(this):Ft(this),null;if(0===(e=Rt(e,t))&&t.ended)return 0===t.length&&Pt(this),null;var n,i=t.needReadable;return _t("need readable",i),(0===t.length||t.length-e0?Ut(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&Pt(this)),null!==n&&this.emit("data",n),n},Ot.prototype._read=function(e){this.emit("error",new Error("not implemented"))},Ot.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,_t("pipe count=%d opts=%j",n.pipesCount,t);var i=!t||!1!==t.end?a:u;function o(e){_t("onunpipe"),e===r&&u()}function a(){_t("onend"),e.end()}n.endEmitted?y(i):r.once("end",i),e.on("unpipe",o);var s=function(e){return function(){var t=e._readableState;_t("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&e.listeners("data").length&&(t.flowing=!0,It(e))}}(r);e.on("drain",s);var c=!1;function u(){_t("cleanup"),e.removeListener("close",f),e.removeListener("finish",p),e.removeListener("drain",s),e.removeListener("error",d),e.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",u),r.removeListener("data",h),c=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||s()}var l=!1;function h(t){_t("ondata"),l=!1,!1!==e.write(t)||l||((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==jt(n.pipes,e))&&!c&&(_t("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,l=!0),r.pause())}function d(t){var r;_t("onerror",t),g(),e.removeListener("error",d),0===(r="error",e.listeners(r).length)&&e.emit("error",t)}function f(){e.removeListener("finish",p),g()}function p(){_t("onfinish"),e.removeListener("close",f),g()}function g(){_t("unpipe"),r.unpipe(e)}return r.on("data",h),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",d),e.once("close",f),e.once("finish",p),e.emit("pipe",r),n.flowing||(_t("pipe resume"),r.resume()),e},Ot.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this)),this;if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Kt.prototype._write=function(e,t,r){r(new Error("not implemented"))},Kt.prototype._writev=null,Kt.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,Wt(e,t),r&&(t.finished?y(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},Me(er,Ot);for(var Xt=Object.keys(Kt.prototype),Zt=0;Zt"===o?(O(n,"onsgmldeclaration",n.sgmlDecl),n.sgmlDecl="",n.state=T.TEXT):g(o)?(n.state=T.SGML_DECL_QUOTED,n.sgmlDecl+=o):n.sgmlDecl+=o;continue;case T.SGML_DECL_QUOTED:o===n.q&&(n.state=T.SGML_DECL,n.q=""),n.sgmlDecl+=o;continue;case T.DOCTYPE:">"===o?(n.state=T.TEXT,O(n,"ondoctype",n.doctype),n.doctype=!0):(n.doctype+=o,"["===o?n.state=T.DOCTYPE_DTD:g(o)&&(n.state=T.DOCTYPE_QUOTED,n.q=o));continue;case T.DOCTYPE_QUOTED:n.doctype+=o,o===n.q&&(n.q="",n.state=T.DOCTYPE);continue;case T.DOCTYPE_DTD:"]"===o?(n.doctype+=o,n.state=T.DOCTYPE):"<"===o?(n.state=T.OPEN_WAKA,n.startTagPosition=n.position):g(o)?(n.doctype+=o,n.state=T.DOCTYPE_DTD_QUOTED,n.q=o):n.doctype+=o;continue;case T.DOCTYPE_DTD_QUOTED:n.doctype+=o,o===n.q&&(n.state=T.DOCTYPE_DTD,n.q="");continue;case T.COMMENT:"-"===o?n.state=T.COMMENT_ENDING:n.comment+=o;continue;case T.COMMENT_ENDING:"-"===o?(n.state=T.COMMENT_ENDED,n.comment=x(n.opt,n.comment),n.comment&&O(n,"oncomment",n.comment),n.comment=""):(n.comment+="-"+o,n.state=T.COMMENT);continue;case T.COMMENT_ENDED:">"!==o?(S(n,"Malformed comment"),n.comment+="--"+o,n.state=T.COMMENT):n.doctype&&!0!==n.doctype?n.state=T.DOCTYPE_DTD:n.state=T.TEXT;continue;case T.CDATA:for(c=i-1;o&&"]"!==o;)(o=j(t,i++))&&n.trackPosition&&(n.position++,"\n"===o?(n.line++,n.column=0):n.column++);n.cdata+=t.substring(c,i-1),"]"===o&&(n.state=T.CDATA_ENDING);continue;case T.CDATA_ENDING:"]"===o?n.state=T.CDATA_ENDING_2:(n.cdata+="]"+o,n.state=T.CDATA);continue;case T.CDATA_ENDING_2:">"===o?(n.cdata&&O(n,"oncdata",n.cdata),O(n,"onclosecdata"),n.cdata="",n.state=T.TEXT):"]"===o?n.cdata+="]":(n.cdata+="]]"+o,n.state=T.CDATA);continue;case T.PROC_INST:"?"===o?n.state=T.PROC_INST_ENDING:y(o)?n.state=T.PROC_INST_BODY:n.procInstName+=o;continue;case T.PROC_INST_BODY:if(!n.procInstBody&&y(o))continue;"?"===o?n.state=T.PROC_INST_ENDING:n.procInstBody+=o;continue;case T.PROC_INST_ENDING:">"===o?(O(n,"onprocessinginstruction",{name:n.procInstName,body:n.procInstBody}),n.procInstName=n.procInstBody="",n.state=T.TEXT):(n.procInstBody+="?"+o,n.state=T.PROC_INST_BODY);continue;case T.OPEN_TAG:v(d,o)?n.tagName+=o:(N(n),">"===o?I(n):"/"===o?n.state=T.OPEN_TAG_SLASH:(y(o)||S(n,"Invalid character in tag name"),n.state=T.ATTRIB));continue;case T.OPEN_TAG_SLASH:">"===o?(I(n,!0),U(n)):(S(n,"Forward-slash in opening tag not followed by >"),n.state=T.ATTRIB);continue;case T.ATTRIB:if(y(o))continue;">"===o?I(n):"/"===o?n.state=T.OPEN_TAG_SLASH:v(h,o)?(n.attribName=o,n.attribValue="",n.state=T.ATTRIB_NAME):S(n,"Invalid attribute name");continue;case T.ATTRIB_NAME:"="===o?n.state=T.ATTRIB_VALUE:">"===o?(S(n,"Attribute without value"),n.attribValue=n.attribName,k(n),I(n)):y(o)?n.state=T.ATTRIB_NAME_SAW_WHITE:v(d,o)?n.attribName+=o:S(n,"Invalid attribute name");continue;case T.ATTRIB_NAME_SAW_WHITE:if("="===o)n.state=T.ATTRIB_VALUE;else{if(y(o))continue;S(n,"Attribute without value"),n.tag.attributes[n.attribName]="",n.attribValue="",O(n,"onattribute",{name:n.attribName,value:""}),n.attribName="",">"===o?I(n):v(h,o)?(n.attribName=o,n.state=T.ATTRIB_NAME):(S(n,"Invalid attribute name"),n.state=T.ATTRIB)}continue;case T.ATTRIB_VALUE:if(y(o))continue;g(o)?(n.q=o,n.state=T.ATTRIB_VALUE_QUOTED):(n.opt.unquotedAttributeValues||R(n,"Unquoted attribute value"),n.state=T.ATTRIB_VALUE_UNQUOTED,n.attribValue=o);continue;case T.ATTRIB_VALUE_QUOTED:if(o!==n.q){"&"===o?n.state=T.ATTRIB_VALUE_ENTITY_Q:n.attribValue+=o;continue}k(n),n.q="",n.state=T.ATTRIB_VALUE_CLOSED;continue;case T.ATTRIB_VALUE_CLOSED:y(o)?n.state=T.ATTRIB:">"===o?I(n):"/"===o?n.state=T.OPEN_TAG_SLASH:v(h,o)?(S(n,"No whitespace between attributes"),n.attribName=o,n.attribValue="",n.state=T.ATTRIB_NAME):S(n,"Invalid attribute name");continue;case T.ATTRIB_VALUE_UNQUOTED:if(!m(o)){"&"===o?n.state=T.ATTRIB_VALUE_ENTITY_U:n.attribValue+=o;continue}k(n),">"===o?I(n):n.state=T.ATTRIB;continue;case T.CLOSE_TAG:if(n.tagName)">"===o?U(n):v(d,o)?n.tagName+=o:n.script?(n.script+=""===o?U(n):S(n,"Invalid characters in closing tag");continue;case T.TEXT_ENTITY:case T.ATTRIB_VALUE_ENTITY_Q:case T.ATTRIB_VALUE_ENTITY_U:var l,w;switch(n.state){case T.TEXT_ENTITY:l=T.TEXT,w="textNode";break;case T.ATTRIB_VALUE_ENTITY_Q:l=T.ATTRIB_VALUE_QUOTED,w="attribValue";break;case T.ATTRIB_VALUE_ENTITY_U:l=T.ATTRIB_VALUE_UNQUOTED,w="attribValue"}if(";"===o){var E=P(n);n.opt.unparsedEntities&&!Object.values(e.XML_ENTITIES).includes(E)?(n.entity="",n.state=l,n.write(E)):(n[w]+=E,n.entity="",n.state=l)}else v(n.entity.length?p:f,o)?n.entity+=o:(S(n,"Invalid character in entity name"),n[w]+="&"+n.entity+o,n.entity="",n.state=l);continue;default:throw new Error(n,"Unknown state: "+n.state)}return n.position>=n.bufferCheckPosition&&function(t){for(var n=Math.max(e.MAX_BUFFER_LENGTH,10),i=0,o=0,a=r.length;on)switch(r[o]){case"textNode":D(t);break;case"cdata":O(t,"oncdata",t.cdata),t.cdata="";break;case"script":O(t,"onscript",t.script),t.script="";break;default:R(t,"Max buffer length exceeded: "+r[o])}i=Math.max(i,s)}var c=e.MAX_BUFFER_LENGTH-i;t.bufferCheckPosition=c+t.position}(n),n} -/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var e;D(e=this),""!==e.cdata&&(O(e,"oncdata",e.cdata),e.cdata=""),""!==e.script&&(O(e,"onscript",e.script),e.script="")}};try{t=Tr.Stream}catch(e){t=function(){}}t||(t=function(){});var i=e.EVENTS.filter(function(e){return"error"!==e&&"end"!==e});function o(e,r){if(!(this instanceof o))return new o(e,r);t.apply(this),this._parser=new n(e,r),this.writable=!0,this.readable=!0;var a=this;this._parser.onend=function(){a.emit("end")},this._parser.onerror=function(e){a.emit("error",e),a._parser.error=null},this._decoder=null,i.forEach(function(e){Object.defineProperty(a,"on"+e,{get:function(){return a._parser["on"+e]},set:function(t){if(!t)return a.removeAllListeners(e),a._parser["on"+e]=t,t;a.on(e,t)},enumerable:!0,configurable:!1})})}o.prototype=Object.create(t.prototype,{constructor:{value:o}}),o.prototype.write=function(e){return"function"==typeof re.isBuffer&&re.isBuffer(e)&&(this._decoder||(this._decoder=new TextDecoder("utf8")),e=this._decoder.decode(e,{stream:!0})),this._parser.write(e.toString()),this.emit("data",e),!0},o.prototype.end=function(e){if(e&&e.length&&this.write(e),this._decoder){var t=this._decoder.decode();t&&(this._parser.write(t),this.emit("data",t))}return this._parser.end(),!0},o.prototype.on=function(e,r){var n=this;return n._parser["on"+e]||-1===i.indexOf(e)||(n._parser["on"+e]=function(){var t=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e),n.emit.apply(n,t)}),t.prototype.on.call(n,e,r)};var a="[CDATA[",s="DOCTYPE",c="http://www.w3.org/XML/1998/namespace",u="http://www.w3.org/2000/xmlns/",l={xml:c,xmlns:u},h=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,d=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,f=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,p=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function y(e){return" "===e||"\n"===e||"\r"===e||"\t"===e}function g(e){return'"'===e||"'"===e}function m(e){return">"===e||y(e)}function v(e,t){return e.test(t)}function b(e,t){return!v(e,t)}var w,E,A,T=0;for(var _ in e.STATE={BEGIN:T++,BEGIN_WHITESPACE:T++,TEXT:T++,TEXT_ENTITY:T++,OPEN_WAKA:T++,SGML_DECL:T++,SGML_DECL_QUOTED:T++,DOCTYPE:T++,DOCTYPE_QUOTED:T++,DOCTYPE_DTD:T++,DOCTYPE_DTD_QUOTED:T++,COMMENT_STARTING:T++,COMMENT:T++,COMMENT_ENDING:T++,COMMENT_ENDED:T++,CDATA:T++,CDATA_ENDING:T++,CDATA_ENDING_2:T++,PROC_INST:T++,PROC_INST_BODY:T++,PROC_INST_ENDING:T++,OPEN_TAG:T++,OPEN_TAG_SLASH:T++,ATTRIB:T++,ATTRIB_NAME:T++,ATTRIB_NAME_SAW_WHITE:T++,ATTRIB_VALUE:T++,ATTRIB_VALUE_QUOTED:T++,ATTRIB_VALUE_CLOSED:T++,ATTRIB_VALUE_UNQUOTED:T++,ATTRIB_VALUE_ENTITY_Q:T++,ATTRIB_VALUE_ENTITY_U:T++,CLOSE_TAG:T++,CLOSE_TAG_SAW_WHITE:T++,SCRIPT:T++,SCRIPT_ENDING:T++},e.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},e.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(e.ENTITIES).forEach(function(t){var r=e.ENTITIES[t],n="number"==typeof r?String.fromCharCode(r):r;e.ENTITIES[t]=n}),e.STATE)e.STATE[e.STATE[_]]=_;function C(e,t,r){e[t]&&e[t](r)}function O(e,t,r){e.textNode&&D(e),C(e,t,r)}function D(e){e.textNode=x(e.opt,e.textNode),e.textNode&&C(e,"ontext",e.textNode),e.textNode=""}function x(e,t){return e.trim&&(t=t.trim()),e.normalize&&(t=t.replace(/\s+/g," ")),t}function R(e,t){return D(e),e.trackPosition&&(t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c),t=new Error(t),e.error=t,C(e,"onerror",t),e}function F(e){return e.sawRoot&&!e.closedRoot&&S(e,"Unclosed root tag"),e.state!==T.BEGIN&&e.state!==T.BEGIN_WHITESPACE&&e.state!==T.TEXT&&R(e,"Unexpected end"),D(e),e.c="",e.closed=!0,C(e,"onend"),n.call(e,e.strict,e.opt),e}function S(e,t){if("object"!=typeof e||!(e instanceof n))throw new Error("bad call to strictFail");e.strict&&R(e,t)}function N(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,r=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(r.ns=t.ns),e.attribList.length=0,O(e,"onopentagstart",r)}function L(e,t){var r=e.indexOf(":")<0?["",e]:e.split(":"),n=r[0],i=r[1];return t&&"xmlns"===e&&(n="xmlns",i=""),{prefix:n,local:i}}function k(e){if(e.strict||(e.attribName=e.attribName[e.looseCase]()),-1!==e.attribList.indexOf(e.attribName)||e.tag.attributes.hasOwnProperty(e.attribName))e.attribName=e.attribValue="";else{if(e.opt.xmlns){var t=L(e.attribName,!0),r=t.prefix,n=t.local;if("xmlns"===r)if("xml"===n&&e.attribValue!==c)S(e,"xml: prefix must be bound to "+c+"\nActual: "+e.attribValue);else if("xmlns"===n&&e.attribValue!==u)S(e,"xmlns: prefix must be bound to "+u+"\nActual: "+e.attribValue);else{var i=e.tag,o=e.tags[e.tags.length-1]||e;i.ns===o.ns&&(i.ns=Object.create(o.ns)),i.ns[n]=e.attribValue}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,O(e,"onattribute",{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=""}}function I(e,t){if(e.opt.xmlns){var r=e.tag,n=L(e.tagName);r.prefix=n.prefix,r.local=n.local,r.uri=r.ns[n.prefix]||"",r.prefix&&!r.uri&&(S(e,"Unbound namespace prefix: "+JSON.stringify(e.tagName)),r.uri=n.prefix);var i=e.tags[e.tags.length-1]||e;r.ns&&i.ns!==r.ns&&Object.keys(r.ns).forEach(function(t){O(e,"onopennamespace",{prefix:t,uri:r.ns[t]})});for(var o=0,a=e.attribList.length;o",e.tagName="",void(e.state=T.SCRIPT);O(e,"onscript",e.script),e.script=""}var t=e.tags.length,r=e.tagName;e.strict||(r=r[e.looseCase]());for(var n=r;t--&&e.tags[t].name!==n;)S(e,"Unexpected close tag");if(t<0)return S(e,"Unmatched closing tag: "+e.tagName),e.textNode+="",void(e.state=T.TEXT);e.tagName=r;for(var i=e.tags.length;i-- >t;){var o=e.tag=e.tags.pop();e.tagName=e.tag.name,O(e,"onclosetag",e.tagName);var a={};for(var s in o.ns)a[s]=o.ns[s];var c=e.tags[e.tags.length-1]||e;e.opt.xmlns&&o.ns!==c.ns&&Object.keys(o.ns).forEach(function(t){var r=o.ns[t];O(e,"onclosenamespace",{prefix:t,uri:r})})}0===t&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=T.TEXT}function P(e){var t,r=e.entity,n=r.toLowerCase(),i="";return e.ENTITIES[r]?e.ENTITIES[r]:e.ENTITIES[n]?e.ENTITIES[n]:("#"===(r=n).charAt(0)&&("x"===r.charAt(1)?(r=r.slice(2),i=(t=parseInt(r,16)).toString(16)):(r=r.slice(1),i=(t=parseInt(r,10)).toString(10))),r=r.replace(/^0+/,""),isNaN(t)||i.toLowerCase()!==r||t<0||t>1114111?(S(e,"Invalid character entity"),"&"+e.entity+";"):String.fromCodePoint(t))}function B(e,t){"<"===t?(e.state=T.OPEN_WAKA,e.startTagPosition=e.position):y(t)||(S(e,"Non-whitespace before first tag."),e.textNode=t,e.state=T.TEXT)}function j(e,t){var r="";return t1114111||E(a)!==a)throw RangeError("Invalid code point: "+a);a<=65535?r.push(a):(e=55296+((a-=65536)>>10),t=a%1024+56320,r.push(e,t)),(n+1===i||r.length>16384)&&(o+=w.apply(null,r),r.length=0)}return o},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:A,configurable:!0,writable:!0}):String.fromCodePoint=A)}($e)),$e}function Cr(){return lr?ur:(lr=1,ur={isArray:function(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}})}function Or(){if(dr)return hr;dr=1;var e=Cr().isArray;return hr={copyOptions:function(e){var t,r={};for(t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r},ensureFlagExists:function(e,t){e in t&&"boolean"==typeof t[e]||(t[e]=!1)},ensureSpacesExists:function(e){(!("spaces"in e)||"number"!=typeof e.spaces&&"string"!=typeof e.spaces)&&(e.spaces=0)},ensureAlwaysArrayExists:function(t){"alwaysArray"in t&&("boolean"==typeof t.alwaysArray||e(t.alwaysArray))||(t.alwaysArray=!1)},ensureKeyExists:function(e,t){e+"Key"in t&&"string"==typeof t[e+"Key"]||(t[e+"Key"]=t.compact?"_"+e:e)},checkFnExists:function(e,t){return e+"Fn"in t}}}function Dr(){if(pr)return fr;pr=1;var e,t,r=_r(),n=Or(),i=Cr().isArray;function o(e){var t=Number(e);if(!isNaN(t))return t;var r=e.toLowerCase();return"true"===r||"false"!==r&&e}function a(r,n){var o;if(e.compact){if(!t[e[r+"Key"]]&&(i(e.alwaysArray)?-1!==e.alwaysArray.indexOf(e[r+"Key"]):e.alwaysArray)&&(t[e[r+"Key"]]=[]),t[e[r+"Key"]]&&!i(t[e[r+"Key"]])&&(t[e[r+"Key"]]=[t[e[r+"Key"]]]),r+"Fn"in e&&"string"==typeof n&&(n=e[r+"Fn"](n,t)),"instruction"===r&&("instructionFn"in e||"instructionNameFn"in e))for(o in n)if(n.hasOwnProperty(o))if("instructionFn"in e)n[o]=e.instructionFn(n[o],o,t);else{var a=n[o];delete n[o],n[e.instructionNameFn(o,a,t)]=a}i(t[e[r+"Key"]])?t[e[r+"Key"]].push(n):t[e[r+"Key"]]=n}else{t[e.elementsKey]||(t[e.elementsKey]=[]);var s={};if(s[e.typeKey]=r,"instruction"===r){for(o in n)if(n.hasOwnProperty(o))break;s[e.nameKey]="instructionNameFn"in e?e.instructionNameFn(o,n,t):o,e.instructionHasAttributes?(s[e.attributesKey]=n[o][e.attributesKey],"instructionFn"in e&&(s[e.attributesKey]=e.instructionFn(s[e.attributesKey],o,t))):("instructionFn"in e&&(n[o]=e.instructionFn(n[o],o,t)),s[e.instructionKey]=n[o])}else r+"Fn"in e&&(n=e[r+"Fn"](n,t)),s[e[r+"Key"]]=n;e.addParent&&(s[e.parentKey]=t),t[e.elementsKey].push(s)}}function s(r){var n;if("attributesFn"in e&&r&&(r=e.attributesFn(r,t)),(e.trim||"attributeValueFn"in e||"attributeNameFn"in e||e.nativeTypeAttributes)&&r)for(n in r)if(r.hasOwnProperty(n)&&(e.trim&&(r[n]=r[n].trim()),e.nativeTypeAttributes&&(r[n]=o(r[n])),"attributeValueFn"in e&&(r[n]=e.attributeValueFn(r[n],n,t)),"attributeNameFn"in e)){var i=r[n];delete r[n],r[e.attributeNameFn(n,r[n],t)]=i}return r}function c(r){var n={};if(r.body&&("xml"===r.name.toLowerCase()||e.instructionHasAttributes)){for(var i,o=/([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g;null!==(i=o.exec(r.body));)n[i[1]]=i[2]||i[3]||i[4];n=s(n)}if("xml"===r.name.toLowerCase()){if(e.ignoreDeclaration)return;t[e.declarationKey]={},Object.keys(n).length&&(t[e.declarationKey][e.attributesKey]=n),e.addParent&&(t[e.declarationKey][e.parentKey]=t)}else{if(e.ignoreInstruction)return;e.trim&&(r.body=r.body.trim());var c={};e.instructionHasAttributes&&Object.keys(n).length?(c[r.name]={},c[r.name][e.attributesKey]=n):c[r.name]=r.body,a("instruction",c)}}function u(r,n){var o;if("object"==typeof r&&(n=r.attributes,r=r.name),n=s(n),"elementNameFn"in e&&(r=e.elementNameFn(r,t)),e.compact){var a;if(o={},!e.ignoreAttributes&&n&&Object.keys(n).length)for(a in o[e.attributesKey]={},n)n.hasOwnProperty(a)&&(o[e.attributesKey][a]=n[a]);!(r in t)&&(i(e.alwaysArray)?-1!==e.alwaysArray.indexOf(r):e.alwaysArray)&&(t[r]=[]),t[r]&&!i(t[r])&&(t[r]=[t[r]]),i(t[r])?t[r].push(o):t[r]=o}else t[e.elementsKey]||(t[e.elementsKey]=[]),(o={})[e.typeKey]="element",o[e.nameKey]=r,!e.ignoreAttributes&&n&&Object.keys(n).length&&(o[e.attributesKey]=n),e.alwaysChildren&&(o[e.elementsKey]=[]),t[e.elementsKey].push(o);o[e.parentKey]=t,t=o}function l(t){e.ignoreText||(t.trim()||e.captureSpacesBetweenElements)&&(e.trim&&(t=t.trim()),e.nativeType&&(t=o(t)),e.sanitize&&(t=t.replace(/&/g,"&").replace(//g,">")),a("text",t))}function h(t){e.ignoreComment||(e.trim&&(t=t.trim()),a("comment",t))}function d(r){var n=t[e.parentKey];e.addParent||delete t[e.parentKey],t=n}function f(t){e.ignoreCdata||(e.trim&&(t=t.trim()),a("cdata",t))}function p(t){e.ignoreDoctype||(t=t.replace(/^ /,""),e.trim&&(t=t.trim()),a("doctype",t))}function y(e){e.note=e}return fr=function(i,o){var a=r.parser(!0,{}),s={};if(t=s,e=function(t){return e=n.copyOptions(t),n.ensureFlagExists("ignoreDeclaration",e),n.ensureFlagExists("ignoreInstruction",e),n.ensureFlagExists("ignoreAttributes",e),n.ensureFlagExists("ignoreText",e),n.ensureFlagExists("ignoreComment",e),n.ensureFlagExists("ignoreCdata",e),n.ensureFlagExists("ignoreDoctype",e),n.ensureFlagExists("compact",e),n.ensureFlagExists("alwaysChildren",e),n.ensureFlagExists("addParent",e),n.ensureFlagExists("trim",e),n.ensureFlagExists("nativeType",e),n.ensureFlagExists("nativeTypeAttributes",e),n.ensureFlagExists("sanitize",e),n.ensureFlagExists("instructionHasAttributes",e),n.ensureFlagExists("captureSpacesBetweenElements",e),n.ensureAlwaysArrayExists(e),n.ensureKeyExists("declaration",e),n.ensureKeyExists("instruction",e),n.ensureKeyExists("attributes",e),n.ensureKeyExists("text",e),n.ensureKeyExists("comment",e),n.ensureKeyExists("cdata",e),n.ensureKeyExists("doctype",e),n.ensureKeyExists("type",e),n.ensureKeyExists("name",e),n.ensureKeyExists("elements",e),n.ensureKeyExists("parent",e),n.checkFnExists("doctype",e),n.checkFnExists("instruction",e),n.checkFnExists("cdata",e),n.checkFnExists("comment",e),n.checkFnExists("text",e),n.checkFnExists("instructionName",e),n.checkFnExists("elementName",e),n.checkFnExists("attributeName",e),n.checkFnExists("attributeValue",e),n.checkFnExists("attributes",e),e}(o),a.opt={strictEntities:!0},a.onopentag=u,a.ontext=l,a.oncomment=h,a.onclosetag=d,a.onerror=y,a.oncdata=f,a.ondoctype=p,a.onprocessinginstruction=c,a.write(i).close(),s[e.elementsKey]){var g=s[e.elementsKey];delete s[e.elementsKey],s[e.elementsKey]=g,delete s.text}return s}}function xr(){if(gr)return yr;gr=1;var e=Or(),t=Dr();return yr=function(r,n){var i,o,a,s;return i=function(t){var r=e.copyOptions(t);return e.ensureSpacesExists(r),r}(n),o=t(r,i),s="compact"in i&&i.compact?"_parent":"parent",a="addParent"in i&&i.addParent?JSON.stringify(o,function(e,t){return e===s?"_":t},i.spaces):JSON.stringify(o,null,i.spaces),a.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")},yr}function Rr(){if(vr)return mr;vr=1;var e,t,r=Or(),n=Cr().isArray;function i(e,t,r){return(!r&&e.spaces?"\n":"")+Array(t+1).join(e.spaces)}function o(r,n,o){if(n.ignoreAttributes)return"";"attributesFn"in n&&(r=n.attributesFn(r,t,e));var a,s,c,u,l=[];for(a in r)r.hasOwnProperty(a)&&null!==r[a]&&void 0!==r[a]&&(u=n.noQuotesForNativeAttributes&&"string"!=typeof r[a]?"":'"',s=(s=""+r[a]).replace(/"/g,"""),c="attributeNameFn"in n?n.attributeNameFn(a,s,t,e):a,l.push(n.spaces&&n.indentAttributes?i(n,o+1,!1):" "),l.push(c+"="+u+("attributeValueFn"in n?n.attributeValueFn(s,a,t,e):s)+u));return r&&Object.keys(r).length&&n.spaces&&n.indentAttributes&&l.push(i(n,o,!1)),l.join("")}function a(r,n,i){return e=r,t="xml",n.ignoreDeclaration?"":""}function s(r,n,i){if(n.ignoreInstruction)return"";var a;for(a in r)if(r.hasOwnProperty(a))break;var s="instructionNameFn"in n?n.instructionNameFn(a,r[a],t,e):a;if("object"==typeof r[a])return e=r,t=s,"";var c=r[a]?r[a]:"";return"instructionFn"in n&&(c=n.instructionFn(c,a,t,e)),""}function c(r,n){return n.ignoreComment?"":"\x3c!--"+("commentFn"in n?n.commentFn(r,t,e):r)+"--\x3e"}function u(r,n){return n.ignoreCdata?"":"","]]]]>"))+"]]>"}function l(r,n){return n.ignoreDoctype?"":""}function h(r,n){return n.ignoreText?"":(r=(r=(r=""+r).replace(/&/g,"&")).replace(/&/g,"&").replace(//g,">"),"textFn"in n?n.textFn(r,t,e):r)}function d(r,n,a,f){return r.reduce(function(r,p){var y=i(n,a,f&&!r);switch(p.type){case"element":return r+y+function(r,n,i){e=r,t=r.name;var a=[],s="elementNameFn"in n?n.elementNameFn(r.name,r):r.name;a.push("<"+s),r[n.attributesKey]&&a.push(o(r[n.attributesKey],n,i));var c=r[n.elementsKey]&&r[n.elementsKey].length||r[n.attributesKey]&&"preserve"===r[n.attributesKey]["xml:space"];return c||(c="fullTagEmptyElementFn"in n?n.fullTagEmptyElementFn(r.name,r):n.fullTagEmptyElement),c?(a.push(">"),r[n.elementsKey]&&r[n.elementsKey].length&&(a.push(d(r[n.elementsKey],n,i+1)),e=r,t=r.name),a.push(n.spaces&&function(e,t){var r;if(e.elements&&e.elements.length)for(r=0;r")):a.push("/>"),a.join("")}(p,n,a);case"comment":return r+y+c(p[n.commentKey],n);case"doctype":return r+y+l(p[n.doctypeKey],n);case"cdata":return r+(n.indentCdata?y:"")+u(p[n.cdataKey],n);case"text":return r+(n.indentText?y:"")+h(p[n.textKey],n);case"instruction":var g={};return g[p[n.nameKey]]=p[n.attributesKey]?p:p[n.instructionKey],r+(n.indentInstruction?y:"")+s(g,n,a)}},"")}function f(e,t,r){var n;for(n in e)if(e.hasOwnProperty(n))switch(n){case t.parentKey:case t.attributesKey:break;case t.textKey:if(t.indentText||r)return!0;break;case t.cdataKey:if(t.indentCdata||r)return!0;break;case t.instructionKey:if(t.indentInstruction||r)return!0;break;case t.doctypeKey:case t.commentKey:default:return!0}return!1}function p(r,n,a,s,c){e=r,t=n;var u="elementNameFn"in a?a.elementNameFn(n,r):n;if(null==r||""===r)return"fullTagEmptyElementFn"in a&&a.fullTagEmptyElementFn(n,r)||a.fullTagEmptyElement?"<"+u+">":"<"+u+"/>";var l=[];if(n){if(l.push("<"+u),"object"!=typeof r)return l.push(">"+h(r,a)+""),l.join("");r[a.attributesKey]&&l.push(o(r[a.attributesKey],a,s));var d=f(r,a,!0)||r[a.attributesKey]&&"preserve"===r[a.attributesKey]["xml:space"];if(d||(d="fullTagEmptyElementFn"in a?a.fullTagEmptyElementFn(n,r):a.fullTagEmptyElement),!d)return l.push("/>"),l.join("");l.push(">")}return l.push(y(r,a,s+1,!1)),e=r,t=n,n&&l.push((c?i(a,s,!1):"")+""),l.join("")}function y(e,t,r,o){var d,y,g,m=[];for(y in e)if(e.hasOwnProperty(y))for(g=n(e[y])?e[y]:[e[y]],d=0;d-1};function h(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function d(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return o&&(t[Symbol.iterator]=function(){return t}),t}function p(e){this.map={},e instanceof p?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){if(2!=e.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function y(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function g(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function m(e){var t=new FileReader,r=g(t);return t.readAsArrayBuffer(e),r}function v(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:a&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:s&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:i&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():c&&a&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=v(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):c&&(ArrayBuffer.prototype.isPrototypeOf(e)||l(e))?this._bodyArrayBuffer=v(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a&&(this.blob=function(){var e=y(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=y(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(a)return this.blob().then(m);throw new Error("could not read as ArrayBuffer")},this.text=function(){var e,t,r,n,i,o=y(this);if(o)return o;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,r=g(t),n=/charset=([A-Za-z0-9_-]+)/.exec(e.type),i=n?n[1]:"utf-8",t.readAsText(e,i),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in n)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var i=/([?&])_=[^&]*/;i.test(this.url)?this.url=this.url.replace(i,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function A(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}}),t}function T(e,t){if(!(this instanceof T))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new p(t.headers),this.url=t.url||"",this._initBody(e)}E.prototype.clone=function(){return new E(this,{body:this._bodyInit})},b.call(E.prototype),b.call(T.prototype),T.prototype.clone=function(){return new T(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},T.error=function(){var e=new T(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var _=[301,302,303,307,308];T.redirect=function(e,t){if(-1===_.indexOf(t))throw new RangeError("Invalid status code");return new T(null,{status:t,headers:{location:e}})},r.DOMException=n.DOMException;try{new r.DOMException}catch(e){r.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},r.DOMException.prototype=Object.create(Error.prototype),r.DOMException.prototype.constructor=r.DOMException}function C(e,t){return new Promise(function(i,o){var s=new E(e,t);if(s.signal&&s.signal.aborted)return o(new r.DOMException("Aborted","AbortError"));var u=new XMLHttpRequest;function l(){u.abort()}if(u.onload=function(){var e,t,r={statusText:u.statusText,headers:(e=u.getAllResponseHeaders()||"",t=new p,e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e}).forEach(function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();try{t.append(n,i)}catch(e){console.warn("Response "+e.message)}}}),t)};0===s.url.indexOf("file://")&&(u.status<200||u.status>599)?r.status=200:r.status=u.status,r.url="responseURL"in u?u.responseURL:r.headers.get("X-Request-URL");var n="response"in u?u.response:u.responseText;setTimeout(function(){i(new T(n,r))},0)},u.onerror=function(){setTimeout(function(){o(new TypeError("Network request failed"))},0)},u.ontimeout=function(){setTimeout(function(){o(new TypeError("Network request timed out"))},0)},u.onabort=function(){setTimeout(function(){o(new r.DOMException("Aborted","AbortError"))},0)},u.open(s.method,function(e){try{return""===e&&n.location.href?n.location.href:e}catch(t){return e}}(s.url),!0),"include"===s.credentials?u.withCredentials=!0:"omit"===s.credentials&&(u.withCredentials=!1),"responseType"in u&&(a?u.responseType="blob":c&&(u.responseType="arraybuffer")),t&&"object"==typeof t.headers&&!(t.headers instanceof p||n.Headers&&t.headers instanceof n.Headers)){var f=[];Object.getOwnPropertyNames(t.headers).forEach(function(e){f.push(h(e)),u.setRequestHeader(e,d(t.headers[e]))}),s.headers.forEach(function(e,t){-1===f.indexOf(t)&&u.setRequestHeader(t,e)})}else s.headers.forEach(function(e,t){u.setRequestHeader(t,e)});s.signal&&(s.signal.addEventListener("abort",l),u.onreadystatechange=function(){4===u.readyState&&s.signal.removeEventListener("abort",l)}),u.send(void 0===s._bodyInit?null:s._bodyInit)})}C.polyfill=!0,n.fetch||(n.fetch=C,n.Headers=p,n.Request=E,n.Response=T),r.Headers=p,r.Request=E,r.Response=T,r.fetch=C}({})}(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var o=n.fetch?n:i;(r=o.fetch).default=o.fetch,r.fetch=o.fetch,r.Headers=o.Headers,r.Request=o.Request,r.Response=o.Response,t.exports=r}(kr,kr.exports)),kr.exports),Ur=t(Ir);const Pr="undefined"!=typeof globalThis&&"function"==typeof globalThis.fetch?globalThis.fetch.bind(globalThis):Ur,Br=e=>{const t=Number(e);if(!Number.isNaN(t))return t;const r=e.toLowerCase();return"true"===r||"false"!==r&&e},jr=(e,t)=>{if(!e&&!t)return!0;if(!e||!t)return!1;const r=e.trim(),n=t.trim();if(Math.abs(r.length-n.length)>1)return!1;const i="/"===r.slice(-1)?r.slice(0,-1):r,o="/"===n.slice(-1)?n.slice(0,-1):n;return e.includes(o)||t.includes(i)},Vr=(e,t)=>{if(!e&&!t)return!0;if(!e||!t)return!1;const r=e.trim(),n=t.trim(),i="/"===r.slice(-1)?r.slice(0,-1):r,o="/"===n.slice(-1)?n.slice(0,-1):n;return e.includes(o)||t.includes(i)},Mr=e=>e.reduce((e,t)=>({...e,[j[t]]:t}),{}),$r=e=>Object.entries(e).reduce((e,[t,r])=>r?{...e,[t]:r}:e,{}),Kr=(e,t)=>t?{[e]:t}:{},Hr=(e,t)=>e?t&&0!==t.length?Object.fromEntries(Object.entries(e).filter(([e])=>!t.includes(e))):e:{};var Yr=Object.freeze({__proto__:null,cleanupFalsy:$r,conditionalParam:Kr,excludeHeaders:Hr,getDAVAttribute:Mr,urlContains:Vr,urlEquals:jr});const qr=B("tsdav:request"),zr=async e=>{var t;const{url:r,init:n,convertIncoming:i=!0,parseOutgoing:o=!0,fetchOptions:a={},fetch:s}=e,c=null!=s?s:Pr,{headers:u={},body:l,namespace:h,method:d,attributes:f}=n,p=i?Nr.js2xml({_declaration:{_attributes:{version:"1.0",encoding:"utf-8"}},...l,_attributes:f},{compact:!0,spaces:2,elementNameFn:e=>h&&!/^.+:.+/.test(e)?`${h}:${e}`:e}):l,y={...a};delete y.headers;const g=await c(r,{headers:{"Content-Type":"text/xml;charset=UTF-8",...$r(u),...a.headers||{}},body:p,method:d,...y}),m=await g.text();if(!(g.ok&&(null===(t=g.headers.get("content-type"))||void 0===t?void 0:t.includes("xml"))&&o&&m))return[{href:g.url,ok:g.ok,status:g.status,statusText:g.statusText,raw:m}];const v=Nr.xml2js(m,{compact:!0,trim:!0,textFn:(e,t)=>{try{const r=t._parent,n=Object.keys(r),i=n[n.length-1],o=r[i];if(o.length>0){o[o.length-1]=Br(e)}else r[i]=Br(e)}catch(e){qr(e.stack)}},elementNameFn:e=>e.replace(/^.+:/,"").replace(/([-_]\w)/g,e=>e[1].toUpperCase()),attributesFn:e=>{const t={...e};return delete t.xmlns,t},ignoreDeclaration:!0});return(Array.isArray(v.multistatus.response)?v.multistatus.response:[v.multistatus.response]).map(e=>{var t,r;if(!e)return{status:g.status,statusText:g.statusText,ok:g.ok};const n=/^\S+\s(?\d+)\s(?.+)$/.exec(e.status);return{raw:v,href:e.href,status:(null==n?void 0:n.groups)?Number.parseInt(null==n?void 0:n.groups.status,10):g.status,statusText:null!==(r=null===(t=null==n?void 0:n.groups)||void 0===t?void 0:t.statusText)&&void 0!==r?r:g.statusText,ok:!e.error,error:e.error,responsedescription:e.responsedescription,props:(Array.isArray(e.propstat)?e.propstat:[e.propstat]).reduce((e,t)=>({...e,...null==t?void 0:t.prop}),{})}})},Gr=async e=>{const{url:t,props:r,depth:n,headers:i,headersToExclude:o,fetchOptions:a={},fetch:s}=e;return zr({url:t,init:{method:"PROPFIND",headers:Hr($r({depth:n,...i}),o),namespace:V.DAV,body:{propfind:{_attributes:Mr([U.CALDAV,U.CALDAV_APPLE,U.CALENDAR_SERVER,U.CARDDAV,U.DAV]),prop:r}}},fetchOptions:a,fetch:s})},Wr=async e=>{const{url:t,data:r,headers:n,headersToExclude:i,fetchOptions:o={},fetch:a}=e;return(null!=a?a:Pr)(t,{method:"PUT",body:r,headers:Hr(n,i),...o})},Qr=async e=>{const{url:t,data:r,etag:n,headers:i,headersToExclude:o,fetchOptions:a={},fetch:s}=e;return(null!=s?s:Pr)(t,{method:"PUT",body:r,headers:Hr($r({"If-Match":n,...i}),o),...a})},Xr=async e=>{const{url:t,headers:r,etag:n,headersToExclude:i,fetchOptions:o={},fetch:a}=e;return(null!=a?a:Pr)(t,{method:"DELETE",headers:Hr($r({"If-Match":n,...r}),i),...o})};var Zr=Object.freeze({__proto__:null,createObject:Wr,davRequest:zr,deleteObject:Xr,propfind:Gr,updateObject:Qr});function Jr(e,t){const r=e=>t.every(t=>e[t]);return Array.isArray(e)?e.every(e=>r(e)):r(e)}const en=(e,t)=>t.reduce((t,r)=>e[r]?t:`${t.length?`${t},`:""}${r.toString()}`,""),tn=B("tsdav:collection"),rn=async e=>{const{url:t,body:r,depth:n,defaultNamespace:i=V.DAV,headers:o,headersToExclude:a,fetchOptions:s={},fetch:c}=e,u=await zr({url:t,init:{method:"REPORT",headers:Hr($r({depth:n,...o}),a),namespace:i,body:r},fetchOptions:s,fetch:c}),l=u.find(e=>!e.ok||e.status&&e.status>=400);if(l)throw new Error(`Collection query failed: ${l.status} ${l.statusText}. ${l.raw?`Raw response: ${l.raw}`:""}`);return 1===u.length&&!u[0].raw&&u[0].status&&u[0].status<300?[]:u},nn=async e=>{const{url:t,props:r,depth:n,headers:i,headersToExclude:o,fetchOptions:a={},fetch:s}=e;return zr({url:t,init:{method:"MKCOL",headers:Hr($r({depth:n,...i}),o),namespace:V.DAV,body:r?{mkcol:{set:{prop:r}}}:void 0},fetchOptions:a,fetch:s})},on=async e=>{var t,r,n,i,o;const{collection:a,headers:s,headersToExclude:c,fetchOptions:u={},fetch:l}=e;return null!==(o=null===(i=null===(n=null===(r=null===(t=(await Gr({url:a.url,props:{[`${V.DAV}:supported-report-set`]:{}},depth:"0",headers:Hr(s,c),fetchOptions:u,fetch:l}))[0])||void 0===t?void 0:t.props)||void 0===r?void 0:r.supportedReportSet)||void 0===n?void 0:n.supportedReport)||void 0===i?void 0:i.map(e=>Object.keys(e.report)[0]))&&void 0!==o?o:[]},an=async e=>{var t,r,n;const{collection:i,headers:o,headersToExclude:a,fetchOptions:s={},fetch:c}=e,u=(await Gr({url:i.url,props:{[`${V.CALENDAR_SERVER}:getctag`]:{}},depth:"0",headers:Hr(o,a),fetchOptions:s,fetch:c})).filter(e=>Vr(i.url,e.href))[0];if(!u)throw new Error("Collection does not exist on server");return{isDirty:`${i.ctag}`!=`${null===(t=u.props)||void 0===t?void 0:t.getctag}`,newCtag:null===(n=null===(r=u.props)||void 0===r?void 0:r.getctag)||void 0===n?void 0:n.toString()}},sn=e=>{const{url:t,props:r,headers:n,syncLevel:i,syncToken:o,headersToExclude:a,fetchOptions:s,fetch:c}=e;return zr({url:t,init:{method:"REPORT",namespace:V.DAV,headers:Hr({...n},a),body:{"sync-collection":{_attributes:Mr([U.CALDAV,U.CARDDAV,U.DAV]),"sync-level":i,"sync-token":o,[`${V.DAV}:prop`]:r}}},fetchOptions:s,fetch:c})},cn=async e=>{var t,r,n,i,o,a,s,c,u,l,h,d;const{collection:f,method:p,headers:y,headersToExclude:g,account:m,detailedResult:v,fetchOptions:b={},fetch:w}=e,E=["accountType","homeUrl"];if(!m||!Jr(m,E)){if(!m)throw new Error("no account for smartCollectionSync");throw new Error(`account must have ${en(m,E)} before smartCollectionSync`)}const A=null!=p?p:(null===(t=f.reports)||void 0===t?void 0:t.includes("syncCollection"))?"webdav":"basic";if(tn(`smart collection sync with type ${m.accountType} and method ${A}`),"webdav"===A){const e=await sn({url:f.url,props:{[`${V.DAV}:getetag`]:{},[`${"caldav"===m.accountType?V.CALDAV:V.CARDDAV}:${"caldav"===m.accountType?"calendar-data":"address-data"}`]:{},[`${V.DAV}:displayname`]:{}},syncLevel:1,syncToken:f.syncToken,headers:Hr(y,g),fetchOptions:b,fetch:w}),t=e.filter(e=>{var t;const r="caldav"===m.accountType?".ics":".vcf";return(null===(t=e.href)||void 0===t?void 0:t.slice(-4))===r}),u=t.filter(e=>404!==e.status).map(e=>e.href),l=t.filter(e=>404===e.status).map(e=>e.href),h=(u.length&&null!==(n=await(null===(r=null==f?void 0:f.objectMultiGet)||void 0===r?void 0:r.call(f,{url:f.url,props:{[`${V.DAV}:getetag`]:{},[`${"caldav"===m.accountType?V.CALDAV:V.CARDDAV}:${"caldav"===m.accountType?"calendar-data":"address-data"}`]:{}},objectUrls:u,depth:"1",headers:Hr(y,g),fetchOptions:b,fetch:w})))&&void 0!==n?n:[]).map(e=>{var t,r,n,i,o,a,s,c,u,l;return{url:null!==(t=e.href)&&void 0!==t?t:"",etag:null===(r=e.props)||void 0===r?void 0:r.getetag,data:"caldav"===(null==m?void 0:m.accountType)?null!==(o=null===(i=null===(n=e.props)||void 0===n?void 0:n.calendarData)||void 0===i?void 0:i._cdata)&&void 0!==o?o:null===(a=e.props)||void 0===a?void 0:a.calendarData:null!==(u=null===(c=null===(s=e.props)||void 0===s?void 0:s.addressData)||void 0===c?void 0:c._cdata)&&void 0!==u?u:null===(l=e.props)||void 0===l?void 0:l.addressData}}),d=null!==(i=f.objects)&&void 0!==i?i:[],p=h.filter(e=>d.every(t=>!Vr(t.url,e.url))),E=d.reduce((e,t)=>{const r=h.find(e=>Vr(e.url,t.url));return r&&r.etag&&r.etag!==t.etag?[...e,r]:e},[]),A=l.map(e=>({url:e,etag:""})),T=d.filter(e=>h.some(t=>Vr(e.url,t.url)&&t.etag===e.etag));return{...f,objects:v?{created:p,updated:E,deleted:A}:[...T,...p,...E],syncToken:null!==(c=null===(s=null===(a=null===(o=e[0])||void 0===o?void 0:o.raw)||void 0===a?void 0:a.multistatus)||void 0===s?void 0:s.syncToken)&&void 0!==c?c:f.syncToken}}if("basic"===A){const{isDirty:e,newCtag:t}=await an({collection:f,headers:Hr(y,g),fetchOptions:b,fetch:w}),r=null!==(u=f.objects)&&void 0!==u?u:[],n=null!==(d=await(null===(h=(l=f).fetchObjects)||void 0===h?void 0:h.call(l,{collection:f,headers:Hr(y,g),fetchOptions:b,fetch:w})))&&void 0!==d?d:[],i=n.filter(e=>r.every(t=>!Vr(t.url,e.url))),o=r.reduce((e,t)=>{const r=n.find(e=>Vr(e.url,t.url));return r&&r.etag&&r.etag!==t.etag?[...e,r]:e},[]),a=r.filter(e=>n.every(t=>!Vr(t.url,e.url))),s=r.filter(e=>n.some(t=>Vr(e.url,t.url)&&t.etag===e.etag));if(e)return{...f,objects:v?{created:i,updated:o,deleted:a}:[...s,...i,...o],ctag:t}}return v?{...f,objects:{created:[],updated:[],deleted:[]}}:f};var un=Object.freeze({__proto__:null,collectionQuery:rn,isCollectionDirty:an,makeCollection:nn,smartCollectionSync:cn,supportedReportSet:on,syncCollection:sn});const ln=B("tsdav:addressBook"),hn=async e=>{const{url:t,props:r,filters:n,depth:i,headers:o,headersToExclude:a,fetchOptions:s={},fetch:c}=e;return rn({url:t,body:{"addressbook-query":$r({_attributes:Mr([U.CARDDAV,U.DAV]),[`${V.DAV}:prop`]:r,filter:null!=n?n:{"prop-filter":{_attributes:{name:"FN"}}}})},defaultNamespace:V.CARDDAV,depth:i,headers:Hr(o,a),fetchOptions:s,fetch:c})},dn=async e=>{const{url:t,props:r,objectUrls:n,depth:i,headers:o,headersToExclude:a,fetchOptions:s={},fetch:c}=e;return rn({url:t,body:{"addressbook-multiget":$r({_attributes:Mr([U.DAV,U.CARDDAV]),[`${V.DAV}:prop`]:r,[`${V.DAV}:href`]:n})},defaultNamespace:V.CARDDAV,depth:i,headers:Hr(o,a),fetchOptions:s,fetch:c})},fn=async e=>{const{account:t,headers:r,props:n,headersToExclude:i,fetchOptions:o={},fetch:a}=null!=e?e:{},s=["homeUrl","rootUrl"];if(!t||!Jr(t,s)){if(!t)throw new Error("no account for fetchAddressBooks");throw new Error(`account must have ${en(t,s)} before fetchAddressBooks`)}const c=await Gr({url:t.homeUrl,props:null!=n?n:{[`${V.DAV}:displayname`]:{},[`${V.CALENDAR_SERVER}:getctag`]:{},[`${V.DAV}:resourcetype`]:{},[`${V.DAV}:sync-token`]:{}},depth:"1",headers:Hr(r,i),fetchOptions:o,fetch:a});return Promise.all(c.filter(e=>{var t,r;return Object.keys(null!==(r=null===(t=e.props)||void 0===t?void 0:t.resourcetype)&&void 0!==r?r:{}).includes("addressbook")}).map(e=>{var r,n,i,o,a,s,c,u,l;const h=null!==(i=null===(n=null===(r=e.props)||void 0===r?void 0:r.displayname)||void 0===n?void 0:n._cdata)&&void 0!==i?i:null===(o=e.props)||void 0===o?void 0:o.displayname;return ln(`Found address book named ${"string"==typeof h?h:""},\n props: ${JSON.stringify(e.props)}`),{url:new URL(null!==(a=e.href)&&void 0!==a?a:"",null!==(s=t.rootUrl)&&void 0!==s?s:"").href,ctag:null===(c=e.props)||void 0===c?void 0:c.getctag,displayName:"string"==typeof h?h:"",resourcetype:Object.keys(null===(u=e.props)||void 0===u?void 0:u.resourcetype),syncToken:null===(l=e.props)||void 0===l?void 0:l.syncToken}}).map(async e=>({...e,reports:await on({collection:e,headers:Hr(r,i),fetchOptions:o,fetch:a})})))},pn=async e=>{const{addressBook:t,headers:r,objectUrls:n,headersToExclude:i,urlFilter:o=e=>e,useMultiGet:a=!0,fetchOptions:s={},fetch:c}=e;ln(`Fetching vcards from ${null==t?void 0:t.url}`);const u=["url"];if(!t||!Jr(t,u)){if(!t)throw new Error("cannot fetchVCards for undefined addressBook");throw new Error(`addressBook must have ${en(t,u)} before fetchVCards`)}const l=(null!=n?n:(await hn({url:t.url,props:{[`${V.DAV}:getetag`]:{}},depth:"1",headers:Hr(r,i),fetchOptions:s,fetch:c})).map(e=>{var t;return null!==(t=e.href)&&void 0!==t?t:""})).map(e=>e.startsWith("http")||!e?e:new URL(e,t.url).href).filter(e=>e&&!jr(e,t.url)).filter(o).map(e=>new URL(e).pathname);let h=[];return l.length>0&&(h=a?await dn({url:t.url,props:{[`${V.DAV}:getetag`]:{},[`${V.CARDDAV}:address-data`]:{}},objectUrls:l,depth:"1",headers:Hr(r,i),fetchOptions:s,fetch:c}):await hn({url:t.url,props:{[`${V.DAV}:getetag`]:{},[`${V.CARDDAV}:address-data`]:{}},depth:"1",headers:Hr(r,i),fetchOptions:s,fetch:c})),h.map(e=>{var r,n,i,o,a,s;return{url:new URL(null!==(r=e.href)&&void 0!==r?r:"",t.url).href,etag:null===(n=e.props)||void 0===n?void 0:n.getetag,data:null!==(a=null===(o=null===(i=e.props)||void 0===i?void 0:i.addressData)||void 0===o?void 0:o._cdata)&&void 0!==a?a:null===(s=e.props)||void 0===s?void 0:s.addressData}})},yn=async e=>{const{addressBook:t,vCardString:r,filename:n,headers:i,headersToExclude:o,fetchOptions:a={},fetch:s}=e;return Wr({url:new URL(n,t.url).href,data:r,headers:Hr({"content-type":"text/vcard; charset=utf-8","If-None-Match":"*",...i},o),fetchOptions:a,fetch:s})},gn=async e=>{const{vCard:t,headers:r,headersToExclude:n,fetchOptions:i={},fetch:o}=e;return Qr({url:t.url,data:t.data,etag:t.etag,headers:Hr({"content-type":"text/vcard; charset=utf-8",...r},n),fetchOptions:i,fetch:o})},mn=async e=>{const{vCard:t,headers:r,headersToExclude:n,fetchOptions:i={},fetch:o}=e;return Xr({url:t.url,etag:t.etag,headers:Hr(r,n),fetchOptions:i,fetch:o})};var vn=Object.freeze({__proto__:null,addressBookMultiGet:dn,addressBookQuery:hn,createVCard:yn,deleteVCard:mn,fetchAddressBooks:fn,fetchVCards:pn,updateVCard:gn});const bn=B("tsdav:calendar"),wn=async e=>{var t,r,n;const{account:i,headers:o,headersToExclude:a,fetchOptions:s={},fetch:c}=e,u=["principalUrl","rootUrl"];if(!Jr(i,u))throw new Error(`account must have ${en(i,u)} before fetchUserAddresses`);bn(`Fetch user addresses from ${i.principalUrl}`);const l=(await Gr({url:i.principalUrl,props:{[`${V.CALDAV}:calendar-user-address-set`]:{}},depth:"0",headers:Hr(o,a),fetchOptions:s,fetch:c})).find(e=>Vr(i.principalUrl,e.href));if(!l||!l.ok)throw new Error("cannot find calendarUserAddresses");const h=(null===(n=null===(r=null===(t=null==l?void 0:l.props)||void 0===t?void 0:t.calendarUserAddressSet)||void 0===r?void 0:r.href)||void 0===n?void 0:n.filter(Boolean))||[];return bn(`Fetched calendar user addresses ${h}`),h},En=async e=>{const{url:t,props:r,filters:n,timezone:i,depth:o,headers:a,headersToExclude:s,fetchOptions:c={},fetch:u}=e;return rn({url:t,body:{"calendar-query":$r({_attributes:Mr([U.CALDAV,U.CALENDAR_SERVER,U.CALDAV_APPLE,U.DAV]),[`${V.DAV}:prop`]:r,filter:n,timezone:i})},defaultNamespace:V.CALDAV,depth:o,headers:Hr(a,s),fetchOptions:c,fetch:u})},An=async e=>{const{url:t,props:r,objectUrls:n,filters:i,timezone:o,depth:a,headers:s,headersToExclude:c,fetchOptions:u={},fetch:l}=e;return rn({url:t,body:{"calendar-multiget":$r({_attributes:Mr([U.DAV,U.CALDAV]),[`${V.DAV}:prop`]:r,[`${V.DAV}:href`]:n,filter:i,timezone:o})},defaultNamespace:V.CALDAV,depth:a,headers:Hr(s,c),fetchOptions:u,fetch:l})},Tn=async e=>{const{url:t,props:r,depth:n,headers:i,headersToExclude:o,fetchOptions:a={},fetch:s}=e;return zr({url:t,init:{method:"MKCALENDAR",headers:Hr($r({depth:n,...i}),o),namespace:V.DAV,body:{[`${V.CALDAV}:mkcalendar`]:{_attributes:Mr([U.DAV,U.CALDAV,U.CALDAV_APPLE]),set:{prop:r}}}},fetchOptions:a,fetch:s})},_n=async e=>{const{headers:t,account:r,props:n,projectedProps:i,headersToExclude:o,fetchOptions:a={},fetch:s}=null!=e?e:{},c=["homeUrl","rootUrl"];if(!r||!Jr(r,c)){if(!r)throw new Error("no account for fetchCalendars");throw new Error(`account must have ${en(r,c)} before fetchCalendars`)}const u=await Gr({url:r.homeUrl,props:null!=n?n:{[`${V.CALDAV}:calendar-description`]:{},[`${V.CALDAV}:calendar-timezone`]:{},[`${V.DAV}:displayname`]:{},[`${V.CALDAV_APPLE}:calendar-color`]:{},[`${V.CALENDAR_SERVER}:getctag`]:{},[`${V.DAV}:resourcetype`]:{},[`${V.CALDAV}:supported-calendar-component-set`]:{},[`${V.DAV}:sync-token`]:{}},depth:"1",headers:Hr(t,o),fetchOptions:a,fetch:s});return Promise.all(u.filter(e=>{var t,r;return Object.keys(null!==(r=null===(t=e.props)||void 0===t?void 0:t.resourcetype)&&void 0!==r?r:{}).includes("calendar")}).filter(e=>{var t,r,n,i,o,a;return(Array.isArray(null===(r=null===(t=e.props)||void 0===t?void 0:t.supportedCalendarComponentSet)||void 0===r?void 0:r.comp)?null===(n=e.props)||void 0===n?void 0:n.supportedCalendarComponentSet.comp.map(e=>e._attributes.name):[null===(a=null===(o=null===(i=e.props)||void 0===i?void 0:i.supportedCalendarComponentSet)||void 0===o?void 0:o.comp)||void 0===a?void 0:a._attributes.name]).some(e=>Object.values(M).includes(e))}).map(e=>{var t,n,o,a,s,c,u,l,h,d,f,p,y,g,m,v;const b=null===(t=e.props)||void 0===t?void 0:t.calendarDescription,w=null===(n=e.props)||void 0===n?void 0:n.calendarTimezone;return{description:"string"==typeof b?b:"",timezone:"string"==typeof w?w:"",url:new URL(null!==(o=e.href)&&void 0!==o?o:"",null!==(a=r.rootUrl)&&void 0!==a?a:"").href,ctag:null===(s=e.props)||void 0===s?void 0:s.getctag,calendarColor:null===(c=e.props)||void 0===c?void 0:c.calendarColor,displayName:null!==(l=null===(u=e.props)||void 0===u?void 0:u.displayname._cdata)&&void 0!==l?l:null===(h=e.props)||void 0===h?void 0:h.displayname,components:Array.isArray(null===(d=e.props)||void 0===d?void 0:d.supportedCalendarComponentSet.comp)?null===(f=e.props)||void 0===f?void 0:f.supportedCalendarComponentSet.comp.map(e=>e._attributes.name):[null===(y=null===(p=e.props)||void 0===p?void 0:p.supportedCalendarComponentSet.comp)||void 0===y?void 0:y._attributes.name],resourcetype:Object.keys(null===(g=e.props)||void 0===g?void 0:g.resourcetype),syncToken:null===(m=e.props)||void 0===m?void 0:m.syncToken,...Kr("projectedProps",Object.fromEntries(Object.entries(null!==(v=e.props)&&void 0!==v?v:{}).filter(([e])=>null==i?void 0:i[e])))}}).map(async e=>({...e,reports:await on({collection:e,headers:Hr(t,o),fetchOptions:a,fetch:s})})))},Cn=async e=>{const{calendar:t,objectUrls:r,filters:n,timeRange:i,headers:o,expand:a,urlFilter:s=e=>Boolean(null==e?void 0:e.includes(".ics")),useMultiGet:c=!0,headersToExclude:u,fetchOptions:l={},fetch:h}=e;if(i){const e=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,t=/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i;if(!(e.test(i.start)&&e.test(i.end)||t.test(i.start)&&t.test(i.end)))throw new Error("invalid timeRange format, not in ISO8601")}bn(`Fetching calendar objects from ${null==t?void 0:t.url}`);const d=["url"];if(!t||!Jr(t,d)){if(!t)throw new Error("cannot fetchCalendarObjects for undefined calendar");throw new Error(`calendar must have ${en(t,d)} before fetchCalendarObjects`)}const f=null!=n?n:[{"comp-filter":{_attributes:{name:"VCALENDAR"},"comp-filter":{_attributes:{name:"VEVENT"},...i?{"time-range":{_attributes:{start:`${new Date(i.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(i.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}}}];let p=[];const y=(null!=r?r:(p=await En({url:t.url,props:{[`${V.DAV}:getetag`]:{},...a&&i?{[`${V.CALDAV}:calendar-data`]:{[`${V.CALDAV}:expand`]:{_attributes:{start:`${new Date(i.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(i.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}}:{}},filters:f,depth:"1",headers:Hr(o,u),fetchOptions:l,fetch:h})).map(e=>{var t;return null!==(t=e.href)&&void 0!==t?t:""})).map(e=>e.startsWith("http")||!e?e:new URL(e,t.url).href).filter(s).map(e=>new URL(e).pathname);let g=[];return y.length>0&&(g=a&&!r?p.filter(e=>{var r,n;const i=(null!==(r=e.href)&&void 0!==r?r:"").startsWith("http")?e.href:new URL(null!==(n=e.href)&&void 0!==n?n:"",t.url).href;return s(null!=i?i:"")}):c?await An({url:t.url,props:{[`${V.DAV}:getetag`]:{},[`${V.CALDAV}:calendar-data`]:{...a&&i?{[`${V.CALDAV}:expand`]:{_attributes:{start:`${new Date(i.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(i.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}},objectUrls:y,depth:"1",headers:Hr(o,u),fetchOptions:l,fetch:h}):await En({url:t.url,props:{[`${V.DAV}:getetag`]:{},[`${V.CALDAV}:calendar-data`]:{...a&&i?{[`${V.CALDAV}:expand`]:{_attributes:{start:`${new Date(i.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(i.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}},filters:f,depth:"1",headers:Hr(o,u),fetchOptions:l,fetch:h})),g.map(e=>{var r,n,i,o,a,s;return{url:new URL(null!==(r=e.href)&&void 0!==r?r:"",t.url).href,etag:`${null===(n=e.props)||void 0===n?void 0:n.getetag}`,data:null!==(a=null===(o=null===(i=e.props)||void 0===i?void 0:i.calendarData)||void 0===o?void 0:o._cdata)&&void 0!==a?a:null===(s=e.props)||void 0===s?void 0:s.calendarData}})},On=async e=>{const{calendar:t,iCalString:r,filename:n,headers:i,headersToExclude:o,fetchOptions:a={},fetch:s}=e;return Wr({url:new URL(n,t.url).href,data:r,headers:Hr({"content-type":"text/calendar; charset=utf-8","If-None-Match":"*",...i},o),fetchOptions:a,fetch:s})},Dn=async e=>{const{calendarObject:t,headers:r,headersToExclude:n,fetchOptions:i={},fetch:o}=e;return Qr({url:t.url,data:t.data,etag:t.etag,headers:Hr({"content-type":"text/calendar; charset=utf-8",...r},n),fetchOptions:i,fetch:o})},xn=async e=>{const{calendarObject:t,headers:r,headersToExclude:n,fetchOptions:i={},fetch:o}=e;return Xr({url:t.url,etag:t.etag,headers:Hr(r,n),fetchOptions:i,fetch:o})},Rn=async e=>{var t;const{oldCalendars:r,account:n,detailedResult:i,headers:o,headersToExclude:a,fetchOptions:s={},fetch:c}=e;if(!n)throw new Error("Must have account before syncCalendars");const u=null!==(t=null!=r?r:n.calendars)&&void 0!==t?t:[],l=await _n({account:n,headers:Hr(o,a),fetchOptions:s,fetch:c}),h=l.filter(e=>u.every(t=>!Vr(t.url,e.url)));bn(`new calendars: ${h.map(e=>e.displayName)}`);const d=u.reduce((e,t)=>{const r=l.find(e=>Vr(e.url,t.url));return r&&(r.syncToken&&`${r.syncToken}`!=`${t.syncToken}`||r.ctag&&`${r.ctag}`!=`${t.ctag}`)?[...e,r]:e},[]);bn(`updated calendars: ${d.map(e=>e.displayName)}`);const f=await Promise.all(d.map(async e=>await cn({collection:{...e,objectMultiGet:An},method:"webdav",headers:Hr(o,a),account:n,fetchOptions:s,fetch:c}))),p=u.filter(e=>l.every(t=>!Vr(t.url,e.url)));bn(`deleted calendars: ${p.map(e=>e.displayName)}`);const y=u.filter(e=>l.some(t=>Vr(t.url,e.url)&&(t.syncToken&&`${t.syncToken}`!=`${e.syncToken}`||t.ctag&&`${t.ctag}`!=`${e.ctag}`)));return i?{created:h,updated:d,deleted:p}:[...y,...h,...f]},Fn=async e=>{const{url:t,timeRange:r,depth:n,headers:i,headersToExclude:o,fetchOptions:a={},fetch:s}=e;if(!r)throw new Error("timeRange is required");{const e=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,t=/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i;if(!(e.test(r.start)&&e.test(r.end)||t.test(r.start)&&t.test(r.end)))throw new Error("invalid timeRange format, not in ISO8601")}return(await rn({url:t,body:{"free-busy-query":$r({_attributes:Mr([U.CALDAV]),[`${V.CALDAV}:time-range`]:{_attributes:{start:`${new Date(r.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(r.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}})},defaultNamespace:V.CALDAV,depth:n,headers:Hr(i,o),fetchOptions:a,fetch:s}))[0]};var Sn=Object.freeze({__proto__:null,calendarMultiGet:An,calendarQuery:En,createCalendarObject:On,deleteCalendarObject:xn,fetchCalendarObjects:Cn,fetchCalendarUserAddresses:wn,fetchCalendars:_n,freeBusyQuery:Fn,makeCalendar:Tn,syncCalendars:Rn,updateCalendarObject:Dn});const Nn=B("tsdav:account"),Ln=async e=>{var t,r;Nn("Service discovery...");const{account:n,headers:i,headersToExclude:o,fetchOptions:a={},fetch:s}=e,c=null!=s?s:Pr,u=new URL(n.serverUrl),l=new URL(`/.well-known/${n.accountType}`,u);l.protocol=null!==(t=u.protocol)&&void 0!==t?t:"http";try{const e=await c(l.href,{headers:{...Hr(i,o),"Content-Type":"text/xml;charset=UTF-8"},method:"PROPFIND",body:'\n\n \n \n \n',redirect:"manual",...a});if(e.status>=300&&e.status<400){const t=e.headers.get("Location");if("string"==typeof t&&t.length){Nn(`Service discovery redirected to ${t}`);const e=new URL(t,u);return e.hostname===l.hostname&&l.port&&!e.port&&(e.port=l.port),e.protocol=null!==(r=u.protocol)&&void 0!==r?r:"http",e.href}}}catch(e){Nn(`Service discovery failed: ${e.stack}`)}return u.href},kn=async e=>{var t,r,n,i,o;const{account:a,headers:s,headersToExclude:c,fetchOptions:u={},fetch:l}=e,h=["rootUrl"];if(!Jr(a,h))throw new Error(`account must have ${en(a,h)} before fetchPrincipalUrl`);Nn(`Fetching principal url from path ${a.rootUrl}`);const[d]=await Gr({url:a.rootUrl,props:{[`${V.DAV}:current-user-principal`]:{}},depth:"0",headers:Hr(s,c),fetchOptions:u,fetch:l});if(!d.ok&&(Nn(`Fetch principal url failed: ${d.statusText}`),401===d.status))throw new Error("Invalid credentials");return Nn(`Fetched principal url ${null===(r=null===(t=d.props)||void 0===t?void 0:t.currentUserPrincipal)||void 0===r?void 0:r.href}`),new URL(null!==(o=null===(i=null===(n=d.props)||void 0===n?void 0:n.currentUserPrincipal)||void 0===i?void 0:i.href)&&void 0!==o?o:"",a.rootUrl).href},In=async e=>{var t,r;const{account:n,headers:i,headersToExclude:o,fetchOptions:a={},fetch:s}=e,c=["principalUrl","rootUrl"];if(!Jr(n,c))throw new Error(`account must have ${en(n,c)} before fetchHomeUrl`);Nn(`Fetch home url from ${n.principalUrl}`);const u=await Gr({url:n.principalUrl,props:"caldav"===n.accountType?{[`${V.CALDAV}:calendar-home-set`]:{}}:{[`${V.CARDDAV}:addressbook-home-set`]:{}},depth:"0",headers:Hr(i,o),fetchOptions:a,fetch:s}),l=u.find(e=>Vr(n.principalUrl,e.href));if(!l||!l.ok)throw Nn(`Fetch home url failed with status ${null==l?void 0:l.statusText} and error ${JSON.stringify(u.map(e=>e.error))}`),new Error("cannot find homeUrl");const h=new URL("caldav"===n.accountType?null===(t=null==l?void 0:l.props)||void 0===t?void 0:t.calendarHomeSet.href:null===(r=null==l?void 0:l.props)||void 0===r?void 0:r.addressbookHomeSet.href,n.rootUrl).href;return Nn(`Fetched home url ${h}`),h},Un=async e=>{const{account:t,headers:r,loadCollections:n=!1,loadObjects:i=!1,headersToExclude:o,fetchOptions:a={},fetch:s}=e,c={...t};return c.rootUrl=await Ln({account:t,headers:Hr(r,o),fetchOptions:a,fetch:s}),c.principalUrl=await kn({account:c,headers:Hr(r,o),fetchOptions:a,fetch:s}),c.homeUrl=await In({account:c,headers:Hr(r,o),fetchOptions:a,fetch:s}),(n||i)&&("caldav"===t.accountType?c.calendars=await _n({headers:Hr(r,o),account:c,fetchOptions:a,fetch:s}):"carddav"===t.accountType&&(c.addressBooks=await fn({headers:Hr(r,o),account:c,fetchOptions:a,fetch:s}))),i&&("caldav"===t.accountType&&c.calendars?c.calendars=await Promise.all(c.calendars.map(async e=>({...e,objects:await Cn({calendar:e,headers:Hr(r,o),fetchOptions:a,fetch:s})}))):"carddav"===t.accountType&&c.addressBooks&&(c.addressBooks=await Promise.all(c.addressBooks.map(async e=>({...e,objects:await pn({addressBook:e,headers:Hr(r,o),fetchOptions:a,fetch:s})}))))),c};var Pn,Bn=Object.freeze({__proto__:null,createAccount:Un,fetchHomeUrl:In,fetchPrincipalUrl:kn,serviceDiscovery:Ln}),jn={exports:{}};var Vn,Mn,$n=(Pn||(Pn=1,Vn=jn,Mn=jn.exports,function(t){var r=Mn,n=Vn&&Vn.exports==r&&Vn,i="object"==typeof e&&e;i.global!==i&&i.window!==i||(t=i);var o=function(e){this.message=e};(o.prototype=new Error).name="InvalidCharacterError";var a=function(e){throw new o(e)},s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=/[\t\n\f\r ]/g,u={encode:function(e){e=String(e),/[^\0-\xFF]/.test(e)&&a("The string to be encoded contains characters outside of the Latin1 range.");for(var t,r,n,i,o=e.length%3,c="",u=-1,l=e.length-o;++u>18&63)+s.charAt(i>>12&63)+s.charAt(i>>6&63)+s.charAt(63&i);return 2==o?(t=e.charCodeAt(u)<<8,r=e.charCodeAt(++u),c+=s.charAt((i=t+r)>>10)+s.charAt(i>>4&63)+s.charAt(i<<2&63)+"="):1==o&&(i=e.charCodeAt(u),c+=s.charAt(i>>2)+s.charAt(i<<4&63)+"=="),c},decode:function(e){var t=(e=String(e).replace(c,"")).length;t%4==0&&(t=(e=e.replace(/==?$/,"")).length),(t%4==1||/[^+a-zA-Z0-9/]/.test(e))&&a("Invalid character: the string to be decoded is not correctly encoded.");for(var r,n,i=0,o="",u=-1;++u>(-2*i&6)));return o},version:"1.0.0"};if(r&&!r.nodeType)if(n)n.exports=u;else for(var l in u)u.hasOwnProperty(l)&&(r[l]=u[l]);else t.base64=u}(jn.exports)),jn.exports);const Kn=B("tsdav:authHelper"),Hn=(e,t)=>(...r)=>e({...t,...r[0]}),Yn=e=>(Kn(`Basic auth token generated: ${$n.encode(`${e.username}:${e.password}`)}`),{authorization:`Basic ${$n.encode(`${e.username}:${e.password}`)}`}),qn=e=>({authorization:`Bearer ${e.accessToken}`}),zn=async(e,t,r)=>{const n=["authorizationCode","redirectUrl","clientId","clientSecret","tokenUrl"];if(!Jr(e,n))throw new Error(`Oauth credentials missing: ${en(e,n)}`);const i=new URLSearchParams({grant_type:"authorization_code",code:e.authorizationCode,redirect_uri:e.redirectUrl,client_id:e.clientId,client_secret:e.clientSecret});Kn(e.tokenUrl),Kn(i.toString());const o=null!=r?r:Pr,a=await o(e.tokenUrl,{method:"POST",body:i.toString(),headers:{"content-length":`${i.toString().length}`,"content-type":"application/x-www-form-urlencoded"},...null!=t?t:{}});if(a.ok){return await a.json()}return Kn(`Fetch Oauth tokens failed: ${await a.text()}`),{}},Gn=async(e,t,r)=>{const n=["refreshToken","clientId","clientSecret","tokenUrl"];if(!Jr(e,n))throw new Error(`Oauth credentials missing: ${en(e,n)}`);const i=new URLSearchParams({client_id:e.clientId,client_secret:e.clientSecret,refresh_token:e.refreshToken,grant_type:"refresh_token"}),o=null!=r?r:Pr,a=await o(e.tokenUrl,{method:"POST",body:i.toString(),headers:{"Content-Type":"application/x-www-form-urlencoded"},...null!=t?t:{}});if(a.ok){return await a.json()}return Kn(`Refresh access token failed: ${await a.text()}`),{}},Wn=async(e,t,r)=>{var n;Kn("Fetching oauth headers");let i={};return e.refreshToken?(e.refreshToken&&!e.accessToken||Date.now()>(null!==(n=e.expiration)&&void 0!==n?n:0))&&(i=await Gn(e,t,r)):i=await zn(e,t,r),Kn(`Oauth tokens fetched: ${i.access_token}`),{tokens:i,headers:{authorization:`Bearer ${i.access_token}`}}};var Qn=Object.freeze({__proto__:null,defaultParam:Hn,fetchOauthTokens:zn,getBasicAuthHeaders:Yn,getBearerAuthHeaders:qn,getOauthHeaders:Wn,refreshAccessToken:Gn});const Xn=async e=>{var t;const{serverUrl:r,credentials:n,authMethod:i,defaultAccountType:o,authFunction:a,fetch:s}=e;let c={};switch(i){case"Basic":c=Yn(n);break;case"Bearer":c=qn(n);break;case"Oauth":c=(await Wn(n,void 0,s)).headers;break;case"Digest":c={Authorization:`Digest ${n.digestString}`};break;case"Custom":c=null!==(t=await(null==a?void 0:a(n)))&&void 0!==t?t:{};break;default:throw new Error("Invalid auth method")}const u=o?await Un({account:{serverUrl:r,credentials:n,accountType:o},headers:c,fetch:s}):void 0,l=Hn(Wr,{url:r,headers:c,fetch:s}),h=Hn(Qr,{headers:c,url:r,fetch:s}),d=Hn(Xr,{headers:c,url:r,fetch:s}),f=Hn(Gr,{headers:c,fetch:s}),p=Hn(rn,{headers:c,fetch:s}),y=Hn(nn,{headers:c,fetch:s}),g=Hn(sn,{headers:c,fetch:s}),m=Hn(on,{headers:c,fetch:s}),v=Hn(an,{headers:c,fetch:s}),b=Hn(cn,{headers:c,account:u,fetch:s}),w=Hn(En,{headers:c,fetch:s}),E=Hn(An,{headers:c,fetch:s}),A=Hn(Tn,{headers:c,fetch:s}),T=Hn(_n,{headers:c,account:u,fetch:s}),_=Hn(wn,{headers:c,account:u,fetch:s}),C=Hn(Cn,{headers:c,fetch:s}),O=Hn(On,{headers:c,fetch:s}),D=Hn(Dn,{headers:c,fetch:s}),x=Hn(xn,{headers:c,fetch:s}),R=Hn(Rn,{account:u,headers:c,fetch:s}),F=Hn(hn,{headers:c,fetch:s}),S=Hn(dn,{headers:c,fetch:s});return{davRequest:async e=>{const{init:t,fetch:r,...n}=e,{headers:i,...o}=t;return zr({...n,init:{...o,headers:{...c,...i}},fetch:null!=r?r:s})},propfind:f,createAccount:async e=>{const{account:t,headers:i,loadCollections:o,loadObjects:a,fetch:u}=e;return Un({account:{serverUrl:r,credentials:n,...t},headers:{...c,...i},loadCollections:o,loadObjects:a,fetch:null!=u?u:s})},createObject:l,updateObject:h,deleteObject:d,calendarQuery:w,addressBookQuery:F,collectionQuery:p,makeCollection:y,calendarMultiGet:E,makeCalendar:A,syncCollection:g,supportedReportSet:m,isCollectionDirty:v,smartCollectionSync:b,fetchCalendars:T,fetchCalendarUserAddresses:_,fetchCalendarObjects:C,createCalendarObject:O,updateCalendarObject:D,deleteCalendarObject:x,syncCalendars:R,fetchAddressBooks:Hn(fn,{account:u,headers:c,fetch:s}),addressBookMultiGet:S,fetchVCards:Hn(pn,{headers:c,fetch:s}),createVCard:Hn(yn,{headers:c,fetch:s}),updateVCard:Hn(gn,{headers:c,fetch:s}),deleteVCard:Hn(mn,{headers:c,fetch:s})}};class Zn{constructor(e){var t,r,n;this.serverUrl=e.serverUrl,this.credentials=e.credentials,this.authMethod=null!==(t=e.authMethod)&&void 0!==t?t:"Basic",this.accountType=null!==(r=e.defaultAccountType)&&void 0!==r?r:"caldav",this.authFunction=e.authFunction,this.fetchOptions=null!==(n=e.fetchOptions)&&void 0!==n?n:{},this.fetchOverride=e.fetch}async login(){var e;switch(this.authMethod){case"Basic":this.authHeaders=Yn(this.credentials);break;case"Bearer":this.authHeaders=qn(this.credentials);break;case"Oauth":this.authHeaders=(await Wn(this.credentials,this.fetchOptions,this.fetchOverride)).headers;break;case"Digest":this.authHeaders={Authorization:`Digest ${this.credentials.digestString}`};break;case"Custom":this.authHeaders=await(null===(e=this.authFunction)||void 0===e?void 0:e.call(this,this.credentials));break;default:throw new Error("Invalid auth method")}this.account=this.accountType?await Un({account:{serverUrl:this.serverUrl,credentials:this.credentials,accountType:this.accountType},headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride}):void 0}async davRequest(e){const{init:t,fetch:r,...n}=e,{headers:i,...o}=t;return zr({...n,init:{...o,headers:{...this.authHeaders,...i}},fetchOptions:this.fetchOptions,fetch:null!=r?r:this.fetchOverride})}async createObject(...e){return Hn(Wr,{url:this.serverUrl,headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async updateObject(...e){return Hn(Qr,{url:this.serverUrl,headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async deleteObject(...e){return Hn(Xr,{url:this.serverUrl,headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async propfind(...e){return Hn(Gr,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async createAccount(e){const{account:t,headers:r,loadCollections:n,loadObjects:i,fetchOptions:o,fetch:a}=e;return Un({account:{serverUrl:this.serverUrl,credentials:this.credentials,...t},headers:{...this.authHeaders,...r},loadCollections:n,loadObjects:i,fetchOptions:null!=o?o:this.fetchOptions,fetch:null!=a?a:this.fetchOverride})}async collectionQuery(...e){return Hn(rn,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async makeCollection(...e){return Hn(nn,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async syncCollection(...e){return Hn(sn,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async supportedReportSet(...e){return Hn(on,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async isCollectionDirty(...e){return Hn(an,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async smartCollectionSync(...e){return Hn(cn,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride,account:this.account})(e[0])}async calendarQuery(...e){return Hn(En,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async makeCalendar(...e){return Hn(Tn,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async calendarMultiGet(...e){return Hn(An,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async fetchCalendars(...e){return Hn(_n,{headers:this.authHeaders,account:this.account,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(null==e?void 0:e[0])}async fetchCalendarUserAddresses(...e){return Hn(wn,{headers:this.authHeaders,account:this.account,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(null==e?void 0:e[0])}async fetchCalendarObjects(...e){return Hn(Cn,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async createCalendarObject(...e){return Hn(On,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async updateCalendarObject(...e){return Hn(Dn,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async deleteCalendarObject(...e){return Hn(xn,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async syncCalendars(...e){return Hn(Rn,{headers:this.authHeaders,account:this.account,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async addressBookQuery(...e){return Hn(hn,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async addressBookMultiGet(...e){return Hn(dn,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async fetchAddressBooks(...e){return Hn(fn,{headers:this.authHeaders,account:this.account,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(null==e?void 0:e[0])}async fetchVCards(...e){return Hn(pn,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async createVCard(...e){return Hn(yn,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async updateVCard(...e){return Hn(gn,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async deleteVCard(...e){return Hn(mn,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}}var Jn={DAVNamespace:U,DAVNamespaceShort:V,DAVAttributeMap:j,...Object.freeze({__proto__:null,DAVClient:Zn,createDAVClient:Xn}),...Zr,...un,...Bn,...vn,...Sn,...Qn,...Yr};export{j as DAVAttributeMap,Zn as DAVClient,U as DAVNamespace,V as DAVNamespaceShort,dn as addressBookMultiGet,hn as addressBookQuery,An as calendarMultiGet,En as calendarQuery,$r as cleanupFalsy,rn as collectionQuery,Un as createAccount,On as createCalendarObject,Xn as createDAVClient,Wr as createObject,yn as createVCard,zr as davRequest,Jn as default,xn as deleteCalendarObject,Xr as deleteObject,mn as deleteVCard,fn as fetchAddressBooks,Cn as fetchCalendarObjects,wn as fetchCalendarUserAddresses,_n as fetchCalendars,zn as fetchOauthTokens,pn as fetchVCards,Fn as freeBusyQuery,Yn as getBasicAuthHeaders,qn as getBearerAuthHeaders,Mr as getDAVAttribute,Wn as getOauthHeaders,an as isCollectionDirty,Tn as makeCalendar,Gr as propfind,Gn as refreshAccessToken,cn as smartCollectionSync,on as supportedReportSet,Rn as syncCalendars,sn as syncCollection,Dn as updateCalendarObject,Qr as updateObject,gn as updateVCard,Vr as urlContains,jr as urlEquals}; +var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function r(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var r=function e(){var r=!1;try{r=this instanceof e}catch{}return r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}var n="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}var o=i,s=a;function c(e){if(o===setTimeout)return setTimeout(e,0);if((o===i||!o)&&setTimeout)return o=setTimeout,setTimeout(e,0);try{return o(e,0)}catch(t){try{return o.call(null,e,0)}catch(t){return o.call(this,e,0)}}}"function"==typeof n.setTimeout&&(o=setTimeout),"function"==typeof n.clearTimeout&&(s=clearTimeout);var u,l=[],h=!1,d=-1;function f(){h&&u&&(h=!1,u.length?l=u.concat(l):d=-1,l.length&&p())}function p(){if(!h){var e=c(f);h=!0;for(var t=l.length;t;){for(u=l,l=[];++d1)for(var r=1;r=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}return x=function(s,c){c=c||{};var u=typeof s;if("string"===u&&s.length>0)return function(o){if((o=String(o)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(o);if(!s)return;var c=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*a;case"weeks":case"week":case"w":return c*i;case"days":case"day":case"d":return c*n;case"hours":case"hour":case"hrs":case"hr":case"h":return c*r;case"minutes":case"minute":case"mins":case"min":case"m":return c*t;case"seconds":case"second":case"secs":case"sec":case"s":return c*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(s);if("number"===u&&isFinite(s))return c.long?function(i){var a=Math.abs(i);if(a>=n)return o(i,a,n,"day");if(a>=r)return o(i,a,r,"hour");if(a>=t)return o(i,a,t,"minute");if(a>=e)return o(i,a,e,"second");return i+" ms"}(s):function(i){var a=Math.abs(i);if(a>=n)return Math.round(i/n)+"d";if(a>=r)return Math.round(i/r)+"h";if(a>=t)return Math.round(i/t)+"m";if(a>=e)return Math.round(i/e)+"s";return i+"ms"}(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))}}var U,P=(N||(N=1,function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,i=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(n++,"%c"===e&&(i=n))}),t.splice(i,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch(e){}return!e&&"env"in L&&(e=L.env.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=(S||(S=1,F=function(e){function t(e){let n,i,a,o=null;function s(...e){if(!s.enabled)return;const r=s,i=Number(new Date),a=i-(n||i);r.diff=a,r.prev=n,r.curr=i,n=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(n,i)=>{if("%%"===n)return"%";o++;const a=t.formatters[i];if("function"==typeof a){const t=e[o];n=a.call(r,t),e.splice(o,1),o--}return n}),t.formatArgs.call(r,e),(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==t.namespaces&&(i=t.namespaces,a=t.enabled(e)),a),set:e=>{o=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function n(e,t){let r=0,n=0,i=-1,a=0;for(;r"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const e of r)"-"===e[0]?t.skips.push(e.slice(1)):t.names.push(e)},t.enabled=function(e){for(const r of t.skips)if(n(e,r))return!1;for(const r of t.names)if(n(e,r))return!0;return!1},t.humanize=I(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(r=>{t[r]=e[r]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t>18&63]+$[e>>12&63]+$[e>>6&63]+$[63&e]}function G(e,t,r){for(var n,i=[],a=t;ac?c:s+o));return 1===n?(t=e[r-1],i+=$[t>>2],i+=$[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=$[t>>10],i+=$[t>>4&63],i+=$[t<<2&63],i+="="),a.push(i),a.join("")}function Q(e,t,r,n,i){var a,o,s=8*i-n-1,c=(1<>1,l=-7,h=r?i-1:0,d=r?-1:1,f=e[t+h];for(h+=d,a=f&(1<<-l)-1,f>>=-l,l+=s;l>0;a=256*a+e[t+h],h+=d,l-=8);for(o=a&(1<<-l)-1,a>>=-l,l+=n;l>0;o=256*o+e[t+h],h+=d,l-=8);if(0===a)a=1-u;else{if(a===c)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,n),a-=u}return(f?-1:1)*o*Math.pow(2,a-n)}function X(e,t,r,n,i,a){var o,s,c,u=8*a-i-1,l=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:a-1,p=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+h>=1?d/c:d*Math.pow(2,1-h))*c>=2&&(o++,c/=2),o+h>=l?(s=0,o=l):o+h>=1?(s=(t*c-1)*Math.pow(2,i),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;e[r+f]=255&s,f+=p,s/=256,i-=8);for(o=o<0;e[r+f]=255&o,f+=p,o/=256,u-=8);e[r+f-p]|=128*y}var Z={}.toString,J=Array.isArray||function(e){return"[object Array]"==Z.call(e)};function ee(){return re.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function te(e,t){if(ee()=ee())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ee().toString(16)+" bytes");return 0|e}function ce(e){return!(null==e||!e._isBuffer)}function ue(e,t){if(ce(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Ue(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Pe(e).length;default:if(n)return Ue(e).length;t=(""+t).toLowerCase(),n=!0}}function le(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return _e(this,t,r);case"utf8":case"utf-8":return Ee(this,t,r);case"ascii":return Te(this,t,r);case"latin1":case"binary":return Oe(this,t,r);case"base64":return we(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ce(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function he(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function de(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=re.from(t,n)),ce(t))return 0===t.length?-1:fe(e,t,r,n,i);if("number"==typeof t)return t&=255,re.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):fe(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function fe(e,t,r,n,i){var a,o=1,s=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,c/=2,r/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var l=-1;for(a=r;as&&(r=s-c),a=r;a>=0;a--){for(var h=!0,d=0;di&&(n=i):n=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o>8,i=r%256,a.push(i),a.push(n);return a}(t,e.length-r),e,r,n)}function we(e,t,r){return 0===t&&r===e.length?W(e):W(e.slice(t,r))}function Ee(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:u>223?3:u>191?2:1;if(i+h<=r)switch(h){case 1:u<128&&(l=u);break;case 2:128==(192&(a=e[i+1]))&&(c=(31&u)<<6|63&a)>127&&(l=c);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(c=(15&u)<<12|(63&a)<<6|63&o)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(c=(15&u)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&c<1114112&&(l=c)}null===l?(l=65533,h=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=h}return function(e){var t=e.length;if(t<=Ae)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),""},re.prototype.compare=function(e,t,r,n,i){if(!ce(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0),s=Math.min(a,o),c=this.slice(n,i),u=e.slice(t,r),l=0;li)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return pe(this,e,t,r);case"utf8":case"utf-8":return ye(this,e,t,r);case"ascii":return ge(this,e,t,r);case"latin1":case"binary":return me(this,e,t,r);case"base64":return ve(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return be(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},re.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Ae=4096;function Te(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",a=t;ar)throw new RangeError("Trying to access beyond buffer length")}function xe(e,t,r,n,i,a){if(!ce(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function Re(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function Fe(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function Se(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Ne(e,t,r,n,i){return i||Se(e,0,r,4),X(e,t,r,n,23,4),r+4}function Le(e,t,r,n,i){return i||Se(e,0,r,8),X(e,t,r,n,52,8),r+8}re.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},re.prototype.readUInt8=function(e,t){return t||De(e,1,this.length),this[e]},re.prototype.readUInt16LE=function(e,t){return t||De(e,2,this.length),this[e]|this[e+1]<<8},re.prototype.readUInt16BE=function(e,t){return t||De(e,2,this.length),this[e]<<8|this[e+1]},re.prototype.readUInt32LE=function(e,t){return t||De(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},re.prototype.readUInt32BE=function(e,t){return t||De(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},re.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||De(e,t,this.length);for(var n=this[e],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*t)),n},re.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||De(e,t,this.length);for(var n=t,i=1,a=this[e+--n];n>0&&(i*=256);)a+=this[e+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},re.prototype.readInt8=function(e,t){return t||De(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},re.prototype.readInt16LE=function(e,t){t||De(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},re.prototype.readInt16BE=function(e,t){t||De(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},re.prototype.readInt32LE=function(e,t){return t||De(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},re.prototype.readInt32BE=function(e,t){return t||De(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},re.prototype.readFloatLE=function(e,t){return t||De(e,4,this.length),Q(this,e,!0,23,4)},re.prototype.readFloatBE=function(e,t){return t||De(e,4,this.length),Q(this,e,!1,23,4)},re.prototype.readDoubleLE=function(e,t){return t||De(e,8,this.length),Q(this,e,!0,52,8)},re.prototype.readDoubleBE=function(e,t){return t||De(e,8,this.length),Q(this,e,!1,52,8)},re.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||xe(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+i]=e/a&255;return t+r},re.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||xe(this,e,t,1,255,0),re.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},re.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||xe(this,e,t,2,65535,0),re.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Re(this,e,t,!0),t+2},re.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||xe(this,e,t,2,65535,0),re.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Re(this,e,t,!1),t+2},re.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||xe(this,e,t,4,4294967295,0),re.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):Fe(this,e,t,!0),t+4},re.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||xe(this,e,t,4,4294967295,0),re.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Fe(this,e,t,!1),t+4},re.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);xe(this,e,t,r,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o|0)-s&255;return t+r},re.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||xe(this,e,t,1,127,-128),re.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},re.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||xe(this,e,t,2,32767,-32768),re.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Re(this,e,t,!0),t+2},re.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||xe(this,e,t,2,32767,-32768),re.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Re(this,e,t,!1),t+2},re.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||xe(this,e,t,4,2147483647,-2147483648),re.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):Fe(this,e,t,!0),t+4},re.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||xe(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),re.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Fe(this,e,t,!1),t+4},re.prototype.writeFloatLE=function(e,t,r){return Ne(this,e,t,!0,r)},re.prototype.writeFloatBE=function(e,t,r){return Ne(this,e,t,!1,r)},re.prototype.writeDoubleLE=function(e,t,r){return Le(this,e,t,!0,r)},re.prototype.writeDoubleBE=function(e,t,r){return Le(this,e,t,!1,r)},re.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(a<1e3||!re.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(a=t;a55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function Pe(e){return function(e){var t,r,n,i,a,o;Y||z();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a="="===e[s-2]?2:"="===e[s-1]?1:0,o=new H(3*s/4-a),n=a>0?s-4:s;var c=0;for(t=0,r=0;t>16&255,o[c++]=i>>8&255,o[c++]=255&i;return 2===a?(i=K[e.charCodeAt(t)]<<2|K[e.charCodeAt(t+1)]>>4,o[c++]=255&i):1===a&&(i=K[e.charCodeAt(t)]<<10|K[e.charCodeAt(t+1)]<<4|K[e.charCodeAt(t+2)]>>2,o[c++]=i>>8&255,o[c++]=255&i),o}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(ke,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function je(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function Be(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var Ve,Me,$e={};function Ke(){}function He(){He.init.call(this)}function Ye(e){return void 0===e._maxListeners?He.defaultMaxListeners:e._maxListeners}function ze(e,t,r,n){var i,a,o,s;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((a=e._events)?(a.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),a=e._events),o=a[t]):(a=e._events=new Ke,e._eventsCount=0),o){if("function"==typeof o?o=a[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),!o.warned&&(i=Ye(e))&&i>0&&o.length>i){o.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=o.length,s=c,"function"==typeof console.warn?console.warn(s):console.log(s)}}else o=a[t]=r,++e._eventsCount;return e}function qe(e,t,r){var n=!1;function i(){e.removeListener(t,i),n||(n=!0,r.apply(e,arguments))}return i.listener=r,i}function Ge(e){var t=this._events;if(t){var r=t[e];if("function"==typeof r)return 1;if(r)return r.length}return 0}function We(e,t){for(var r=new Array(t);t--;)r[t]=e[t];return r}Ke.prototype=Object.create(null),He.EventEmitter=He,He.usingDomains=!1,He.prototype.domain=void 0,He.prototype._events=void 0,He.prototype._maxListeners=void 0,He.defaultMaxListeners=10,He.init=function(){this.domain=null,He.usingDomains&&(!Ve.active||this instanceof Ve.Domain||(this.domain=Ve.active)),this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new Ke,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},He.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},He.prototype.getMaxListeners=function(){return Ye(this)},He.prototype.emit=function(e){var t,r,n,i,a,o,s,c="error"===e;if(o=this._events)c=c&&null==o.error;else if(!c)return!1;if(s=this.domain,c){if(t=arguments[1],!s){if(t instanceof Error)throw t;var u=new Error('Uncaught, unspecified "error" event. ('+t+")");throw u.context=t,u}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=s,t.domainThrown=!1,s.emit("error",t),!1}if(!(r=o[e]))return!1;var l="function"==typeof r;switch(n=arguments.length){case 1:!function(e,t,r){if(t)e.call(r);else for(var n=e.length,i=We(e,n),a=0;a0;)if(r[a]===t||r[a].listener&&r[a].listener===t){o=r[a].listener,i=a;break}if(i<0)return this;if(1===r.length){if(r[0]=void 0,0===--this._eventsCount)return this._events=new Ke,this;delete n[e]}else!function(e,t){for(var r=t,n=r+1,i=e.length;n0?Reflect.ownKeys(this._events):[]},Me="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e};var Qe=/%[sdj%]/g;function Xe(e){if(!ut(e)){for(var t=[],r=0;r=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),o=n[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),st(t)?r.showHidden=t:t&&function(e,t){if(!t||!dt(t))return e;var r=Object.keys(t),n=r.length;for(;n--;)e[r[n]]=t[r[n]]}(r,t),lt(r.showHidden)&&(r.showHidden=!1),lt(r.depth)&&(r.depth=2),lt(r.colors)&&(r.colors=!1),lt(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=rt),it(r,e,r.depth)}function rt(e,t){var r=tt.styles[t];return r?"["+tt.colors[r][0]+"m"+e+"["+tt.colors[r][1]+"m":e}function nt(e,t){return e}function it(e,t,r){if(e.customInspect&&t&&yt(t.inspect)&&t.inspect!==tt&&(!t.constructor||t.constructor.prototype!==t)){var n=t.inspect(r,e);return ut(n)||(n=it(e,n,r)),n}var i=function(e,t){if(lt(t))return e.stylize("undefined","undefined");if(ut(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(n=t,"number"==typeof n)return e.stylize(""+t,"number");var n;if(st(t))return e.stylize(""+t,"boolean");if(ct(t))return e.stylize("null","null")}(e,t);if(i)return i;var a=Object.keys(t),o=function(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),pt(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return at(t);if(0===a.length){if(yt(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(ht(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(ft(t))return e.stylize(Date.prototype.toString.call(t),"date");if(pt(t))return at(t)}var c,u,l="",h=!1,d=["{","}"];(c=t,Array.isArray(c)&&(h=!0,d=["[","]"]),yt(t))&&(l=" [Function"+(t.name?": "+t.name:"")+"]");return ht(t)&&(l=" "+RegExp.prototype.toString.call(t)),ft(t)&&(l=" "+Date.prototype.toUTCString.call(t)),pt(t)&&(l=" "+at(t)),0!==a.length||h&&0!=t.length?r<0?ht(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),u=h?function(e,t,r,n,i){for(var a=[],o=0,s=t.length;o60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(u,l,d)):d[0]+l+d[1]}function at(e){return"["+Error.prototype.toString.call(e)+"]"}function ot(e,t,r,n,i,a){var o,s,c;if((c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),mt(n,i)||(o="["+i+"]"),s||(e.seen.indexOf(c.value)<0?(s=ct(r)?it(e,c.value,null):it(e,c.value,r-1)).indexOf("\n")>-1&&(s=a?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n")):s=e.stylize("[Circular]","special")),lt(o)){if(a&&i.match(/^\d+$/))return s;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function st(e){return"boolean"==typeof e}function ct(e){return null===e}function ut(e){return"string"==typeof e}function lt(e){return void 0===e}function ht(e){return dt(e)&&"[object RegExp]"===gt(e)}function dt(e){return"object"==typeof e&&null!==e}function ft(e){return dt(e)&&"[object Date]"===gt(e)}function pt(e){return dt(e)&&("[object Error]"===gt(e)||e instanceof Error)}function yt(e){return"function"==typeof e}function gt(e){return Object.prototype.toString.call(e)}function mt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function vt(){this.head=null,this.tail=null,this.length=0}tt.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},tt.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},vt.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},vt.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},vt.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},vt.prototype.clear=function(){this.head=this.tail=null,this.length=0},vt.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},vt.prototype.concat=function(e){if(0===this.length)return re.alloc(0);if(1===this.length)return this.head.data;for(var t=re.allocUnsafe(e>>>0),r=this.head,n=0;r;)r.data.copy(t,n),n+=r.data.length,r=r.next;return t};var bt=re.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function wt(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(e){if(e&&!bt(e))throw new Error("Unknown encoding: "+e)}(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=At;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=Tt;break;default:return void(this.write=Et)}this.charBuffer=new re(6),this.charReceived=0,this.charLength=0}function Et(e){return e.toString(this.encoding)}function At(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function Tt(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}wt.prototype.write=function(e){for(var t="";this.charLength;){var r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived=55296&&i<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var n=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,n),n-=this.charReceived);var i;n=(t+=e.toString(this.encoding,0,n)).length-1;if((i=t.charCodeAt(n))>=55296&&i<=56319){var a=this.surrogateSize;return this.charLength+=a,this.charReceived+=a,this.charBuffer.copy(this.charBuffer,a,0,a),e.copy(this.charBuffer,0,0,a),t.substring(0,n)}return t},wt.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var r=e[e.length-t];if(1==t&&r>>5==6){this.charLength=2;break}if(t<=2&&r>>4==14){this.charLength=3;break}if(t<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=t},wt.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;t+=n.slice(0,r).toString(i)}return t},Ct.ReadableState=_t;var Ot=function(e){if(lt(Je)&&(Je=L.env.NODE_DEBUG||""),e=e.toUpperCase(),!et[e])if(new RegExp("\\b"+e+"\\b","i").test(Je)){et[e]=function(){var t=Xe.apply(null,arguments);console.error("%s %d: %s",e,0,t)}}else et[e]=function(){};return et[e]}("stream");function _t(e,t){e=e||{},this.objectMode=!!e.objectMode,t instanceof er&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,n=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:n,this.highWaterMark=~~this.highWaterMark,this.buffer=new vt,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(this.decoder=new wt(e.encoding),this.encoding=e.encoding)}function Ct(e){if(!(this instanceof Ct))return new Ct(e);this._readableState=new _t(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),He.call(this)}function Dt(e,t,r,n,i){var a=function(e,t){var r=null;re.isBuffer(t)||"string"==typeof t||null==t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));return r}(t,r);if(a)e.emit("error",a);else if(null===r)t.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,Ft(e)}(e,t);else if(t.objectMode||r&&r.length>0)if(t.ended&&!i){var o=new Error("stream.push() after EOF");e.emit("error",o)}else if(t.endEmitted&&i){var s=new Error("stream.unshift() after end event");e.emit("error",s)}else{var c;!t.decoder||i||n||(r=t.decoder.write(r),c=!t.objectMode&&0===r.length),i||(t.reading=!1),c||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&Ft(e))),function(e,t){t.readingMore||(t.readingMore=!0,y(Nt,e,t))}(e,t)}else i||(t.reading=!1);return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=xt?e=xt:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function Ft(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(Ot("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?y(St,e):St(e))}function St(e){Ot("emit readable"),e.emit("readable"),It(e)}function Nt(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;ea.length?a.length:e;if(o===a.length?i+=a:i+=a.slice(0,e),0===(e-=o)){o===a.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=re.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var a=n.data,o=e>a.length?a.length:e;if(a.copy(r,r.length-e,0,o),0===(e-=o)){o===a.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(o));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function Pt(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,y(jt,t,e))}function jt(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function Bt(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return Ot("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?Pt(this):Ft(this),null;if(0===(e=Rt(e,t))&&t.ended)return 0===t.length&&Pt(this),null;var n,i=t.needReadable;return Ot("need readable",i),(0===t.length||t.length-e0?Ut(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&Pt(this)),null!==n&&this.emit("data",n),n},Ct.prototype._read=function(e){this.emit("error",new Error("not implemented"))},Ct.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,Ot("pipe count=%d opts=%j",n.pipesCount,t);var i=!t||!1!==t.end?o:u;function a(e){Ot("onunpipe"),e===r&&u()}function o(){Ot("onend"),e.end()}n.endEmitted?y(i):r.once("end",i),e.on("unpipe",a);var s=function(e){return function(){var t=e._readableState;Ot("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&e.listeners("data").length&&(t.flowing=!0,It(e))}}(r);e.on("drain",s);var c=!1;function u(){Ot("cleanup"),e.removeListener("close",f),e.removeListener("finish",p),e.removeListener("drain",s),e.removeListener("error",d),e.removeListener("unpipe",a),r.removeListener("end",o),r.removeListener("end",u),r.removeListener("data",h),c=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||s()}var l=!1;function h(t){Ot("ondata"),l=!1,!1!==e.write(t)||l||((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==Bt(n.pipes,e))&&!c&&(Ot("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,l=!0),r.pause())}function d(t){var r;Ot("onerror",t),g(),e.removeListener("error",d),0===(r="error",e.listeners(r).length)&&e.emit("error",t)}function f(){e.removeListener("finish",p),g()}function p(){Ot("onfinish"),e.removeListener("close",f),g()}function g(){Ot("unpipe"),r.unpipe(e)}return r.on("data",h),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",d),e.once("close",f),e.once("finish",p),e.emit("pipe",r),n.flowing||(Ot("pipe resume"),r.resume()),e},Ct.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this)),this;if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Kt.prototype._write=function(e,t,r){r(new Error("not implemented"))},Kt.prototype._writev=null,Kt.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,Wt(e,t),r&&(t.finished?y(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},Me(er,Ct);for(var Xt=Object.keys(Kt.prototype),Zt=0;Zt"===a?(C(n,"onsgmldeclaration",n.sgmlDecl),n.sgmlDecl="",n.state=T.TEXT):g(a)?(n.state=T.SGML_DECL_QUOTED,n.sgmlDecl+=a):n.sgmlDecl+=a;continue;case T.SGML_DECL_QUOTED:a===n.q&&(n.state=T.SGML_DECL,n.q=""),n.sgmlDecl+=a;continue;case T.DOCTYPE:">"===a?(n.state=T.TEXT,C(n,"ondoctype",n.doctype),n.doctype=!0):(n.doctype+=a,"["===a?n.state=T.DOCTYPE_DTD:g(a)&&(n.state=T.DOCTYPE_QUOTED,n.q=a));continue;case T.DOCTYPE_QUOTED:n.doctype+=a,a===n.q&&(n.q="",n.state=T.DOCTYPE);continue;case T.DOCTYPE_DTD:"]"===a?(n.doctype+=a,n.state=T.DOCTYPE):"<"===a?(n.state=T.OPEN_WAKA,n.startTagPosition=n.position):g(a)?(n.doctype+=a,n.state=T.DOCTYPE_DTD_QUOTED,n.q=a):n.doctype+=a;continue;case T.DOCTYPE_DTD_QUOTED:n.doctype+=a,a===n.q&&(n.state=T.DOCTYPE_DTD,n.q="");continue;case T.COMMENT:"-"===a?n.state=T.COMMENT_ENDING:n.comment+=a;continue;case T.COMMENT_ENDING:"-"===a?(n.state=T.COMMENT_ENDED,n.comment=x(n.opt,n.comment),n.comment&&C(n,"oncomment",n.comment),n.comment=""):(n.comment+="-"+a,n.state=T.COMMENT);continue;case T.COMMENT_ENDED:">"!==a?(S(n,"Malformed comment"),n.comment+="--"+a,n.state=T.COMMENT):n.doctype&&!0!==n.doctype?n.state=T.DOCTYPE_DTD:n.state=T.TEXT;continue;case T.CDATA:for(c=i-1;a&&"]"!==a;)(a=B(t,i++))&&n.trackPosition&&(n.position++,"\n"===a?(n.line++,n.column=0):n.column++);n.cdata+=t.substring(c,i-1),"]"===a&&(n.state=T.CDATA_ENDING);continue;case T.CDATA_ENDING:"]"===a?n.state=T.CDATA_ENDING_2:(n.cdata+="]"+a,n.state=T.CDATA);continue;case T.CDATA_ENDING_2:">"===a?(n.cdata&&C(n,"oncdata",n.cdata),C(n,"onclosecdata"),n.cdata="",n.state=T.TEXT):"]"===a?n.cdata+="]":(n.cdata+="]]"+a,n.state=T.CDATA);continue;case T.PROC_INST:"?"===a?n.state=T.PROC_INST_ENDING:y(a)?n.state=T.PROC_INST_BODY:n.procInstName+=a;continue;case T.PROC_INST_BODY:if(!n.procInstBody&&y(a))continue;"?"===a?n.state=T.PROC_INST_ENDING:n.procInstBody+=a;continue;case T.PROC_INST_ENDING:">"===a?(C(n,"onprocessinginstruction",{name:n.procInstName,body:n.procInstBody}),n.procInstName=n.procInstBody="",n.state=T.TEXT):(n.procInstBody+="?"+a,n.state=T.PROC_INST_BODY);continue;case T.OPEN_TAG:v(d,a)?n.tagName+=a:(N(n),">"===a?I(n):"/"===a?n.state=T.OPEN_TAG_SLASH:(y(a)||S(n,"Invalid character in tag name"),n.state=T.ATTRIB));continue;case T.OPEN_TAG_SLASH:">"===a?(I(n,!0),U(n)):(S(n,"Forward-slash in opening tag not followed by >"),n.state=T.ATTRIB);continue;case T.ATTRIB:if(y(a))continue;">"===a?I(n):"/"===a?n.state=T.OPEN_TAG_SLASH:v(h,a)?(n.attribName=a,n.attribValue="",n.state=T.ATTRIB_NAME):S(n,"Invalid attribute name");continue;case T.ATTRIB_NAME:"="===a?n.state=T.ATTRIB_VALUE:">"===a?(S(n,"Attribute without value"),n.attribValue=n.attribName,k(n),I(n)):y(a)?n.state=T.ATTRIB_NAME_SAW_WHITE:v(d,a)?n.attribName+=a:S(n,"Invalid attribute name");continue;case T.ATTRIB_NAME_SAW_WHITE:if("="===a)n.state=T.ATTRIB_VALUE;else{if(y(a))continue;S(n,"Attribute without value"),n.tag.attributes[n.attribName]="",n.attribValue="",C(n,"onattribute",{name:n.attribName,value:""}),n.attribName="",">"===a?I(n):v(h,a)?(n.attribName=a,n.state=T.ATTRIB_NAME):(S(n,"Invalid attribute name"),n.state=T.ATTRIB)}continue;case T.ATTRIB_VALUE:if(y(a))continue;g(a)?(n.q=a,n.state=T.ATTRIB_VALUE_QUOTED):(n.opt.unquotedAttributeValues||R(n,"Unquoted attribute value"),n.state=T.ATTRIB_VALUE_UNQUOTED,n.attribValue=a);continue;case T.ATTRIB_VALUE_QUOTED:if(a!==n.q){"&"===a?n.state=T.ATTRIB_VALUE_ENTITY_Q:n.attribValue+=a;continue}k(n),n.q="",n.state=T.ATTRIB_VALUE_CLOSED;continue;case T.ATTRIB_VALUE_CLOSED:y(a)?n.state=T.ATTRIB:">"===a?I(n):"/"===a?n.state=T.OPEN_TAG_SLASH:v(h,a)?(S(n,"No whitespace between attributes"),n.attribName=a,n.attribValue="",n.state=T.ATTRIB_NAME):S(n,"Invalid attribute name");continue;case T.ATTRIB_VALUE_UNQUOTED:if(!m(a)){"&"===a?n.state=T.ATTRIB_VALUE_ENTITY_U:n.attribValue+=a;continue}k(n),">"===a?I(n):n.state=T.ATTRIB;continue;case T.CLOSE_TAG:if(n.tagName)">"===a?U(n):v(d,a)?n.tagName+=a:n.script?(n.script+=""===a?U(n):S(n,"Invalid characters in closing tag");continue;case T.TEXT_ENTITY:case T.ATTRIB_VALUE_ENTITY_Q:case T.ATTRIB_VALUE_ENTITY_U:var l,w;switch(n.state){case T.TEXT_ENTITY:l=T.TEXT,w="textNode";break;case T.ATTRIB_VALUE_ENTITY_Q:l=T.ATTRIB_VALUE_QUOTED,w="attribValue";break;case T.ATTRIB_VALUE_ENTITY_U:l=T.ATTRIB_VALUE_UNQUOTED,w="attribValue"}if(";"===a){var E=P(n);n.opt.unparsedEntities&&!Object.values(e.XML_ENTITIES).includes(E)?(n.entity="",n.state=l,n.write(E)):(n[w]+=E,n.entity="",n.state=l)}else v(n.entity.length?p:f,a)?n.entity+=a:(S(n,"Invalid character in entity name"),n[w]+="&"+n.entity+a,n.entity="",n.state=l);continue;default:throw new Error(n,"Unknown state: "+n.state)}return n.position>=n.bufferCheckPosition&&function(t){for(var n=Math.max(e.MAX_BUFFER_LENGTH,10),i=0,a=0,o=r.length;an)switch(r[a]){case"textNode":D(t);break;case"cdata":C(t,"oncdata",t.cdata),t.cdata="";break;case"script":C(t,"onscript",t.script),t.script="";break;default:R(t,"Max buffer length exceeded: "+r[a])}i=Math.max(i,s)}var c=e.MAX_BUFFER_LENGTH-i;t.bufferCheckPosition=c+t.position}(n),n} +/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var e;D(e=this),""!==e.cdata&&(C(e,"oncdata",e.cdata),e.cdata=""),""!==e.script&&(C(e,"onscript",e.script),e.script="")}};try{t=Tr.Stream}catch(e){t=function(){}}t||(t=function(){});var i=e.EVENTS.filter(function(e){return"error"!==e&&"end"!==e});function a(e,r){if(!(this instanceof a))return new a(e,r);t.apply(this),this._parser=new n(e,r),this.writable=!0,this.readable=!0;var o=this;this._parser.onend=function(){o.emit("end")},this._parser.onerror=function(e){o.emit("error",e),o._parser.error=null},this._decoder=null,i.forEach(function(e){Object.defineProperty(o,"on"+e,{get:function(){return o._parser["on"+e]},set:function(t){if(!t)return o.removeAllListeners(e),o._parser["on"+e]=t,t;o.on(e,t)},enumerable:!0,configurable:!1})})}a.prototype=Object.create(t.prototype,{constructor:{value:a}}),a.prototype.write=function(e){return"function"==typeof re.isBuffer&&re.isBuffer(e)&&(this._decoder||(this._decoder=new TextDecoder("utf8")),e=this._decoder.decode(e,{stream:!0})),this._parser.write(e.toString()),this.emit("data",e),!0},a.prototype.end=function(e){if(e&&e.length&&this.write(e),this._decoder){var t=this._decoder.decode();t&&(this._parser.write(t),this.emit("data",t))}return this._parser.end(),!0},a.prototype.on=function(e,r){var n=this;return n._parser["on"+e]||-1===i.indexOf(e)||(n._parser["on"+e]=function(){var t=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e),n.emit.apply(n,t)}),t.prototype.on.call(n,e,r)};var o="[CDATA[",s="DOCTYPE",c="http://www.w3.org/XML/1998/namespace",u="http://www.w3.org/2000/xmlns/",l={xml:c,xmlns:u},h=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,d=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,f=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,p=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function y(e){return" "===e||"\n"===e||"\r"===e||"\t"===e}function g(e){return'"'===e||"'"===e}function m(e){return">"===e||y(e)}function v(e,t){return e.test(t)}function b(e,t){return!v(e,t)}var w,E,A,T=0;for(var O in e.STATE={BEGIN:T++,BEGIN_WHITESPACE:T++,TEXT:T++,TEXT_ENTITY:T++,OPEN_WAKA:T++,SGML_DECL:T++,SGML_DECL_QUOTED:T++,DOCTYPE:T++,DOCTYPE_QUOTED:T++,DOCTYPE_DTD:T++,DOCTYPE_DTD_QUOTED:T++,COMMENT_STARTING:T++,COMMENT:T++,COMMENT_ENDING:T++,COMMENT_ENDED:T++,CDATA:T++,CDATA_ENDING:T++,CDATA_ENDING_2:T++,PROC_INST:T++,PROC_INST_BODY:T++,PROC_INST_ENDING:T++,OPEN_TAG:T++,OPEN_TAG_SLASH:T++,ATTRIB:T++,ATTRIB_NAME:T++,ATTRIB_NAME_SAW_WHITE:T++,ATTRIB_VALUE:T++,ATTRIB_VALUE_QUOTED:T++,ATTRIB_VALUE_CLOSED:T++,ATTRIB_VALUE_UNQUOTED:T++,ATTRIB_VALUE_ENTITY_Q:T++,ATTRIB_VALUE_ENTITY_U:T++,CLOSE_TAG:T++,CLOSE_TAG_SAW_WHITE:T++,SCRIPT:T++,SCRIPT_ENDING:T++},e.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},e.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(e.ENTITIES).forEach(function(t){var r=e.ENTITIES[t],n="number"==typeof r?String.fromCharCode(r):r;e.ENTITIES[t]=n}),e.STATE)e.STATE[e.STATE[O]]=O;function _(e,t,r){e[t]&&e[t](r)}function C(e,t,r){e.textNode&&D(e),_(e,t,r)}function D(e){e.textNode=x(e.opt,e.textNode),e.textNode&&_(e,"ontext",e.textNode),e.textNode=""}function x(e,t){return e.trim&&(t=t.trim()),e.normalize&&(t=t.replace(/\s+/g," ")),t}function R(e,t){return D(e),e.trackPosition&&(t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c),t=new Error(t),e.error=t,_(e,"onerror",t),e}function F(e){return e.sawRoot&&!e.closedRoot&&S(e,"Unclosed root tag"),e.state!==T.BEGIN&&e.state!==T.BEGIN_WHITESPACE&&e.state!==T.TEXT&&R(e,"Unexpected end"),D(e),e.c="",e.closed=!0,_(e,"onend"),n.call(e,e.strict,e.opt),e}function S(e,t){if("object"!=typeof e||!(e instanceof n))throw new Error("bad call to strictFail");e.strict&&R(e,t)}function N(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,r=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(r.ns=t.ns),e.attribList.length=0,C(e,"onopentagstart",r)}function L(e,t){var r=e.indexOf(":")<0?["",e]:e.split(":"),n=r[0],i=r[1];return t&&"xmlns"===e&&(n="xmlns",i=""),{prefix:n,local:i}}function k(e){if(e.strict||(e.attribName=e.attribName[e.looseCase]()),-1!==e.attribList.indexOf(e.attribName)||e.tag.attributes.hasOwnProperty(e.attribName))e.attribName=e.attribValue="";else{if(e.opt.xmlns){var t=L(e.attribName,!0),r=t.prefix,n=t.local;if("xmlns"===r)if("xml"===n&&e.attribValue!==c)S(e,"xml: prefix must be bound to "+c+"\nActual: "+e.attribValue);else if("xmlns"===n&&e.attribValue!==u)S(e,"xmlns: prefix must be bound to "+u+"\nActual: "+e.attribValue);else{var i=e.tag,a=e.tags[e.tags.length-1]||e;i.ns===a.ns&&(i.ns=Object.create(a.ns)),i.ns[n]=e.attribValue}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,C(e,"onattribute",{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=""}}function I(e,t){if(e.opt.xmlns){var r=e.tag,n=L(e.tagName);r.prefix=n.prefix,r.local=n.local,r.uri=r.ns[n.prefix]||"",r.prefix&&!r.uri&&(S(e,"Unbound namespace prefix: "+JSON.stringify(e.tagName)),r.uri=n.prefix);var i=e.tags[e.tags.length-1]||e;r.ns&&i.ns!==r.ns&&Object.keys(r.ns).forEach(function(t){C(e,"onopennamespace",{prefix:t,uri:r.ns[t]})});for(var a=0,o=e.attribList.length;a",e.tagName="",void(e.state=T.SCRIPT);C(e,"onscript",e.script),e.script=""}var t=e.tags.length,r=e.tagName;e.strict||(r=r[e.looseCase]());for(var n=r;t--&&e.tags[t].name!==n;)S(e,"Unexpected close tag");if(t<0)return S(e,"Unmatched closing tag: "+e.tagName),e.textNode+="",void(e.state=T.TEXT);e.tagName=r;for(var i=e.tags.length;i-- >t;){var a=e.tag=e.tags.pop();e.tagName=e.tag.name,C(e,"onclosetag",e.tagName);var o={};for(var s in a.ns)o[s]=a.ns[s];var c=e.tags[e.tags.length-1]||e;e.opt.xmlns&&a.ns!==c.ns&&Object.keys(a.ns).forEach(function(t){var r=a.ns[t];C(e,"onclosenamespace",{prefix:t,uri:r})})}0===t&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=T.TEXT}function P(e){var t,r=e.entity,n=r.toLowerCase(),i="";return e.ENTITIES[r]?e.ENTITIES[r]:e.ENTITIES[n]?e.ENTITIES[n]:("#"===(r=n).charAt(0)&&("x"===r.charAt(1)?(r=r.slice(2),i=(t=parseInt(r,16)).toString(16)):(r=r.slice(1),i=(t=parseInt(r,10)).toString(10))),r=r.replace(/^0+/,""),isNaN(t)||i.toLowerCase()!==r||t<0||t>1114111?(S(e,"Invalid character entity"),"&"+e.entity+";"):String.fromCodePoint(t))}function j(e,t){"<"===t?(e.state=T.OPEN_WAKA,e.startTagPosition=e.position):y(t)||(S(e,"Non-whitespace before first tag."),e.textNode=t,e.state=T.TEXT)}function B(e,t){var r="";return t1114111||E(o)!==o)throw RangeError("Invalid code point: "+o);o<=65535?r.push(o):(e=55296+((o-=65536)>>10),t=o%1024+56320,r.push(e,t)),(n+1===i||r.length>16384)&&(a+=w.apply(null,r),r.length=0)}return a},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:A,configurable:!0,writable:!0}):String.fromCodePoint=A)}($e)),$e}function _r(){return lr?ur:(lr=1,ur={isArray:function(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}})}function Cr(){if(dr)return hr;dr=1;var e=_r().isArray;return hr={copyOptions:function(e){var t,r={};for(t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r},ensureFlagExists:function(e,t){e in t&&"boolean"==typeof t[e]||(t[e]=!1)},ensureSpacesExists:function(e){(!("spaces"in e)||"number"!=typeof e.spaces&&"string"!=typeof e.spaces)&&(e.spaces=0)},ensureAlwaysArrayExists:function(t){"alwaysArray"in t&&("boolean"==typeof t.alwaysArray||e(t.alwaysArray))||(t.alwaysArray=!1)},ensureKeyExists:function(e,t){e+"Key"in t&&"string"==typeof t[e+"Key"]||(t[e+"Key"]=t.compact?"_"+e:e)},checkFnExists:function(e,t){return e+"Fn"in t}}}function Dr(){if(pr)return fr;pr=1;var e,t,r=Or(),n=Cr(),i=_r().isArray;function a(e){var t=Number(e);if(!isNaN(t))return t;var r=e.toLowerCase();return"true"===r||"false"!==r&&e}function o(r,n){var a;if(e.compact){if(!t[e[r+"Key"]]&&(i(e.alwaysArray)?-1!==e.alwaysArray.indexOf(e[r+"Key"]):e.alwaysArray)&&(t[e[r+"Key"]]=[]),t[e[r+"Key"]]&&!i(t[e[r+"Key"]])&&(t[e[r+"Key"]]=[t[e[r+"Key"]]]),r+"Fn"in e&&"string"==typeof n&&(n=e[r+"Fn"](n,t)),"instruction"===r&&("instructionFn"in e||"instructionNameFn"in e))for(a in n)if(n.hasOwnProperty(a))if("instructionFn"in e)n[a]=e.instructionFn(n[a],a,t);else{var o=n[a];delete n[a],n[e.instructionNameFn(a,o,t)]=o}i(t[e[r+"Key"]])?t[e[r+"Key"]].push(n):t[e[r+"Key"]]=n}else{t[e.elementsKey]||(t[e.elementsKey]=[]);var s={};if(s[e.typeKey]=r,"instruction"===r){for(a in n)if(n.hasOwnProperty(a))break;s[e.nameKey]="instructionNameFn"in e?e.instructionNameFn(a,n,t):a,e.instructionHasAttributes?(s[e.attributesKey]=n[a][e.attributesKey],"instructionFn"in e&&(s[e.attributesKey]=e.instructionFn(s[e.attributesKey],a,t))):("instructionFn"in e&&(n[a]=e.instructionFn(n[a],a,t)),s[e.instructionKey]=n[a])}else r+"Fn"in e&&(n=e[r+"Fn"](n,t)),s[e[r+"Key"]]=n;e.addParent&&(s[e.parentKey]=t),t[e.elementsKey].push(s)}}function s(r){var n;if("attributesFn"in e&&r&&(r=e.attributesFn(r,t)),(e.trim||"attributeValueFn"in e||"attributeNameFn"in e||e.nativeTypeAttributes)&&r)for(n in r)if(r.hasOwnProperty(n)&&(e.trim&&(r[n]=r[n].trim()),e.nativeTypeAttributes&&(r[n]=a(r[n])),"attributeValueFn"in e&&(r[n]=e.attributeValueFn(r[n],n,t)),"attributeNameFn"in e)){var i=r[n];delete r[n],r[e.attributeNameFn(n,r[n],t)]=i}return r}function c(r){var n={};if(r.body&&("xml"===r.name.toLowerCase()||e.instructionHasAttributes)){for(var i,a=/([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g;null!==(i=a.exec(r.body));)n[i[1]]=i[2]||i[3]||i[4];n=s(n)}if("xml"===r.name.toLowerCase()){if(e.ignoreDeclaration)return;t[e.declarationKey]={},Object.keys(n).length&&(t[e.declarationKey][e.attributesKey]=n),e.addParent&&(t[e.declarationKey][e.parentKey]=t)}else{if(e.ignoreInstruction)return;e.trim&&(r.body=r.body.trim());var c={};e.instructionHasAttributes&&Object.keys(n).length?(c[r.name]={},c[r.name][e.attributesKey]=n):c[r.name]=r.body,o("instruction",c)}}function u(r,n){var a;if("object"==typeof r&&(n=r.attributes,r=r.name),n=s(n),"elementNameFn"in e&&(r=e.elementNameFn(r,t)),e.compact){var o;if(a={},!e.ignoreAttributes&&n&&Object.keys(n).length)for(o in a[e.attributesKey]={},n)n.hasOwnProperty(o)&&(a[e.attributesKey][o]=n[o]);!(r in t)&&(i(e.alwaysArray)?-1!==e.alwaysArray.indexOf(r):e.alwaysArray)&&(t[r]=[]),t[r]&&!i(t[r])&&(t[r]=[t[r]]),i(t[r])?t[r].push(a):t[r]=a}else t[e.elementsKey]||(t[e.elementsKey]=[]),(a={})[e.typeKey]="element",a[e.nameKey]=r,!e.ignoreAttributes&&n&&Object.keys(n).length&&(a[e.attributesKey]=n),e.alwaysChildren&&(a[e.elementsKey]=[]),t[e.elementsKey].push(a);a[e.parentKey]=t,t=a}function l(t){e.ignoreText||(t.trim()||e.captureSpacesBetweenElements)&&(e.trim&&(t=t.trim()),e.nativeType&&(t=a(t)),e.sanitize&&(t=t.replace(/&/g,"&").replace(//g,">")),o("text",t))}function h(t){e.ignoreComment||(e.trim&&(t=t.trim()),o("comment",t))}function d(r){var n=t[e.parentKey];e.addParent||delete t[e.parentKey],t=n}function f(t){e.ignoreCdata||(e.trim&&(t=t.trim()),o("cdata",t))}function p(t){e.ignoreDoctype||(t=t.replace(/^ /,""),e.trim&&(t=t.trim()),o("doctype",t))}function y(e){e.note=e}return fr=function(i,a){var o=r.parser(!0,{}),s={};if(t=s,e=function(t){return e=n.copyOptions(t),n.ensureFlagExists("ignoreDeclaration",e),n.ensureFlagExists("ignoreInstruction",e),n.ensureFlagExists("ignoreAttributes",e),n.ensureFlagExists("ignoreText",e),n.ensureFlagExists("ignoreComment",e),n.ensureFlagExists("ignoreCdata",e),n.ensureFlagExists("ignoreDoctype",e),n.ensureFlagExists("compact",e),n.ensureFlagExists("alwaysChildren",e),n.ensureFlagExists("addParent",e),n.ensureFlagExists("trim",e),n.ensureFlagExists("nativeType",e),n.ensureFlagExists("nativeTypeAttributes",e),n.ensureFlagExists("sanitize",e),n.ensureFlagExists("instructionHasAttributes",e),n.ensureFlagExists("captureSpacesBetweenElements",e),n.ensureAlwaysArrayExists(e),n.ensureKeyExists("declaration",e),n.ensureKeyExists("instruction",e),n.ensureKeyExists("attributes",e),n.ensureKeyExists("text",e),n.ensureKeyExists("comment",e),n.ensureKeyExists("cdata",e),n.ensureKeyExists("doctype",e),n.ensureKeyExists("type",e),n.ensureKeyExists("name",e),n.ensureKeyExists("elements",e),n.ensureKeyExists("parent",e),n.checkFnExists("doctype",e),n.checkFnExists("instruction",e),n.checkFnExists("cdata",e),n.checkFnExists("comment",e),n.checkFnExists("text",e),n.checkFnExists("instructionName",e),n.checkFnExists("elementName",e),n.checkFnExists("attributeName",e),n.checkFnExists("attributeValue",e),n.checkFnExists("attributes",e),e}(a),o.opt={strictEntities:!0},o.onopentag=u,o.ontext=l,o.oncomment=h,o.onclosetag=d,o.onerror=y,o.oncdata=f,o.ondoctype=p,o.onprocessinginstruction=c,o.write(i).close(),s[e.elementsKey]){var g=s[e.elementsKey];delete s[e.elementsKey],s[e.elementsKey]=g,delete s.text}return s}}function xr(){if(gr)return yr;gr=1;var e=Cr(),t=Dr();return yr=function(r,n){var i,a,o,s;return i=function(t){var r=e.copyOptions(t);return e.ensureSpacesExists(r),r}(n),a=t(r,i),s="compact"in i&&i.compact?"_parent":"parent",o="addParent"in i&&i.addParent?JSON.stringify(a,function(e,t){return e===s?"_":t},i.spaces):JSON.stringify(a,null,i.spaces),o.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")},yr}function Rr(){if(vr)return mr;vr=1;var e,t,r=Cr(),n=_r().isArray;function i(e,t,r){return(!r&&e.spaces?"\n":"")+Array(t+1).join(e.spaces)}function a(r,n,a){if(n.ignoreAttributes)return"";"attributesFn"in n&&(r=n.attributesFn(r,t,e));var o,s,c,u,l=[];for(o in r)r.hasOwnProperty(o)&&null!==r[o]&&void 0!==r[o]&&(u=n.noQuotesForNativeAttributes&&"string"!=typeof r[o]?"":'"',s=(s=""+r[o]).replace(/"/g,"""),c="attributeNameFn"in n?n.attributeNameFn(o,s,t,e):o,l.push(n.spaces&&n.indentAttributes?i(n,a+1,!1):" "),l.push(c+"="+u+("attributeValueFn"in n?n.attributeValueFn(s,o,t,e):s)+u));return r&&Object.keys(r).length&&n.spaces&&n.indentAttributes&&l.push(i(n,a,!1)),l.join("")}function o(r,n,i){return e=r,t="xml",n.ignoreDeclaration?"":""}function s(r,n,i){if(n.ignoreInstruction)return"";var o;for(o in r)if(r.hasOwnProperty(o))break;var s="instructionNameFn"in n?n.instructionNameFn(o,r[o],t,e):o;if("object"==typeof r[o])return e=r,t=s,"";var c=r[o]?r[o]:"";return"instructionFn"in n&&(c=n.instructionFn(c,o,t,e)),""}function c(r,n){return n.ignoreComment?"":"\x3c!--"+("commentFn"in n?n.commentFn(r,t,e):r)+"--\x3e"}function u(r,n){return n.ignoreCdata?"":"","]]]]>"))+"]]>"}function l(r,n){return n.ignoreDoctype?"":""}function h(r,n){return n.ignoreText?"":(r=(r=(r=""+r).replace(/&/g,"&")).replace(/&/g,"&").replace(//g,">"),"textFn"in n?n.textFn(r,t,e):r)}function d(r,n,o,f){return r.reduce(function(r,p){var y=i(n,o,f&&!r);switch(p.type){case"element":return r+y+function(r,n,i){e=r,t=r.name;var o=[],s="elementNameFn"in n?n.elementNameFn(r.name,r):r.name;o.push("<"+s),r[n.attributesKey]&&o.push(a(r[n.attributesKey],n,i));var c=r[n.elementsKey]&&r[n.elementsKey].length||r[n.attributesKey]&&"preserve"===r[n.attributesKey]["xml:space"];return c||(c="fullTagEmptyElementFn"in n?n.fullTagEmptyElementFn(r.name,r):n.fullTagEmptyElement),c?(o.push(">"),r[n.elementsKey]&&r[n.elementsKey].length&&(o.push(d(r[n.elementsKey],n,i+1)),e=r,t=r.name),o.push(n.spaces&&function(e,t){var r;if(e.elements&&e.elements.length)for(r=0;r")):o.push("/>"),o.join("")}(p,n,o);case"comment":return r+y+c(p[n.commentKey],n);case"doctype":return r+y+l(p[n.doctypeKey],n);case"cdata":return r+(n.indentCdata?y:"")+u(p[n.cdataKey],n);case"text":return r+(n.indentText?y:"")+h(p[n.textKey],n);case"instruction":var g={};return g[p[n.nameKey]]=p[n.attributesKey]?p:p[n.instructionKey],r+(n.indentInstruction?y:"")+s(g,n,o)}},"")}function f(e,t,r){var n;for(n in e)if(e.hasOwnProperty(n))switch(n){case t.parentKey:case t.attributesKey:break;case t.textKey:if(t.indentText||r)return!0;break;case t.cdataKey:if(t.indentCdata||r)return!0;break;case t.instructionKey:if(t.indentInstruction||r)return!0;break;case t.doctypeKey:case t.commentKey:default:return!0}return!1}function p(r,n,o,s,c){e=r,t=n;var u="elementNameFn"in o?o.elementNameFn(n,r):n;if(null==r||""===r)return"fullTagEmptyElementFn"in o&&o.fullTagEmptyElementFn(n,r)||o.fullTagEmptyElement?"<"+u+">":"<"+u+"/>";var l=[];if(n){if(l.push("<"+u),"object"!=typeof r)return l.push(">"+h(r,o)+""),l.join("");r[o.attributesKey]&&l.push(a(r[o.attributesKey],o,s));var d=f(r,o,!0)||r[o.attributesKey]&&"preserve"===r[o.attributesKey]["xml:space"];if(d||(d="fullTagEmptyElementFn"in o?o.fullTagEmptyElementFn(n,r):o.fullTagEmptyElement),!d)return l.push("/>"),l.join("");l.push(">")}return l.push(y(r,o,s+1,!1)),e=r,t=n,n&&l.push((c?i(o,s,!1):"")+""),l.join("")}function y(e,t,r,a){var d,y,g,m=[];for(y in e)if(e.hasOwnProperty(y))for(g=n(e[y])?e[y]:[e[y]],d=0;d-1};function h(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function d(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return a&&(t[Symbol.iterator]=function(){return t}),t}function p(e){this.map={},e instanceof p?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){if(2!=e.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function y(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function g(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function m(e){var t=new FileReader,r=g(t);return t.readAsArrayBuffer(e),r}function v(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:o&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:s&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:i&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():c&&o&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=v(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):c&&(ArrayBuffer.prototype.isPrototypeOf(e)||l(e))?this._bodyArrayBuffer=v(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var e=y(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=y(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(o)return this.blob().then(m);throw new Error("could not read as ArrayBuffer")},this.text=function(){var e,t,r,n,i,a=y(this);if(a)return a;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,r=g(t),n=/charset=([A-Za-z0-9_-]+)/.exec(e.type),i=n?n[1]:"utf-8",t.readAsText(e,i),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in n)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var i=/([?&])_=[^&]*/;i.test(this.url)?this.url=this.url.replace(i,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function A(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}}),t}function T(e,t){if(!(this instanceof T))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new p(t.headers),this.url=t.url||"",this._initBody(e)}E.prototype.clone=function(){return new E(this,{body:this._bodyInit})},b.call(E.prototype),b.call(T.prototype),T.prototype.clone=function(){return new T(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},T.error=function(){var e=new T(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var O=[301,302,303,307,308];T.redirect=function(e,t){if(-1===O.indexOf(t))throw new RangeError("Invalid status code");return new T(null,{status:t,headers:{location:e}})},r.DOMException=n.DOMException;try{new r.DOMException}catch(e){r.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},r.DOMException.prototype=Object.create(Error.prototype),r.DOMException.prototype.constructor=r.DOMException}function _(e,t){return new Promise(function(i,a){var s=new E(e,t);if(s.signal&&s.signal.aborted)return a(new r.DOMException("Aborted","AbortError"));var u=new XMLHttpRequest;function l(){u.abort()}if(u.onload=function(){var e,t,r={statusText:u.statusText,headers:(e=u.getAllResponseHeaders()||"",t=new p,e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e}).forEach(function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();try{t.append(n,i)}catch(e){console.warn("Response "+e.message)}}}),t)};0===s.url.indexOf("file://")&&(u.status<200||u.status>599)?r.status=200:r.status=u.status,r.url="responseURL"in u?u.responseURL:r.headers.get("X-Request-URL");var n="response"in u?u.response:u.responseText;setTimeout(function(){i(new T(n,r))},0)},u.onerror=function(){setTimeout(function(){a(new TypeError("Network request failed"))},0)},u.ontimeout=function(){setTimeout(function(){a(new TypeError("Network request timed out"))},0)},u.onabort=function(){setTimeout(function(){a(new r.DOMException("Aborted","AbortError"))},0)},u.open(s.method,function(e){try{return""===e&&n.location.href?n.location.href:e}catch(t){return e}}(s.url),!0),"include"===s.credentials?u.withCredentials=!0:"omit"===s.credentials&&(u.withCredentials=!1),"responseType"in u&&(o?u.responseType="blob":c&&(u.responseType="arraybuffer")),t&&"object"==typeof t.headers&&!(t.headers instanceof p||n.Headers&&t.headers instanceof n.Headers)){var f=[];Object.getOwnPropertyNames(t.headers).forEach(function(e){f.push(h(e)),u.setRequestHeader(e,d(t.headers[e]))}),s.headers.forEach(function(e,t){-1===f.indexOf(t)&&u.setRequestHeader(t,e)})}else s.headers.forEach(function(e,t){u.setRequestHeader(t,e)});s.signal&&(s.signal.addEventListener("abort",l),u.onreadystatechange=function(){4===u.readyState&&s.signal.removeEventListener("abort",l)}),u.send(void 0===s._bodyInit?null:s._bodyInit)})}_.polyfill=!0,n.fetch||(n.fetch=_,n.Headers=p,n.Request=E,n.Response=T),r.Headers=p,r.Request=E,r.Response=T,r.fetch=_}({})}(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var a=n.fetch?n:i;(r=a.fetch).default=a.fetch,r.fetch=a.fetch,r.Headers=a.Headers,r.Request=a.Request,r.Response=a.Response,t.exports=r}(kr,kr.exports)),kr.exports),Ur=t(Ir);const Pr="undefined"!=typeof globalThis&&"function"==typeof globalThis.fetch?globalThis.fetch.bind(globalThis):Ur,jr=e=>{const t=Number(e);if(!Number.isNaN(t))return t;const r=e.toLowerCase();return"true"===r||"false"!==r&&e},Br=(e,t)=>{if(!e&&!t)return!0;if(!e||!t)return!1;const r=e.trim(),n=t.trim();if(Math.abs(r.length-n.length)>1)return!1;const i="/"===r.slice(-1)?r.slice(0,-1):r,a="/"===n.slice(-1)?n.slice(0,-1):n;return e.includes(a)||t.includes(i)},Vr=(e,t)=>{if(!e&&!t)return!0;if(!e||!t)return!1;const r=e.trim(),n=t.trim(),i="/"===r.slice(-1)?r.slice(0,-1):r,a="/"===n.slice(-1)?n.slice(0,-1):n;return e.includes(a)||t.includes(i)},Mr=e=>e.reduce((e,t)=>({...e,[B[t]]:t}),{}),$r=e=>Object.entries(e).reduce((e,[t,r])=>r?{...e,[t]:r}:e,{}),Kr=(e,t)=>t?{[e]:t}:{},Hr=(e,t)=>e?t&&0!==t.length?Object.fromEntries(Object.entries(e).filter(([e])=>!t.includes(e))):e:{},Yr=e=>Boolean(null==e?void 0:e.includes(".ics")),zr=(e,t)=>{const r=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,n=/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i;if(!(r.test(e)&&r.test(t)||n.test(e)&&n.test(t)))throw new Error("invalid timeRange format, not in ISO8601")};var qr=Object.freeze({__proto__:null,cleanupFalsy:$r,conditionalParam:Kr,defaultIcsFilter:Yr,excludeHeaders:Hr,getDAVAttribute:Mr,urlContains:Vr,urlEquals:Br,validateISO8601TimeRange:zr});const Gr=j("tsdav:request"),Wr=async e=>{var t;const{url:r,init:n,convertIncoming:i=!0,parseOutgoing:a=!0,fetchOptions:o={},fetch:s}=e,c=null!=s?s:Pr,{headers:u={},body:l,namespace:h,method:d,attributes:f}=n,p=i?Nr.js2xml({_declaration:{_attributes:{version:"1.0",encoding:"utf-8"}},...l,_attributes:f},{compact:!0,spaces:2,elementNameFn:e=>h&&!/^.+:.+/.test(e)?`${h}:${e}`:e}):l,y={...o};delete y.headers;const g=await c(r,{headers:{"Content-Type":"text/xml;charset=UTF-8",...$r(u),...o.headers||{}},body:p,method:d,...y}),m=await g.text();if(!(g.ok&&(null===(t=g.headers.get("content-type"))||void 0===t?void 0:t.includes("xml"))&&a&&m))return[{href:g.url,ok:g.ok,status:g.status,statusText:g.statusText,raw:m}];const v=Nr.xml2js(m,{compact:!0,trim:!0,textFn:(e,t)=>{try{const r=t._parent,n=Object.keys(r),i=n[n.length-1],a=r[i];if(a.length>0){a[a.length-1]=jr(e)}else r[i]=jr(e)}catch(e){Gr(e.stack)}},elementNameFn:e=>e.replace(/^.+:/,"").replace(/([-_]\w)/g,e=>e[1].toUpperCase()),attributesFn:e=>{const t={...e};return delete t.xmlns,t},ignoreDeclaration:!0});return(Array.isArray(v.multistatus.response)?v.multistatus.response:[v.multistatus.response]).map(e=>{var t,r;if(!e)return{status:g.status,statusText:g.statusText,ok:g.ok};const n=/^\S+\s(?\d+)\s(?.+)$/.exec(e.status);return{raw:v,href:e.href,status:(null==n?void 0:n.groups)?Number.parseInt(null==n?void 0:n.groups.status,10):g.status,statusText:null!==(r=null===(t=null==n?void 0:n.groups)||void 0===t?void 0:t.statusText)&&void 0!==r?r:g.statusText,ok:!e.error,error:e.error,responsedescription:e.responsedescription,props:(Array.isArray(e.propstat)?e.propstat:[e.propstat]).reduce((e,t)=>({...e,...null==t?void 0:t.prop}),{})}})},Qr=async e=>{const{url:t,props:r,depth:n,headers:i,headersToExclude:a,fetchOptions:o={},fetch:s}=e;return Wr({url:t,init:{method:"PROPFIND",headers:Hr($r({depth:n,...i}),a),namespace:V.DAV,body:{propfind:{_attributes:Mr([U.CALDAV,U.CALDAV_APPLE,U.CALENDAR_SERVER,U.CARDDAV,U.DAV]),prop:r}}},fetchOptions:o,fetch:s})},Xr=async e=>{const{url:t,data:r,headers:n,headersToExclude:i,fetchOptions:a={},fetch:o}=e;return(null!=o?o:Pr)(t,{method:"PUT",body:r,headers:Hr(n,i),...a})},Zr=async e=>{const{url:t,data:r,etag:n,headers:i,headersToExclude:a,fetchOptions:o={},fetch:s}=e;return(null!=s?s:Pr)(t,{method:"PUT",body:r,headers:Hr($r({"If-Match":n,...i}),a),...o})},Jr=async e=>{const{url:t,headers:r,etag:n,headersToExclude:i,fetchOptions:a={},fetch:o}=e;return(null!=o?o:Pr)(t,{method:"DELETE",headers:Hr($r({"If-Match":n,...r}),i),...a})};var en=Object.freeze({__proto__:null,createObject:Xr,davRequest:Wr,deleteObject:Jr,propfind:Qr,updateObject:Zr});function tn(e,t){const r=e=>t.every(t=>e[t]);return Array.isArray(e)?e.every(e=>r(e)):r(e)}const rn=(e,t)=>t.reduce((t,r)=>e[r]?t:`${t.length?`${t},`:""}${r.toString()}`,""),nn=j("tsdav:collection"),an=async e=>{const{url:t,body:r,depth:n,defaultNamespace:i=V.DAV,headers:a,headersToExclude:o,fetchOptions:s={},fetch:c}=e,u=await Wr({url:t,init:{method:"REPORT",headers:Hr($r({depth:n,...a}),o),namespace:i,body:r},fetchOptions:s,fetch:c}),l=u.find(e=>!e.ok||e.status&&e.status>=400);if(l)throw new Error(`Collection query failed: ${l.status} ${l.statusText}. ${l.raw?`Raw response: ${l.raw}`:""}`);return 1===u.length&&!u[0].raw&&u[0].status&&u[0].status<300?[]:u},on=async e=>{const{url:t,props:r,depth:n,headers:i,headersToExclude:a,fetchOptions:o={},fetch:s}=e;return Wr({url:t,init:{method:"MKCOL",headers:Hr($r({depth:n,...i}),a),namespace:V.DAV,body:r?{mkcol:{set:{prop:r}}}:void 0},fetchOptions:o,fetch:s})},sn=async e=>{var t,r,n,i,a;const{collection:o,headers:s,headersToExclude:c,fetchOptions:u={},fetch:l}=e;return null!==(a=null===(i=null===(n=null===(r=null===(t=(await Qr({url:o.url,props:{[`${V.DAV}:supported-report-set`]:{}},depth:"0",headers:Hr(s,c),fetchOptions:u,fetch:l}))[0])||void 0===t?void 0:t.props)||void 0===r?void 0:r.supportedReportSet)||void 0===n?void 0:n.supportedReport)||void 0===i?void 0:i.map(e=>Object.keys(e.report)[0]))&&void 0!==a?a:[]},cn=async e=>{var t,r,n;const{collection:i,headers:a,headersToExclude:o,fetchOptions:s={},fetch:c}=e,u=(await Qr({url:i.url,props:{[`${V.CALENDAR_SERVER}:getctag`]:{}},depth:"0",headers:Hr(a,o),fetchOptions:s,fetch:c})).filter(e=>Vr(i.url,e.href))[0];if(!u)throw new Error("Collection does not exist on server");return{isDirty:`${i.ctag}`!=`${null===(t=u.props)||void 0===t?void 0:t.getctag}`,newCtag:null===(n=null===(r=u.props)||void 0===r?void 0:r.getctag)||void 0===n?void 0:n.toString()}},un=e=>{const{url:t,props:r,headers:n,syncLevel:i,syncToken:a,headersToExclude:o,fetchOptions:s,fetch:c}=e;return Wr({url:t,init:{method:"REPORT",namespace:V.DAV,headers:Hr({...n},o),body:{"sync-collection":{_attributes:Mr([U.CALDAV,U.CARDDAV,U.DAV]),"sync-level":i,"sync-token":a,[`${V.DAV}:prop`]:r}}},fetchOptions:s,fetch:c})},ln=async e=>{var t,r,n,i,a,o,s,c,u,l,h,d;const{collection:f,method:p,headers:y,headersToExclude:g,account:m,detailedResult:v,fetchOptions:b={},fetch:w}=e,E=["accountType","homeUrl"];if(!m||!tn(m,E)){if(!m)throw new Error("no account for smartCollectionSync");throw new Error(`account must have ${rn(m,E)} before smartCollectionSync`)}const A=null!=p?p:(null===(t=f.reports)||void 0===t?void 0:t.includes("syncCollection"))?"webdav":"basic";if(nn(`smart collection sync with type ${m.accountType} and method ${A}`),"webdav"===A){const e=await un({url:f.url,props:{[`${V.DAV}:getetag`]:{},[`${"caldav"===m.accountType?V.CALDAV:V.CARDDAV}:${"caldav"===m.accountType?"calendar-data":"address-data"}`]:{},[`${V.DAV}:displayname`]:{}},syncLevel:1,syncToken:f.syncToken,headers:Hr(y,g),fetchOptions:b,fetch:w}),t=e.filter(e=>{var t;const r="caldav"===m.accountType?".ics":".vcf";return(null===(t=e.href)||void 0===t?void 0:t.slice(-4))===r}),u=t.filter(e=>404!==e.status).map(e=>e.href),l=t.filter(e=>404===e.status).map(e=>e.href),h=(u.length&&null!==(n=await(null===(r=null==f?void 0:f.objectMultiGet)||void 0===r?void 0:r.call(f,{url:f.url,props:{[`${V.DAV}:getetag`]:{},[`${"caldav"===m.accountType?V.CALDAV:V.CARDDAV}:${"caldav"===m.accountType?"calendar-data":"address-data"}`]:{}},objectUrls:u,depth:"1",headers:Hr(y,g),fetchOptions:b,fetch:w})))&&void 0!==n?n:[]).map(e=>{var t,r,n,i,a,o,s,c,u,l;return{url:null!==(t=e.href)&&void 0!==t?t:"",etag:null===(r=e.props)||void 0===r?void 0:r.getetag,data:"caldav"===(null==m?void 0:m.accountType)?null!==(a=null===(i=null===(n=e.props)||void 0===n?void 0:n.calendarData)||void 0===i?void 0:i._cdata)&&void 0!==a?a:null===(o=e.props)||void 0===o?void 0:o.calendarData:null!==(u=null===(c=null===(s=e.props)||void 0===s?void 0:s.addressData)||void 0===c?void 0:c._cdata)&&void 0!==u?u:null===(l=e.props)||void 0===l?void 0:l.addressData}}),d=null!==(i=f.objects)&&void 0!==i?i:[],p=h.filter(e=>d.every(t=>!Vr(t.url,e.url))),E=d.reduce((e,t)=>{const r=h.find(e=>Vr(e.url,t.url));return r&&r.etag&&r.etag!==t.etag?[...e,r]:e},[]),A=l.map(e=>({url:e,etag:""})),T=d.filter(e=>h.some(t=>Vr(e.url,t.url)&&t.etag===e.etag));return{...f,objects:v?{created:p,updated:E,deleted:A}:[...T,...p,...E],syncToken:null!==(c=null===(s=null===(o=null===(a=e[0])||void 0===a?void 0:a.raw)||void 0===o?void 0:o.multistatus)||void 0===s?void 0:s.syncToken)&&void 0!==c?c:f.syncToken}}if("basic"===A){const{isDirty:e,newCtag:t}=await cn({collection:f,headers:Hr(y,g),fetchOptions:b,fetch:w}),r=null!==(u=f.objects)&&void 0!==u?u:[],n=null!==(d=await(null===(h=(l=f).fetchObjects)||void 0===h?void 0:h.call(l,{collection:f,headers:Hr(y,g),fetchOptions:b,fetch:w})))&&void 0!==d?d:[],i=n.filter(e=>r.every(t=>!Vr(t.url,e.url))),a=r.reduce((e,t)=>{const r=n.find(e=>Vr(e.url,t.url));return r&&r.etag&&r.etag!==t.etag?[...e,r]:e},[]),o=r.filter(e=>n.every(t=>!Vr(t.url,e.url))),s=r.filter(e=>n.some(t=>Vr(e.url,t.url)&&t.etag===e.etag));if(e)return{...f,objects:v?{created:i,updated:a,deleted:o}:[...s,...i,...a],ctag:t}}return v?{...f,objects:{created:[],updated:[],deleted:[]}}:f};var hn=Object.freeze({__proto__:null,collectionQuery:an,isCollectionDirty:cn,makeCollection:on,smartCollectionSync:ln,supportedReportSet:sn,syncCollection:un});const dn=j("tsdav:addressBook"),fn=async e=>{const{url:t,props:r,filters:n,depth:i,headers:a,headersToExclude:o,fetchOptions:s={},fetch:c}=e;return an({url:t,body:{"addressbook-query":$r({_attributes:Mr([U.CARDDAV,U.DAV]),[`${V.DAV}:prop`]:r,filter:null!=n?n:{"prop-filter":{_attributes:{name:"FN"}}}})},defaultNamespace:V.CARDDAV,depth:i,headers:Hr(a,o),fetchOptions:s,fetch:c})},pn=async e=>{const{url:t,props:r,objectUrls:n,depth:i,headers:a,headersToExclude:o,fetchOptions:s={},fetch:c}=e;return an({url:t,body:{"addressbook-multiget":$r({_attributes:Mr([U.DAV,U.CARDDAV]),[`${V.DAV}:prop`]:r,[`${V.DAV}:href`]:n})},defaultNamespace:V.CARDDAV,depth:i,headers:Hr(a,o),fetchOptions:s,fetch:c})},yn=async e=>{const{account:t,headers:r,props:n,headersToExclude:i,fetchOptions:a={},fetch:o}=null!=e?e:{},s=["homeUrl","rootUrl"];if(!t||!tn(t,s)){if(!t)throw new Error("no account for fetchAddressBooks");throw new Error(`account must have ${rn(t,s)} before fetchAddressBooks`)}const c=await Qr({url:t.homeUrl,props:null!=n?n:{[`${V.DAV}:displayname`]:{},[`${V.CALENDAR_SERVER}:getctag`]:{},[`${V.DAV}:resourcetype`]:{},[`${V.DAV}:sync-token`]:{}},depth:"1",headers:Hr(r,i),fetchOptions:a,fetch:o});return Promise.all(c.filter(e=>{var t,r;return Object.keys(null!==(r=null===(t=e.props)||void 0===t?void 0:t.resourcetype)&&void 0!==r?r:{}).includes("addressbook")}).map(e=>{var r,n,i,a,o,s,c,u,l;const h=null!==(i=null===(n=null===(r=e.props)||void 0===r?void 0:r.displayname)||void 0===n?void 0:n._cdata)&&void 0!==i?i:null===(a=e.props)||void 0===a?void 0:a.displayname;return dn(`Found address book named ${"string"==typeof h?h:""},\n props: ${JSON.stringify(e.props)}`),{url:new URL(null!==(o=e.href)&&void 0!==o?o:"",null!==(s=t.rootUrl)&&void 0!==s?s:"").href,ctag:null===(c=e.props)||void 0===c?void 0:c.getctag,displayName:"string"==typeof h?h:"",resourcetype:Object.keys(null===(u=e.props)||void 0===u?void 0:u.resourcetype),syncToken:null===(l=e.props)||void 0===l?void 0:l.syncToken}}).map(async e=>({...e,reports:await sn({collection:e,headers:Hr(r,i),fetchOptions:a,fetch:o})})))},gn=async e=>{const{addressBook:t,headers:r,objectUrls:n,headersToExclude:i,urlFilter:a=e=>e,useMultiGet:o=!0,fetchOptions:s={},fetch:c}=e;dn(`Fetching vcards from ${null==t?void 0:t.url}`);const u=["url"];if(!t||!tn(t,u)){if(!t)throw new Error("cannot fetchVCards for undefined addressBook");throw new Error(`addressBook must have ${rn(t,u)} before fetchVCards`)}const l=(null!=n?n:(await fn({url:t.url,props:{[`${V.DAV}:getetag`]:{}},depth:"1",headers:Hr(r,i),fetchOptions:s,fetch:c})).map(e=>{var t;return null!==(t=e.href)&&void 0!==t?t:""})).map(e=>e.startsWith("http")||!e?e:new URL(e,t.url).href).filter(e=>e&&!Br(e,t.url)).filter(a).map(e=>new URL(e).pathname);let h=[];return l.length>0&&(h=o?await pn({url:t.url,props:{[`${V.DAV}:getetag`]:{},[`${V.CARDDAV}:address-data`]:{}},objectUrls:l,depth:"1",headers:Hr(r,i),fetchOptions:s,fetch:c}):await fn({url:t.url,props:{[`${V.DAV}:getetag`]:{},[`${V.CARDDAV}:address-data`]:{}},depth:"1",headers:Hr(r,i),fetchOptions:s,fetch:c})),h.map(e=>{var r,n,i,a,o,s;return{url:new URL(null!==(r=e.href)&&void 0!==r?r:"",t.url).href,etag:null===(n=e.props)||void 0===n?void 0:n.getetag,data:null!==(o=null===(a=null===(i=e.props)||void 0===i?void 0:i.addressData)||void 0===a?void 0:a._cdata)&&void 0!==o?o:null===(s=e.props)||void 0===s?void 0:s.addressData}})},mn=async e=>{const{addressBook:t,vCardString:r,filename:n,headers:i,headersToExclude:a,fetchOptions:o={},fetch:s}=e;return Xr({url:new URL(n,t.url).href,data:r,headers:Hr({"content-type":"text/vcard; charset=utf-8","If-None-Match":"*",...i},a),fetchOptions:o,fetch:s})},vn=async e=>{const{vCard:t,headers:r,headersToExclude:n,fetchOptions:i={},fetch:a}=e;return Zr({url:t.url,data:t.data,etag:t.etag,headers:Hr({"content-type":"text/vcard; charset=utf-8",...r},n),fetchOptions:i,fetch:a})},bn=async e=>{const{vCard:t,headers:r,headersToExclude:n,fetchOptions:i={},fetch:a}=e;return Jr({url:t.url,etag:t.etag,headers:Hr(r,n),fetchOptions:i,fetch:a})},wn=async e=>{const{url:t,props:r,depth:n,headers:i,headersToExclude:a,fetchOptions:o={}}=e;return Wr({url:t,init:{method:"MKCOL",headers:Hr($r({depth:n,...i}),a),namespace:V.DAV,body:r?{mkcol:{_attributes:Mr([U.DAV,U.CARDDAV]),set:{prop:r}}}:void 0},fetchOptions:o})};var En=Object.freeze({__proto__:null,addressBookMultiGet:pn,addressBookQuery:fn,createVCard:mn,deleteVCard:bn,fetchAddressBooks:yn,fetchVCards:gn,makeAddressBook:wn,updateVCard:vn});const An=j("tsdav:calendar"),Tn=async e=>{var t,r,n;const{account:i,headers:a,headersToExclude:o,fetchOptions:s={},fetch:c}=e,u=["principalUrl","rootUrl"];if(!tn(i,u))throw new Error(`account must have ${rn(i,u)} before fetchUserAddresses`);An(`Fetch user addresses from ${i.principalUrl}`);const l=(await Qr({url:i.principalUrl,props:{[`${V.CALDAV}:calendar-user-address-set`]:{}},depth:"0",headers:Hr(a,o),fetchOptions:s,fetch:c})).find(e=>Vr(i.principalUrl,e.href));if(!l||!l.ok)throw new Error("cannot find calendarUserAddresses");const h=(null===(n=null===(r=null===(t=null==l?void 0:l.props)||void 0===t?void 0:t.calendarUserAddressSet)||void 0===r?void 0:r.href)||void 0===n?void 0:n.filter(Boolean))||[];return An(`Fetched calendar user addresses ${h}`),h},On=async e=>{const{url:t,props:r,filters:n,timezone:i,depth:a,headers:o,headersToExclude:s,fetchOptions:c={},fetch:u}=e;return an({url:t,body:{"calendar-query":$r({_attributes:Mr([U.CALDAV,U.CALENDAR_SERVER,U.CALDAV_APPLE,U.DAV]),[`${V.DAV}:prop`]:r,filter:n,timezone:i})},defaultNamespace:V.CALDAV,depth:a,headers:Hr(o,s),fetchOptions:c,fetch:u})},_n=async e=>{const{url:t,props:r,objectUrls:n,filters:i,timezone:a,depth:o,headers:s,headersToExclude:c,fetchOptions:u={},fetch:l}=e;return an({url:t,body:{"calendar-multiget":$r({_attributes:Mr([U.DAV,U.CALDAV]),[`${V.DAV}:prop`]:r,[`${V.DAV}:href`]:n,filter:i,timezone:a})},defaultNamespace:V.CALDAV,depth:o,headers:Hr(s,c),fetchOptions:u,fetch:l})},Cn=async e=>{const{url:t,props:r,depth:n,headers:i,headersToExclude:a,fetchOptions:o={},fetch:s}=e;return Wr({url:t,init:{method:"MKCALENDAR",headers:Hr($r({depth:n,...i}),a),namespace:V.DAV,body:{[`${V.CALDAV}:mkcalendar`]:{_attributes:Mr([U.DAV,U.CALDAV,U.CALDAV_APPLE]),set:{prop:r}}}},fetchOptions:o,fetch:s})},Dn=async e=>{const{headers:t,account:r,props:n,projectedProps:i,headersToExclude:a,fetchOptions:o={},fetch:s}=null!=e?e:{},c=["homeUrl","rootUrl"];if(!r||!tn(r,c)){if(!r)throw new Error("no account for fetchCalendars");throw new Error(`account must have ${rn(r,c)} before fetchCalendars`)}const u=await Qr({url:r.homeUrl,props:null!=n?n:{[`${V.CALDAV}:calendar-description`]:{},[`${V.CALDAV}:calendar-timezone`]:{},[`${V.DAV}:displayname`]:{},[`${V.CALDAV_APPLE}:calendar-color`]:{},[`${V.CALENDAR_SERVER}:getctag`]:{},[`${V.DAV}:resourcetype`]:{},[`${V.CALDAV}:supported-calendar-component-set`]:{},[`${V.DAV}:sync-token`]:{}},depth:"1",headers:Hr(t,a),fetchOptions:o,fetch:s});return Promise.all(u.filter(e=>{var t,r;return Object.keys(null!==(r=null===(t=e.props)||void 0===t?void 0:t.resourcetype)&&void 0!==r?r:{}).includes("calendar")}).filter(e=>{var t,r,n,i,a,o;return(Array.isArray(null===(r=null===(t=e.props)||void 0===t?void 0:t.supportedCalendarComponentSet)||void 0===r?void 0:r.comp)?null===(n=e.props)||void 0===n?void 0:n.supportedCalendarComponentSet.comp.map(e=>e._attributes.name):[null===(o=null===(a=null===(i=e.props)||void 0===i?void 0:i.supportedCalendarComponentSet)||void 0===a?void 0:a.comp)||void 0===o?void 0:o._attributes.name]).some(e=>Object.values(M).includes(e))}).map(e=>{var t,n,a,o,s,c,u,l,h,d,f,p,y,g,m,v;const b=null===(t=e.props)||void 0===t?void 0:t.calendarDescription,w=null===(n=e.props)||void 0===n?void 0:n.calendarTimezone;return{description:"string"==typeof b?b:"",timezone:"string"==typeof w?w:"",url:new URL(null!==(a=e.href)&&void 0!==a?a:"",null!==(o=r.rootUrl)&&void 0!==o?o:"").href,ctag:null===(s=e.props)||void 0===s?void 0:s.getctag,calendarColor:null===(c=e.props)||void 0===c?void 0:c.calendarColor,displayName:null!==(l=null===(u=e.props)||void 0===u?void 0:u.displayname._cdata)&&void 0!==l?l:null===(h=e.props)||void 0===h?void 0:h.displayname,components:Array.isArray(null===(d=e.props)||void 0===d?void 0:d.supportedCalendarComponentSet.comp)?null===(f=e.props)||void 0===f?void 0:f.supportedCalendarComponentSet.comp.map(e=>e._attributes.name):[null===(y=null===(p=e.props)||void 0===p?void 0:p.supportedCalendarComponentSet.comp)||void 0===y?void 0:y._attributes.name],resourcetype:Object.keys(null===(g=e.props)||void 0===g?void 0:g.resourcetype),syncToken:null===(m=e.props)||void 0===m?void 0:m.syncToken,...Kr("projectedProps",Object.fromEntries(Object.entries(null!==(v=e.props)&&void 0!==v?v:{}).filter(([e])=>null==i?void 0:i[e])))}}).map(async e=>({...e,reports:await sn({collection:e,headers:Hr(t,a),fetchOptions:o,fetch:s})})))},xn=async e=>{const{calendar:t,objectUrls:r,filters:n,timeRange:i,headers:a,expand:o,urlFilter:s=Yr,useMultiGet:c=!0,headersToExclude:u,fetchOptions:l={},fetch:h}=e;i&&zr(i.start,i.end),An(`Fetching calendar objects from ${null==t?void 0:t.url}`);const d=["url"];if(!t||!tn(t,d)){if(!t)throw new Error("cannot fetchCalendarObjects for undefined calendar");throw new Error(`calendar must have ${rn(t,d)} before fetchCalendarObjects`)}const f=null!=n?n:[{"comp-filter":{_attributes:{name:"VCALENDAR"},"comp-filter":{_attributes:{name:"VEVENT"},...i?{"time-range":{_attributes:{start:`${new Date(i.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(i.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}}}];let p=[];const y=(null!=r?r:(p=await On({url:t.url,props:{[`${V.DAV}:getetag`]:{},...o&&i?{[`${V.CALDAV}:calendar-data`]:{[`${V.CALDAV}:expand`]:{_attributes:{start:`${new Date(i.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(i.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}}:{}},filters:f,depth:"1",headers:Hr(a,u),fetchOptions:l,fetch:h})).map(e=>{var t;return null!==(t=e.href)&&void 0!==t?t:""})).map(e=>e.startsWith("http")||!e?e:new URL(e,t.url).href).filter(s).map(e=>new URL(e).pathname);let g=[];return y.length>0&&(g=o&&!r?p.filter(e=>{var r,n;const i=(null!==(r=e.href)&&void 0!==r?r:"").startsWith("http")?e.href:new URL(null!==(n=e.href)&&void 0!==n?n:"",t.url).href;return s(null!=i?i:"")}):c?await _n({url:t.url,props:{[`${V.DAV}:getetag`]:{},[`${V.CALDAV}:calendar-data`]:{...o&&i?{[`${V.CALDAV}:expand`]:{_attributes:{start:`${new Date(i.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(i.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}},objectUrls:y,depth:"1",headers:Hr(a,u),fetchOptions:l,fetch:h}):await On({url:t.url,props:{[`${V.DAV}:getetag`]:{},[`${V.CALDAV}:calendar-data`]:{...o&&i?{[`${V.CALDAV}:expand`]:{_attributes:{start:`${new Date(i.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(i.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}},filters:f,depth:"1",headers:Hr(a,u),fetchOptions:l,fetch:h})),g.map(e=>{var r,n,i,a,o,s;return{url:new URL(null!==(r=e.href)&&void 0!==r?r:"",t.url).href,etag:`${null===(n=e.props)||void 0===n?void 0:n.getetag}`,data:null!==(o=null===(a=null===(i=e.props)||void 0===i?void 0:i.calendarData)||void 0===a?void 0:a._cdata)&&void 0!==o?o:null===(s=e.props)||void 0===s?void 0:s.calendarData}})},Rn=async e=>{const{calendar:t,iCalString:r,filename:n,headers:i,headersToExclude:a,fetchOptions:o={},fetch:s}=e;return Xr({url:new URL(n,t.url).href,data:r,headers:Hr({"content-type":"text/calendar; charset=utf-8","If-None-Match":"*",...i},a),fetchOptions:o,fetch:s})},Fn=async e=>{const{calendarObject:t,headers:r,headersToExclude:n,fetchOptions:i={},fetch:a}=e;return Zr({url:t.url,data:t.data,etag:t.etag,headers:Hr({"content-type":"text/calendar; charset=utf-8",...r},n),fetchOptions:i,fetch:a})},Sn=async e=>{const{calendarObject:t,headers:r,headersToExclude:n,fetchOptions:i={},fetch:a}=e;return Jr({url:t.url,etag:t.etag,headers:Hr(r,n),fetchOptions:i,fetch:a})},Nn=async e=>{var t;const{oldCalendars:r,account:n,detailedResult:i,headers:a,headersToExclude:o,fetchOptions:s={},fetch:c}=e;if(!n)throw new Error("Must have account before syncCalendars");const u=null!==(t=null!=r?r:n.calendars)&&void 0!==t?t:[],l=await Dn({account:n,headers:Hr(a,o),fetchOptions:s,fetch:c}),h=l.filter(e=>u.every(t=>!Vr(t.url,e.url)));An(`new calendars: ${h.map(e=>e.displayName)}`);const d=u.reduce((e,t)=>{const r=l.find(e=>Vr(e.url,t.url));return r&&(r.syncToken&&`${r.syncToken}`!=`${t.syncToken}`||r.ctag&&`${r.ctag}`!=`${t.ctag}`)?[...e,r]:e},[]);An(`updated calendars: ${d.map(e=>e.displayName)}`);const f=await Promise.all(d.map(async e=>await ln({collection:{...e,objectMultiGet:_n},method:"webdav",headers:Hr(a,o),account:n,fetchOptions:s,fetch:c}))),p=u.filter(e=>l.every(t=>!Vr(t.url,e.url)));An(`deleted calendars: ${p.map(e=>e.displayName)}`);const y=u.filter(e=>l.some(t=>Vr(t.url,e.url)&&(t.syncToken&&`${t.syncToken}`!=`${e.syncToken}`||t.ctag&&`${t.ctag}`!=`${e.ctag}`)));return i?{created:h,updated:d,deleted:p}:[...y,...h,...f]},Ln=async e=>{const{url:t,timeRange:r,depth:n,headers:i,headersToExclude:a,fetchOptions:o={},fetch:s}=e;if(!r)throw new Error("timeRange is required");zr(r.start,r.end);return(await an({url:t,body:{"free-busy-query":$r({_attributes:Mr([U.CALDAV]),[`${V.CALDAV}:time-range`]:{_attributes:{start:`${new Date(r.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(r.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}})},defaultNamespace:V.CALDAV,depth:n,headers:Hr(i,a),fetchOptions:o,fetch:s}))[0]};var kn=Object.freeze({__proto__:null,calendarMultiGet:_n,calendarQuery:On,createCalendarObject:Rn,deleteCalendarObject:Sn,fetchCalendarObjects:xn,fetchCalendarUserAddresses:Tn,fetchCalendars:Dn,freeBusyQuery:Ln,makeCalendar:Cn,syncCalendars:Nn,updateCalendarObject:Fn});const In=j("tsdav:account"),Un=async e=>{var t,r;In("Service discovery...");const{account:n,headers:i,headersToExclude:a,fetchOptions:o={},fetch:s}=e,c=null!=s?s:Pr,u=new URL(n.serverUrl),l=new URL(`/.well-known/${n.accountType}`,u);l.protocol=null!==(t=u.protocol)&&void 0!==t?t:"http";try{const e=await c(l.href,{headers:{...Hr(i,a),"Content-Type":"text/xml;charset=UTF-8"},method:"PROPFIND",body:'\n\n \n \n \n',redirect:"manual",...o});if(e.status>=300&&e.status<400){const t=e.headers.get("Location");if("string"==typeof t&&t.length){In(`Service discovery redirected to ${t}`);const e=new URL(t,u);return e.hostname===l.hostname&&l.port&&!e.port&&(e.port=l.port),e.protocol=null!==(r=u.protocol)&&void 0!==r?r:"http",e.href}}}catch(e){In(`Service discovery failed: ${e.stack}`)}return u.href},Pn=async e=>{var t,r,n,i,a;const{account:o,headers:s,headersToExclude:c,fetchOptions:u={},fetch:l}=e,h=["rootUrl"];if(!tn(o,h))throw new Error(`account must have ${rn(o,h)} before fetchPrincipalUrl`);In(`Fetching principal url from path ${o.rootUrl}`);const[d]=await Qr({url:o.rootUrl,props:{[`${V.DAV}:current-user-principal`]:{}},depth:"0",headers:Hr(s,c),fetchOptions:u,fetch:l});if(!d.ok&&(In(`Fetch principal url failed: ${d.statusText}`),401===d.status))throw new Error("Invalid credentials");return In(`Fetched principal url ${null===(r=null===(t=d.props)||void 0===t?void 0:t.currentUserPrincipal)||void 0===r?void 0:r.href}`),new URL(null!==(a=null===(i=null===(n=d.props)||void 0===n?void 0:n.currentUserPrincipal)||void 0===i?void 0:i.href)&&void 0!==a?a:"",o.rootUrl).href},jn=async e=>{var t,r;const{account:n,headers:i,headersToExclude:a,fetchOptions:o={},fetch:s}=e,c=["principalUrl","rootUrl"];if(!tn(n,c))throw new Error(`account must have ${rn(n,c)} before fetchHomeUrl`);In(`Fetch home url from ${n.principalUrl}`);const u=await Qr({url:n.principalUrl,props:"caldav"===n.accountType?{[`${V.CALDAV}:calendar-home-set`]:{}}:{[`${V.CARDDAV}:addressbook-home-set`]:{}},depth:"0",headers:Hr(i,a),fetchOptions:o,fetch:s}),l=u.find(e=>Vr(n.principalUrl,e.href));if(!l||!l.ok)throw In(`Fetch home url failed with status ${null==l?void 0:l.statusText} and error ${JSON.stringify(u.map(e=>e.error))}`),new Error("cannot find homeUrl");const h=new URL("caldav"===n.accountType?null===(t=null==l?void 0:l.props)||void 0===t?void 0:t.calendarHomeSet.href:null===(r=null==l?void 0:l.props)||void 0===r?void 0:r.addressbookHomeSet.href,n.rootUrl).href;return In(`Fetched home url ${h}`),h},Bn=async e=>{const{account:t,headers:r,loadCollections:n=!1,loadObjects:i=!1,headersToExclude:a,fetchOptions:o={},fetch:s}=e,c={...t};return c.rootUrl=await Un({account:t,headers:Hr(r,a),fetchOptions:o,fetch:s}),c.principalUrl=await Pn({account:c,headers:Hr(r,a),fetchOptions:o,fetch:s}),c.homeUrl=await jn({account:c,headers:Hr(r,a),fetchOptions:o,fetch:s}),(n||i)&&("caldav"===t.accountType?c.calendars=await Dn({headers:Hr(r,a),account:c,fetchOptions:o,fetch:s}):"carddav"===t.accountType&&(c.addressBooks=await yn({headers:Hr(r,a),account:c,fetchOptions:o,fetch:s}))),i&&("caldav"===t.accountType&&c.calendars?c.calendars=await Promise.all(c.calendars.map(async e=>({...e,objects:await xn({calendar:e,headers:Hr(r,a),fetchOptions:o,fetch:s})}))):"carddav"===t.accountType&&c.addressBooks&&(c.addressBooks=await Promise.all(c.addressBooks.map(async e=>({...e,objects:await gn({addressBook:e,headers:Hr(r,a),fetchOptions:o,fetch:s})}))))),c};var Vn=Object.freeze({__proto__:null,createAccount:Bn,fetchHomeUrl:jn,fetchPrincipalUrl:Pn,serviceDiscovery:Un});const Mn=j("tsdav:todo"),$n=e=>({[`${V.CALDAV}:expand`]:{_attributes:{start:`${new Date(e.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(e.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}),Kn=async e=>{const{url:t,props:r,filters:n,timezone:i,depth:a,headers:o,headersToExclude:s,fetchOptions:c={}}=e;return an({url:t,body:{"calendar-query":$r({_attributes:Mr([U.CALDAV,U.CALENDAR_SERVER,U.CALDAV_APPLE,U.DAV]),[`${V.DAV}:prop`]:r,filter:n,timezone:i})},defaultNamespace:V.CALDAV,depth:a,headers:Hr(o,s),fetchOptions:c})},Hn=async e=>{const{url:t,props:r,objectUrls:n,filters:i,timezone:a,depth:o,headers:s,headersToExclude:c,fetchOptions:u={}}=e;return an({url:t,body:{"calendar-multiget":$r({_attributes:Mr([U.DAV,U.CALDAV]),[`${V.DAV}:prop`]:r,[`${V.DAV}:href`]:n,filter:i,timezone:a})},defaultNamespace:V.CALDAV,depth:o,headers:Hr(s,c),fetchOptions:u})},Yn=async e=>{const{calendar:t,objectUrls:r,filters:n,timeRange:i,headers:a,expand:o,urlFilter:s=Yr,useMultiGet:c=!0,headersToExclude:u,fetchOptions:l={}}=e;i&&zr(i.start,i.end),Mn(`Fetching todo objects from ${null==t?void 0:t.url}`);const h=["url"];if(!t||!tn(t,h)){if(!t)throw new Error("cannot fetchTodos for undefined calendar");throw new Error(`calendar must have ${rn(t,h)} before fetchTodos`)}const d=null!=n?n:[{"comp-filter":{_attributes:{name:"VCALENDAR"},"comp-filter":{_attributes:{name:"VTODO"},...i?{"time-range":{_attributes:{start:`${new Date(i.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(i.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}}}],f=(null!=r?r:(await Kn({url:t.url,props:{[`${V.DAV}:getetag`]:{...o&&i?$n(i):{}}},filters:d,depth:"1",headers:Hr(a,u),fetchOptions:l})).map(e=>{var t;return null!==(t=e.href)&&void 0!==t?t:""})).map(e=>e.startsWith("http")||!e?e:new URL(e,t.url).href).filter(s).map(e=>new URL(e).pathname);let p=[];return f.length>0&&(p=!c||o?await Kn({url:t.url,props:{[`${V.DAV}:getetag`]:{},[`${V.CALDAV}:calendar-data`]:{...o&&i?$n(i):{}}},filters:d,depth:"1",headers:Hr(a,u),fetchOptions:l}):await Hn({url:t.url,props:{[`${V.DAV}:getetag`]:{},[`${V.CALDAV}:calendar-data`]:{...o&&i?$n(i):{}}},objectUrls:f,depth:"1",headers:Hr(a,u),fetchOptions:l})),p.map(e=>{var r,n,i,a,o,s;return{url:new URL(null!==(r=e.href)&&void 0!==r?r:"",t.url).href,etag:`${null===(n=e.props)||void 0===n?void 0:n.getetag}`,data:null!==(o=null===(a=null===(i=e.props)||void 0===i?void 0:i.calendarData)||void 0===a?void 0:a._cdata)&&void 0!==o?o:null===(s=e.props)||void 0===s?void 0:s.calendarData}})},zn=async e=>{const{calendar:t,iCalString:r,filename:n,headers:i,headersToExclude:a,fetchOptions:o={}}=e;if(!r.includes("UID:"))throw new Error("iCalString must contain a UID");return Xr({url:new URL(n,t.url).href,data:r,headers:Hr({"content-type":"text/calendar; charset=utf-8","If-None-Match":"*",...i},a),fetchOptions:o})},qn=async e=>{const{calendarObject:t,headers:r,headersToExclude:n,fetchOptions:i={}}=e;if(!t.etag)throw new Error("calendarObject must have etag for update - fetch todo first");return Zr({url:t.url,data:t.data,etag:t.etag,headers:Hr({"content-type":"text/calendar; charset=utf-8",...r},n),fetchOptions:i})},Gn=async e=>{const{calendarObject:t,headers:r,headersToExclude:n,fetchOptions:i={}}=e;return Jr({url:t.url,etag:t.etag,headers:Hr(r,n),fetchOptions:i})};var Wn,Qn=Object.freeze({__proto__:null,createTodo:zn,deleteTodo:Gn,fetchTodos:Yn,todoMultiGet:Hn,todoQuery:Kn,updateTodo:qn}),Xn={exports:{}};var Zn,Jn,ei=(Wn||(Wn=1,Zn=Xn,Jn=Xn.exports,function(t){var r=Jn,n=Zn&&Zn.exports==r&&Zn,i="object"==typeof e&&e;i.global!==i&&i.window!==i||(t=i);var a=function(e){this.message=e};(a.prototype=new Error).name="InvalidCharacterError";var o=function(e){throw new a(e)},s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=/[\t\n\f\r ]/g,u={encode:function(e){e=String(e),/[^\0-\xFF]/.test(e)&&o("The string to be encoded contains characters outside of the Latin1 range.");for(var t,r,n,i,a=e.length%3,c="",u=-1,l=e.length-a;++u>18&63)+s.charAt(i>>12&63)+s.charAt(i>>6&63)+s.charAt(63&i);return 2==a?(t=e.charCodeAt(u)<<8,r=e.charCodeAt(++u),c+=s.charAt((i=t+r)>>10)+s.charAt(i>>4&63)+s.charAt(i<<2&63)+"="):1==a&&(i=e.charCodeAt(u),c+=s.charAt(i>>2)+s.charAt(i<<4&63)+"=="),c},decode:function(e){var t=(e=String(e).replace(c,"")).length;t%4==0&&(t=(e=e.replace(/==?$/,"")).length),(t%4==1||/[^+a-zA-Z0-9/]/.test(e))&&o("Invalid character: the string to be decoded is not correctly encoded.");for(var r,n,i=0,a="",u=-1;++u>(-2*i&6)));return a},version:"1.0.0"};if(r&&!r.nodeType)if(n)n.exports=u;else for(var l in u)u.hasOwnProperty(l)&&(r[l]=u[l]);else t.base64=u}(Xn.exports)),Xn.exports);const ti=j("tsdav:authHelper"),ri=(e,t)=>(...r)=>e({...t,...r[0]}),ni=e=>(ti(`Basic auth token generated: ${ei.encode(`${e.username}:${e.password}`)}`),{authorization:`Basic ${ei.encode(`${e.username}:${e.password}`)}`}),ii=e=>({authorization:`Bearer ${e.accessToken}`}),ai=async(e,t,r)=>{const n=["authorizationCode","redirectUrl","clientId","clientSecret","tokenUrl"];if(!tn(e,n))throw new Error(`Oauth credentials missing: ${rn(e,n)}`);const i=new URLSearchParams({grant_type:"authorization_code",code:e.authorizationCode,redirect_uri:e.redirectUrl,client_id:e.clientId,client_secret:e.clientSecret});ti(e.tokenUrl),ti(i.toString());const a=null!=r?r:Pr,o=await a(e.tokenUrl,{method:"POST",body:i.toString(),headers:{"content-length":`${i.toString().length}`,"content-type":"application/x-www-form-urlencoded"},...null!=t?t:{}});if(o.ok){return await o.json()}return ti(`Fetch Oauth tokens failed: ${await o.text()}`),{}},oi=async(e,t,r)=>{const n=["refreshToken","clientId","clientSecret","tokenUrl"];if(!tn(e,n))throw new Error(`Oauth credentials missing: ${rn(e,n)}`);const i=new URLSearchParams({client_id:e.clientId,client_secret:e.clientSecret,refresh_token:e.refreshToken,grant_type:"refresh_token"}),a=null!=r?r:Pr,o=await a(e.tokenUrl,{method:"POST",body:i.toString(),headers:{"Content-Type":"application/x-www-form-urlencoded"},...null!=t?t:{}});if(o.ok){return await o.json()}return ti(`Refresh access token failed: ${await o.text()}`),{}},si=async(e,t,r)=>{var n;ti("Fetching oauth headers");let i={};return e.refreshToken?(e.refreshToken&&!e.accessToken||Date.now()>(null!==(n=e.expiration)&&void 0!==n?n:0))&&(i=await oi(e,t,r)):i=await ai(e,t,r),ti(`Oauth tokens fetched: ${i.access_token}`),{tokens:i,headers:{authorization:`Bearer ${i.access_token}`}}};var ci=Object.freeze({__proto__:null,defaultParam:ri,fetchOauthTokens:ai,getBasicAuthHeaders:ni,getBearerAuthHeaders:ii,getOauthHeaders:si,refreshAccessToken:oi});const ui=async e=>{var t;const{serverUrl:r,credentials:n,authMethod:i,defaultAccountType:a,authFunction:o,fetch:s}=e;let c={};switch(i){case"Basic":c=ni(n);break;case"Bearer":c=ii(n);break;case"Oauth":c=(await si(n,void 0,s)).headers;break;case"Digest":c={Authorization:`Digest ${n.digestString}`};break;case"Custom":c=null!==(t=await(null==o?void 0:o(n)))&&void 0!==t?t:{};break;default:throw new Error("Invalid auth method")}const u=a?await Bn({account:{serverUrl:r,credentials:n,accountType:a},headers:c,fetch:s}):void 0,l=ri(Xr,{url:r,headers:c,fetch:s}),h=ri(Zr,{headers:c,url:r,fetch:s}),d=ri(Jr,{headers:c,url:r,fetch:s}),f=ri(Qr,{headers:c,fetch:s}),p=ri(an,{headers:c,fetch:s}),y=ri(on,{headers:c,fetch:s}),g=ri(un,{headers:c,fetch:s}),m=ri(sn,{headers:c,fetch:s}),v=ri(cn,{headers:c,fetch:s}),b=ri(ln,{headers:c,account:u,fetch:s}),w=ri(On,{headers:c,fetch:s}),E=ri(_n,{headers:c,fetch:s}),A=ri(Cn,{headers:c,fetch:s}),T=ri(Dn,{headers:c,account:u,fetch:s}),O=ri(Tn,{headers:c,account:u,fetch:s}),_=ri(xn,{headers:c,fetch:s}),C=ri(Rn,{headers:c,fetch:s}),D=ri(Fn,{headers:c,fetch:s}),x=ri(Sn,{headers:c,fetch:s}),R=ri(Nn,{account:u,headers:c,fetch:s}),F=ri(fn,{headers:c,fetch:s}),S=ri(pn,{headers:c,fetch:s}),N=ri(wn,{headers:c,fetch:s});return{davRequest:async e=>{const{init:t,fetch:r,...n}=e,{headers:i,...a}=t;return Wr({...n,init:{...a,headers:{...c,...i}},fetch:null!=r?r:s})},propfind:f,createAccount:async e=>{const{account:t,headers:i,loadCollections:a,loadObjects:o,fetch:u}=e;return Bn({account:{serverUrl:r,credentials:n,...t},headers:{...c,...i},loadCollections:a,loadObjects:o,fetch:null!=u?u:s})},createObject:l,updateObject:h,deleteObject:d,calendarQuery:w,addressBookQuery:F,collectionQuery:p,makeCollection:y,calendarMultiGet:E,makeCalendar:A,syncCollection:g,supportedReportSet:m,isCollectionDirty:v,smartCollectionSync:b,fetchCalendars:T,fetchCalendarUserAddresses:O,fetchCalendarObjects:_,createCalendarObject:C,updateCalendarObject:D,deleteCalendarObject:x,syncCalendars:R,fetchAddressBooks:ri(yn,{account:u,headers:c,fetch:s}),addressBookMultiGet:S,makeAddressBook:N,fetchVCards:ri(gn,{headers:c,fetch:s}),createVCard:ri(mn,{headers:c,fetch:s}),updateVCard:ri(vn,{headers:c,fetch:s}),deleteVCard:ri(bn,{headers:c,fetch:s}),todoQuery:ri(Kn,{headers:c}),todoMultiGet:ri(Hn,{headers:c}),fetchTodos:ri(Yn,{headers:c}),createTodo:ri(zn,{headers:c}),updateTodo:ri(qn,{headers:c}),deleteTodo:ri(Gn,{headers:c})}};class li{constructor(e){var t,r,n;this.serverUrl=e.serverUrl,this.credentials=e.credentials,this.authMethod=null!==(t=e.authMethod)&&void 0!==t?t:"Basic",this.accountType=null!==(r=e.defaultAccountType)&&void 0!==r?r:"caldav",this.authFunction=e.authFunction,this.fetchOptions=null!==(n=e.fetchOptions)&&void 0!==n?n:{},this.fetchOverride=e.fetch}async login(){var e;switch(this.authMethod){case"Basic":this.authHeaders=ni(this.credentials);break;case"Bearer":this.authHeaders=ii(this.credentials);break;case"Oauth":this.authHeaders=(await si(this.credentials,this.fetchOptions,this.fetchOverride)).headers;break;case"Digest":this.authHeaders={Authorization:`Digest ${this.credentials.digestString}`};break;case"Custom":this.authHeaders=await(null===(e=this.authFunction)||void 0===e?void 0:e.call(this,this.credentials));break;default:throw new Error("Invalid auth method")}this.account=this.accountType?await Bn({account:{serverUrl:this.serverUrl,credentials:this.credentials,accountType:this.accountType},headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride}):void 0}async davRequest(e){const{init:t,fetch:r,...n}=e,{headers:i,...a}=t;return Wr({...n,init:{...a,headers:{...this.authHeaders,...i}},fetchOptions:this.fetchOptions,fetch:null!=r?r:this.fetchOverride})}async createObject(...e){return ri(Xr,{url:this.serverUrl,headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async updateObject(...e){return ri(Zr,{url:this.serverUrl,headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async deleteObject(...e){return ri(Jr,{url:this.serverUrl,headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async propfind(...e){return ri(Qr,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async createAccount(e){const{account:t,headers:r,loadCollections:n,loadObjects:i,fetchOptions:a,fetch:o}=e;return Bn({account:{serverUrl:this.serverUrl,credentials:this.credentials,...t},headers:{...this.authHeaders,...r},loadCollections:n,loadObjects:i,fetchOptions:null!=a?a:this.fetchOptions,fetch:null!=o?o:this.fetchOverride})}async collectionQuery(...e){return ri(an,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async makeCollection(...e){return ri(on,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async syncCollection(...e){return ri(un,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async supportedReportSet(...e){return ri(sn,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async isCollectionDirty(...e){return ri(cn,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async smartCollectionSync(...e){return ri(ln,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride,account:this.account})(e[0])}async calendarQuery(...e){return ri(On,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async makeCalendar(...e){return ri(Cn,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async calendarMultiGet(...e){return ri(_n,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async fetchCalendars(...e){return ri(Dn,{headers:this.authHeaders,account:this.account,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(null==e?void 0:e[0])}async fetchCalendarUserAddresses(...e){return ri(Tn,{headers:this.authHeaders,account:this.account,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(null==e?void 0:e[0])}async fetchCalendarObjects(...e){return ri(xn,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async createCalendarObject(...e){return ri(Rn,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async updateCalendarObject(...e){return ri(Fn,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async deleteCalendarObject(...e){return ri(Sn,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async syncCalendars(...e){return ri(Nn,{headers:this.authHeaders,account:this.account,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async addressBookQuery(...e){return ri(fn,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async addressBookMultiGet(...e){return ri(pn,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async makeAddressBook(...e){return ri(wn,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async fetchAddressBooks(...e){return ri(yn,{headers:this.authHeaders,account:this.account,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(null==e?void 0:e[0])}async fetchVCards(...e){return ri(gn,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async createVCard(...e){return ri(mn,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async updateVCard(...e){return ri(vn,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async deleteVCard(...e){return ri(bn,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async todoQuery(...e){return ri(Kn,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async todoMultiGet(...e){return ri(Hn,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async fetchTodos(...e){return ri(Yn,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async createTodo(...e){return ri(zn,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async updateTodo(...e){return ri(qn,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async deleteTodo(...e){return ri(Gn,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}}var hi={DAVNamespace:U,DAVNamespaceShort:V,DAVAttributeMap:B,...Object.freeze({__proto__:null,DAVClient:li,createDAVClient:ui}),...en,...hn,...Vn,...En,...kn,...Qn,...ci,...qr};export{B as DAVAttributeMap,li as DAVClient,U as DAVNamespace,V as DAVNamespaceShort,pn as addressBookMultiGet,fn as addressBookQuery,_n as calendarMultiGet,On as calendarQuery,$r as cleanupFalsy,an as collectionQuery,Bn as createAccount,Rn as createCalendarObject,ui as createDAVClient,Xr as createObject,zn as createTodo,mn as createVCard,Wr as davRequest,hi as default,Sn as deleteCalendarObject,Jr as deleteObject,Gn as deleteTodo,bn as deleteVCard,yn as fetchAddressBooks,xn as fetchCalendarObjects,Tn as fetchCalendarUserAddresses,Dn as fetchCalendars,ai as fetchOauthTokens,Yn as fetchTodos,gn as fetchVCards,Ln as freeBusyQuery,ni as getBasicAuthHeaders,ii as getBearerAuthHeaders,Mr as getDAVAttribute,si as getOauthHeaders,cn as isCollectionDirty,wn as makeAddressBook,Cn as makeCalendar,Qr as propfind,oi as refreshAccessToken,ln as smartCollectionSync,sn as supportedReportSet,Nn as syncCalendars,un as syncCollection,Hn as todoMultiGet,Kn as todoQuery,Fn as updateCalendarObject,Zr as updateObject,qn as updateTodo,vn as updateVCard,Vr as urlContains,Br as urlEquals}; diff --git a/dist/tsdav.min.mjs b/dist/tsdav.min.mjs index 70a4c915..12af0049 100644 --- a/dist/tsdav.min.mjs +++ b/dist/tsdav.min.mjs @@ -1 +1 @@ -import e from"debug";import t from"xml-js";import r from"cross-fetch";import{encode as a}from"base-64";var s;!function(e){e.CALENDAR_SERVER="http://calendarserver.org/ns/",e.CALDAV_APPLE="http://apple.com/ns/ical/",e.CALDAV="urn:ietf:params:xml:ns:caldav",e.CARDDAV="urn:ietf:params:xml:ns:carddav",e.DAV="DAV:"}(s||(s={}));const n={[s.CALDAV]:"xmlns:c",[s.CARDDAV]:"xmlns:card",[s.CALENDAR_SERVER]:"xmlns:cs",[s.CALDAV_APPLE]:"xmlns:ca",[s.DAV]:"xmlns:d"};var o,c;!function(e){e.CALDAV="c",e.CARDDAV="card",e.CALENDAR_SERVER="cs",e.CALDAV_APPLE="ca",e.DAV="d"}(o||(o={})),function(e){e.VEVENT="VEVENT",e.VTODO="VTODO",e.VJOURNAL="VJOURNAL",e.VFREEBUSY="VFREEBUSY",e.VTIMEZONE="VTIMEZONE",e.VALARM="VALARM"}(c||(c={}));const d="undefined"!=typeof globalThis&&"function"==typeof globalThis.fetch?globalThis.fetch.bind(globalThis):r,i=e=>{const t=Number(e);if(!Number.isNaN(t))return t;const r=e.toLowerCase();return"true"===r||"false"!==r&&e},l=(e,t)=>{if(!e&&!t)return!0;if(!e||!t)return!1;const r=e.trim(),a=t.trim();if(Math.abs(r.length-a.length)>1)return!1;const s="/"===r.slice(-1)?r.slice(0,-1):r,n="/"===a.slice(-1)?a.slice(0,-1):a;return e.includes(n)||t.includes(s)},h=(e,t)=>{if(!e&&!t)return!0;if(!e||!t)return!1;const r=e.trim(),a=t.trim(),s="/"===r.slice(-1)?r.slice(0,-1):r,n="/"===a.slice(-1)?a.slice(0,-1):a;return e.includes(n)||t.includes(s)},u=e=>e.reduce((e,t)=>({...e,[n[t]]:t}),{}),p=e=>Object.entries(e).reduce((e,[t,r])=>r?{...e,[t]:r}:e,{}),f=(e,t)=>t?{[e]:t}:{},v=(e,t)=>e?t&&0!==t.length?Object.fromEntries(Object.entries(e).filter(([e])=>!t.includes(e))):e:{};var O=Object.freeze({__proto__:null,cleanupFalsy:p,conditionalParam:f,excludeHeaders:v,getDAVAttribute:u,urlContains:h,urlEquals:l});const y=e("tsdav:request"),m=async e=>{var r;const{url:a,init:s,convertIncoming:n=!0,parseOutgoing:o=!0,fetchOptions:c={},fetch:l}=e,h=null!=l?l:d,{headers:u={},body:f,namespace:v,method:O,attributes:m}=s,A=n?t.js2xml({_declaration:{_attributes:{version:"1.0",encoding:"utf-8"}},...f,_attributes:m},{compact:!0,spaces:2,elementNameFn:e=>v&&!/^.+:.+/.test(e)?`${v}:${e}`:e}):f,g={...c};delete g.headers;const w=await h(a,{headers:{"Content-Type":"text/xml;charset=UTF-8",...p(u),...c.headers||{}},body:A,method:O,...g}),C=await w.text();if(!(w.ok&&(null===(r=w.headers.get("content-type"))||void 0===r?void 0:r.includes("xml"))&&o&&C))return[{href:w.url,ok:w.ok,status:w.status,statusText:w.statusText,raw:C}];const D=t.xml2js(C,{compact:!0,trim:!0,textFn:(e,t)=>{try{const r=t._parent,a=Object.keys(r),s=a[a.length-1],n=r[s];if(n.length>0){n[n.length-1]=i(e)}else r[s]=i(e)}catch(e){y(e.stack)}},elementNameFn:e=>e.replace(/^.+:/,"").replace(/([-_]\w)/g,e=>e[1].toUpperCase()),attributesFn:e=>{const t={...e};return delete t.xmlns,t},ignoreDeclaration:!0});return(Array.isArray(D.multistatus.response)?D.multistatus.response:[D.multistatus.response]).map(e=>{var t,r;if(!e)return{status:w.status,statusText:w.statusText,ok:w.ok};const a=/^\S+\s(?\d+)\s(?.+)$/.exec(e.status);return{raw:D,href:e.href,status:(null==a?void 0:a.groups)?Number.parseInt(null==a?void 0:a.groups.status,10):w.status,statusText:null!==(r=null===(t=null==a?void 0:a.groups)||void 0===t?void 0:t.statusText)&&void 0!==r?r:w.statusText,ok:!e.error,error:e.error,responsedescription:e.responsedescription,props:(Array.isArray(e.propstat)?e.propstat:[e.propstat]).reduce((e,t)=>({...e,...null==t?void 0:t.prop}),{})}})},A=async e=>{const{url:t,props:r,depth:a,headers:n,headersToExclude:c,fetchOptions:d={},fetch:i}=e;return m({url:t,init:{method:"PROPFIND",headers:v(p({depth:a,...n}),c),namespace:o.DAV,body:{propfind:{_attributes:u([s.CALDAV,s.CALDAV_APPLE,s.CALENDAR_SERVER,s.CARDDAV,s.DAV]),prop:r}}},fetchOptions:d,fetch:i})},g=async e=>{const{url:t,data:r,headers:a,headersToExclude:s,fetchOptions:n={},fetch:o}=e;return(null!=o?o:d)(t,{method:"PUT",body:r,headers:v(a,s),...n})},w=async e=>{const{url:t,data:r,etag:a,headers:s,headersToExclude:n,fetchOptions:o={},fetch:c}=e;return(null!=c?c:d)(t,{method:"PUT",body:r,headers:v(p({"If-Match":a,...s}),n),...o})},C=async e=>{const{url:t,headers:r,etag:a,headersToExclude:s,fetchOptions:n={},fetch:o}=e;return(null!=o?o:d)(t,{method:"DELETE",headers:v(p({"If-Match":a,...r}),s),...n})};var D=Object.freeze({__proto__:null,createObject:g,davRequest:m,deleteObject:C,propfind:A,updateObject:w});function b(e,t){const r=e=>t.every(t=>e[t]);return Array.isArray(e)?e.every(e=>r(e)):r(e)}const V=(e,t)=>t.reduce((t,r)=>e[r]?t:`${t.length?`${t},`:""}${r.toString()}`,""),$=e("tsdav:collection"),T=async e=>{const{url:t,body:r,depth:a,defaultNamespace:s=o.DAV,headers:n,headersToExclude:c,fetchOptions:d={},fetch:i}=e,l=await m({url:t,init:{method:"REPORT",headers:v(p({depth:a,...n}),c),namespace:s,body:r},fetchOptions:d,fetch:i}),h=l.find(e=>!e.ok||e.status&&e.status>=400);if(h)throw new Error(`Collection query failed: ${h.status} ${h.statusText}. ${h.raw?`Raw response: ${h.raw}`:""}`);return 1===l.length&&!l[0].raw&&l[0].status&&l[0].status<300?[]:l},E=async e=>{const{url:t,props:r,depth:a,headers:s,headersToExclude:n,fetchOptions:c={},fetch:d}=e;return m({url:t,init:{method:"MKCOL",headers:v(p({depth:a,...s}),n),namespace:o.DAV,body:r?{mkcol:{set:{prop:r}}}:void 0},fetchOptions:c,fetch:d})},k=async e=>{var t,r,a,s,n;const{collection:c,headers:d,headersToExclude:i,fetchOptions:l={},fetch:h}=e;return null!==(n=null===(s=null===(a=null===(r=null===(t=(await A({url:c.url,props:{[`${o.DAV}:supported-report-set`]:{}},depth:"0",headers:v(d,i),fetchOptions:l,fetch:h}))[0])||void 0===t?void 0:t.props)||void 0===r?void 0:r.supportedReportSet)||void 0===a?void 0:a.supportedReport)||void 0===s?void 0:s.map(e=>Object.keys(e.report)[0]))&&void 0!==n?n:[]},U=async e=>{var t,r,a;const{collection:s,headers:n,headersToExclude:c,fetchOptions:d={},fetch:i}=e,l=(await A({url:s.url,props:{[`${o.CALENDAR_SERVER}:getctag`]:{}},depth:"0",headers:v(n,c),fetchOptions:d,fetch:i})).filter(e=>h(s.url,e.href))[0];if(!l)throw new Error("Collection does not exist on server");return{isDirty:`${s.ctag}`!=`${null===(t=l.props)||void 0===t?void 0:t.getctag}`,newCtag:null===(a=null===(r=l.props)||void 0===r?void 0:r.getctag)||void 0===a?void 0:a.toString()}},_=e=>{const{url:t,props:r,headers:a,syncLevel:n,syncToken:c,headersToExclude:d,fetchOptions:i,fetch:l}=e;return m({url:t,init:{method:"REPORT",namespace:o.DAV,headers:v({...a},d),body:{"sync-collection":{_attributes:u([s.CALDAV,s.CARDDAV,s.DAV]),"sync-level":n,"sync-token":c,[`${o.DAV}:prop`]:r}}},fetchOptions:i,fetch:l})},R=async e=>{var t,r,a,s,n,c,d,i,l,u,p,f;const{collection:O,method:y,headers:m,headersToExclude:A,account:g,detailedResult:w,fetchOptions:C={},fetch:D}=e,T=["accountType","homeUrl"];if(!g||!b(g,T)){if(!g)throw new Error("no account for smartCollectionSync");throw new Error(`account must have ${V(g,T)} before smartCollectionSync`)}const E=null!=y?y:(null===(t=O.reports)||void 0===t?void 0:t.includes("syncCollection"))?"webdav":"basic";if($(`smart collection sync with type ${g.accountType} and method ${E}`),"webdav"===E){const e=await _({url:O.url,props:{[`${o.DAV}:getetag`]:{},[`${"caldav"===g.accountType?o.CALDAV:o.CARDDAV}:${"caldav"===g.accountType?"calendar-data":"address-data"}`]:{},[`${o.DAV}:displayname`]:{}},syncLevel:1,syncToken:O.syncToken,headers:v(m,A),fetchOptions:C,fetch:D}),t=e.filter(e=>{var t;const r="caldav"===g.accountType?".ics":".vcf";return(null===(t=e.href)||void 0===t?void 0:t.slice(-4))===r}),l=t.filter(e=>404!==e.status).map(e=>e.href),u=t.filter(e=>404===e.status).map(e=>e.href),p=(l.length&&null!==(a=await(null===(r=null==O?void 0:O.objectMultiGet)||void 0===r?void 0:r.call(O,{url:O.url,props:{[`${o.DAV}:getetag`]:{},[`${"caldav"===g.accountType?o.CALDAV:o.CARDDAV}:${"caldav"===g.accountType?"calendar-data":"address-data"}`]:{}},objectUrls:l,depth:"1",headers:v(m,A),fetchOptions:C,fetch:D})))&&void 0!==a?a:[]).map(e=>{var t,r,a,s,n,o,c,d,i,l;return{url:null!==(t=e.href)&&void 0!==t?t:"",etag:null===(r=e.props)||void 0===r?void 0:r.getetag,data:"caldav"===(null==g?void 0:g.accountType)?null!==(n=null===(s=null===(a=e.props)||void 0===a?void 0:a.calendarData)||void 0===s?void 0:s._cdata)&&void 0!==n?n:null===(o=e.props)||void 0===o?void 0:o.calendarData:null!==(i=null===(d=null===(c=e.props)||void 0===c?void 0:c.addressData)||void 0===d?void 0:d._cdata)&&void 0!==i?i:null===(l=e.props)||void 0===l?void 0:l.addressData}}),f=null!==(s=O.objects)&&void 0!==s?s:[],y=p.filter(e=>f.every(t=>!h(t.url,e.url))),b=f.reduce((e,t)=>{const r=p.find(e=>h(e.url,t.url));return r&&r.etag&&r.etag!==t.etag?[...e,r]:e},[]),V=u.map(e=>({url:e,etag:""})),$=f.filter(e=>p.some(t=>h(e.url,t.url)&&t.etag===e.etag));return{...O,objects:w?{created:y,updated:b,deleted:V}:[...$,...y,...b],syncToken:null!==(i=null===(d=null===(c=null===(n=e[0])||void 0===n?void 0:n.raw)||void 0===c?void 0:c.multistatus)||void 0===d?void 0:d.syncToken)&&void 0!==i?i:O.syncToken}}if("basic"===E){const{isDirty:e,newCtag:t}=await U({collection:O,headers:v(m,A),fetchOptions:C,fetch:D}),r=null!==(l=O.objects)&&void 0!==l?l:[],a=null!==(f=await(null===(p=(u=O).fetchObjects)||void 0===p?void 0:p.call(u,{collection:O,headers:v(m,A),fetchOptions:C,fetch:D})))&&void 0!==f?f:[],s=a.filter(e=>r.every(t=>!h(t.url,e.url))),n=r.reduce((e,t)=>{const r=a.find(e=>h(e.url,t.url));return r&&r.etag&&r.etag!==t.etag?[...e,r]:e},[]),o=r.filter(e=>a.every(t=>!h(t.url,e.url))),c=r.filter(e=>a.some(t=>h(e.url,t.url)&&t.etag===e.etag));if(e)return{...O,objects:w?{created:s,updated:n,deleted:o}:[...c,...s,...n],ctag:t}}return w?{...O,objects:{created:[],updated:[],deleted:[]}}:O};var x=Object.freeze({__proto__:null,collectionQuery:T,isCollectionDirty:U,makeCollection:E,smartCollectionSync:R,supportedReportSet:k,syncCollection:_});const L=e("tsdav:addressBook"),j=async e=>{const{url:t,props:r,filters:a,depth:n,headers:c,headersToExclude:d,fetchOptions:i={},fetch:l}=e;return T({url:t,body:{"addressbook-query":p({_attributes:u([s.CARDDAV,s.DAV]),[`${o.DAV}:prop`]:r,filter:null!=a?a:{"prop-filter":{_attributes:{name:"FN"}}}})},defaultNamespace:o.CARDDAV,depth:n,headers:v(c,d),fetchOptions:i,fetch:l})},S=async e=>{const{url:t,props:r,objectUrls:a,depth:n,headers:c,headersToExclude:d,fetchOptions:i={},fetch:l}=e;return T({url:t,body:{"addressbook-multiget":p({_attributes:u([s.DAV,s.CARDDAV]),[`${o.DAV}:prop`]:r,[`${o.DAV}:href`]:a})},defaultNamespace:o.CARDDAV,depth:n,headers:v(c,d),fetchOptions:i,fetch:l})},H=async e=>{const{account:t,headers:r,props:a,headersToExclude:s,fetchOptions:n={},fetch:c}=null!=e?e:{},d=["homeUrl","rootUrl"];if(!t||!b(t,d)){if(!t)throw new Error("no account for fetchAddressBooks");throw new Error(`account must have ${V(t,d)} before fetchAddressBooks`)}const i=await A({url:t.homeUrl,props:null!=a?a:{[`${o.DAV}:displayname`]:{},[`${o.CALENDAR_SERVER}:getctag`]:{},[`${o.DAV}:resourcetype`]:{},[`${o.DAV}:sync-token`]:{}},depth:"1",headers:v(r,s),fetchOptions:n,fetch:c});return Promise.all(i.filter(e=>{var t,r;return Object.keys(null!==(r=null===(t=e.props)||void 0===t?void 0:t.resourcetype)&&void 0!==r?r:{}).includes("addressbook")}).map(e=>{var r,a,s,n,o,c,d,i,l;const h=null!==(s=null===(a=null===(r=e.props)||void 0===r?void 0:r.displayname)||void 0===a?void 0:a._cdata)&&void 0!==s?s:null===(n=e.props)||void 0===n?void 0:n.displayname;return L(`Found address book named ${"string"==typeof h?h:""},\n props: ${JSON.stringify(e.props)}`),{url:new URL(null!==(o=e.href)&&void 0!==o?o:"",null!==(c=t.rootUrl)&&void 0!==c?c:"").href,ctag:null===(d=e.props)||void 0===d?void 0:d.getctag,displayName:"string"==typeof h?h:"",resourcetype:Object.keys(null===(i=e.props)||void 0===i?void 0:i.resourcetype),syncToken:null===(l=e.props)||void 0===l?void 0:l.syncToken}}).map(async e=>({...e,reports:await k({collection:e,headers:v(r,s),fetchOptions:n,fetch:c})})))},N=async e=>{const{addressBook:t,headers:r,objectUrls:a,headersToExclude:s,urlFilter:n=e=>e,useMultiGet:c=!0,fetchOptions:d={},fetch:i}=e;L(`Fetching vcards from ${null==t?void 0:t.url}`);const h=["url"];if(!t||!b(t,h)){if(!t)throw new Error("cannot fetchVCards for undefined addressBook");throw new Error(`addressBook must have ${V(t,h)} before fetchVCards`)}const u=(null!=a?a:(await j({url:t.url,props:{[`${o.DAV}:getetag`]:{}},depth:"1",headers:v(r,s),fetchOptions:d,fetch:i})).map(e=>{var t;return null!==(t=e.href)&&void 0!==t?t:""})).map(e=>e.startsWith("http")||!e?e:new URL(e,t.url).href).filter(e=>e&&!l(e,t.url)).filter(n).map(e=>new URL(e).pathname);let p=[];return u.length>0&&(p=c?await S({url:t.url,props:{[`${o.DAV}:getetag`]:{},[`${o.CARDDAV}:address-data`]:{}},objectUrls:u,depth:"1",headers:v(r,s),fetchOptions:d,fetch:i}):await j({url:t.url,props:{[`${o.DAV}:getetag`]:{},[`${o.CARDDAV}:address-data`]:{}},depth:"1",headers:v(r,s),fetchOptions:d,fetch:i})),p.map(e=>{var r,a,s,n,o,c;return{url:new URL(null!==(r=e.href)&&void 0!==r?r:"",t.url).href,etag:null===(a=e.props)||void 0===a?void 0:a.getetag,data:null!==(o=null===(n=null===(s=e.props)||void 0===s?void 0:s.addressData)||void 0===n?void 0:n._cdata)&&void 0!==o?o:null===(c=e.props)||void 0===c?void 0:c.addressData}})},P=async e=>{const{addressBook:t,vCardString:r,filename:a,headers:s,headersToExclude:n,fetchOptions:o={},fetch:c}=e;return g({url:new URL(a,t.url).href,data:r,headers:v({"content-type":"text/vcard; charset=utf-8","If-None-Match":"*",...s},n),fetchOptions:o,fetch:c})},B=async e=>{const{vCard:t,headers:r,headersToExclude:a,fetchOptions:s={},fetch:n}=e;return w({url:t.url,data:t.data,etag:t.etag,headers:v({"content-type":"text/vcard; charset=utf-8",...r},a),fetchOptions:s,fetch:n})},F=async e=>{const{vCard:t,headers:r,headersToExclude:a,fetchOptions:s={},fetch:n}=e;return C({url:t.url,etag:t.etag,headers:v(r,a),fetchOptions:s,fetch:n})};var I=Object.freeze({__proto__:null,addressBookMultiGet:S,addressBookQuery:j,createVCard:P,deleteVCard:F,fetchAddressBooks:H,fetchVCards:N,updateVCard:B});const M=e("tsdav:calendar"),z=async e=>{var t,r,a;const{account:s,headers:n,headersToExclude:c,fetchOptions:d={},fetch:i}=e,l=["principalUrl","rootUrl"];if(!b(s,l))throw new Error(`account must have ${V(s,l)} before fetchUserAddresses`);M(`Fetch user addresses from ${s.principalUrl}`);const u=(await A({url:s.principalUrl,props:{[`${o.CALDAV}:calendar-user-address-set`]:{}},depth:"0",headers:v(n,c),fetchOptions:d,fetch:i})).find(e=>h(s.principalUrl,e.href));if(!u||!u.ok)throw new Error("cannot find calendarUserAddresses");const p=(null===(a=null===(r=null===(t=null==u?void 0:u.props)||void 0===t?void 0:t.calendarUserAddressSet)||void 0===r?void 0:r.href)||void 0===a?void 0:a.filter(Boolean))||[];return M(`Fetched calendar user addresses ${p}`),p},Z=async e=>{const{url:t,props:r,filters:a,timezone:n,depth:c,headers:d,headersToExclude:i,fetchOptions:l={},fetch:h}=e;return T({url:t,body:{"calendar-query":p({_attributes:u([s.CALDAV,s.CALENDAR_SERVER,s.CALDAV_APPLE,s.DAV]),[`${o.DAV}:prop`]:r,filter:a,timezone:n})},defaultNamespace:o.CALDAV,depth:c,headers:v(d,i),fetchOptions:l,fetch:h})},q=async e=>{const{url:t,props:r,objectUrls:a,filters:n,timezone:c,depth:d,headers:i,headersToExclude:l,fetchOptions:h={},fetch:f}=e;return T({url:t,body:{"calendar-multiget":p({_attributes:u([s.DAV,s.CALDAV]),[`${o.DAV}:prop`]:r,[`${o.DAV}:href`]:a,filter:n,timezone:c})},defaultNamespace:o.CALDAV,depth:d,headers:v(i,l),fetchOptions:h,fetch:f})},G=async e=>{const{url:t,props:r,depth:a,headers:n,headersToExclude:c,fetchOptions:d={},fetch:i}=e;return m({url:t,init:{method:"MKCALENDAR",headers:v(p({depth:a,...n}),c),namespace:o.DAV,body:{[`${o.CALDAV}:mkcalendar`]:{_attributes:u([s.DAV,s.CALDAV,s.CALDAV_APPLE]),set:{prop:r}}}},fetchOptions:d,fetch:i})},Q=async e=>{const{headers:t,account:r,props:a,projectedProps:s,headersToExclude:n,fetchOptions:d={},fetch:i}=null!=e?e:{},l=["homeUrl","rootUrl"];if(!r||!b(r,l)){if(!r)throw new Error("no account for fetchCalendars");throw new Error(`account must have ${V(r,l)} before fetchCalendars`)}const h=await A({url:r.homeUrl,props:null!=a?a:{[`${o.CALDAV}:calendar-description`]:{},[`${o.CALDAV}:calendar-timezone`]:{},[`${o.DAV}:displayname`]:{},[`${o.CALDAV_APPLE}:calendar-color`]:{},[`${o.CALENDAR_SERVER}:getctag`]:{},[`${o.DAV}:resourcetype`]:{},[`${o.CALDAV}:supported-calendar-component-set`]:{},[`${o.DAV}:sync-token`]:{}},depth:"1",headers:v(t,n),fetchOptions:d,fetch:i});return Promise.all(h.filter(e=>{var t,r;return Object.keys(null!==(r=null===(t=e.props)||void 0===t?void 0:t.resourcetype)&&void 0!==r?r:{}).includes("calendar")}).filter(e=>{var t,r,a,s,n,o;return(Array.isArray(null===(r=null===(t=e.props)||void 0===t?void 0:t.supportedCalendarComponentSet)||void 0===r?void 0:r.comp)?null===(a=e.props)||void 0===a?void 0:a.supportedCalendarComponentSet.comp.map(e=>e._attributes.name):[null===(o=null===(n=null===(s=e.props)||void 0===s?void 0:s.supportedCalendarComponentSet)||void 0===n?void 0:n.comp)||void 0===o?void 0:o._attributes.name]).some(e=>Object.values(c).includes(e))}).map(e=>{var t,a,n,o,c,d,i,l,h,u,p,v,O,y,m,A;const g=null===(t=e.props)||void 0===t?void 0:t.calendarDescription,w=null===(a=e.props)||void 0===a?void 0:a.calendarTimezone;return{description:"string"==typeof g?g:"",timezone:"string"==typeof w?w:"",url:new URL(null!==(n=e.href)&&void 0!==n?n:"",null!==(o=r.rootUrl)&&void 0!==o?o:"").href,ctag:null===(c=e.props)||void 0===c?void 0:c.getctag,calendarColor:null===(d=e.props)||void 0===d?void 0:d.calendarColor,displayName:null!==(l=null===(i=e.props)||void 0===i?void 0:i.displayname._cdata)&&void 0!==l?l:null===(h=e.props)||void 0===h?void 0:h.displayname,components:Array.isArray(null===(u=e.props)||void 0===u?void 0:u.supportedCalendarComponentSet.comp)?null===(p=e.props)||void 0===p?void 0:p.supportedCalendarComponentSet.comp.map(e=>e._attributes.name):[null===(O=null===(v=e.props)||void 0===v?void 0:v.supportedCalendarComponentSet.comp)||void 0===O?void 0:O._attributes.name],resourcetype:Object.keys(null===(y=e.props)||void 0===y?void 0:y.resourcetype),syncToken:null===(m=e.props)||void 0===m?void 0:m.syncToken,...f("projectedProps",Object.fromEntries(Object.entries(null!==(A=e.props)&&void 0!==A?A:{}).filter(([e])=>null==s?void 0:s[e])))}}).map(async e=>({...e,reports:await k({collection:e,headers:v(t,n),fetchOptions:d,fetch:i})})))},J=async e=>{const{calendar:t,objectUrls:r,filters:a,timeRange:s,headers:n,expand:c,urlFilter:d=e=>Boolean(null==e?void 0:e.includes(".ics")),useMultiGet:i=!0,headersToExclude:l,fetchOptions:h={},fetch:u}=e;if(s){const e=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,t=/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i;if(!(e.test(s.start)&&e.test(s.end)||t.test(s.start)&&t.test(s.end)))throw new Error("invalid timeRange format, not in ISO8601")}M(`Fetching calendar objects from ${null==t?void 0:t.url}`);const p=["url"];if(!t||!b(t,p)){if(!t)throw new Error("cannot fetchCalendarObjects for undefined calendar");throw new Error(`calendar must have ${V(t,p)} before fetchCalendarObjects`)}const f=null!=a?a:[{"comp-filter":{_attributes:{name:"VCALENDAR"},"comp-filter":{_attributes:{name:"VEVENT"},...s?{"time-range":{_attributes:{start:`${new Date(s.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(s.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}}}];let O=[];const y=(null!=r?r:(O=await Z({url:t.url,props:{[`${o.DAV}:getetag`]:{},...c&&s?{[`${o.CALDAV}:calendar-data`]:{[`${o.CALDAV}:expand`]:{_attributes:{start:`${new Date(s.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(s.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}}:{}},filters:f,depth:"1",headers:v(n,l),fetchOptions:h,fetch:u})).map(e=>{var t;return null!==(t=e.href)&&void 0!==t?t:""})).map(e=>e.startsWith("http")||!e?e:new URL(e,t.url).href).filter(d).map(e=>new URL(e).pathname);let m=[];return y.length>0&&(m=c&&!r?O.filter(e=>{var r,a;const s=(null!==(r=e.href)&&void 0!==r?r:"").startsWith("http")?e.href:new URL(null!==(a=e.href)&&void 0!==a?a:"",t.url).href;return d(null!=s?s:"")}):i?await q({url:t.url,props:{[`${o.DAV}:getetag`]:{},[`${o.CALDAV}:calendar-data`]:{...c&&s?{[`${o.CALDAV}:expand`]:{_attributes:{start:`${new Date(s.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(s.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}},objectUrls:y,depth:"1",headers:v(n,l),fetchOptions:h,fetch:u}):await Z({url:t.url,props:{[`${o.DAV}:getetag`]:{},[`${o.CALDAV}:calendar-data`]:{...c&&s?{[`${o.CALDAV}:expand`]:{_attributes:{start:`${new Date(s.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(s.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}},filters:f,depth:"1",headers:v(n,l),fetchOptions:h,fetch:u})),m.map(e=>{var r,a,s,n,o,c;return{url:new URL(null!==(r=e.href)&&void 0!==r?r:"",t.url).href,etag:`${null===(a=e.props)||void 0===a?void 0:a.getetag}`,data:null!==(o=null===(n=null===(s=e.props)||void 0===s?void 0:s.calendarData)||void 0===n?void 0:n._cdata)&&void 0!==o?o:null===(c=e.props)||void 0===c?void 0:c.calendarData}})},W=async e=>{const{calendar:t,iCalString:r,filename:a,headers:s,headersToExclude:n,fetchOptions:o={},fetch:c}=e;return g({url:new URL(a,t.url).href,data:r,headers:v({"content-type":"text/calendar; charset=utf-8","If-None-Match":"*",...s},n),fetchOptions:o,fetch:c})},K=async e=>{const{calendarObject:t,headers:r,headersToExclude:a,fetchOptions:s={},fetch:n}=e;return w({url:t.url,data:t.data,etag:t.etag,headers:v({"content-type":"text/calendar; charset=utf-8",...r},a),fetchOptions:s,fetch:n})},Y=async e=>{const{calendarObject:t,headers:r,headersToExclude:a,fetchOptions:s={},fetch:n}=e;return C({url:t.url,etag:t.etag,headers:v(r,a),fetchOptions:s,fetch:n})},X=async e=>{var t;const{oldCalendars:r,account:a,detailedResult:s,headers:n,headersToExclude:o,fetchOptions:c={},fetch:d}=e;if(!a)throw new Error("Must have account before syncCalendars");const i=null!==(t=null!=r?r:a.calendars)&&void 0!==t?t:[],l=await Q({account:a,headers:v(n,o),fetchOptions:c,fetch:d}),u=l.filter(e=>i.every(t=>!h(t.url,e.url)));M(`new calendars: ${u.map(e=>e.displayName)}`);const p=i.reduce((e,t)=>{const r=l.find(e=>h(e.url,t.url));return r&&(r.syncToken&&`${r.syncToken}`!=`${t.syncToken}`||r.ctag&&`${r.ctag}`!=`${t.ctag}`)?[...e,r]:e},[]);M(`updated calendars: ${p.map(e=>e.displayName)}`);const f=await Promise.all(p.map(async e=>await R({collection:{...e,objectMultiGet:q},method:"webdav",headers:v(n,o),account:a,fetchOptions:c,fetch:d}))),O=i.filter(e=>l.every(t=>!h(t.url,e.url)));M(`deleted calendars: ${O.map(e=>e.displayName)}`);const y=i.filter(e=>l.some(t=>h(t.url,e.url)&&(t.syncToken&&`${t.syncToken}`!=`${e.syncToken}`||t.ctag&&`${t.ctag}`!=`${e.ctag}`)));return s?{created:u,updated:p,deleted:O}:[...y,...u,...f]},ee=async e=>{const{url:t,timeRange:r,depth:a,headers:n,headersToExclude:c,fetchOptions:d={},fetch:i}=e;if(!r)throw new Error("timeRange is required");{const e=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,t=/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i;if(!(e.test(r.start)&&e.test(r.end)||t.test(r.start)&&t.test(r.end)))throw new Error("invalid timeRange format, not in ISO8601")}return(await T({url:t,body:{"free-busy-query":p({_attributes:u([s.CALDAV]),[`${o.CALDAV}:time-range`]:{_attributes:{start:`${new Date(r.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(r.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}})},defaultNamespace:o.CALDAV,depth:a,headers:v(n,c),fetchOptions:d,fetch:i}))[0]};var te=Object.freeze({__proto__:null,calendarMultiGet:q,calendarQuery:Z,createCalendarObject:W,deleteCalendarObject:Y,fetchCalendarObjects:J,fetchCalendarUserAddresses:z,fetchCalendars:Q,freeBusyQuery:ee,makeCalendar:G,syncCalendars:X,updateCalendarObject:K});const re=e("tsdav:account"),ae=async e=>{var t,r;re("Service discovery...");const{account:a,headers:s,headersToExclude:n,fetchOptions:o={},fetch:c}=e,i=null!=c?c:d,l=new URL(a.serverUrl),h=new URL(`/.well-known/${a.accountType}`,l);h.protocol=null!==(t=l.protocol)&&void 0!==t?t:"http";try{const e=await i(h.href,{headers:{...v(s,n),"Content-Type":"text/xml;charset=UTF-8"},method:"PROPFIND",body:'\n\n \n \n \n',redirect:"manual",...o});if(e.status>=300&&e.status<400){const t=e.headers.get("Location");if("string"==typeof t&&t.length){re(`Service discovery redirected to ${t}`);const e=new URL(t,l);return e.hostname===h.hostname&&h.port&&!e.port&&(e.port=h.port),e.protocol=null!==(r=l.protocol)&&void 0!==r?r:"http",e.href}}}catch(e){re(`Service discovery failed: ${e.stack}`)}return l.href},se=async e=>{var t,r,a,s,n;const{account:c,headers:d,headersToExclude:i,fetchOptions:l={},fetch:h}=e,u=["rootUrl"];if(!b(c,u))throw new Error(`account must have ${V(c,u)} before fetchPrincipalUrl`);re(`Fetching principal url from path ${c.rootUrl}`);const[p]=await A({url:c.rootUrl,props:{[`${o.DAV}:current-user-principal`]:{}},depth:"0",headers:v(d,i),fetchOptions:l,fetch:h});if(!p.ok&&(re(`Fetch principal url failed: ${p.statusText}`),401===p.status))throw new Error("Invalid credentials");return re(`Fetched principal url ${null===(r=null===(t=p.props)||void 0===t?void 0:t.currentUserPrincipal)||void 0===r?void 0:r.href}`),new URL(null!==(n=null===(s=null===(a=p.props)||void 0===a?void 0:a.currentUserPrincipal)||void 0===s?void 0:s.href)&&void 0!==n?n:"",c.rootUrl).href},ne=async e=>{var t,r;const{account:a,headers:s,headersToExclude:n,fetchOptions:c={},fetch:d}=e,i=["principalUrl","rootUrl"];if(!b(a,i))throw new Error(`account must have ${V(a,i)} before fetchHomeUrl`);re(`Fetch home url from ${a.principalUrl}`);const l=await A({url:a.principalUrl,props:"caldav"===a.accountType?{[`${o.CALDAV}:calendar-home-set`]:{}}:{[`${o.CARDDAV}:addressbook-home-set`]:{}},depth:"0",headers:v(s,n),fetchOptions:c,fetch:d}),u=l.find(e=>h(a.principalUrl,e.href));if(!u||!u.ok)throw re(`Fetch home url failed with status ${null==u?void 0:u.statusText} and error ${JSON.stringify(l.map(e=>e.error))}`),new Error("cannot find homeUrl");const p=new URL("caldav"===a.accountType?null===(t=null==u?void 0:u.props)||void 0===t?void 0:t.calendarHomeSet.href:null===(r=null==u?void 0:u.props)||void 0===r?void 0:r.addressbookHomeSet.href,a.rootUrl).href;return re(`Fetched home url ${p}`),p},oe=async e=>{const{account:t,headers:r,loadCollections:a=!1,loadObjects:s=!1,headersToExclude:n,fetchOptions:o={},fetch:c}=e,d={...t};return d.rootUrl=await ae({account:t,headers:v(r,n),fetchOptions:o,fetch:c}),d.principalUrl=await se({account:d,headers:v(r,n),fetchOptions:o,fetch:c}),d.homeUrl=await ne({account:d,headers:v(r,n),fetchOptions:o,fetch:c}),(a||s)&&("caldav"===t.accountType?d.calendars=await Q({headers:v(r,n),account:d,fetchOptions:o,fetch:c}):"carddav"===t.accountType&&(d.addressBooks=await H({headers:v(r,n),account:d,fetchOptions:o,fetch:c}))),s&&("caldav"===t.accountType&&d.calendars?d.calendars=await Promise.all(d.calendars.map(async e=>({...e,objects:await J({calendar:e,headers:v(r,n),fetchOptions:o,fetch:c})}))):"carddav"===t.accountType&&d.addressBooks&&(d.addressBooks=await Promise.all(d.addressBooks.map(async e=>({...e,objects:await N({addressBook:e,headers:v(r,n),fetchOptions:o,fetch:c})}))))),d};var ce=Object.freeze({__proto__:null,createAccount:oe,fetchHomeUrl:ne,fetchPrincipalUrl:se,serviceDiscovery:ae});const de=e("tsdav:authHelper"),ie=(e,t)=>(...r)=>e({...t,...r[0]}),le=e=>(de(`Basic auth token generated: ${a(`${e.username}:${e.password}`)}`),{authorization:`Basic ${a(`${e.username}:${e.password}`)}`}),he=e=>({authorization:`Bearer ${e.accessToken}`}),ue=async(e,t,r)=>{const a=["authorizationCode","redirectUrl","clientId","clientSecret","tokenUrl"];if(!b(e,a))throw new Error(`Oauth credentials missing: ${V(e,a)}`);const s=new URLSearchParams({grant_type:"authorization_code",code:e.authorizationCode,redirect_uri:e.redirectUrl,client_id:e.clientId,client_secret:e.clientSecret});de(e.tokenUrl),de(s.toString());const n=null!=r?r:d,o=await n(e.tokenUrl,{method:"POST",body:s.toString(),headers:{"content-length":`${s.toString().length}`,"content-type":"application/x-www-form-urlencoded"},...null!=t?t:{}});if(o.ok){return await o.json()}return de(`Fetch Oauth tokens failed: ${await o.text()}`),{}},pe=async(e,t,r)=>{const a=["refreshToken","clientId","clientSecret","tokenUrl"];if(!b(e,a))throw new Error(`Oauth credentials missing: ${V(e,a)}`);const s=new URLSearchParams({client_id:e.clientId,client_secret:e.clientSecret,refresh_token:e.refreshToken,grant_type:"refresh_token"}),n=null!=r?r:d,o=await n(e.tokenUrl,{method:"POST",body:s.toString(),headers:{"Content-Type":"application/x-www-form-urlencoded"},...null!=t?t:{}});if(o.ok){return await o.json()}return de(`Refresh access token failed: ${await o.text()}`),{}},fe=async(e,t,r)=>{var a;de("Fetching oauth headers");let s={};return e.refreshToken?(e.refreshToken&&!e.accessToken||Date.now()>(null!==(a=e.expiration)&&void 0!==a?a:0))&&(s=await pe(e,t,r)):s=await ue(e,t,r),de(`Oauth tokens fetched: ${s.access_token}`),{tokens:s,headers:{authorization:`Bearer ${s.access_token}`}}};var ve=Object.freeze({__proto__:null,defaultParam:ie,fetchOauthTokens:ue,getBasicAuthHeaders:le,getBearerAuthHeaders:he,getOauthHeaders:fe,refreshAccessToken:pe});const Oe=async e=>{var t;const{serverUrl:r,credentials:a,authMethod:s,defaultAccountType:n,authFunction:o,fetch:c}=e;let d={};switch(s){case"Basic":d=le(a);break;case"Bearer":d=he(a);break;case"Oauth":d=(await fe(a,void 0,c)).headers;break;case"Digest":d={Authorization:`Digest ${a.digestString}`};break;case"Custom":d=null!==(t=await(null==o?void 0:o(a)))&&void 0!==t?t:{};break;default:throw new Error("Invalid auth method")}const i=n?await oe({account:{serverUrl:r,credentials:a,accountType:n},headers:d,fetch:c}):void 0,l=ie(g,{url:r,headers:d,fetch:c}),h=ie(w,{headers:d,url:r,fetch:c}),u=ie(C,{headers:d,url:r,fetch:c}),p=ie(A,{headers:d,fetch:c}),f=ie(T,{headers:d,fetch:c}),v=ie(E,{headers:d,fetch:c}),O=ie(_,{headers:d,fetch:c}),y=ie(k,{headers:d,fetch:c}),D=ie(U,{headers:d,fetch:c}),b=ie(R,{headers:d,account:i,fetch:c}),V=ie(Z,{headers:d,fetch:c}),$=ie(q,{headers:d,fetch:c}),x=ie(G,{headers:d,fetch:c}),L=ie(Q,{headers:d,account:i,fetch:c}),I=ie(z,{headers:d,account:i,fetch:c}),M=ie(J,{headers:d,fetch:c}),ee=ie(W,{headers:d,fetch:c}),te=ie(K,{headers:d,fetch:c}),re=ie(Y,{headers:d,fetch:c}),ae=ie(X,{account:i,headers:d,fetch:c}),se=ie(j,{headers:d,fetch:c}),ne=ie(S,{headers:d,fetch:c});return{davRequest:async e=>{const{init:t,fetch:r,...a}=e,{headers:s,...n}=t;return m({...a,init:{...n,headers:{...d,...s}},fetch:null!=r?r:c})},propfind:p,createAccount:async e=>{const{account:t,headers:s,loadCollections:n,loadObjects:o,fetch:i}=e;return oe({account:{serverUrl:r,credentials:a,...t},headers:{...d,...s},loadCollections:n,loadObjects:o,fetch:null!=i?i:c})},createObject:l,updateObject:h,deleteObject:u,calendarQuery:V,addressBookQuery:se,collectionQuery:f,makeCollection:v,calendarMultiGet:$,makeCalendar:x,syncCollection:O,supportedReportSet:y,isCollectionDirty:D,smartCollectionSync:b,fetchCalendars:L,fetchCalendarUserAddresses:I,fetchCalendarObjects:M,createCalendarObject:ee,updateCalendarObject:te,deleteCalendarObject:re,syncCalendars:ae,fetchAddressBooks:ie(H,{account:i,headers:d,fetch:c}),addressBookMultiGet:ne,fetchVCards:ie(N,{headers:d,fetch:c}),createVCard:ie(P,{headers:d,fetch:c}),updateVCard:ie(B,{headers:d,fetch:c}),deleteVCard:ie(F,{headers:d,fetch:c})}};class ye{constructor(e){var t,r,a;this.serverUrl=e.serverUrl,this.credentials=e.credentials,this.authMethod=null!==(t=e.authMethod)&&void 0!==t?t:"Basic",this.accountType=null!==(r=e.defaultAccountType)&&void 0!==r?r:"caldav",this.authFunction=e.authFunction,this.fetchOptions=null!==(a=e.fetchOptions)&&void 0!==a?a:{},this.fetchOverride=e.fetch}async login(){var e;switch(this.authMethod){case"Basic":this.authHeaders=le(this.credentials);break;case"Bearer":this.authHeaders=he(this.credentials);break;case"Oauth":this.authHeaders=(await fe(this.credentials,this.fetchOptions,this.fetchOverride)).headers;break;case"Digest":this.authHeaders={Authorization:`Digest ${this.credentials.digestString}`};break;case"Custom":this.authHeaders=await(null===(e=this.authFunction)||void 0===e?void 0:e.call(this,this.credentials));break;default:throw new Error("Invalid auth method")}this.account=this.accountType?await oe({account:{serverUrl:this.serverUrl,credentials:this.credentials,accountType:this.accountType},headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride}):void 0}async davRequest(e){const{init:t,fetch:r,...a}=e,{headers:s,...n}=t;return m({...a,init:{...n,headers:{...this.authHeaders,...s}},fetchOptions:this.fetchOptions,fetch:null!=r?r:this.fetchOverride})}async createObject(...e){return ie(g,{url:this.serverUrl,headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async updateObject(...e){return ie(w,{url:this.serverUrl,headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async deleteObject(...e){return ie(C,{url:this.serverUrl,headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async propfind(...e){return ie(A,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async createAccount(e){const{account:t,headers:r,loadCollections:a,loadObjects:s,fetchOptions:n,fetch:o}=e;return oe({account:{serverUrl:this.serverUrl,credentials:this.credentials,...t},headers:{...this.authHeaders,...r},loadCollections:a,loadObjects:s,fetchOptions:null!=n?n:this.fetchOptions,fetch:null!=o?o:this.fetchOverride})}async collectionQuery(...e){return ie(T,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async makeCollection(...e){return ie(E,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async syncCollection(...e){return ie(_,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async supportedReportSet(...e){return ie(k,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async isCollectionDirty(...e){return ie(U,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async smartCollectionSync(...e){return ie(R,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride,account:this.account})(e[0])}async calendarQuery(...e){return ie(Z,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async makeCalendar(...e){return ie(G,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async calendarMultiGet(...e){return ie(q,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async fetchCalendars(...e){return ie(Q,{headers:this.authHeaders,account:this.account,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(null==e?void 0:e[0])}async fetchCalendarUserAddresses(...e){return ie(z,{headers:this.authHeaders,account:this.account,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(null==e?void 0:e[0])}async fetchCalendarObjects(...e){return ie(J,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async createCalendarObject(...e){return ie(W,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async updateCalendarObject(...e){return ie(K,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async deleteCalendarObject(...e){return ie(Y,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async syncCalendars(...e){return ie(X,{headers:this.authHeaders,account:this.account,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async addressBookQuery(...e){return ie(j,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async addressBookMultiGet(...e){return ie(S,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async fetchAddressBooks(...e){return ie(H,{headers:this.authHeaders,account:this.account,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(null==e?void 0:e[0])}async fetchVCards(...e){return ie(N,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async createVCard(...e){return ie(P,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async updateVCard(...e){return ie(B,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async deleteVCard(...e){return ie(F,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}}var me={DAVNamespace:s,DAVNamespaceShort:o,DAVAttributeMap:n,...Object.freeze({__proto__:null,DAVClient:ye,createDAVClient:Oe}),...D,...x,...ce,...I,...te,...ve,...O};export{n as DAVAttributeMap,ye as DAVClient,s as DAVNamespace,o as DAVNamespaceShort,S as addressBookMultiGet,j as addressBookQuery,q as calendarMultiGet,Z as calendarQuery,p as cleanupFalsy,T as collectionQuery,oe as createAccount,W as createCalendarObject,Oe as createDAVClient,g as createObject,P as createVCard,m as davRequest,me as default,Y as deleteCalendarObject,C as deleteObject,F as deleteVCard,H as fetchAddressBooks,J as fetchCalendarObjects,z as fetchCalendarUserAddresses,Q as fetchCalendars,ue as fetchOauthTokens,N as fetchVCards,ee as freeBusyQuery,le as getBasicAuthHeaders,he as getBearerAuthHeaders,u as getDAVAttribute,fe as getOauthHeaders,U as isCollectionDirty,G as makeCalendar,A as propfind,pe as refreshAccessToken,R as smartCollectionSync,k as supportedReportSet,X as syncCalendars,_ as syncCollection,K as updateCalendarObject,w as updateObject,B as updateVCard,h as urlContains,l as urlEquals}; +import e from"debug";import t from"xml-js";import r from"cross-fetch";import{encode as a}from"base-64";var s;!function(e){e.CALENDAR_SERVER="http://calendarserver.org/ns/",e.CALDAV_APPLE="http://apple.com/ns/ical/",e.CALDAV="urn:ietf:params:xml:ns:caldav",e.CARDDAV="urn:ietf:params:xml:ns:carddav",e.DAV="DAV:"}(s||(s={}));const o={[s.CALDAV]:"xmlns:c",[s.CARDDAV]:"xmlns:card",[s.CALENDAR_SERVER]:"xmlns:cs",[s.CALDAV_APPLE]:"xmlns:ca",[s.DAV]:"xmlns:d"};var n,c;!function(e){e.CALDAV="c",e.CARDDAV="card",e.CALENDAR_SERVER="cs",e.CALDAV_APPLE="ca",e.DAV="d"}(n||(n={})),function(e){e.VEVENT="VEVENT",e.VTODO="VTODO",e.VJOURNAL="VJOURNAL",e.VFREEBUSY="VFREEBUSY",e.VTIMEZONE="VTIMEZONE",e.VALARM="VALARM"}(c||(c={}));const d="undefined"!=typeof globalThis&&"function"==typeof globalThis.fetch?globalThis.fetch.bind(globalThis):r,i=e=>{const t=Number(e);if(!Number.isNaN(t))return t;const r=e.toLowerCase();return"true"===r||"false"!==r&&e},l=(e,t)=>{if(!e&&!t)return!0;if(!e||!t)return!1;const r=e.trim(),a=t.trim();if(Math.abs(r.length-a.length)>1)return!1;const s="/"===r.slice(-1)?r.slice(0,-1):r,o="/"===a.slice(-1)?a.slice(0,-1):a;return e.includes(o)||t.includes(s)},h=(e,t)=>{if(!e&&!t)return!0;if(!e||!t)return!1;const r=e.trim(),a=t.trim(),s="/"===r.slice(-1)?r.slice(0,-1):r,o="/"===a.slice(-1)?a.slice(0,-1):a;return e.includes(o)||t.includes(s)},u=e=>e.reduce((e,t)=>({...e,[o[t]]:t}),{}),p=e=>Object.entries(e).reduce((e,[t,r])=>r?{...e,[t]:r}:e,{}),f=(e,t)=>t?{[e]:t}:{},v=(e,t)=>e?t&&0!==t.length?Object.fromEntries(Object.entries(e).filter(([e])=>!t.includes(e))):e:{},O=e=>Boolean(null==e?void 0:e.includes(".ics")),y=(e,t)=>{const r=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,a=/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i;if(!(r.test(e)&&r.test(t)||a.test(e)&&a.test(t)))throw new Error("invalid timeRange format, not in ISO8601")};var m=Object.freeze({__proto__:null,cleanupFalsy:p,conditionalParam:f,defaultIcsFilter:O,excludeHeaders:v,getDAVAttribute:u,urlContains:h,urlEquals:l,validateISO8601TimeRange:y});const A=e("tsdav:request"),g=async e=>{var r;const{url:a,init:s,convertIncoming:o=!0,parseOutgoing:n=!0,fetchOptions:c={},fetch:l}=e,h=null!=l?l:d,{headers:u={},body:f,namespace:v,method:O,attributes:y}=s,m=o?t.js2xml({_declaration:{_attributes:{version:"1.0",encoding:"utf-8"}},...f,_attributes:y},{compact:!0,spaces:2,elementNameFn:e=>v&&!/^.+:.+/.test(e)?`${v}:${e}`:e}):f,g={...c};delete g.headers;const D=await h(a,{headers:{"Content-Type":"text/xml;charset=UTF-8",...p(u),...c.headers||{}},body:m,method:O,...g}),w=await D.text();if(!(D.ok&&(null===(r=D.headers.get("content-type"))||void 0===r?void 0:r.includes("xml"))&&n&&w))return[{href:D.url,ok:D.ok,status:D.status,statusText:D.statusText,raw:w}];const b=t.xml2js(w,{compact:!0,trim:!0,textFn:(e,t)=>{try{const r=t._parent,a=Object.keys(r),s=a[a.length-1],o=r[s];if(o.length>0){o[o.length-1]=i(e)}else r[s]=i(e)}catch(e){A(e.stack)}},elementNameFn:e=>e.replace(/^.+:/,"").replace(/([-_]\w)/g,e=>e[1].toUpperCase()),attributesFn:e=>{const t={...e};return delete t.xmlns,t},ignoreDeclaration:!0});return(Array.isArray(b.multistatus.response)?b.multistatus.response:[b.multistatus.response]).map(e=>{var t,r;if(!e)return{status:D.status,statusText:D.statusText,ok:D.ok};const a=/^\S+\s(?\d+)\s(?.+)$/.exec(e.status);return{raw:b,href:e.href,status:(null==a?void 0:a.groups)?Number.parseInt(null==a?void 0:a.groups.status,10):D.status,statusText:null!==(r=null===(t=null==a?void 0:a.groups)||void 0===t?void 0:t.statusText)&&void 0!==r?r:D.statusText,ok:!e.error,error:e.error,responsedescription:e.responsedescription,props:(Array.isArray(e.propstat)?e.propstat:[e.propstat]).reduce((e,t)=>({...e,...null==t?void 0:t.prop}),{})}})},D=async e=>{const{url:t,props:r,depth:a,headers:o,headersToExclude:c,fetchOptions:d={},fetch:i}=e;return g({url:t,init:{method:"PROPFIND",headers:v(p({depth:a,...o}),c),namespace:n.DAV,body:{propfind:{_attributes:u([s.CALDAV,s.CALDAV_APPLE,s.CALENDAR_SERVER,s.CARDDAV,s.DAV]),prop:r}}},fetchOptions:d,fetch:i})},w=async e=>{const{url:t,data:r,headers:a,headersToExclude:s,fetchOptions:o={},fetch:n}=e;return(null!=n?n:d)(t,{method:"PUT",body:r,headers:v(a,s),...o})},b=async e=>{const{url:t,data:r,etag:a,headers:s,headersToExclude:o,fetchOptions:n={},fetch:c}=e;return(null!=c?c:d)(t,{method:"PUT",body:r,headers:v(p({"If-Match":a,...s}),o),...n})},C=async e=>{const{url:t,headers:r,etag:a,headersToExclude:s,fetchOptions:o={},fetch:n}=e;return(null!=n?n:d)(t,{method:"DELETE",headers:v(p({"If-Match":a,...r}),s),...o})};var V=Object.freeze({__proto__:null,createObject:w,davRequest:g,deleteObject:C,propfind:D,updateObject:b});function $(e,t){const r=e=>t.every(t=>e[t]);return Array.isArray(e)?e.every(e=>r(e)):r(e)}const T=(e,t)=>t.reduce((t,r)=>e[r]?t:`${t.length?`${t},`:""}${r.toString()}`,""),E=e("tsdav:collection"),k=async e=>{const{url:t,body:r,depth:a,defaultNamespace:s=n.DAV,headers:o,headersToExclude:c,fetchOptions:d={},fetch:i}=e,l=await g({url:t,init:{method:"REPORT",headers:v(p({depth:a,...o}),c),namespace:s,body:r},fetchOptions:d,fetch:i}),h=l.find(e=>!e.ok||e.status&&e.status>=400);if(h)throw new Error(`Collection query failed: ${h.status} ${h.statusText}. ${h.raw?`Raw response: ${h.raw}`:""}`);return 1===l.length&&!l[0].raw&&l[0].status&&l[0].status<300?[]:l},_=async e=>{const{url:t,props:r,depth:a,headers:s,headersToExclude:o,fetchOptions:c={},fetch:d}=e;return g({url:t,init:{method:"MKCOL",headers:v(p({depth:a,...s}),o),namespace:n.DAV,body:r?{mkcol:{set:{prop:r}}}:void 0},fetchOptions:c,fetch:d})},U=async e=>{var t,r,a,s,o;const{collection:c,headers:d,headersToExclude:i,fetchOptions:l={},fetch:h}=e;return null!==(o=null===(s=null===(a=null===(r=null===(t=(await D({url:c.url,props:{[`${n.DAV}:supported-report-set`]:{}},depth:"0",headers:v(d,i),fetchOptions:l,fetch:h}))[0])||void 0===t?void 0:t.props)||void 0===r?void 0:r.supportedReportSet)||void 0===a?void 0:a.supportedReport)||void 0===s?void 0:s.map(e=>Object.keys(e.report)[0]))&&void 0!==o?o:[]},R=async e=>{var t,r,a;const{collection:s,headers:o,headersToExclude:c,fetchOptions:d={},fetch:i}=e,l=(await D({url:s.url,props:{[`${n.CALENDAR_SERVER}:getctag`]:{}},depth:"0",headers:v(o,c),fetchOptions:d,fetch:i})).filter(e=>h(s.url,e.href))[0];if(!l)throw new Error("Collection does not exist on server");return{isDirty:`${s.ctag}`!=`${null===(t=l.props)||void 0===t?void 0:t.getctag}`,newCtag:null===(a=null===(r=l.props)||void 0===r?void 0:r.getctag)||void 0===a?void 0:a.toString()}},L=e=>{const{url:t,props:r,headers:a,syncLevel:o,syncToken:c,headersToExclude:d,fetchOptions:i,fetch:l}=e;return g({url:t,init:{method:"REPORT",namespace:n.DAV,headers:v({...a},d),body:{"sync-collection":{_attributes:u([s.CALDAV,s.CARDDAV,s.DAV]),"sync-level":o,"sync-token":c,[`${n.DAV}:prop`]:r}}},fetchOptions:i,fetch:l})},x=async e=>{var t,r,a,s,o,c,d,i,l,u,p,f;const{collection:O,method:y,headers:m,headersToExclude:A,account:g,detailedResult:D,fetchOptions:w={},fetch:b}=e,C=["accountType","homeUrl"];if(!g||!$(g,C)){if(!g)throw new Error("no account for smartCollectionSync");throw new Error(`account must have ${T(g,C)} before smartCollectionSync`)}const V=null!=y?y:(null===(t=O.reports)||void 0===t?void 0:t.includes("syncCollection"))?"webdav":"basic";if(E(`smart collection sync with type ${g.accountType} and method ${V}`),"webdav"===V){const e=await L({url:O.url,props:{[`${n.DAV}:getetag`]:{},[`${"caldav"===g.accountType?n.CALDAV:n.CARDDAV}:${"caldav"===g.accountType?"calendar-data":"address-data"}`]:{},[`${n.DAV}:displayname`]:{}},syncLevel:1,syncToken:O.syncToken,headers:v(m,A),fetchOptions:w,fetch:b}),t=e.filter(e=>{var t;const r="caldav"===g.accountType?".ics":".vcf";return(null===(t=e.href)||void 0===t?void 0:t.slice(-4))===r}),l=t.filter(e=>404!==e.status).map(e=>e.href),u=t.filter(e=>404===e.status).map(e=>e.href),p=(l.length&&null!==(a=await(null===(r=null==O?void 0:O.objectMultiGet)||void 0===r?void 0:r.call(O,{url:O.url,props:{[`${n.DAV}:getetag`]:{},[`${"caldav"===g.accountType?n.CALDAV:n.CARDDAV}:${"caldav"===g.accountType?"calendar-data":"address-data"}`]:{}},objectUrls:l,depth:"1",headers:v(m,A),fetchOptions:w,fetch:b})))&&void 0!==a?a:[]).map(e=>{var t,r,a,s,o,n,c,d,i,l;return{url:null!==(t=e.href)&&void 0!==t?t:"",etag:null===(r=e.props)||void 0===r?void 0:r.getetag,data:"caldav"===(null==g?void 0:g.accountType)?null!==(o=null===(s=null===(a=e.props)||void 0===a?void 0:a.calendarData)||void 0===s?void 0:s._cdata)&&void 0!==o?o:null===(n=e.props)||void 0===n?void 0:n.calendarData:null!==(i=null===(d=null===(c=e.props)||void 0===c?void 0:c.addressData)||void 0===d?void 0:d._cdata)&&void 0!==i?i:null===(l=e.props)||void 0===l?void 0:l.addressData}}),f=null!==(s=O.objects)&&void 0!==s?s:[],y=p.filter(e=>f.every(t=>!h(t.url,e.url))),C=f.reduce((e,t)=>{const r=p.find(e=>h(e.url,t.url));return r&&r.etag&&r.etag!==t.etag?[...e,r]:e},[]),V=u.map(e=>({url:e,etag:""})),$=f.filter(e=>p.some(t=>h(e.url,t.url)&&t.etag===e.etag));return{...O,objects:D?{created:y,updated:C,deleted:V}:[...$,...y,...C],syncToken:null!==(i=null===(d=null===(c=null===(o=e[0])||void 0===o?void 0:o.raw)||void 0===c?void 0:c.multistatus)||void 0===d?void 0:d.syncToken)&&void 0!==i?i:O.syncToken}}if("basic"===V){const{isDirty:e,newCtag:t}=await R({collection:O,headers:v(m,A),fetchOptions:w,fetch:b}),r=null!==(l=O.objects)&&void 0!==l?l:[],a=null!==(f=await(null===(p=(u=O).fetchObjects)||void 0===p?void 0:p.call(u,{collection:O,headers:v(m,A),fetchOptions:w,fetch:b})))&&void 0!==f?f:[],s=a.filter(e=>r.every(t=>!h(t.url,e.url))),o=r.reduce((e,t)=>{const r=a.find(e=>h(e.url,t.url));return r&&r.etag&&r.etag!==t.etag?[...e,r]:e},[]),n=r.filter(e=>a.every(t=>!h(t.url,e.url))),c=r.filter(e=>a.some(t=>h(e.url,t.url)&&t.etag===e.etag));if(e)return{...O,objects:D?{created:s,updated:o,deleted:n}:[...c,...s,...o],ctag:t}}return D?{...O,objects:{created:[],updated:[],deleted:[]}}:O};var S=Object.freeze({__proto__:null,collectionQuery:k,isCollectionDirty:R,makeCollection:_,smartCollectionSync:x,supportedReportSet:U,syncCollection:L});const j=e("tsdav:addressBook"),H=async e=>{const{url:t,props:r,filters:a,depth:o,headers:c,headersToExclude:d,fetchOptions:i={},fetch:l}=e;return k({url:t,body:{"addressbook-query":p({_attributes:u([s.CARDDAV,s.DAV]),[`${n.DAV}:prop`]:r,filter:null!=a?a:{"prop-filter":{_attributes:{name:"FN"}}}})},defaultNamespace:n.CARDDAV,depth:o,headers:v(c,d),fetchOptions:i,fetch:l})},N=async e=>{const{url:t,props:r,objectUrls:a,depth:o,headers:c,headersToExclude:d,fetchOptions:i={},fetch:l}=e;return k({url:t,body:{"addressbook-multiget":p({_attributes:u([s.DAV,s.CARDDAV]),[`${n.DAV}:prop`]:r,[`${n.DAV}:href`]:a})},defaultNamespace:n.CARDDAV,depth:o,headers:v(c,d),fetchOptions:i,fetch:l})},P=async e=>{const{account:t,headers:r,props:a,headersToExclude:s,fetchOptions:o={},fetch:c}=null!=e?e:{},d=["homeUrl","rootUrl"];if(!t||!$(t,d)){if(!t)throw new Error("no account for fetchAddressBooks");throw new Error(`account must have ${T(t,d)} before fetchAddressBooks`)}const i=await D({url:t.homeUrl,props:null!=a?a:{[`${n.DAV}:displayname`]:{},[`${n.CALENDAR_SERVER}:getctag`]:{},[`${n.DAV}:resourcetype`]:{},[`${n.DAV}:sync-token`]:{}},depth:"1",headers:v(r,s),fetchOptions:o,fetch:c});return Promise.all(i.filter(e=>{var t,r;return Object.keys(null!==(r=null===(t=e.props)||void 0===t?void 0:t.resourcetype)&&void 0!==r?r:{}).includes("addressbook")}).map(e=>{var r,a,s,o,n,c,d,i,l;const h=null!==(s=null===(a=null===(r=e.props)||void 0===r?void 0:r.displayname)||void 0===a?void 0:a._cdata)&&void 0!==s?s:null===(o=e.props)||void 0===o?void 0:o.displayname;return j(`Found address book named ${"string"==typeof h?h:""},\n props: ${JSON.stringify(e.props)}`),{url:new URL(null!==(n=e.href)&&void 0!==n?n:"",null!==(c=t.rootUrl)&&void 0!==c?c:"").href,ctag:null===(d=e.props)||void 0===d?void 0:d.getctag,displayName:"string"==typeof h?h:"",resourcetype:Object.keys(null===(i=e.props)||void 0===i?void 0:i.resourcetype),syncToken:null===(l=e.props)||void 0===l?void 0:l.syncToken}}).map(async e=>({...e,reports:await U({collection:e,headers:v(r,s),fetchOptions:o,fetch:c})})))},B=async e=>{const{addressBook:t,headers:r,objectUrls:a,headersToExclude:s,urlFilter:o=e=>e,useMultiGet:c=!0,fetchOptions:d={},fetch:i}=e;j(`Fetching vcards from ${null==t?void 0:t.url}`);const h=["url"];if(!t||!$(t,h)){if(!t)throw new Error("cannot fetchVCards for undefined addressBook");throw new Error(`addressBook must have ${T(t,h)} before fetchVCards`)}const u=(null!=a?a:(await H({url:t.url,props:{[`${n.DAV}:getetag`]:{}},depth:"1",headers:v(r,s),fetchOptions:d,fetch:i})).map(e=>{var t;return null!==(t=e.href)&&void 0!==t?t:""})).map(e=>e.startsWith("http")||!e?e:new URL(e,t.url).href).filter(e=>e&&!l(e,t.url)).filter(o).map(e=>new URL(e).pathname);let p=[];return u.length>0&&(p=c?await N({url:t.url,props:{[`${n.DAV}:getetag`]:{},[`${n.CARDDAV}:address-data`]:{}},objectUrls:u,depth:"1",headers:v(r,s),fetchOptions:d,fetch:i}):await H({url:t.url,props:{[`${n.DAV}:getetag`]:{},[`${n.CARDDAV}:address-data`]:{}},depth:"1",headers:v(r,s),fetchOptions:d,fetch:i})),p.map(e=>{var r,a,s,o,n,c;return{url:new URL(null!==(r=e.href)&&void 0!==r?r:"",t.url).href,etag:null===(a=e.props)||void 0===a?void 0:a.getetag,data:null!==(n=null===(o=null===(s=e.props)||void 0===s?void 0:s.addressData)||void 0===o?void 0:o._cdata)&&void 0!==n?n:null===(c=e.props)||void 0===c?void 0:c.addressData}})},I=async e=>{const{addressBook:t,vCardString:r,filename:a,headers:s,headersToExclude:o,fetchOptions:n={},fetch:c}=e;return w({url:new URL(a,t.url).href,data:r,headers:v({"content-type":"text/vcard; charset=utf-8","If-None-Match":"*",...s},o),fetchOptions:n,fetch:c})},F=async e=>{const{vCard:t,headers:r,headersToExclude:a,fetchOptions:s={},fetch:o}=e;return b({url:t.url,data:t.data,etag:t.etag,headers:v({"content-type":"text/vcard; charset=utf-8",...r},a),fetchOptions:s,fetch:o})},M=async e=>{const{vCard:t,headers:r,headersToExclude:a,fetchOptions:s={},fetch:o}=e;return C({url:t.url,etag:t.etag,headers:v(r,a),fetchOptions:s,fetch:o})},z=async e=>{const{url:t,props:r,depth:a,headers:o,headersToExclude:c,fetchOptions:d={}}=e;return g({url:t,init:{method:"MKCOL",headers:v(p({depth:a,...o}),c),namespace:n.DAV,body:r?{mkcol:{_attributes:u([s.DAV,s.CARDDAV]),set:{prop:r}}}:void 0},fetchOptions:d})};var Z=Object.freeze({__proto__:null,addressBookMultiGet:N,addressBookQuery:H,createVCard:I,deleteVCard:M,fetchAddressBooks:P,fetchVCards:B,makeAddressBook:z,updateVCard:F});const G=e("tsdav:calendar"),Q=async e=>{var t,r,a;const{account:s,headers:o,headersToExclude:c,fetchOptions:d={},fetch:i}=e,l=["principalUrl","rootUrl"];if(!$(s,l))throw new Error(`account must have ${T(s,l)} before fetchUserAddresses`);G(`Fetch user addresses from ${s.principalUrl}`);const u=(await D({url:s.principalUrl,props:{[`${n.CALDAV}:calendar-user-address-set`]:{}},depth:"0",headers:v(o,c),fetchOptions:d,fetch:i})).find(e=>h(s.principalUrl,e.href));if(!u||!u.ok)throw new Error("cannot find calendarUserAddresses");const p=(null===(a=null===(r=null===(t=null==u?void 0:u.props)||void 0===t?void 0:t.calendarUserAddressSet)||void 0===r?void 0:r.href)||void 0===a?void 0:a.filter(Boolean))||[];return G(`Fetched calendar user addresses ${p}`),p},q=async e=>{const{url:t,props:r,filters:a,timezone:o,depth:c,headers:d,headersToExclude:i,fetchOptions:l={},fetch:h}=e;return k({url:t,body:{"calendar-query":p({_attributes:u([s.CALDAV,s.CALENDAR_SERVER,s.CALDAV_APPLE,s.DAV]),[`${n.DAV}:prop`]:r,filter:a,timezone:o})},defaultNamespace:n.CALDAV,depth:c,headers:v(d,i),fetchOptions:l,fetch:h})},J=async e=>{const{url:t,props:r,objectUrls:a,filters:o,timezone:c,depth:d,headers:i,headersToExclude:l,fetchOptions:h={},fetch:f}=e;return k({url:t,body:{"calendar-multiget":p({_attributes:u([s.DAV,s.CALDAV]),[`${n.DAV}:prop`]:r,[`${n.DAV}:href`]:a,filter:o,timezone:c})},defaultNamespace:n.CALDAV,depth:d,headers:v(i,l),fetchOptions:h,fetch:f})},W=async e=>{const{url:t,props:r,depth:a,headers:o,headersToExclude:c,fetchOptions:d={},fetch:i}=e;return g({url:t,init:{method:"MKCALENDAR",headers:v(p({depth:a,...o}),c),namespace:n.DAV,body:{[`${n.CALDAV}:mkcalendar`]:{_attributes:u([s.DAV,s.CALDAV,s.CALDAV_APPLE]),set:{prop:r}}}},fetchOptions:d,fetch:i})},K=async e=>{const{headers:t,account:r,props:a,projectedProps:s,headersToExclude:o,fetchOptions:d={},fetch:i}=null!=e?e:{},l=["homeUrl","rootUrl"];if(!r||!$(r,l)){if(!r)throw new Error("no account for fetchCalendars");throw new Error(`account must have ${T(r,l)} before fetchCalendars`)}const h=await D({url:r.homeUrl,props:null!=a?a:{[`${n.CALDAV}:calendar-description`]:{},[`${n.CALDAV}:calendar-timezone`]:{},[`${n.DAV}:displayname`]:{},[`${n.CALDAV_APPLE}:calendar-color`]:{},[`${n.CALENDAR_SERVER}:getctag`]:{},[`${n.DAV}:resourcetype`]:{},[`${n.CALDAV}:supported-calendar-component-set`]:{},[`${n.DAV}:sync-token`]:{}},depth:"1",headers:v(t,o),fetchOptions:d,fetch:i});return Promise.all(h.filter(e=>{var t,r;return Object.keys(null!==(r=null===(t=e.props)||void 0===t?void 0:t.resourcetype)&&void 0!==r?r:{}).includes("calendar")}).filter(e=>{var t,r,a,s,o,n;return(Array.isArray(null===(r=null===(t=e.props)||void 0===t?void 0:t.supportedCalendarComponentSet)||void 0===r?void 0:r.comp)?null===(a=e.props)||void 0===a?void 0:a.supportedCalendarComponentSet.comp.map(e=>e._attributes.name):[null===(n=null===(o=null===(s=e.props)||void 0===s?void 0:s.supportedCalendarComponentSet)||void 0===o?void 0:o.comp)||void 0===n?void 0:n._attributes.name]).some(e=>Object.values(c).includes(e))}).map(e=>{var t,a,o,n,c,d,i,l,h,u,p,v,O,y,m,A;const g=null===(t=e.props)||void 0===t?void 0:t.calendarDescription,D=null===(a=e.props)||void 0===a?void 0:a.calendarTimezone;return{description:"string"==typeof g?g:"",timezone:"string"==typeof D?D:"",url:new URL(null!==(o=e.href)&&void 0!==o?o:"",null!==(n=r.rootUrl)&&void 0!==n?n:"").href,ctag:null===(c=e.props)||void 0===c?void 0:c.getctag,calendarColor:null===(d=e.props)||void 0===d?void 0:d.calendarColor,displayName:null!==(l=null===(i=e.props)||void 0===i?void 0:i.displayname._cdata)&&void 0!==l?l:null===(h=e.props)||void 0===h?void 0:h.displayname,components:Array.isArray(null===(u=e.props)||void 0===u?void 0:u.supportedCalendarComponentSet.comp)?null===(p=e.props)||void 0===p?void 0:p.supportedCalendarComponentSet.comp.map(e=>e._attributes.name):[null===(O=null===(v=e.props)||void 0===v?void 0:v.supportedCalendarComponentSet.comp)||void 0===O?void 0:O._attributes.name],resourcetype:Object.keys(null===(y=e.props)||void 0===y?void 0:y.resourcetype),syncToken:null===(m=e.props)||void 0===m?void 0:m.syncToken,...f("projectedProps",Object.fromEntries(Object.entries(null!==(A=e.props)&&void 0!==A?A:{}).filter(([e])=>null==s?void 0:s[e])))}}).map(async e=>({...e,reports:await U({collection:e,headers:v(t,o),fetchOptions:d,fetch:i})})))},Y=async e=>{const{calendar:t,objectUrls:r,filters:a,timeRange:s,headers:o,expand:c,urlFilter:d=O,useMultiGet:i=!0,headersToExclude:l,fetchOptions:h={},fetch:u}=e;s&&y(s.start,s.end),G(`Fetching calendar objects from ${null==t?void 0:t.url}`);const p=["url"];if(!t||!$(t,p)){if(!t)throw new Error("cannot fetchCalendarObjects for undefined calendar");throw new Error(`calendar must have ${T(t,p)} before fetchCalendarObjects`)}const f=null!=a?a:[{"comp-filter":{_attributes:{name:"VCALENDAR"},"comp-filter":{_attributes:{name:"VEVENT"},...s?{"time-range":{_attributes:{start:`${new Date(s.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(s.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}}}];let m=[];const A=(null!=r?r:(m=await q({url:t.url,props:{[`${n.DAV}:getetag`]:{},...c&&s?{[`${n.CALDAV}:calendar-data`]:{[`${n.CALDAV}:expand`]:{_attributes:{start:`${new Date(s.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(s.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}}:{}},filters:f,depth:"1",headers:v(o,l),fetchOptions:h,fetch:u})).map(e=>{var t;return null!==(t=e.href)&&void 0!==t?t:""})).map(e=>e.startsWith("http")||!e?e:new URL(e,t.url).href).filter(d).map(e=>new URL(e).pathname);let g=[];return A.length>0&&(g=c&&!r?m.filter(e=>{var r,a;const s=(null!==(r=e.href)&&void 0!==r?r:"").startsWith("http")?e.href:new URL(null!==(a=e.href)&&void 0!==a?a:"",t.url).href;return d(null!=s?s:"")}):i?await J({url:t.url,props:{[`${n.DAV}:getetag`]:{},[`${n.CALDAV}:calendar-data`]:{...c&&s?{[`${n.CALDAV}:expand`]:{_attributes:{start:`${new Date(s.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(s.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}},objectUrls:A,depth:"1",headers:v(o,l),fetchOptions:h,fetch:u}):await q({url:t.url,props:{[`${n.DAV}:getetag`]:{},[`${n.CALDAV}:calendar-data`]:{...c&&s?{[`${n.CALDAV}:expand`]:{_attributes:{start:`${new Date(s.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(s.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}},filters:f,depth:"1",headers:v(o,l),fetchOptions:h,fetch:u})),g.map(e=>{var r,a,s,o,n,c;return{url:new URL(null!==(r=e.href)&&void 0!==r?r:"",t.url).href,etag:`${null===(a=e.props)||void 0===a?void 0:a.getetag}`,data:null!==(n=null===(o=null===(s=e.props)||void 0===s?void 0:s.calendarData)||void 0===o?void 0:o._cdata)&&void 0!==n?n:null===(c=e.props)||void 0===c?void 0:c.calendarData}})},X=async e=>{const{calendar:t,iCalString:r,filename:a,headers:s,headersToExclude:o,fetchOptions:n={},fetch:c}=e;return w({url:new URL(a,t.url).href,data:r,headers:v({"content-type":"text/calendar; charset=utf-8","If-None-Match":"*",...s},o),fetchOptions:n,fetch:c})},ee=async e=>{const{calendarObject:t,headers:r,headersToExclude:a,fetchOptions:s={},fetch:o}=e;return b({url:t.url,data:t.data,etag:t.etag,headers:v({"content-type":"text/calendar; charset=utf-8",...r},a),fetchOptions:s,fetch:o})},te=async e=>{const{calendarObject:t,headers:r,headersToExclude:a,fetchOptions:s={},fetch:o}=e;return C({url:t.url,etag:t.etag,headers:v(r,a),fetchOptions:s,fetch:o})},re=async e=>{var t;const{oldCalendars:r,account:a,detailedResult:s,headers:o,headersToExclude:n,fetchOptions:c={},fetch:d}=e;if(!a)throw new Error("Must have account before syncCalendars");const i=null!==(t=null!=r?r:a.calendars)&&void 0!==t?t:[],l=await K({account:a,headers:v(o,n),fetchOptions:c,fetch:d}),u=l.filter(e=>i.every(t=>!h(t.url,e.url)));G(`new calendars: ${u.map(e=>e.displayName)}`);const p=i.reduce((e,t)=>{const r=l.find(e=>h(e.url,t.url));return r&&(r.syncToken&&`${r.syncToken}`!=`${t.syncToken}`||r.ctag&&`${r.ctag}`!=`${t.ctag}`)?[...e,r]:e},[]);G(`updated calendars: ${p.map(e=>e.displayName)}`);const f=await Promise.all(p.map(async e=>await x({collection:{...e,objectMultiGet:J},method:"webdav",headers:v(o,n),account:a,fetchOptions:c,fetch:d}))),O=i.filter(e=>l.every(t=>!h(t.url,e.url)));G(`deleted calendars: ${O.map(e=>e.displayName)}`);const y=i.filter(e=>l.some(t=>h(t.url,e.url)&&(t.syncToken&&`${t.syncToken}`!=`${e.syncToken}`||t.ctag&&`${t.ctag}`!=`${e.ctag}`)));return s?{created:u,updated:p,deleted:O}:[...y,...u,...f]},ae=async e=>{const{url:t,timeRange:r,depth:a,headers:o,headersToExclude:c,fetchOptions:d={},fetch:i}=e;if(!r)throw new Error("timeRange is required");y(r.start,r.end);return(await k({url:t,body:{"free-busy-query":p({_attributes:u([s.CALDAV]),[`${n.CALDAV}:time-range`]:{_attributes:{start:`${new Date(r.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(r.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}})},defaultNamespace:n.CALDAV,depth:a,headers:v(o,c),fetchOptions:d,fetch:i}))[0]};var se=Object.freeze({__proto__:null,calendarMultiGet:J,calendarQuery:q,createCalendarObject:X,deleteCalendarObject:te,fetchCalendarObjects:Y,fetchCalendarUserAddresses:Q,fetchCalendars:K,freeBusyQuery:ae,makeCalendar:W,syncCalendars:re,updateCalendarObject:ee});const oe=e("tsdav:account"),ne=async e=>{var t,r;oe("Service discovery...");const{account:a,headers:s,headersToExclude:o,fetchOptions:n={},fetch:c}=e,i=null!=c?c:d,l=new URL(a.serverUrl),h=new URL(`/.well-known/${a.accountType}`,l);h.protocol=null!==(t=l.protocol)&&void 0!==t?t:"http";try{const e=await i(h.href,{headers:{...v(s,o),"Content-Type":"text/xml;charset=UTF-8"},method:"PROPFIND",body:'\n\n \n \n \n',redirect:"manual",...n});if(e.status>=300&&e.status<400){const t=e.headers.get("Location");if("string"==typeof t&&t.length){oe(`Service discovery redirected to ${t}`);const e=new URL(t,l);return e.hostname===h.hostname&&h.port&&!e.port&&(e.port=h.port),e.protocol=null!==(r=l.protocol)&&void 0!==r?r:"http",e.href}}}catch(e){oe(`Service discovery failed: ${e.stack}`)}return l.href},ce=async e=>{var t,r,a,s,o;const{account:c,headers:d,headersToExclude:i,fetchOptions:l={},fetch:h}=e,u=["rootUrl"];if(!$(c,u))throw new Error(`account must have ${T(c,u)} before fetchPrincipalUrl`);oe(`Fetching principal url from path ${c.rootUrl}`);const[p]=await D({url:c.rootUrl,props:{[`${n.DAV}:current-user-principal`]:{}},depth:"0",headers:v(d,i),fetchOptions:l,fetch:h});if(!p.ok&&(oe(`Fetch principal url failed: ${p.statusText}`),401===p.status))throw new Error("Invalid credentials");return oe(`Fetched principal url ${null===(r=null===(t=p.props)||void 0===t?void 0:t.currentUserPrincipal)||void 0===r?void 0:r.href}`),new URL(null!==(o=null===(s=null===(a=p.props)||void 0===a?void 0:a.currentUserPrincipal)||void 0===s?void 0:s.href)&&void 0!==o?o:"",c.rootUrl).href},de=async e=>{var t,r;const{account:a,headers:s,headersToExclude:o,fetchOptions:c={},fetch:d}=e,i=["principalUrl","rootUrl"];if(!$(a,i))throw new Error(`account must have ${T(a,i)} before fetchHomeUrl`);oe(`Fetch home url from ${a.principalUrl}`);const l=await D({url:a.principalUrl,props:"caldav"===a.accountType?{[`${n.CALDAV}:calendar-home-set`]:{}}:{[`${n.CARDDAV}:addressbook-home-set`]:{}},depth:"0",headers:v(s,o),fetchOptions:c,fetch:d}),u=l.find(e=>h(a.principalUrl,e.href));if(!u||!u.ok)throw oe(`Fetch home url failed with status ${null==u?void 0:u.statusText} and error ${JSON.stringify(l.map(e=>e.error))}`),new Error("cannot find homeUrl");const p=new URL("caldav"===a.accountType?null===(t=null==u?void 0:u.props)||void 0===t?void 0:t.calendarHomeSet.href:null===(r=null==u?void 0:u.props)||void 0===r?void 0:r.addressbookHomeSet.href,a.rootUrl).href;return oe(`Fetched home url ${p}`),p},ie=async e=>{const{account:t,headers:r,loadCollections:a=!1,loadObjects:s=!1,headersToExclude:o,fetchOptions:n={},fetch:c}=e,d={...t};return d.rootUrl=await ne({account:t,headers:v(r,o),fetchOptions:n,fetch:c}),d.principalUrl=await ce({account:d,headers:v(r,o),fetchOptions:n,fetch:c}),d.homeUrl=await de({account:d,headers:v(r,o),fetchOptions:n,fetch:c}),(a||s)&&("caldav"===t.accountType?d.calendars=await K({headers:v(r,o),account:d,fetchOptions:n,fetch:c}):"carddav"===t.accountType&&(d.addressBooks=await P({headers:v(r,o),account:d,fetchOptions:n,fetch:c}))),s&&("caldav"===t.accountType&&d.calendars?d.calendars=await Promise.all(d.calendars.map(async e=>({...e,objects:await Y({calendar:e,headers:v(r,o),fetchOptions:n,fetch:c})}))):"carddav"===t.accountType&&d.addressBooks&&(d.addressBooks=await Promise.all(d.addressBooks.map(async e=>({...e,objects:await B({addressBook:e,headers:v(r,o),fetchOptions:n,fetch:c})}))))),d};var le=Object.freeze({__proto__:null,createAccount:ie,fetchHomeUrl:de,fetchPrincipalUrl:ce,serviceDiscovery:ne});const he=e("tsdav:todo"),ue=e=>({[`${n.CALDAV}:expand`]:{_attributes:{start:`${new Date(e.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(e.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}),pe=async e=>{const{url:t,props:r,filters:a,timezone:o,depth:c,headers:d,headersToExclude:i,fetchOptions:l={}}=e;return k({url:t,body:{"calendar-query":p({_attributes:u([s.CALDAV,s.CALENDAR_SERVER,s.CALDAV_APPLE,s.DAV]),[`${n.DAV}:prop`]:r,filter:a,timezone:o})},defaultNamespace:n.CALDAV,depth:c,headers:v(d,i),fetchOptions:l})},fe=async e=>{const{url:t,props:r,objectUrls:a,filters:o,timezone:c,depth:d,headers:i,headersToExclude:l,fetchOptions:h={}}=e;return k({url:t,body:{"calendar-multiget":p({_attributes:u([s.DAV,s.CALDAV]),[`${n.DAV}:prop`]:r,[`${n.DAV}:href`]:a,filter:o,timezone:c})},defaultNamespace:n.CALDAV,depth:d,headers:v(i,l),fetchOptions:h})},ve=async e=>{const{calendar:t,objectUrls:r,filters:a,timeRange:s,headers:o,expand:c,urlFilter:d=O,useMultiGet:i=!0,headersToExclude:l,fetchOptions:h={}}=e;s&&y(s.start,s.end),he(`Fetching todo objects from ${null==t?void 0:t.url}`);const u=["url"];if(!t||!$(t,u)){if(!t)throw new Error("cannot fetchTodos for undefined calendar");throw new Error(`calendar must have ${T(t,u)} before fetchTodos`)}const p=null!=a?a:[{"comp-filter":{_attributes:{name:"VCALENDAR"},"comp-filter":{_attributes:{name:"VTODO"},...s?{"time-range":{_attributes:{start:`${new Date(s.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(s.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}}}],f=(null!=r?r:(await pe({url:t.url,props:{[`${n.DAV}:getetag`]:{...c&&s?ue(s):{}}},filters:p,depth:"1",headers:v(o,l),fetchOptions:h})).map(e=>{var t;return null!==(t=e.href)&&void 0!==t?t:""})).map(e=>e.startsWith("http")||!e?e:new URL(e,t.url).href).filter(d).map(e=>new URL(e).pathname);let m=[];return f.length>0&&(m=!i||c?await pe({url:t.url,props:{[`${n.DAV}:getetag`]:{},[`${n.CALDAV}:calendar-data`]:{...c&&s?ue(s):{}}},filters:p,depth:"1",headers:v(o,l),fetchOptions:h}):await fe({url:t.url,props:{[`${n.DAV}:getetag`]:{},[`${n.CALDAV}:calendar-data`]:{...c&&s?ue(s):{}}},objectUrls:f,depth:"1",headers:v(o,l),fetchOptions:h})),m.map(e=>{var r,a,s,o,n,c;return{url:new URL(null!==(r=e.href)&&void 0!==r?r:"",t.url).href,etag:`${null===(a=e.props)||void 0===a?void 0:a.getetag}`,data:null!==(n=null===(o=null===(s=e.props)||void 0===s?void 0:s.calendarData)||void 0===o?void 0:o._cdata)&&void 0!==n?n:null===(c=e.props)||void 0===c?void 0:c.calendarData}})},Oe=async e=>{const{calendar:t,iCalString:r,filename:a,headers:s,headersToExclude:o,fetchOptions:n={}}=e;if(!r.includes("UID:"))throw new Error("iCalString must contain a UID");return w({url:new URL(a,t.url).href,data:r,headers:v({"content-type":"text/calendar; charset=utf-8","If-None-Match":"*",...s},o),fetchOptions:n})},ye=async e=>{const{calendarObject:t,headers:r,headersToExclude:a,fetchOptions:s={}}=e;if(!t.etag)throw new Error("calendarObject must have etag for update - fetch todo first");return b({url:t.url,data:t.data,etag:t.etag,headers:v({"content-type":"text/calendar; charset=utf-8",...r},a),fetchOptions:s})},me=async e=>{const{calendarObject:t,headers:r,headersToExclude:a,fetchOptions:s={}}=e;return C({url:t.url,etag:t.etag,headers:v(r,a),fetchOptions:s})};var Ae=Object.freeze({__proto__:null,createTodo:Oe,deleteTodo:me,fetchTodos:ve,todoMultiGet:fe,todoQuery:pe,updateTodo:ye});const ge=e("tsdav:authHelper"),De=(e,t)=>(...r)=>e({...t,...r[0]}),we=e=>(ge(`Basic auth token generated: ${a(`${e.username}:${e.password}`)}`),{authorization:`Basic ${a(`${e.username}:${e.password}`)}`}),be=e=>({authorization:`Bearer ${e.accessToken}`}),Ce=async(e,t,r)=>{const a=["authorizationCode","redirectUrl","clientId","clientSecret","tokenUrl"];if(!$(e,a))throw new Error(`Oauth credentials missing: ${T(e,a)}`);const s=new URLSearchParams({grant_type:"authorization_code",code:e.authorizationCode,redirect_uri:e.redirectUrl,client_id:e.clientId,client_secret:e.clientSecret});ge(e.tokenUrl),ge(s.toString());const o=null!=r?r:d,n=await o(e.tokenUrl,{method:"POST",body:s.toString(),headers:{"content-length":`${s.toString().length}`,"content-type":"application/x-www-form-urlencoded"},...null!=t?t:{}});if(n.ok){return await n.json()}return ge(`Fetch Oauth tokens failed: ${await n.text()}`),{}},Ve=async(e,t,r)=>{const a=["refreshToken","clientId","clientSecret","tokenUrl"];if(!$(e,a))throw new Error(`Oauth credentials missing: ${T(e,a)}`);const s=new URLSearchParams({client_id:e.clientId,client_secret:e.clientSecret,refresh_token:e.refreshToken,grant_type:"refresh_token"}),o=null!=r?r:d,n=await o(e.tokenUrl,{method:"POST",body:s.toString(),headers:{"Content-Type":"application/x-www-form-urlencoded"},...null!=t?t:{}});if(n.ok){return await n.json()}return ge(`Refresh access token failed: ${await n.text()}`),{}},$e=async(e,t,r)=>{var a;ge("Fetching oauth headers");let s={};return e.refreshToken?(e.refreshToken&&!e.accessToken||Date.now()>(null!==(a=e.expiration)&&void 0!==a?a:0))&&(s=await Ve(e,t,r)):s=await Ce(e,t,r),ge(`Oauth tokens fetched: ${s.access_token}`),{tokens:s,headers:{authorization:`Bearer ${s.access_token}`}}};var Te=Object.freeze({__proto__:null,defaultParam:De,fetchOauthTokens:Ce,getBasicAuthHeaders:we,getBearerAuthHeaders:be,getOauthHeaders:$e,refreshAccessToken:Ve});const Ee=async e=>{var t;const{serverUrl:r,credentials:a,authMethod:s,defaultAccountType:o,authFunction:n,fetch:c}=e;let d={};switch(s){case"Basic":d=we(a);break;case"Bearer":d=be(a);break;case"Oauth":d=(await $e(a,void 0,c)).headers;break;case"Digest":d={Authorization:`Digest ${a.digestString}`};break;case"Custom":d=null!==(t=await(null==n?void 0:n(a)))&&void 0!==t?t:{};break;default:throw new Error("Invalid auth method")}const i=o?await ie({account:{serverUrl:r,credentials:a,accountType:o},headers:d,fetch:c}):void 0,l=De(w,{url:r,headers:d,fetch:c}),h=De(b,{headers:d,url:r,fetch:c}),u=De(C,{headers:d,url:r,fetch:c}),p=De(D,{headers:d,fetch:c}),f=De(k,{headers:d,fetch:c}),v=De(_,{headers:d,fetch:c}),O=De(L,{headers:d,fetch:c}),y=De(U,{headers:d,fetch:c}),m=De(R,{headers:d,fetch:c}),A=De(x,{headers:d,account:i,fetch:c}),V=De(q,{headers:d,fetch:c}),$=De(J,{headers:d,fetch:c}),T=De(W,{headers:d,fetch:c}),E=De(K,{headers:d,account:i,fetch:c}),S=De(Q,{headers:d,account:i,fetch:c}),j=De(Y,{headers:d,fetch:c}),Z=De(X,{headers:d,fetch:c}),G=De(ee,{headers:d,fetch:c}),ae=De(te,{headers:d,fetch:c}),se=De(re,{account:i,headers:d,fetch:c}),oe=De(H,{headers:d,fetch:c}),ne=De(N,{headers:d,fetch:c}),ce=De(z,{headers:d,fetch:c});return{davRequest:async e=>{const{init:t,fetch:r,...a}=e,{headers:s,...o}=t;return g({...a,init:{...o,headers:{...d,...s}},fetch:null!=r?r:c})},propfind:p,createAccount:async e=>{const{account:t,headers:s,loadCollections:o,loadObjects:n,fetch:i}=e;return ie({account:{serverUrl:r,credentials:a,...t},headers:{...d,...s},loadCollections:o,loadObjects:n,fetch:null!=i?i:c})},createObject:l,updateObject:h,deleteObject:u,calendarQuery:V,addressBookQuery:oe,collectionQuery:f,makeCollection:v,calendarMultiGet:$,makeCalendar:T,syncCollection:O,supportedReportSet:y,isCollectionDirty:m,smartCollectionSync:A,fetchCalendars:E,fetchCalendarUserAddresses:S,fetchCalendarObjects:j,createCalendarObject:Z,updateCalendarObject:G,deleteCalendarObject:ae,syncCalendars:se,fetchAddressBooks:De(P,{account:i,headers:d,fetch:c}),addressBookMultiGet:ne,makeAddressBook:ce,fetchVCards:De(B,{headers:d,fetch:c}),createVCard:De(I,{headers:d,fetch:c}),updateVCard:De(F,{headers:d,fetch:c}),deleteVCard:De(M,{headers:d,fetch:c}),todoQuery:De(pe,{headers:d}),todoMultiGet:De(fe,{headers:d}),fetchTodos:De(ve,{headers:d}),createTodo:De(Oe,{headers:d}),updateTodo:De(ye,{headers:d}),deleteTodo:De(me,{headers:d})}};class ke{constructor(e){var t,r,a;this.serverUrl=e.serverUrl,this.credentials=e.credentials,this.authMethod=null!==(t=e.authMethod)&&void 0!==t?t:"Basic",this.accountType=null!==(r=e.defaultAccountType)&&void 0!==r?r:"caldav",this.authFunction=e.authFunction,this.fetchOptions=null!==(a=e.fetchOptions)&&void 0!==a?a:{},this.fetchOverride=e.fetch}async login(){var e;switch(this.authMethod){case"Basic":this.authHeaders=we(this.credentials);break;case"Bearer":this.authHeaders=be(this.credentials);break;case"Oauth":this.authHeaders=(await $e(this.credentials,this.fetchOptions,this.fetchOverride)).headers;break;case"Digest":this.authHeaders={Authorization:`Digest ${this.credentials.digestString}`};break;case"Custom":this.authHeaders=await(null===(e=this.authFunction)||void 0===e?void 0:e.call(this,this.credentials));break;default:throw new Error("Invalid auth method")}this.account=this.accountType?await ie({account:{serverUrl:this.serverUrl,credentials:this.credentials,accountType:this.accountType},headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride}):void 0}async davRequest(e){const{init:t,fetch:r,...a}=e,{headers:s,...o}=t;return g({...a,init:{...o,headers:{...this.authHeaders,...s}},fetchOptions:this.fetchOptions,fetch:null!=r?r:this.fetchOverride})}async createObject(...e){return De(w,{url:this.serverUrl,headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async updateObject(...e){return De(b,{url:this.serverUrl,headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async deleteObject(...e){return De(C,{url:this.serverUrl,headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async propfind(...e){return De(D,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async createAccount(e){const{account:t,headers:r,loadCollections:a,loadObjects:s,fetchOptions:o,fetch:n}=e;return ie({account:{serverUrl:this.serverUrl,credentials:this.credentials,...t},headers:{...this.authHeaders,...r},loadCollections:a,loadObjects:s,fetchOptions:null!=o?o:this.fetchOptions,fetch:null!=n?n:this.fetchOverride})}async collectionQuery(...e){return De(k,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async makeCollection(...e){return De(_,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async syncCollection(...e){return De(L,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async supportedReportSet(...e){return De(U,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async isCollectionDirty(...e){return De(R,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async smartCollectionSync(...e){return De(x,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride,account:this.account})(e[0])}async calendarQuery(...e){return De(q,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async makeCalendar(...e){return De(W,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async calendarMultiGet(...e){return De(J,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async fetchCalendars(...e){return De(K,{headers:this.authHeaders,account:this.account,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(null==e?void 0:e[0])}async fetchCalendarUserAddresses(...e){return De(Q,{headers:this.authHeaders,account:this.account,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(null==e?void 0:e[0])}async fetchCalendarObjects(...e){return De(Y,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async createCalendarObject(...e){return De(X,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async updateCalendarObject(...e){return De(ee,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async deleteCalendarObject(...e){return De(te,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async syncCalendars(...e){return De(re,{headers:this.authHeaders,account:this.account,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async addressBookQuery(...e){return De(H,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async addressBookMultiGet(...e){return De(N,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async makeAddressBook(...e){return De(z,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async fetchAddressBooks(...e){return De(P,{headers:this.authHeaders,account:this.account,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(null==e?void 0:e[0])}async fetchVCards(...e){return De(B,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async createVCard(...e){return De(I,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async updateVCard(...e){return De(F,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async deleteVCard(...e){return De(M,{headers:this.authHeaders,fetchOptions:this.fetchOptions,fetch:this.fetchOverride})(e[0])}async todoQuery(...e){return De(pe,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async todoMultiGet(...e){return De(fe,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async fetchTodos(...e){return De(ve,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async createTodo(...e){return De(Oe,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async updateTodo(...e){return De(ye,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async deleteTodo(...e){return De(me,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}}var _e={DAVNamespace:s,DAVNamespaceShort:n,DAVAttributeMap:o,...Object.freeze({__proto__:null,DAVClient:ke,createDAVClient:Ee}),...V,...S,...le,...Z,...se,...Ae,...Te,...m};export{o as DAVAttributeMap,ke as DAVClient,s as DAVNamespace,n as DAVNamespaceShort,N as addressBookMultiGet,H as addressBookQuery,J as calendarMultiGet,q as calendarQuery,p as cleanupFalsy,k as collectionQuery,ie as createAccount,X as createCalendarObject,Ee as createDAVClient,w as createObject,Oe as createTodo,I as createVCard,g as davRequest,_e as default,te as deleteCalendarObject,C as deleteObject,me as deleteTodo,M as deleteVCard,P as fetchAddressBooks,Y as fetchCalendarObjects,Q as fetchCalendarUserAddresses,K as fetchCalendars,Ce as fetchOauthTokens,ve as fetchTodos,B as fetchVCards,ae as freeBusyQuery,we as getBasicAuthHeaders,be as getBearerAuthHeaders,u as getDAVAttribute,$e as getOauthHeaders,R as isCollectionDirty,z as makeAddressBook,W as makeCalendar,D as propfind,Ve as refreshAccessToken,x as smartCollectionSync,U as supportedReportSet,re as syncCalendars,L as syncCollection,fe as todoMultiGet,pe as todoQuery,ee as updateCalendarObject,b as updateObject,ye as updateTodo,F as updateVCard,h as urlContains,l as urlEquals}; diff --git a/dist/tsdav.mjs b/dist/tsdav.mjs index 2450aaa4..641c681b 100644 --- a/dist/tsdav.mjs +++ b/dist/tsdav.mjs @@ -118,18 +118,30 @@ const excludeHeaders = (headers, headersToExclude) => { } return Object.fromEntries(Object.entries(headers).filter(([key]) => !headersToExclude.includes(key))); }; +const DEFAULT_ICAL_EXTENSION = '.ics'; +const defaultIcsFilter = (url) => Boolean(url === null || url === void 0 ? void 0 : url.includes(DEFAULT_ICAL_EXTENSION)); +const validateISO8601TimeRange = (start, end) => { + const ISO_8601 = /^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i; + const ISO_8601_FULL = /^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i; + if ((!ISO_8601.test(start) || !ISO_8601.test(end)) && + (!ISO_8601_FULL.test(start) || !ISO_8601_FULL.test(end))) { + throw new Error('invalid timeRange format, not in ISO8601'); + } +}; var requestHelpers = /*#__PURE__*/Object.freeze({ __proto__: null, cleanupFalsy: cleanupFalsy, conditionalParam: conditionalParam, + defaultIcsFilter: defaultIcsFilter, excludeHeaders: excludeHeaders, getDAVAttribute: getDAVAttribute, urlContains: urlContains, - urlEquals: urlEquals + urlEquals: urlEquals, + validateISO8601TimeRange: validateISO8601TimeRange }); -const debug$5 = getLogger('tsdav:request'); +const debug$6 = getLogger('tsdav:request'); const davRequest = async (params) => { var _a; const { url, init, convertIncoming = true, parseOutgoing = true, fetchOptions = {}, fetch: fetchOverride, } = params; @@ -221,7 +233,7 @@ const davRequest = async (params) => { } } catch (e) { - debug$5(e.stack); + debug$6(e.stack); } }, // remove namespace & camelCase @@ -340,7 +352,7 @@ function hasFields(obj, fields) { const findMissingFieldNames = (obj, fields) => fields.reduce((prev, curr) => (obj[curr] ? prev : `${prev.length ? `${prev},` : ''}${curr.toString()}`), ''); /* eslint-disable no-underscore-dangle */ -const debug$4 = getLogger('tsdav:collection'); +const debug$5 = getLogger('tsdav:collection'); const collectionQuery = async (params) => { const { url, body, depth, defaultNamespace = DAVNamespaceShort.DAV, headers, headersToExclude, fetchOptions = {}, fetch: fetchOverride, } = params; const queryResults = await davRequest({ @@ -466,7 +478,7 @@ const smartCollectionSync = async (params) => { throw new Error(`account must have ${findMissingFieldNames(account, requiredFields)} before smartCollectionSync`); } const syncMethod = method !== null && method !== void 0 ? method : (((_a = collection.reports) === null || _a === void 0 ? void 0 : _a.includes('syncCollection')) ? 'webdav' : 'basic'); - debug$4(`smart collection sync with type ${account.accountType} and method ${syncMethod}`); + debug$5(`smart collection sync with type ${account.accountType} and method ${syncMethod}`); if (syncMethod === 'webdav') { const result = await syncCollection({ url: collection.url, @@ -605,7 +617,7 @@ var collection = /*#__PURE__*/Object.freeze({ }); /* eslint-disable no-underscore-dangle */ -const debug$3 = getLogger('tsdav:addressBook'); +const debug$4 = getLogger('tsdav:addressBook'); const addressBookQuery = async (params) => { const { url, props, filters, depth, headers, headersToExclude, fetchOptions = {}, fetch: fetchOverride, } = params; return collectionQuery({ @@ -675,7 +687,7 @@ const fetchAddressBooks = async (params) => { .map((rs) => { var _a, _b, _c, _d, _e, _f, _g, _h, _j; const displayName = (_c = (_b = (_a = rs.props) === null || _a === void 0 ? void 0 : _a.displayname) === null || _b === void 0 ? void 0 : _b._cdata) !== null && _c !== void 0 ? _c : (_d = rs.props) === null || _d === void 0 ? void 0 : _d.displayname; - debug$3(`Found address book named ${typeof displayName === 'string' ? displayName : ''}, + debug$4(`Found address book named ${typeof displayName === 'string' ? displayName : ''}, props: ${JSON.stringify(rs.props)}`); return { url: new URL((_e = rs.href) !== null && _e !== void 0 ? _e : '', (_f = account.rootUrl) !== null && _f !== void 0 ? _f : '').href, @@ -697,7 +709,7 @@ const fetchAddressBooks = async (params) => { }; const fetchVCards = async (params) => { const { addressBook, headers, objectUrls, headersToExclude, urlFilter = (url) => url, useMultiGet = true, fetchOptions = {}, fetch: fetchOverride, } = params; - debug$3(`Fetching vcards from ${addressBook === null || addressBook === void 0 ? void 0 : addressBook.url}`); + debug$4(`Fetching vcards from ${addressBook === null || addressBook === void 0 ? void 0 : addressBook.url}`); const requiredFields = ['url']; if (!addressBook || !hasFields(addressBook, requiredFields)) { if (!addressBook) { @@ -796,6 +808,31 @@ const deleteVCard = async (params) => { fetch: fetchOverride, }); }; +const makeAddressBook = async (params) => { + const { url, props, depth, headers, headersToExclude, fetchOptions = {} } = params; + return davRequest({ + url, + init: { + method: 'MKCOL', + headers: excludeHeaders(cleanupFalsy({ depth, ...headers }), headersToExclude), + namespace: DAVNamespaceShort.DAV, + body: props + ? { + mkcol: { + _attributes: getDAVAttribute([ + DAVNamespace.DAV, + DAVNamespace.CARDDAV, + ]), + set: { + prop: props, + }, + }, + } + : undefined, + }, + fetchOptions, + }); +}; var addressBook = /*#__PURE__*/Object.freeze({ __proto__: null, @@ -805,11 +842,12 @@ var addressBook = /*#__PURE__*/Object.freeze({ deleteVCard: deleteVCard, fetchAddressBooks: fetchAddressBooks, fetchVCards: fetchVCards, + makeAddressBook: makeAddressBook, updateVCard: updateVCard }); /* eslint-disable no-underscore-dangle */ -const debug$2 = getLogger('tsdav:calendar'); +const debug$3 = getLogger('tsdav:calendar'); const fetchCalendarUserAddresses = async (params) => { var _a, _b, _c; const { account, headers, headersToExclude, fetchOptions = {}, fetch: fetchOverride } = params; @@ -817,7 +855,7 @@ const fetchCalendarUserAddresses = async (params) => { if (!hasFields(account, requiredFields)) { throw new Error(`account must have ${findMissingFieldNames(account, requiredFields)} before fetchUserAddresses`); } - debug$2(`Fetch user addresses from ${account.principalUrl}`); + debug$3(`Fetch user addresses from ${account.principalUrl}`); const responses = await propfind({ url: account.principalUrl, props: { [`${DAVNamespaceShort.CALDAV}:calendar-user-address-set`]: {} }, @@ -831,7 +869,7 @@ const fetchCalendarUserAddresses = async (params) => { throw new Error('cannot find calendarUserAddresses'); } const addresses = ((_c = (_b = (_a = matched === null || matched === void 0 ? void 0 : matched.props) === null || _a === void 0 ? void 0 : _a.calendarUserAddressSet) === null || _b === void 0 ? void 0 : _b.href) === null || _c === void 0 ? void 0 : _c.filter(Boolean)) || []; - debug$2(`Fetched calendar user addresses ${addresses}`); + debug$3(`Fetched calendar user addresses ${addresses}`); return addresses; }; const calendarQuery = async (params) => { @@ -970,17 +1008,11 @@ const fetchCalendars = async (params) => { }))); }; const fetchCalendarObjects = async (params) => { - const { calendar, objectUrls, filters: customFilters, timeRange, headers, expand, urlFilter = (url) => Boolean(url === null || url === void 0 ? void 0 : url.includes('.ics')), useMultiGet = true, headersToExclude, fetchOptions = {}, fetch: fetchOverride, } = params; + const { calendar, objectUrls, filters: customFilters, timeRange, headers, expand, urlFilter = defaultIcsFilter, useMultiGet = true, headersToExclude, fetchOptions = {}, fetch: fetchOverride, } = params; if (timeRange) { - // validate timeRange - const ISO_8601 = /^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i; - const ISO_8601_FULL = /^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i; - if ((!ISO_8601.test(timeRange.start) || !ISO_8601.test(timeRange.end)) && - (!ISO_8601_FULL.test(timeRange.start) || !ISO_8601_FULL.test(timeRange.end))) { - throw new Error('invalid timeRange format, not in ISO8601'); - } + validateISO8601TimeRange(timeRange.start, timeRange.end); } - debug$2(`Fetching calendar objects from ${calendar === null || calendar === void 0 ? void 0 : calendar.url}`); + debug$3(`Fetching calendar objects from ${calendar === null || calendar === void 0 ? void 0 : calendar.url}`); const requiredFields = ['url']; if (!calendar || !hasFields(calendar, requiredFields)) { if (!calendar) { @@ -1193,7 +1225,7 @@ const syncCalendars = async (params) => { }); // no existing url const created = remoteCalendars.filter((rc) => localCalendars.every((lc) => !urlContains(lc.url, rc.url))); - debug$2(`new calendars: ${created.map((cc) => cc.displayName)}`); + debug$3(`new calendars: ${created.map((cc) => cc.displayName)}`); // have same url, but syncToken/ctag different const updated = localCalendars.reduce((prev, curr) => { const found = remoteCalendars.find((rc) => urlContains(rc.url, curr.url)); @@ -1204,7 +1236,7 @@ const syncCalendars = async (params) => { } return prev; }, []); - debug$2(`updated calendars: ${updated.map((cc) => cc.displayName)}`); + debug$3(`updated calendars: ${updated.map((cc) => cc.displayName)}`); const updatedWithObjects = await Promise.all(updated.map(async (u) => { const result = await smartCollectionSync({ collection: { ...u, objectMultiGet: calendarMultiGet }, @@ -1218,7 +1250,7 @@ const syncCalendars = async (params) => { })); // does not present in remote const deleted = localCalendars.filter((cal) => remoteCalendars.every((rc) => !urlContains(rc.url, cal.url))); - debug$2(`deleted calendars: ${deleted.map((cc) => cc.displayName)}`); + debug$3(`deleted calendars: ${deleted.map((cc) => cc.displayName)}`); const unchanged = localCalendars.filter((cal) => remoteCalendars.some((rc) => urlContains(rc.url, cal.url) && ((rc.syncToken && `${rc.syncToken}` !== `${cal.syncToken}`) || (rc.ctag && `${rc.ctag}` !== `${cal.ctag}`)))); @@ -1234,13 +1266,7 @@ const syncCalendars = async (params) => { const freeBusyQuery = async (params) => { const { url, timeRange, depth, headers, headersToExclude, fetchOptions = {}, fetch: fetchOverride, } = params; if (timeRange) { - // validate timeRange - const ISO_8601 = /^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i; - const ISO_8601_FULL = /^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i; - if ((!ISO_8601.test(timeRange.start) || !ISO_8601.test(timeRange.end)) && - (!ISO_8601_FULL.test(timeRange.start) || !ISO_8601_FULL.test(timeRange.end))) { - throw new Error('invalid timeRange format, not in ISO8601'); - } + validateISO8601TimeRange(timeRange.start, timeRange.end); } else { throw new Error('timeRange is required'); @@ -1282,10 +1308,10 @@ var calendar = /*#__PURE__*/Object.freeze({ updateCalendarObject: updateCalendarObject }); -const debug$1 = getLogger('tsdav:account'); +const debug$2 = getLogger('tsdav:account'); const serviceDiscovery = async (params) => { var _a, _b; - debug$1('Service discovery...'); + debug$2('Service discovery...'); const { account, headers, headersToExclude, fetchOptions = {}, fetch: fetchOverride } = params; const requestFetch = fetchOverride !== null && fetchOverride !== void 0 ? fetchOverride : fetch; const endpoint = new URL(account.serverUrl); @@ -1311,7 +1337,7 @@ const serviceDiscovery = async (params) => { // http redirect. const location = response.headers.get('Location'); if (typeof location === 'string' && location.length) { - debug$1(`Service discovery redirected to ${location}`); + debug$2(`Service discovery redirected to ${location}`); const serviceURL = new URL(location, endpoint); if (serviceURL.hostname === uri.hostname && uri.port && !serviceURL.port) { serviceURL.port = uri.port; @@ -1322,7 +1348,7 @@ const serviceDiscovery = async (params) => { } } catch (err) { - debug$1(`Service discovery failed: ${err.stack}`); + debug$2(`Service discovery failed: ${err.stack}`); } return endpoint.href; }; @@ -1333,7 +1359,7 @@ const fetchPrincipalUrl = async (params) => { if (!hasFields(account, requiredFields)) { throw new Error(`account must have ${findMissingFieldNames(account, requiredFields)} before fetchPrincipalUrl`); } - debug$1(`Fetching principal url from path ${account.rootUrl}`); + debug$2(`Fetching principal url from path ${account.rootUrl}`); const [response] = await propfind({ url: account.rootUrl, props: { @@ -1345,12 +1371,12 @@ const fetchPrincipalUrl = async (params) => { fetch: fetchOverride, }); if (!response.ok) { - debug$1(`Fetch principal url failed: ${response.statusText}`); + debug$2(`Fetch principal url failed: ${response.statusText}`); if (response.status === 401) { throw new Error('Invalid credentials'); } } - debug$1(`Fetched principal url ${(_b = (_a = response.props) === null || _a === void 0 ? void 0 : _a.currentUserPrincipal) === null || _b === void 0 ? void 0 : _b.href}`); + debug$2(`Fetched principal url ${(_b = (_a = response.props) === null || _a === void 0 ? void 0 : _a.currentUserPrincipal) === null || _b === void 0 ? void 0 : _b.href}`); return new URL((_e = (_d = (_c = response.props) === null || _c === void 0 ? void 0 : _c.currentUserPrincipal) === null || _d === void 0 ? void 0 : _d.href) !== null && _e !== void 0 ? _e : '', account.rootUrl).href; }; const fetchHomeUrl = async (params) => { @@ -1360,7 +1386,7 @@ const fetchHomeUrl = async (params) => { if (!hasFields(account, requiredFields)) { throw new Error(`account must have ${findMissingFieldNames(account, requiredFields)} before fetchHomeUrl`); } - debug$1(`Fetch home url from ${account.principalUrl}`); + debug$2(`Fetch home url from ${account.principalUrl}`); const responses = await propfind({ url: account.principalUrl, props: account.accountType === 'caldav' @@ -1373,13 +1399,13 @@ const fetchHomeUrl = async (params) => { }); const matched = responses.find((r) => urlContains(account.principalUrl, r.href)); if (!matched || !matched.ok) { - debug$1(`Fetch home url failed with status ${matched === null || matched === void 0 ? void 0 : matched.statusText} and error ${JSON.stringify(responses.map((r) => r.error))}`); + debug$2(`Fetch home url failed with status ${matched === null || matched === void 0 ? void 0 : matched.statusText} and error ${JSON.stringify(responses.map((r) => r.error))}`); throw new Error('cannot find homeUrl'); } const result = new URL(account.accountType === 'caldav' ? (_a = matched === null || matched === void 0 ? void 0 : matched.props) === null || _a === void 0 ? void 0 : _a.calendarHomeSet.href : (_b = matched === null || matched === void 0 ? void 0 : matched.props) === null || _b === void 0 ? void 0 : _b.addressbookHomeSet.href, account.rootUrl).href; - debug$1(`Fetched home url ${result}`); + debug$2(`Fetched home url ${result}`); return result; }; const createAccount = async (params) => { @@ -1457,6 +1483,291 @@ var account = /*#__PURE__*/Object.freeze({ serviceDiscovery: serviceDiscovery }); +/* eslint-disable no-underscore-dangle */ +const debug$1 = getLogger('tsdav:todo'); +/** + * Helper function to build expand property for calendar-data + */ +const buildExpandProp = (timeRange) => ({ + [`${DAVNamespaceShort.CALDAV}:expand`]: { + _attributes: { + start: `${new Date(timeRange.start).toISOString().slice(0, 19).replace(/[-:.]/g, '')}Z`, + end: `${new Date(timeRange.end).toISOString().slice(0, 19).replace(/[-:.]/g, '')}Z`, + }, + }, +}); +/** + * Query todos using CalDAV REPORT calendar-query + * + * @param params.url - Calendar URL to query + * @param params.props - Properties to request + * @param params.filters - Optional CalDAV filters + * @param params.timezone - Optional timezone + * @param params.depth - Depth header value + * @param params.headers - Request headers + * @param params.headersToExclude - Headers to exclude + * @param params.fetchOptions - Fetch options + * @returns Array of DAV responses + */ +const todoQuery = async (params) => { + const { url, props, filters, timezone, depth, headers, headersToExclude, fetchOptions = {}, } = params; + return collectionQuery({ + url, + body: { + 'calendar-query': cleanupFalsy({ + _attributes: getDAVAttribute([ + DAVNamespace.CALDAV, + DAVNamespace.CALENDAR_SERVER, + DAVNamespace.CALDAV_APPLE, + DAVNamespace.DAV, + ]), + [`${DAVNamespaceShort.DAV}:prop`]: props, + filter: filters, + timezone, + }), + }, + defaultNamespace: DAVNamespaceShort.CALDAV, + depth, + headers: excludeHeaders(headers, headersToExclude), + fetchOptions, + }); +}; +/** + * Fetch multiple todos by URL using CalDAV calendar-multiget + * + * @param params.url - Calendar URL + * @param params.props - Properties to request + * @param params.objectUrls - Array of todo object URLs to fetch + * @param params.timezone - Optional timezone + * @param params.depth - Depth header value + * @param params.filters - Optional CalDAV filters + * @param params.headers - Request headers + * @param params.headersToExclude - Headers to exclude + * @param params.fetchOptions - Fetch options + * @returns Array of DAV responses + */ +const todoMultiGet = async (params) => { + const { url, props, objectUrls, filters, timezone, depth, headers, headersToExclude, fetchOptions = {}, } = params; + return collectionQuery({ + url, + body: { + 'calendar-multiget': cleanupFalsy({ + _attributes: getDAVAttribute([DAVNamespace.DAV, DAVNamespace.CALDAV]), + [`${DAVNamespaceShort.DAV}:prop`]: props, + [`${DAVNamespaceShort.DAV}:href`]: objectUrls, + filter: filters, + timezone, + }), + }, + defaultNamespace: DAVNamespaceShort.CALDAV, + depth, + headers: excludeHeaders(headers, headersToExclude), + fetchOptions, + }); +}; +/** + * Fetch VTODO objects from a CalDAV calendar with optional filtering + * + * @param params.calendar - Calendar to fetch todos from + * @param params.objectUrls - Optional array of specific todo URLs to fetch + * @param params.filters - Optional custom CalDAV filters + * @param params.timeRange - Optional time range filter in ISO8601 format + * @param params.expand - Whether to expand recurring todos + * @param params.urlFilter - Custom filter function for todo object URLs + * @param params.headers - Request headers + * @param params.headersToExclude - Headers to exclude + * @param params.useMultiGet - Whether to use multiget (default: true) + * @param params.fetchOptions - Fetch options + * @returns Array of todo objects with url, etag, and iCalendar data + * @throws Error if calendar URL is missing or timeRange format is invalid + */ +const fetchTodos = async (params) => { + const { calendar, objectUrls, filters: customFilters, timeRange, headers, expand, urlFilter = defaultIcsFilter, useMultiGet = true, headersToExclude, fetchOptions = {}, } = params; + if (timeRange) { + validateISO8601TimeRange(timeRange.start, timeRange.end); + } + debug$1(`Fetching todo objects from ${calendar === null || calendar === void 0 ? void 0 : calendar.url}`); + const requiredFields = ['url']; + if (!calendar || !hasFields(calendar, requiredFields)) { + if (!calendar) { + throw new Error('cannot fetchTodos for undefined calendar'); + } + throw new Error(`calendar must have ${findMissingFieldNames(calendar, requiredFields)} before fetchTodos`); + } + // Build CalDAV filter for VTODO components + // Structure: VCALENDAR -> VTODO -> optional time-range + const filters = customFilters !== null && customFilters !== void 0 ? customFilters : [ + { + 'comp-filter': { + _attributes: { + name: 'VCALENDAR', + }, + 'comp-filter': { + _attributes: { + name: 'VTODO', + }, + ...(timeRange + ? { + 'time-range': { + _attributes: { + start: `${new Date(timeRange.start) + .toISOString() + .slice(0, 19) + .replace(/[-:.]/g, '')}Z`, + end: `${new Date(timeRange.end) + .toISOString() + .slice(0, 19) + .replace(/[-:.]/g, '')}Z`, + }, + }, + } + : {}), + }, + }, + }, + ]; + const todoObjectUrls = (objectUrls !== null && objectUrls !== void 0 ? objectUrls : + // fetch all todo objects of the calendar + (await todoQuery({ + url: calendar.url, + props: { + [`${DAVNamespaceShort.DAV}:getetag`]: { + ...(expand && timeRange ? buildExpandProp(timeRange) : {}), + }, + }, + filters, + depth: '1', + headers: excludeHeaders(headers, headersToExclude), + fetchOptions, + })).map((res) => { var _a; return (_a = res.href) !== null && _a !== void 0 ? _a : ''; })) + .map((url) => (url.startsWith('http') || !url ? url : new URL(url, calendar.url).href)) + .filter(urlFilter) + .map((url) => new URL(url).pathname); + let todoObjectResults = []; + if (todoObjectUrls.length > 0) { + if (!useMultiGet || expand) { + todoObjectResults = await todoQuery({ + url: calendar.url, + props: { + [`${DAVNamespaceShort.DAV}:getetag`]: {}, + [`${DAVNamespaceShort.CALDAV}:calendar-data`]: { + ...(expand && timeRange ? buildExpandProp(timeRange) : {}), + }, + }, + filters, + depth: '1', + headers: excludeHeaders(headers, headersToExclude), + fetchOptions, + }); + } + else { + todoObjectResults = await todoMultiGet({ + url: calendar.url, + props: { + [`${DAVNamespaceShort.DAV}:getetag`]: {}, + [`${DAVNamespaceShort.CALDAV}:calendar-data`]: { + ...(expand && timeRange ? buildExpandProp(timeRange) : {}), + }, + }, + objectUrls: todoObjectUrls, + depth: '1', + headers: excludeHeaders(headers, headersToExclude), + fetchOptions, + }); + } + } + return todoObjectResults.map((res) => { + var _a, _b, _c, _d, _e, _f; + return ({ + url: new URL((_a = res.href) !== null && _a !== void 0 ? _a : '', calendar.url).href, + etag: `${(_b = res.props) === null || _b === void 0 ? void 0 : _b.getetag}`, + data: (_e = (_d = (_c = res.props) === null || _c === void 0 ? void 0 : _c.calendarData) === null || _d === void 0 ? void 0 : _d._cdata) !== null && _e !== void 0 ? _e : (_f = res.props) === null || _f === void 0 ? void 0 : _f.calendarData, + }); + }); +}; +/** + * Create a new VTODO object in a CalDAV calendar + * + * @param params.calendar - Calendar to create the todo in + * @param params.iCalString - iCalendar data string (must contain UID) + * @param params.filename - Filename for the todo object + * @param params.headers - Request headers + * @param params.headersToExclude - Headers to exclude + * @param params.fetchOptions - Fetch options + * @returns Response from the server + * @throws Error if iCalString does not contain a UID + */ +const createTodo = async (params) => { + const { calendar, iCalString, filename, headers, headersToExclude, fetchOptions = {} } = params; + if (!iCalString.includes('UID:')) { + throw new Error('iCalString must contain a UID'); + } + return createObject({ + url: new URL(filename, calendar.url).href, + data: iCalString, + headers: excludeHeaders({ + 'content-type': 'text/calendar; charset=utf-8', + 'If-None-Match': '*', + ...headers, + }, headersToExclude), + fetchOptions, + }); +}; +/** + * Update an existing VTODO object in a CalDAV calendar + * + * @param params.calendarObject - Todo object to update (must have etag) + * @param params.headers - Request headers + * @param params.headersToExclude - Headers to exclude + * @param params.fetchOptions - Fetch options + * @returns Response from the server + * @throws Error if calendarObject does not have an etag + */ +const updateTodo = async (params) => { + const { calendarObject, headers, headersToExclude, fetchOptions = {} } = params; + if (!calendarObject.etag) { + throw new Error('calendarObject must have etag for update - fetch todo first'); + } + return updateObject({ + url: calendarObject.url, + data: calendarObject.data, + etag: calendarObject.etag, + headers: excludeHeaders({ + 'content-type': 'text/calendar; charset=utf-8', + ...headers, + }, headersToExclude), + fetchOptions, + }); +}; +/** + * Delete a VTODO object from a CalDAV calendar + * + * @param params.calendarObject - Todo object to delete + * @param params.headers - Request headers + * @param params.headersToExclude - Headers to exclude + * @param params.fetchOptions - Fetch options + * @returns Response from the server + */ +const deleteTodo = async (params) => { + const { calendarObject, headers, headersToExclude, fetchOptions = {} } = params; + return deleteObject({ + url: calendarObject.url, + etag: calendarObject.etag, + headers: excludeHeaders(headers, headersToExclude), + fetchOptions, + }); +}; + +var todo = /*#__PURE__*/Object.freeze({ + __proto__: null, + createTodo: createTodo, + deleteTodo: deleteTodo, + fetchTodos: fetchTodos, + todoMultiGet: todoMultiGet, + todoQuery: todoQuery, + updateTodo: updateTodo +}); + const debug = getLogger('tsdav:authHelper'); /** * Provide given params as default params to given function with optional params. @@ -1735,6 +2046,10 @@ const createDAVClient = async (params) => { headers: authHeaders, fetch: fetchOverride, }); + const makeAddressBook$1 = defaultParam(makeAddressBook, { + headers: authHeaders, + fetch: fetchOverride, + }); const fetchAddressBooks$1 = defaultParam(fetchAddressBooks, { account: defaultAccount, headers: authHeaders, @@ -1756,6 +2071,13 @@ const createDAVClient = async (params) => { headers: authHeaders, fetch: fetchOverride, }); + // todo + const todoQuery$1 = defaultParam(todoQuery, { headers: authHeaders }); + const todoMultiGet$1 = defaultParam(todoMultiGet, { headers: authHeaders }); + const fetchTodos$1 = defaultParam(fetchTodos, { headers: authHeaders }); + const createTodo$1 = defaultParam(createTodo, { headers: authHeaders }); + const updateTodo$1 = defaultParam(updateTodo, { headers: authHeaders }); + const deleteTodo$1 = defaultParam(deleteTodo, { headers: authHeaders }); return { davRequest: davRequest$1, propfind: propfind$1, @@ -1782,10 +2104,17 @@ const createDAVClient = async (params) => { syncCalendars: syncCalendars$1, fetchAddressBooks: fetchAddressBooks$1, addressBookMultiGet: addressBookMultiGet$1, + makeAddressBook: makeAddressBook$1, fetchVCards: fetchVCards$1, createVCard: createVCard$1, updateVCard: updateVCard$1, deleteVCard: deleteVCard$1, + todoQuery: todoQuery$1, + todoMultiGet: todoMultiGet$1, + fetchTodos: fetchTodos$1, + createTodo: createTodo$1, + updateTodo: updateTodo$1, + deleteTodo: deleteTodo$1, }; }; class DAVClient { @@ -2023,6 +2352,9 @@ class DAVClient { fetch: this.fetchOverride, })(params[0]); } + async makeAddressBook(...params) { + return defaultParam(makeAddressBook, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); + } async fetchAddressBooks(...params) { return defaultParam(fetchAddressBooks, { headers: this.authHeaders, @@ -2059,6 +2391,24 @@ class DAVClient { fetch: this.fetchOverride, })(params[0]); } + async todoQuery(...params) { + return defaultParam(todoQuery, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); + } + async todoMultiGet(...params) { + return defaultParam(todoMultiGet, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); + } + async fetchTodos(...params) { + return defaultParam(fetchTodos, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); + } + async createTodo(...params) { + return defaultParam(createTodo, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); + } + async updateTodo(...params) { + return defaultParam(updateTodo, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); + } + async deleteTodo(...params) { + return defaultParam(deleteTodo, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); + } } var client = /*#__PURE__*/Object.freeze({ @@ -2077,8 +2427,9 @@ var index = { ...account, ...addressBook, ...calendar, + ...todo, ...authHelpers, ...requestHelpers, }; -export { DAVAttributeMap, DAVClient, DAVNamespace, DAVNamespaceShort, addressBookMultiGet, addressBookQuery, calendarMultiGet, calendarQuery, cleanupFalsy, collectionQuery, createAccount, createCalendarObject, createDAVClient, createObject, createVCard, davRequest, index as default, deleteCalendarObject, deleteObject, deleteVCard, fetchAddressBooks, fetchCalendarObjects, fetchCalendarUserAddresses, fetchCalendars, fetchOauthTokens, fetchVCards, freeBusyQuery, getBasicAuthHeaders, getBearerAuthHeaders, getDAVAttribute, getOauthHeaders, isCollectionDirty, makeCalendar, propfind, refreshAccessToken, smartCollectionSync, supportedReportSet, syncCalendars, syncCollection, updateCalendarObject, updateObject, updateVCard, urlContains, urlEquals }; +export { DAVAttributeMap, DAVClient, DAVNamespace, DAVNamespaceShort, addressBookMultiGet, addressBookQuery, calendarMultiGet, calendarQuery, cleanupFalsy, collectionQuery, createAccount, createCalendarObject, createDAVClient, createObject, createTodo, createVCard, davRequest, index as default, deleteCalendarObject, deleteObject, deleteTodo, deleteVCard, fetchAddressBooks, fetchCalendarObjects, fetchCalendarUserAddresses, fetchCalendars, fetchOauthTokens, fetchTodos, fetchVCards, freeBusyQuery, getBasicAuthHeaders, getBearerAuthHeaders, getDAVAttribute, getOauthHeaders, isCollectionDirty, makeAddressBook, makeCalendar, propfind, refreshAccessToken, smartCollectionSync, supportedReportSet, syncCalendars, syncCollection, todoMultiGet, todoQuery, updateCalendarObject, updateObject, updateTodo, updateVCard, urlContains, urlEquals }; diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index fb12bce5..00000000 --- a/package-lock.json +++ /dev/null @@ -1,11769 +0,0 @@ -{ - "name": "tsdav", - "version": "2.2.1", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "tsdav", - "version": "2.2.1", - "license": "MIT", - "dependencies": { - "base-64": "1.0.0", - "cross-fetch": "4.1.0", - "debug": "4.4.1", - "xml-js": "1.6.11" - }, - "devDependencies": { - "@rollup/plugin-commonjs": "28.0.5", - "@rollup/plugin-node-resolve": "16.0.1", - "@rollup/plugin-terser": "0.4.4", - "@rollup/plugin-typescript": "12.1.2", - "@types/base-64": "1.0.2", - "@types/debug": "4.1.12", - "@types/jest": "30.0.0", - "@types/node": "24.0.3", - "@typescript-eslint/eslint-plugin": "8.34.1", - "@typescript-eslint/parser": "8.34.1", - "copyfiles": "2.4.1", - "cross-env": "7.0.3", - "dotenv": "16.5.0", - "eslint": "9.25.1", - "eslint-config-airbnb": "19.0.4", - "eslint-config-airbnb-typescript": "18.0.0", - "eslint-config-prettier": "10.1.5", - "eslint-module-utils": "2.12.0", - "eslint-plugin-import": "2.31.0", - "eslint-plugin-prettier": "5.5.0", - "husky": "^9.1.7", - "jest": "30.0.0", - "prettier": "3.5.3", - "rimraf": "6.0.1", - "rollup": "4.43.0", - "rollup-plugin-dts": "6.2.1", - "rollup-plugin-node-builtins": "2.1.2", - "rollup-plugin-polyfill-node": "0.13.0", - "sort-package-json": "3.2.1", - "ts-jest": "29.4.0", - "tslib": "2.8.1", - "typescript": "5.8.3" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", - "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.27.1", - "js-tokens": "^4.0.0", - "picocolors": "^1.1.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.5.tgz", - "integrity": "sha512-6uFXyCayocRbqhZOB+6XcuZbkMNimwfVGFji8CTZnCzOHVGvDqzvitu1re2AU5LROliz7eQPhB8CpAMvnx9EjA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.5.tgz", - "integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.28.5", - "@babel/helper-compilation-targets": "^7.27.2", - "@babel/helper-module-transforms": "^7.28.3", - "@babel/helpers": "^7.28.4", - "@babel/parser": "^7.28.5", - "@babel/template": "^7.27.2", - "@babel/traverse": "^7.28.5", - "@babel/types": "^7.28.5", - "@jridgewell/remapping": "^2.3.5", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/core/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/generator": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.5.tgz", - "integrity": "sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.28.5", - "@babel/types": "^7.28.5", - "@jridgewell/gen-mapping": "^0.3.12", - "@jridgewell/trace-mapping": "^0.3.28", - "jsesc": "^3.0.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.27.2", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz", - "integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.27.2", - "@babel/helper-validator-option": "^7.27.1", - "browserslist": "^4.24.0", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/helper-globals": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", - "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz", - "integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/traverse": "^7.27.1", - "@babel/types": "^7.27.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.28.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz", - "integrity": "sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-imports": "^7.27.1", - "@babel/helper-validator-identifier": "^7.27.1", - "@babel/traverse": "^7.28.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz", - "integrity": "sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", - "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", - "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", - "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.4.tgz", - "integrity": "sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.27.2", - "@babel/types": "^7.28.4" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/parser": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.5.tgz", - "integrity": "sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.28.5" - }, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.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-import-attributes": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.27.1.tgz", - "integrity": "sha512-oFT0FrKHgF53f4vOsZGi2Hh3I35PfSmVs4IBFLFj4dnafP+hIWDLg3VyKmUHfLoLHlyxY4C7DGtmHuJgn+IGww==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" - }, - "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-jsx": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.27.1.tgz", - "integrity": "sha512-y8YTNIeKoyhGd9O0Jiyzyyqk8gdjnumGTQPsz0xOZOQ2RmkVJeZ1vmmfIvFEKqucBG6axJGBZDE/7iI5suUI/w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" - }, - "engines": { - "node": ">=6.9.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.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.27.1.tgz", - "integrity": "sha512-xfYCBMxveHrRMnAWl1ZlPXOZjzkN82THFvLhQhFXFt81Z5HnN+EtUkZhv/zcKpmT3fzmWZB0ywiBrbC3vogbwQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/template": { - "version": "7.27.2", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", - "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.27.1", - "@babel/parser": "^7.27.2", - "@babel/types": "^7.27.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.5.tgz", - "integrity": "sha512-TCCj4t55U90khlYkVV/0TfkJkAkUg3jZFA3Neb7unZT8CPok7iiRfaX0F+WnqWqt7OxhOn0uBKXCw4lbL8W0aQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.28.5", - "@babel/helper-globals": "^7.28.0", - "@babel/parser": "^7.28.5", - "@babel/template": "^7.27.2", - "@babel/types": "^7.28.5", - "debug": "^4.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/types": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.5.tgz", - "integrity": "sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.27.1", - "@babel/helper-validator-identifier": "^7.28.5" - }, - "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/@emnapi/core": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.7.0.tgz", - "integrity": "sha512-pJdKGq/1iquWYtv1RRSljZklxHCOCAJFJrImO5ZLKPJVJlVUcs8yFwNQlqS0Lo8xT1VAXXTCZocF9n26FWEKsw==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@emnapi/wasi-threads": "1.1.0", - "tslib": "^2.4.0" - } - }, - "node_modules/@emnapi/runtime": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.7.0.tgz", - "integrity": "sha512-oAYoQnCYaQZKVS53Fq23ceWMRxq5EhQsE0x0RdQ55jT7wagMu5k+fS39v1fiSLrtrLQlXwVINenqhLMtTrV/1Q==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, - "node_modules/@emnapi/wasi-threads": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.1.0.tgz", - "integrity": "sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz", - "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", - "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/config-array": { - "version": "0.20.1", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.20.1.tgz", - "integrity": "sha512-OL0RJzC/CBzli0DrrR31qzj6d6i6Mm3HByuhflhl4LOBiWxN+3i6/t/ZQQNii4tjksXi8r2CRW1wMpWA2ULUEw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/object-schema": "^2.1.6", - "debug": "^4.3.1", - "minimatch": "^3.1.2" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/config-array/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@eslint/config-array/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/@eslint/config-helpers": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.2.3.tgz", - "integrity": "sha512-u180qk2Um1le4yf0ruXH3PYFeEZeYC3p/4wCTKrr2U1CmGdzGi3KtY0nuPDH48UJxlKCC5RDzbcbh4X0XlqgHg==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/core": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.13.0.tgz", - "integrity": "sha512-yfkgDw1KR66rkT5A8ci4irzDysN7FRpq3ttJolR88OqQikAWqwA8j5VZyas+vjyBNFIJ7MfybJ9plMILI2UrCw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@types/json-schema": "^7.0.15" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", - "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^10.0.1", - "globals": "^14.0.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": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@eslint/eslintrc/node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/@eslint/eslintrc/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/@eslint/js": { - "version": "9.25.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.25.1.tgz", - "integrity": "sha512-dEIwmjntEx8u3Uvv+kr3PDeeArL8Hw07H9kyYxCjnM9pBjfEhk6uLXSchxxzgiwtRhhzVzqmUSDFBOi1TuZ7qg==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/object-schema": { - "version": "2.1.7", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz", - "integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/plugin-kit": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.8.tgz", - "integrity": "sha512-ZAoA40rNMPwSm+AeHpCq8STiNAwzWLJuP8Xv4CHIc9wv/PSuExjMrmjfYNj682vW0OOiZ1HKxzvjQr9XZIisQA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/core": "^0.13.0", - "levn": "^0.4.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@humanfs/core": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", - "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanfs/node": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", - "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanfs/core": "^0.19.1", - "@humanwhocodes/retry": "^0.4.0" - }, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/retry": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", - "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@isaacs/balanced-match": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz", - "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/@isaacs/brace-expansion": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz", - "integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@isaacs/balanced-match": "^4.0.1" - }, - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", - "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-styles": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", - "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@isaacs/cliui/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", - "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "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/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/@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/load-nyc-config/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/@istanbuljs/load-nyc-config/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/@istanbuljs/load-nyc-config/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/@istanbuljs/load-nyc-config/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/@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": "30.0.0", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-30.0.0.tgz", - "integrity": "sha512-vfpJap6JZQ3I8sUN8dsFqNAKJYO4KIGxkcB+3Fw7Q/BJiWY5HwtMMiuT1oP0avsiDhjE/TCLaDgbGfHwDdBVeg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.0.0", - "@types/node": "*", - "chalk": "^4.1.2", - "jest-message-util": "30.0.0", - "jest-util": "30.0.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/console/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/@jest/console/node_modules/jest-message-util": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-30.0.0.tgz", - "integrity": "sha512-pV3qcrb4utEsa/U7UI2VayNzSDQcmCllBZLSoIucrESRu0geKThFZOjjh0kACDJFJRAQwsK7GVsmS6SpEceD8w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.27.1", - "@jest/types": "30.0.0", - "@types/stack-utils": "^2.0.3", - "chalk": "^4.1.2", - "graceful-fs": "^4.2.11", - "micromatch": "^4.0.8", - "pretty-format": "30.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.6" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/console/node_modules/jest-util": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.0.0.tgz", - "integrity": "sha512-fhNBBM9uSUbd4Lzsf8l/kcAdaHD/4SgoI48en3HXcBEMwKwoleKFMZ6cYEYs21SB779PRuRCyNLmymApAm8tZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.0.0", - "@types/node": "*", - "chalk": "^4.1.2", - "ci-info": "^4.2.0", - "graceful-fs": "^4.2.11", - "picomatch": "^4.0.2" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/console/node_modules/pretty-format": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.0.0.tgz", - "integrity": "sha512-18NAOUr4ZOQiIR+BgI5NhQE7uREdx4ZyV0dyay5izh4yfQ+1T7BSvggxvRGoXocrRyevqW5OhScUjbi9GB8R8Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "30.0.0", - "ansi-styles": "^5.2.0", - "react-is": "^18.3.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/core": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-30.0.0.tgz", - "integrity": "sha512-1zU39zFtWSl5ZuDK3Rd6P8S28MmS4F11x6Z4CURrgJ99iaAJg68hmdJ2SAHEEO6ociaNk43UhUYtHxWKEWoNYw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "30.0.0", - "@jest/pattern": "30.0.0", - "@jest/reporters": "30.0.0", - "@jest/test-result": "30.0.0", - "@jest/transform": "30.0.0", - "@jest/types": "30.0.0", - "@types/node": "*", - "ansi-escapes": "^4.3.2", - "chalk": "^4.1.2", - "ci-info": "^4.2.0", - "exit-x": "^0.2.2", - "graceful-fs": "^4.2.11", - "jest-changed-files": "30.0.0", - "jest-config": "30.0.0", - "jest-haste-map": "30.0.0", - "jest-message-util": "30.0.0", - "jest-regex-util": "30.0.0", - "jest-resolve": "30.0.0", - "jest-resolve-dependencies": "30.0.0", - "jest-runner": "30.0.0", - "jest-runtime": "30.0.0", - "jest-snapshot": "30.0.0", - "jest-util": "30.0.0", - "jest-validate": "30.0.0", - "jest-watcher": "30.0.0", - "micromatch": "^4.0.8", - "pretty-format": "30.0.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/@jest/core/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/@jest/core/node_modules/jest-message-util": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-30.0.0.tgz", - "integrity": "sha512-pV3qcrb4utEsa/U7UI2VayNzSDQcmCllBZLSoIucrESRu0geKThFZOjjh0kACDJFJRAQwsK7GVsmS6SpEceD8w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.27.1", - "@jest/types": "30.0.0", - "@types/stack-utils": "^2.0.3", - "chalk": "^4.1.2", - "graceful-fs": "^4.2.11", - "micromatch": "^4.0.8", - "pretty-format": "30.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.6" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/core/node_modules/jest-util": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.0.0.tgz", - "integrity": "sha512-fhNBBM9uSUbd4Lzsf8l/kcAdaHD/4SgoI48en3HXcBEMwKwoleKFMZ6cYEYs21SB779PRuRCyNLmymApAm8tZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.0.0", - "@types/node": "*", - "chalk": "^4.1.2", - "ci-info": "^4.2.0", - "graceful-fs": "^4.2.11", - "picomatch": "^4.0.2" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/core/node_modules/pretty-format": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.0.0.tgz", - "integrity": "sha512-18NAOUr4ZOQiIR+BgI5NhQE7uREdx4ZyV0dyay5izh4yfQ+1T7BSvggxvRGoXocrRyevqW5OhScUjbi9GB8R8Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "30.0.0", - "ansi-styles": "^5.2.0", - "react-is": "^18.3.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/diff-sequences": { - "version": "30.0.1", - "resolved": "https://registry.npmjs.org/@jest/diff-sequences/-/diff-sequences-30.0.1.tgz", - "integrity": "sha512-n5H8QLDJ47QqbCNn5SuFjCRDrOLEZ0h8vAHCK5RL9Ls7Xa8AQLa/YxAc9UjFqoEDM48muwtBGjtMY5cr0PLDCw==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/environment": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-30.0.0.tgz", - "integrity": "sha512-09sFbMMgS5JxYnvgmmtwIHhvoyzvR5fUPrVl8nOCrC5KdzmmErTcAxfWyAhJ2bv3rvHNQaKiS+COSG+O7oNbXw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/fake-timers": "30.0.0", - "@jest/types": "30.0.0", - "@types/node": "*", - "jest-mock": "30.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/environment/node_modules/jest-mock": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-30.0.0.tgz", - "integrity": "sha512-W2sRA4ALXILrEetEOh2ooZG6fZ01iwVs0OWMKSSWRcUlaLr4ESHuiKXDNTg+ZVgOq8Ei5445i/Yxrv59VT+XkA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.0.0", - "@types/node": "*", - "jest-util": "30.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/environment/node_modules/jest-util": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.0.0.tgz", - "integrity": "sha512-fhNBBM9uSUbd4Lzsf8l/kcAdaHD/4SgoI48en3HXcBEMwKwoleKFMZ6cYEYs21SB779PRuRCyNLmymApAm8tZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.0.0", - "@types/node": "*", - "chalk": "^4.1.2", - "ci-info": "^4.2.0", - "graceful-fs": "^4.2.11", - "picomatch": "^4.0.2" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/expect": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-30.0.0.tgz", - "integrity": "sha512-XZ3j6syhMeKiBknmmc8V3mNIb44kxLTbOQtaXA4IFdHy+vEN0cnXRzbRjdGBtrp4k1PWyMWNU3Fjz3iejrhpQg==", - "dev": true, - "license": "MIT", - "dependencies": { - "expect": "30.0.0", - "jest-snapshot": "30.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/expect-utils": { - "version": "30.2.0", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-30.2.0.tgz", - "integrity": "sha512-1JnRfhqpD8HGpOmQp180Fo9Zt69zNtC+9lR+kT7NVL05tNXIi+QC8Csz7lfidMoVLPD3FnOtcmp0CEFnxExGEA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/get-type": "30.1.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/expect/node_modules/@jest/diff-sequences": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/@jest/diff-sequences/-/diff-sequences-30.0.0.tgz", - "integrity": "sha512-xMbtoCeKJDto86GW6AiwVv7M4QAuI56R7dVBr1RNGYbOT44M2TIzOiske2RxopBqkumDY+A1H55pGvuribRY9A==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/expect/node_modules/@jest/expect-utils": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-30.0.0.tgz", - "integrity": "sha512-UiWfsqNi/+d7xepfOv8KDcbbzcYtkWBe3a3kVDtg6M1kuN6CJ7b4HzIp5e1YHrSaQaVS8sdCoyCMCZClTLNKFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/get-type": "30.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/expect/node_modules/@jest/get-type": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/@jest/get-type/-/get-type-30.0.0.tgz", - "integrity": "sha512-VZWMjrBzqfDKngQ7sUctKeLxanAbsBFoZnPxNIG6CmxK7Gv6K44yqd0nzveNIBfuhGZMmk1n5PGbvdSTOu0yTg==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/expect/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/@jest/expect/node_modules/expect": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-30.0.0.tgz", - "integrity": "sha512-xCdPp6gwiR9q9lsPCHANarIkFTN/IMZso6Kkq03sOm9IIGtzK/UJqml0dkhHibGh8HKOj8BIDIpZ0BZuU7QK6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/expect-utils": "30.0.0", - "@jest/get-type": "30.0.0", - "jest-matcher-utils": "30.0.0", - "jest-message-util": "30.0.0", - "jest-mock": "30.0.0", - "jest-util": "30.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/expect/node_modules/jest-diff": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-30.0.0.tgz", - "integrity": "sha512-TgT1+KipV8JTLXXeFX0qSvIJR/UXiNNojjxb/awh3vYlBZyChU/NEmyKmq+wijKjWEztyrGJFL790nqMqNjTHA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/diff-sequences": "30.0.0", - "@jest/get-type": "30.0.0", - "chalk": "^4.1.2", - "pretty-format": "30.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/expect/node_modules/jest-matcher-utils": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-30.0.0.tgz", - "integrity": "sha512-m5mrunqopkrqwG1mMdJxe1J4uGmS9AHHKYUmoxeQOxBcLjEvirIrIDwuKmUYrecPHVB/PUBpXs2gPoeA2FSSLQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/get-type": "30.0.0", - "chalk": "^4.1.2", - "jest-diff": "30.0.0", - "pretty-format": "30.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/expect/node_modules/jest-message-util": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-30.0.0.tgz", - "integrity": "sha512-pV3qcrb4utEsa/U7UI2VayNzSDQcmCllBZLSoIucrESRu0geKThFZOjjh0kACDJFJRAQwsK7GVsmS6SpEceD8w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.27.1", - "@jest/types": "30.0.0", - "@types/stack-utils": "^2.0.3", - "chalk": "^4.1.2", - "graceful-fs": "^4.2.11", - "micromatch": "^4.0.8", - "pretty-format": "30.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.6" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/expect/node_modules/jest-mock": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-30.0.0.tgz", - "integrity": "sha512-W2sRA4ALXILrEetEOh2ooZG6fZ01iwVs0OWMKSSWRcUlaLr4ESHuiKXDNTg+ZVgOq8Ei5445i/Yxrv59VT+XkA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.0.0", - "@types/node": "*", - "jest-util": "30.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/expect/node_modules/jest-util": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.0.0.tgz", - "integrity": "sha512-fhNBBM9uSUbd4Lzsf8l/kcAdaHD/4SgoI48en3HXcBEMwKwoleKFMZ6cYEYs21SB779PRuRCyNLmymApAm8tZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.0.0", - "@types/node": "*", - "chalk": "^4.1.2", - "ci-info": "^4.2.0", - "graceful-fs": "^4.2.11", - "picomatch": "^4.0.2" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/expect/node_modules/pretty-format": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.0.0.tgz", - "integrity": "sha512-18NAOUr4ZOQiIR+BgI5NhQE7uREdx4ZyV0dyay5izh4yfQ+1T7BSvggxvRGoXocrRyevqW5OhScUjbi9GB8R8Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "30.0.0", - "ansi-styles": "^5.2.0", - "react-is": "^18.3.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/fake-timers": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-30.0.0.tgz", - "integrity": "sha512-yzBmJcrMHAMcAEbV2w1kbxmx8WFpEz8Cth3wjLMSkq+LO8VeGKRhpr5+BUp7PPK+x4njq/b6mVnDR8e/tPL5ng==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.0.0", - "@sinonjs/fake-timers": "^13.0.0", - "@types/node": "*", - "jest-message-util": "30.0.0", - "jest-mock": "30.0.0", - "jest-util": "30.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/fake-timers/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/@jest/fake-timers/node_modules/jest-message-util": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-30.0.0.tgz", - "integrity": "sha512-pV3qcrb4utEsa/U7UI2VayNzSDQcmCllBZLSoIucrESRu0geKThFZOjjh0kACDJFJRAQwsK7GVsmS6SpEceD8w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.27.1", - "@jest/types": "30.0.0", - "@types/stack-utils": "^2.0.3", - "chalk": "^4.1.2", - "graceful-fs": "^4.2.11", - "micromatch": "^4.0.8", - "pretty-format": "30.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.6" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/fake-timers/node_modules/jest-mock": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-30.0.0.tgz", - "integrity": "sha512-W2sRA4ALXILrEetEOh2ooZG6fZ01iwVs0OWMKSSWRcUlaLr4ESHuiKXDNTg+ZVgOq8Ei5445i/Yxrv59VT+XkA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.0.0", - "@types/node": "*", - "jest-util": "30.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/fake-timers/node_modules/jest-util": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.0.0.tgz", - "integrity": "sha512-fhNBBM9uSUbd4Lzsf8l/kcAdaHD/4SgoI48en3HXcBEMwKwoleKFMZ6cYEYs21SB779PRuRCyNLmymApAm8tZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.0.0", - "@types/node": "*", - "chalk": "^4.1.2", - "ci-info": "^4.2.0", - "graceful-fs": "^4.2.11", - "picomatch": "^4.0.2" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/fake-timers/node_modules/pretty-format": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.0.0.tgz", - "integrity": "sha512-18NAOUr4ZOQiIR+BgI5NhQE7uREdx4ZyV0dyay5izh4yfQ+1T7BSvggxvRGoXocrRyevqW5OhScUjbi9GB8R8Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "30.0.0", - "ansi-styles": "^5.2.0", - "react-is": "^18.3.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/get-type": { - "version": "30.1.0", - "resolved": "https://registry.npmjs.org/@jest/get-type/-/get-type-30.1.0.tgz", - "integrity": "sha512-eMbZE2hUnx1WV0pmURZY9XoXPkUYjpc55mb0CrhtdWLtzMQPFvu/rZkTLZFTsdaVQa+Tr4eWAteqcUzoawq/uA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/globals": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-30.0.0.tgz", - "integrity": "sha512-OEzYes5A1xwBJVMPqFRa8NCao8Vr42nsUZuf/SpaJWoLE+4kyl6nCQZ1zqfipmCrIXQVALC5qJwKy/7NQQLPhw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "30.0.0", - "@jest/expect": "30.0.0", - "@jest/types": "30.0.0", - "jest-mock": "30.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/globals/node_modules/jest-mock": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-30.0.0.tgz", - "integrity": "sha512-W2sRA4ALXILrEetEOh2ooZG6fZ01iwVs0OWMKSSWRcUlaLr4ESHuiKXDNTg+ZVgOq8Ei5445i/Yxrv59VT+XkA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.0.0", - "@types/node": "*", - "jest-util": "30.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/globals/node_modules/jest-util": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.0.0.tgz", - "integrity": "sha512-fhNBBM9uSUbd4Lzsf8l/kcAdaHD/4SgoI48en3HXcBEMwKwoleKFMZ6cYEYs21SB779PRuRCyNLmymApAm8tZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.0.0", - "@types/node": "*", - "chalk": "^4.1.2", - "ci-info": "^4.2.0", - "graceful-fs": "^4.2.11", - "picomatch": "^4.0.2" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/pattern": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/@jest/pattern/-/pattern-30.0.0.tgz", - "integrity": "sha512-k+TpEThzLVXMkbdxf8KHjZ83Wl+G54ytVJoDIGWwS96Ql4xyASRjc6SU1hs5jHVql+hpyK9G8N7WuFhLpGHRpQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "jest-regex-util": "30.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/reporters": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-30.0.0.tgz", - "integrity": "sha512-5WHNlLO0Ok+/o6ML5IzgVm1qyERtLHBNhwn67PAq92H4hZ+n5uW/BYj1VVwmTdxIcNrZLxdV9qtpdZkXf16HxA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "30.0.0", - "@jest/test-result": "30.0.0", - "@jest/transform": "30.0.0", - "@jest/types": "30.0.0", - "@jridgewell/trace-mapping": "^0.3.25", - "@types/node": "*", - "chalk": "^4.1.2", - "collect-v8-coverage": "^1.0.2", - "exit-x": "^0.2.2", - "glob": "^10.3.10", - "graceful-fs": "^4.2.11", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^6.0.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^5.0.0", - "istanbul-reports": "^3.1.3", - "jest-message-util": "30.0.0", - "jest-util": "30.0.0", - "jest-worker": "30.0.0", - "slash": "^3.0.0", - "string-length": "^4.0.2", - "v8-to-istanbul": "^9.0.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/@jest/reporters/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/@jest/reporters/node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", - "dev": true, - "license": "ISC", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@jest/reporters/node_modules/jest-message-util": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-30.0.0.tgz", - "integrity": "sha512-pV3qcrb4utEsa/U7UI2VayNzSDQcmCllBZLSoIucrESRu0geKThFZOjjh0kACDJFJRAQwsK7GVsmS6SpEceD8w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.27.1", - "@jest/types": "30.0.0", - "@types/stack-utils": "^2.0.3", - "chalk": "^4.1.2", - "graceful-fs": "^4.2.11", - "micromatch": "^4.0.8", - "pretty-format": "30.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.6" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/reporters/node_modules/jest-util": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.0.0.tgz", - "integrity": "sha512-fhNBBM9uSUbd4Lzsf8l/kcAdaHD/4SgoI48en3HXcBEMwKwoleKFMZ6cYEYs21SB779PRuRCyNLmymApAm8tZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.0.0", - "@types/node": "*", - "chalk": "^4.1.2", - "ci-info": "^4.2.0", - "graceful-fs": "^4.2.11", - "picomatch": "^4.0.2" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/reporters/node_modules/pretty-format": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.0.0.tgz", - "integrity": "sha512-18NAOUr4ZOQiIR+BgI5NhQE7uREdx4ZyV0dyay5izh4yfQ+1T7BSvggxvRGoXocrRyevqW5OhScUjbi9GB8R8Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "30.0.0", - "ansi-styles": "^5.2.0", - "react-is": "^18.3.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/schemas": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-30.0.0.tgz", - "integrity": "sha512-NID2VRyaEkevCRz6badhfqYwri/RvMbiHY81rk3AkK/LaiB0LSxi1RdVZ7MpZdTjNugtZeGfpL0mLs9Kp3MrQw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@sinclair/typebox": "^0.34.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/snapshot-utils": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/@jest/snapshot-utils/-/snapshot-utils-30.0.0.tgz", - "integrity": "sha512-C/QSFUmvZEYptg2Vin84FggAphwHvj6la39vkw1CNOZQORWZ7O/H0BXmdeeeGnvlXDYY8TlFM5jgFnxLAxpFjA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.0.0", - "chalk": "^4.1.2", - "graceful-fs": "^4.2.11", - "natural-compare": "^1.4.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/source-map": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-30.0.0.tgz", - "integrity": "sha512-oYBJ4d/NF4ZY3/7iq1VaeoERHRvlwKtrGClgescaXMIa1mmb+vfJd0xMgbW9yrI80IUA7qGbxpBWxlITrHkWoA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.25", - "callsites": "^3.1.0", - "graceful-fs": "^4.2.11" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/test-result": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-30.0.0.tgz", - "integrity": "sha512-685zco9HdgBaaWiB9T4xjLtBuN0Q795wgaQPpmuAeZPHwHZSoKFAUnozUtU+ongfi4l5VCz8AclOE5LAQdyjxQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "30.0.0", - "@jest/types": "30.0.0", - "@types/istanbul-lib-coverage": "^2.0.6", - "collect-v8-coverage": "^1.0.2" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/test-sequencer": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-30.0.0.tgz", - "integrity": "sha512-Hmvv5Yg6UmghXIcVZIydkT0nAK7M/hlXx9WMHR5cLVwdmc14/qUQt3mC72T6GN0olPC6DhmKE6Cd/pHsgDbuqQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/test-result": "30.0.0", - "graceful-fs": "^4.2.11", - "jest-haste-map": "30.0.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/transform": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-30.0.0.tgz", - "integrity": "sha512-8xhpsCGYJsUjqpJOgLyMkeOSSlhqggFZEWAnZquBsvATtueoEs7CkMRxOUmJliF3E5x+mXmZ7gEEsHank029Og==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.27.4", - "@jest/types": "30.0.0", - "@jridgewell/trace-mapping": "^0.3.25", - "babel-plugin-istanbul": "^7.0.0", - "chalk": "^4.1.2", - "convert-source-map": "^2.0.0", - "fast-json-stable-stringify": "^2.1.0", - "graceful-fs": "^4.2.11", - "jest-haste-map": "30.0.0", - "jest-regex-util": "30.0.0", - "jest-util": "30.0.0", - "micromatch": "^4.0.8", - "pirates": "^4.0.7", - "slash": "^3.0.0", - "write-file-atomic": "^5.0.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/transform/node_modules/jest-util": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.0.0.tgz", - "integrity": "sha512-fhNBBM9uSUbd4Lzsf8l/kcAdaHD/4SgoI48en3HXcBEMwKwoleKFMZ6cYEYs21SB779PRuRCyNLmymApAm8tZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.0.0", - "@types/node": "*", - "chalk": "^4.1.2", - "ci-info": "^4.2.0", - "graceful-fs": "^4.2.11", - "picomatch": "^4.0.2" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/types": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-30.0.0.tgz", - "integrity": "sha512-1Nox8mAL52PKPfEnUQWBvKU/bp8FTT6AiDu76bFDEJj/qsRFSAVSldfCH3XYMqialti2zHXKvD5gN0AaHc0yKA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/pattern": "30.0.0", - "@jest/schemas": "30.0.0", - "@types/istanbul-lib-coverage": "^2.0.6", - "@types/istanbul-reports": "^3.0.4", - "@types/node": "*", - "@types/yargs": "^17.0.33", - "chalk": "^4.1.2" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.13", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", - "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.0", - "@jridgewell/trace-mapping": "^0.3.24" - } - }, - "node_modules/@jridgewell/remapping": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", - "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/source-map": { - "version": "0.3.11", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.11.tgz", - "integrity": "sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", - "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", - "dev": true, - "license": "MIT" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.31", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", - "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@napi-rs/wasm-runtime": { - "version": "0.2.12", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.12.tgz", - "integrity": "sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@emnapi/core": "^1.4.3", - "@emnapi/runtime": "^1.4.3", - "@tybys/wasm-util": "^0.10.0" - } - }, - "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/@pkgjs/parseargs": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/@pkgr/core": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.2.9.tgz", - "integrity": "sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/pkgr" - } - }, - "node_modules/@rollup/plugin-commonjs": { - "version": "28.0.5", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-28.0.5.tgz", - "integrity": "sha512-lytLp2JgAMwqJY6ve3OSROXr2XuEYHjnsQN3hmnxC+w11dI91LuUw4Yc1kk2FqKXeMG8psoFejFgK+znoij0cg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rollup/pluginutils": "^5.0.1", - "commondir": "^1.0.1", - "estree-walker": "^2.0.2", - "fdir": "^6.2.0", - "is-reference": "1.2.1", - "magic-string": "^0.30.3", - "picomatch": "^4.0.2" - }, - "engines": { - "node": ">=16.0.0 || 14 >= 14.17" - }, - "peerDependencies": { - "rollup": "^2.68.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, - "node_modules/@rollup/plugin-inject": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@rollup/plugin-inject/-/plugin-inject-5.0.5.tgz", - "integrity": "sha512-2+DEJbNBoPROPkgTDNe8/1YXWcqxbN5DTjASVIOx8HS+pITXushyNiBV56RB08zuptzz8gT3YfkqriTBVycepg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rollup/pluginutils": "^5.0.1", - "estree-walker": "^2.0.2", - "magic-string": "^0.30.3" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, - "node_modules/@rollup/plugin-node-resolve": { - "version": "16.0.1", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-16.0.1.tgz", - "integrity": "sha512-tk5YCxJWIG81umIvNkSod2qK5KyQW19qcBF/B78n1bjtOON6gzKoVeSzAE8yHCZEDmqkHKkxplExA8KzdJLJpA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rollup/pluginutils": "^5.0.1", - "@types/resolve": "1.20.2", - "deepmerge": "^4.2.2", - "is-module": "^1.0.0", - "resolve": "^1.22.1" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^2.78.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, - "node_modules/@rollup/plugin-terser": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.4.4.tgz", - "integrity": "sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==", - "dev": true, - "license": "MIT", - "dependencies": { - "serialize-javascript": "^6.0.1", - "smob": "^1.0.0", - "terser": "^5.17.4" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^2.0.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, - "node_modules/@rollup/plugin-typescript": { - "version": "12.1.2", - "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-12.1.2.tgz", - "integrity": "sha512-cdtSp154H5sv637uMr1a8OTWB0L1SWDSm1rDGiyfcGcvQ6cuTs4MDk2BVEBGysUWago4OJN4EQZqOTl/QY3Jgg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rollup/pluginutils": "^5.1.0", - "resolve": "^1.22.1" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^2.14.0||^3.0.0||^4.0.0", - "tslib": "*", - "typescript": ">=3.7.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - }, - "tslib": { - "optional": true - } - } - }, - "node_modules/@rollup/pluginutils": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.3.0.tgz", - "integrity": "sha512-5EdhGZtnu3V88ces7s53hhfK5KSASnJZv8Lulpc04cWO3REESroJXg73DFsOmgbU2BhwV0E20bu2IDZb3VKW4Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "^1.0.0", - "estree-walker": "^2.0.2", - "picomatch": "^4.0.2" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, - "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.43.0.tgz", - "integrity": "sha512-Krjy9awJl6rKbruhQDgivNbD1WuLb8xAclM4IR4cN5pHGAs2oIMMQJEiC3IC/9TZJ+QZkmZhlMO/6MBGxPidpw==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-android-arm64": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.43.0.tgz", - "integrity": "sha512-ss4YJwRt5I63454Rpj+mXCXicakdFmKnUNxr1dLK+5rv5FJgAxnN7s31a5VchRYxCFWdmnDWKd0wbAdTr0J5EA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.43.0.tgz", - "integrity": "sha512-eKoL8ykZ7zz8MjgBenEF2OoTNFAPFz1/lyJ5UmmFSz5jW+7XbH1+MAgCVHy72aG59rbuQLcJeiMrP8qP5d/N0A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.43.0.tgz", - "integrity": "sha512-SYwXJgaBYW33Wi/q4ubN+ldWC4DzQY62S4Ll2dgfr/dbPoF50dlQwEaEHSKrQdSjC6oIe1WgzosoaNoHCdNuMg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.43.0.tgz", - "integrity": "sha512-SV+U5sSo0yujrjzBF7/YidieK2iF6E7MdF6EbYxNz94lA+R0wKl3SiixGyG/9Klab6uNBIqsN7j4Y/Fya7wAjQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.43.0.tgz", - "integrity": "sha512-J7uCsiV13L/VOeHJBo5SjasKiGxJ0g+nQTrBkAsmQBIdil3KhPnSE9GnRon4ejX1XDdsmK/l30IYLiAaQEO0Cg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.43.0.tgz", - "integrity": "sha512-gTJ/JnnjCMc15uwB10TTATBEhK9meBIY+gXP4s0sHD1zHOaIh4Dmy1X9wup18IiY9tTNk5gJc4yx9ctj/fjrIw==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.43.0.tgz", - "integrity": "sha512-ZJ3gZynL1LDSIvRfz0qXtTNs56n5DI2Mq+WACWZ7yGHFUEirHBRt7fyIk0NsCKhmRhn7WAcjgSkSVVxKlPNFFw==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.43.0.tgz", - "integrity": "sha512-8FnkipasmOOSSlfucGYEu58U8cxEdhziKjPD2FIa0ONVMxvl/hmONtX/7y4vGjdUhjcTHlKlDhw3H9t98fPvyA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.43.0.tgz", - "integrity": "sha512-KPPyAdlcIZ6S9C3S2cndXDkV0Bb1OSMsX0Eelr2Bay4EsF9yi9u9uzc9RniK3mcUGCLhWY9oLr6er80P5DE6XA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.43.0.tgz", - "integrity": "sha512-HPGDIH0/ZzAZjvtlXj6g+KDQ9ZMHfSP553za7o2Odegb/BEfwJcR0Sw0RLNpQ9nC6Gy8s+3mSS9xjZ0n3rhcYg==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.43.0.tgz", - "integrity": "sha512-gEmwbOws4U4GLAJDhhtSPWPXUzDfMRedT3hFMyRAvM9Mrnj+dJIFIeL7otsv2WF3D7GrV0GIewW0y28dOYWkmw==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.43.0.tgz", - "integrity": "sha512-XXKvo2e+wFtXZF/9xoWohHg+MuRnvO29TI5Hqe9xwN5uN8NKUYy7tXUG3EZAlfchufNCTHNGjEx7uN78KsBo0g==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.43.0.tgz", - "integrity": "sha512-ruf3hPWhjw6uDFsOAzmbNIvlXFXlBQ4nk57Sec8E8rUxs/AI4HD6xmiiasOOx/3QxS2f5eQMKTAwk7KHwpzr/Q==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.43.0.tgz", - "integrity": "sha512-QmNIAqDiEMEvFV15rsSnjoSmO0+eJLoKRD9EAa9rrYNwO/XRCtOGM3A5A0X+wmG+XRrw9Fxdsw+LnyYiZWWcVw==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.43.0.tgz", - "integrity": "sha512-jAHr/S0iiBtFyzjhOkAics/2SrXE092qyqEg96e90L3t9Op8OTzS6+IX0Fy5wCt2+KqeHAkti+eitV0wvblEoQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.43.0.tgz", - "integrity": "sha512-3yATWgdeXyuHtBhrLt98w+5fKurdqvs8B53LaoKD7P7H7FKOONLsBVMNl9ghPQZQuYcceV5CDyPfyfGpMWD9mQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.43.0.tgz", - "integrity": "sha512-wVzXp2qDSCOpcBCT5WRWLmpJRIzv23valvcTwMHEobkjippNf+C3ys/+wf07poPkeNix0paTNemB2XrHr2TnGw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.43.0.tgz", - "integrity": "sha512-fYCTEyzf8d+7diCw8b+asvWDCLMjsCEA8alvtAutqJOJp/wL5hs1rWSqJ1vkjgW0L2NB4bsYJrpKkiIPRR9dvw==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.43.0.tgz", - "integrity": "sha512-SnGhLiE5rlK0ofq8kzuDkM0g7FN1s5VYY+YSMTibP7CqShxCQvqtNxTARS4xX4PFJfHjG0ZQYX9iGzI3FQh5Aw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rtsao/scc": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", - "integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==", - "dev": true, - "license": "MIT" - }, - "node_modules/@sinclair/typebox": { - "version": "0.34.41", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.41.tgz", - "integrity": "sha512-6gS8pZzSXdyRHTIqoqSVknxolr1kzfy4/CeDnrzsVz8TTIWUbOBr6gnzOmTYJ3eXQNh4IYHIGi5aIL7sOZ2G/g==", - "dev": true, - "license": "MIT" - }, - "node_modules/@sinonjs/commons": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", - "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/@sinonjs/fake-timers": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-13.0.5.tgz", - "integrity": "sha512-36/hTbH2uaWuGVERyC6da9YwGWnzUZXuPro/F2LfsdOsLnCojz/iSH8MxUt/FD2S5XBSVPhmArFUXcpCQ2Hkiw==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sinonjs/commons": "^3.0.1" - } - }, - "node_modules/@tybys/wasm-util": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.1.tgz", - "integrity": "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, - "node_modules/@types/babel__core": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", - "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "node_modules/@types/babel__generator": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", - "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__template": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", - "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__traverse": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", - "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.28.2" - } - }, - "node_modules/@types/base-64": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@types/base-64/-/base-64-1.0.2.tgz", - "integrity": "sha512-uPgKMmM9fmn7I+Zi6YBqctOye4SlJsHKcisjHIMWpb2YKZRc36GpKyNuQ03JcT+oNXg1m7Uv4wU94EVltn8/cw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/debug": { - "version": "4.1.12", - "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", - "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/ms": "*" - } - }, - "node_modules/@types/estree": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", - "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", - "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/istanbul-lib-report": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", - "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-coverage": "*" - } - }, - "node_modules/@types/istanbul-reports": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", - "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-report": "*" - } - }, - "node_modules/@types/jest": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-30.0.0.tgz", - "integrity": "sha512-XTYugzhuwqWjws0CVz8QpM36+T+Dz5mTEBKhNs/esGLnCIlGdRy+Dq78NRjd7ls7r8BC8ZRMOrKlkO1hU0JOwA==", - "dev": true, - "license": "MIT", - "dependencies": { - "expect": "^30.0.0", - "pretty-format": "^30.0.0" - } - }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/json5": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/ms": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz", - "integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/node": { - "version": "24.0.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.3.tgz", - "integrity": "sha512-R4I/kzCYAdRLzfiCabn9hxWfbuHS573x+r0dJMkkzThEa7pbrcDWK+9zu3e7aBOouf+rQAciqPFMnxwr0aWgKg==", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~7.8.0" - } - }, - "node_modules/@types/resolve": { - "version": "1.20.2", - "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", - "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/stack-utils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", - "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/yargs": { - "version": "17.0.34", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.34.tgz", - "integrity": "sha512-KExbHVa92aJpw9WDQvzBaGVE2/Pz+pLZQloT2hjL8IqsZnV62rlPOYvNnLmf/L2dyllfVUOVBj64M0z/46eR2A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@types/yargs-parser": { - "version": "21.0.3", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", - "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.34.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.34.1.tgz", - "integrity": "sha512-STXcN6ebF6li4PxwNeFnqF8/2BNDvBupf2OPx2yWNzr6mKNGF7q49VM00Pz5FaomJyqvbXpY6PhO+T9w139YEQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.34.1", - "@typescript-eslint/type-utils": "8.34.1", - "@typescript-eslint/utils": "8.34.1", - "@typescript-eslint/visitor-keys": "8.34.1", - "graphemer": "^1.4.0", - "ignore": "^7.0.0", - "natural-compare": "^1.4.0", - "ts-api-utils": "^2.1.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^8.34.1", - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "8.34.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.34.1.tgz", - "integrity": "sha512-4O3idHxhyzjClSMJ0a29AcoK0+YwnEqzI6oz3vlRf3xw0zbzt15MzXwItOlnr5nIth6zlY2RENLsOPvhyrKAQA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/scope-manager": "8.34.1", - "@typescript-eslint/types": "8.34.1", - "@typescript-eslint/typescript-estree": "8.34.1", - "@typescript-eslint/visitor-keys": "8.34.1", - "debug": "^4.3.4" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" - } - }, - "node_modules/@typescript-eslint/project-service": { - "version": "8.34.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.34.1.tgz", - "integrity": "sha512-nuHlOmFZfuRwLJKDGQOVc0xnQrAmuq1Mj/ISou5044y1ajGNp2BNliIqp7F2LPQ5sForz8lempMFCovfeS1XoA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.34.1", - "@typescript-eslint/types": "^8.34.1", - "debug": "^4.3.4" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <5.9.0" - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "8.34.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.34.1.tgz", - "integrity": "sha512-beu6o6QY4hJAgL1E8RaXNC071G4Kso2MGmJskCFQhRhg8VOH/FDbC8soP8NHN7e/Hdphwp8G8cE6OBzC8o41ZA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.34.1", - "@typescript-eslint/visitor-keys": "8.34.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.34.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.34.1.tgz", - "integrity": "sha512-K4Sjdo4/xF9NEeA2khOb7Y5nY6NSXBnod87uniVYW9kHP+hNlDV8trUSFeynA2uxWam4gIWgWoygPrv9VMWrYg==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <5.9.0" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "8.34.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.34.1.tgz", - "integrity": "sha512-Tv7tCCr6e5m8hP4+xFugcrwTOucB8lshffJ6zf1mF1TbU67R+ntCc6DzLNKM+s/uzDyv8gLq7tufaAhIBYeV8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/typescript-estree": "8.34.1", - "@typescript-eslint/utils": "8.34.1", - "debug": "^4.3.4", - "ts-api-utils": "^2.1.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" - } - }, - "node_modules/@typescript-eslint/types": { - "version": "8.34.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.34.1.tgz", - "integrity": "sha512-rjLVbmE7HR18kDsjNIZQHxmv9RZwlgzavryL5Lnj2ujIRTeXlKtILHgRNmQ3j4daw7zd+mQgy+uyt6Zo6I0IGA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.34.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.34.1.tgz", - "integrity": "sha512-rjCNqqYPuMUF5ODD+hWBNmOitjBWghkGKJg6hiCHzUvXRy6rK22Jd3rwbP2Xi+R7oYVvIKhokHVhH41BxPV5mA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/project-service": "8.34.1", - "@typescript-eslint/tsconfig-utils": "8.34.1", - "@typescript-eslint/types": "8.34.1", - "@typescript-eslint/visitor-keys": "8.34.1", - "debug": "^4.3.4", - "fast-glob": "^3.3.2", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^2.1.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <5.9.0" - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "8.34.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.34.1.tgz", - "integrity": "sha512-mqOwUdZ3KjtGk7xJJnLbHxTuWVn3GO2WZZuM+Slhkun4+qthLdXx32C8xIXbO1kfCECb3jIs3eoxK3eryk7aoQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.34.1", - "@typescript-eslint/types": "8.34.1", - "@typescript-eslint/typescript-estree": "8.34.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.34.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.34.1.tgz", - "integrity": "sha512-xoh5rJ+tgsRKoXnkBPFRLZ7rjKM0AfVbC68UZ/ECXoDbfggb9RbEySN359acY1vS3qZ0jVTVWzbtfapwm5ztxw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.34.1", - "eslint-visitor-keys": "^4.2.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", - "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@ungap/structured-clone": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", - "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", - "dev": true, - "license": "ISC" - }, - "node_modules/@unrs/resolver-binding-android-arm-eabi": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm-eabi/-/resolver-binding-android-arm-eabi-1.11.1.tgz", - "integrity": "sha512-ppLRUgHVaGRWUx0R0Ut06Mjo9gBaBkg3v/8AxusGLhsIotbBLuRk51rAzqLC8gq6NyyAojEXglNjzf6R948DNw==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@unrs/resolver-binding-android-arm64": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm64/-/resolver-binding-android-arm64-1.11.1.tgz", - "integrity": "sha512-lCxkVtb4wp1v+EoN+HjIG9cIIzPkX5OtM03pQYkG+U5O/wL53LC4QbIeazgiKqluGeVEeBlZahHalCaBvU1a2g==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@unrs/resolver-binding-darwin-arm64": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.11.1.tgz", - "integrity": "sha512-gPVA1UjRu1Y/IsB/dQEsp2V1pm44Of6+LWvbLc9SDk1c2KhhDRDBUkQCYVWe6f26uJb3fOK8saWMgtX8IrMk3g==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@unrs/resolver-binding-darwin-x64": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-x64/-/resolver-binding-darwin-x64-1.11.1.tgz", - "integrity": "sha512-cFzP7rWKd3lZaCsDze07QX1SC24lO8mPty9vdP+YVa3MGdVgPmFc59317b2ioXtgCMKGiCLxJ4HQs62oz6GfRQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@unrs/resolver-binding-freebsd-x64": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-freebsd-x64/-/resolver-binding-freebsd-x64-1.11.1.tgz", - "integrity": "sha512-fqtGgak3zX4DCB6PFpsH5+Kmt/8CIi4Bry4rb1ho6Av2QHTREM+47y282Uqiu3ZRF5IQioJQ5qWRV6jduA+iGw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@unrs/resolver-binding-linux-arm-gnueabihf": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-gnueabihf/-/resolver-binding-linux-arm-gnueabihf-1.11.1.tgz", - "integrity": "sha512-u92mvlcYtp9MRKmP+ZvMmtPN34+/3lMHlyMj7wXJDeXxuM0Vgzz0+PPJNsro1m3IZPYChIkn944wW8TYgGKFHw==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-arm-musleabihf": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-musleabihf/-/resolver-binding-linux-arm-musleabihf-1.11.1.tgz", - "integrity": "sha512-cINaoY2z7LVCrfHkIcmvj7osTOtm6VVT16b5oQdS4beibX2SYBwgYLmqhBjA1t51CarSaBuX5YNsWLjsqfW5Cw==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-arm64-gnu": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-gnu/-/resolver-binding-linux-arm64-gnu-1.11.1.tgz", - "integrity": "sha512-34gw7PjDGB9JgePJEmhEqBhWvCiiWCuXsL9hYphDF7crW7UgI05gyBAi6MF58uGcMOiOqSJ2ybEeCvHcq0BCmQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-arm64-musl": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-musl/-/resolver-binding-linux-arm64-musl-1.11.1.tgz", - "integrity": "sha512-RyMIx6Uf53hhOtJDIamSbTskA99sPHS96wxVE/bJtePJJtpdKGXO1wY90oRdXuYOGOTuqjT8ACccMc4K6QmT3w==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-ppc64-gnu": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-ppc64-gnu/-/resolver-binding-linux-ppc64-gnu-1.11.1.tgz", - "integrity": "sha512-D8Vae74A4/a+mZH0FbOkFJL9DSK2R6TFPC9M+jCWYia/q2einCubX10pecpDiTmkJVUH+y8K3BZClycD8nCShA==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-riscv64-gnu": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-gnu/-/resolver-binding-linux-riscv64-gnu-1.11.1.tgz", - "integrity": "sha512-frxL4OrzOWVVsOc96+V3aqTIQl1O2TjgExV4EKgRY09AJ9leZpEg8Ak9phadbuX0BA4k8U5qtvMSQQGGmaJqcQ==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-riscv64-musl": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-musl/-/resolver-binding-linux-riscv64-musl-1.11.1.tgz", - "integrity": "sha512-mJ5vuDaIZ+l/acv01sHoXfpnyrNKOk/3aDoEdLO/Xtn9HuZlDD6jKxHlkN8ZhWyLJsRBxfv9GYM2utQ1SChKew==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-s390x-gnu": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-s390x-gnu/-/resolver-binding-linux-s390x-gnu-1.11.1.tgz", - "integrity": "sha512-kELo8ebBVtb9sA7rMe1Cph4QHreByhaZ2QEADd9NzIQsYNQpt9UkM9iqr2lhGr5afh885d/cB5QeTXSbZHTYPg==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-x64-gnu": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-gnu/-/resolver-binding-linux-x64-gnu-1.11.1.tgz", - "integrity": "sha512-C3ZAHugKgovV5YvAMsxhq0gtXuwESUKc5MhEtjBpLoHPLYM+iuwSj3lflFwK3DPm68660rZ7G8BMcwSro7hD5w==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-x64-musl": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.11.1.tgz", - "integrity": "sha512-rV0YSoyhK2nZ4vEswT/QwqzqQXw5I6CjoaYMOX0TqBlWhojUf8P94mvI7nuJTeaCkkds3QE4+zS8Ko+GdXuZtA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-wasm32-wasi": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-wasm32-wasi/-/resolver-binding-wasm32-wasi-1.11.1.tgz", - "integrity": "sha512-5u4RkfxJm+Ng7IWgkzi3qrFOvLvQYnPBmjmZQ8+szTK/b31fQCnleNl1GgEt7nIsZRIf5PLhPwT0WM+q45x/UQ==", - "cpu": [ - "wasm32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@napi-rs/wasm-runtime": "^0.2.11" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@unrs/resolver-binding-win32-arm64-msvc": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.11.1.tgz", - "integrity": "sha512-nRcz5Il4ln0kMhfL8S3hLkxI85BXs3o8EYoattsJNdsX4YUU89iOkVn7g0VHSRxFuVMdM4Q1jEpIId1Ihim/Uw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@unrs/resolver-binding-win32-ia32-msvc": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.11.1.tgz", - "integrity": "sha512-DCEI6t5i1NmAZp6pFonpD5m7i6aFrpofcp4LA2i8IIq60Jyo28hamKBxNrZcyOwVOZkgsRp9O2sXWBWP8MnvIQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@unrs/resolver-binding-win32-x64-msvc": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.11.1.tgz", - "integrity": "sha512-lrW200hZdbfRtztbygyaq/6jP6AKE8qQN2KvPcJ+x7wiD038YtnYtZ82IMNJ69GJibV7bwL3y9FgK+5w/pYt6g==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/abstract-leveldown": { - "version": "0.12.4", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-0.12.4.tgz", - "integrity": "sha512-TOod9d5RDExo6STLMGa+04HGkl+TlMfbDnTyN93/ETJ9DpQ0DaYLqcMZlbXvdc4W3vVo1Qrl+WhSp8zvDsJ+jA==", - "deprecated": "Superseded by abstract-level (https://github.com/Level/community#faq)", - "dev": true, - "license": "MIT", - "dependencies": { - "xtend": "~3.0.0" - } - }, - "node_modules/abstract-leveldown/node_modules/xtend": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz", - "integrity": "sha512-sp/sT9OALMjRW1fKDlPeuSZlDQpkqReA0pyJukniWbTGoEKefHxhGJynE3PNhUMlcM8qWIjPwecwCw4LArS5Eg==", - "dev": true, - "engines": { - "node": ">=0.4" - } - }, - "node_modules/acorn": { - "version": "8.15.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", - "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", - "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==", - "dev": true, - "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-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.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/anymatch/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/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-buffer-byte-length": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", - "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "is-array-buffer": "^3.0.5" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array-includes": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.9.tgz", - "integrity": "sha512-FmeCCAenzH0KH381SPT5FZmiA/TmpndpcaShhfgEN9eCVjnFBqq3l1xrI42y8+PPLI6hypzou4GXw00WHmPBLQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "define-properties": "^1.2.1", - "es-abstract": "^1.24.0", - "es-object-atoms": "^1.1.1", - "get-intrinsic": "^1.3.0", - "is-string": "^1.1.1", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.findlastindex": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.6.tgz", - "integrity": "sha512-F/TKATkzseUExPlfvmwQKGITM3DGTK+vkAsCZoDc5daVygbJBnjEUCbgkAvVFsgfXfX4YIqZ/27G3k3tdXrTxQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.9", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "es-shim-unscopables": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.flat": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz", - "integrity": "sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.flatmap": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz", - "integrity": "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", - "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-buffer-byte-length": "^1.0.1", - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "is-array-buffer": "^3.0.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/asn1.js": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", - "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", - "dev": true, - "license": "MIT", - "dependencies": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "node_modules/asn1.js/node_modules/bn.js": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", - "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", - "dev": true, - "license": "MIT" - }, - "node_modules/async": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", - "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", - "dev": true, - "license": "MIT" - }, - "node_modules/async-function": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz", - "integrity": "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/available-typed-arrays": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", - "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "possible-typed-array-names": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/babel-jest": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-30.0.0.tgz", - "integrity": "sha512-JQ0DhdFjODbSawDf0026uZuwaqfKkQzk+9mwWkq2XkKFIaMhFVOxlVmbFCOnnC76jATdxrff3IiUAvOAJec6tw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/transform": "30.0.0", - "@types/babel__core": "^7.20.5", - "babel-plugin-istanbul": "^7.0.0", - "babel-preset-jest": "30.0.0", - "chalk": "^4.1.2", - "graceful-fs": "^4.2.11", - "slash": "^3.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.11.0" - } - }, - "node_modules/babel-plugin-istanbul": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-7.0.1.tgz", - "integrity": "sha512-D8Z6Qm8jCvVXtIRkBnqNHX0zJ37rQcFJ9u8WOS6tkYOsRdHBzypCstaxWiu5ZIlqQtviRYbgnRLSoCEvjqcqbA==", - "dev": true, - "license": "BSD-3-Clause", - "workspaces": [ - "test/babel-8" - ], - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.3", - "istanbul-lib-instrument": "^6.0.2", - "test-exclude": "^6.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/babel-plugin-jest-hoist": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-30.0.0.tgz", - "integrity": "sha512-DSRm+US/FCB4xPDD6Rnslb6PAF9Bej1DZ+1u4aTiqJnk7ZX12eHsnDiIOqjGvITCq+u6wLqUhgS+faCNbVY8+g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.27.2", - "@babel/types": "^7.27.3", - "@types/babel__core": "^7.20.5" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/babel-preset-current-node-syntax": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.2.0.tgz", - "integrity": "sha512-E/VlAEzRrsLEb2+dv8yp3bo4scof3l9nR4lrld+Iy5NyVqgVYUJnDAmunkhPMisRI32Qc4iRiz425d8vM++2fg==", - "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.12.13", - "@babel/plugin-syntax-class-static-block": "^7.14.5", - "@babel/plugin-syntax-import-attributes": "^7.24.7", - "@babel/plugin-syntax-import-meta": "^7.10.4", - "@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" - }, - "peerDependencies": { - "@babel/core": "^7.0.0 || ^8.0.0-0" - } - }, - "node_modules/babel-preset-jest": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-30.0.0.tgz", - "integrity": "sha512-hgEuu/W7gk8QOWUA9+m3Zk+WpGvKc1Egp6rFQEfYxEoM9Fk/q8nuTXNL65OkhwGrTApauEGgakOoWVXj+UfhKw==", - "dev": true, - "license": "MIT", - "dependencies": { - "babel-plugin-jest-hoist": "30.0.0", - "babel-preset-current-node-syntax": "^1.1.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.11.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/base-64": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/base-64/-/base-64-1.0.0.tgz", - "integrity": "sha512-kwDPIFCGx0NZHog36dj+tHiwP4QMzsZ3AgMViUBKI0+V5n4U0ufTCUMhnQ04diaRI8EX/QcPfql7zlhZ7j4zgg==", - "license": "MIT" - }, - "node_modules/baseline-browser-mapping": { - "version": "2.8.24", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.24.tgz", - "integrity": "sha512-uUhTRDPXamakPyghwrUcjaGvvBqGrWvBHReoiULMIpOJVM9IYzQh83Xk2Onx5HlGI2o10NNCzcs9TG/S3TkwrQ==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "baseline-browser-mapping": "dist/cli.js" - } - }, - "node_modules/bl": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/bl/-/bl-0.8.2.tgz", - "integrity": "sha512-pfqikmByp+lifZCS0p6j6KreV6kNU6Apzpm2nKOk+94cZb/jvle55+JxWiByUQ0Wo/+XnDXEy5MxxKMb6r0VIw==", - "dev": true, - "license": "MIT", - "dependencies": { - "readable-stream": "~1.0.26" - } - }, - "node_modules/bn.js": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.2.tgz", - "integrity": "sha512-v2YAxEmKaBLahNwE1mjp4WON6huMNeuDvagFZW+ASCuA/ku0bXR9hSMw0XpiqMoA3+rmnyck/tPRSFQkoC9Cuw==", - "dev": true, - "license": "MIT" - }, - "node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", - "dev": true, - "license": "MIT" - }, - "node_modules/browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", - "dev": true, - "license": "MIT", - "dependencies": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "node_modules/browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/browserify-fs": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/browserify-fs/-/browserify-fs-1.0.0.tgz", - "integrity": "sha512-8LqHRPuAEKvyTX34R6tsw4bO2ro6j9DmlYBhiYWHRM26Zv2cBw1fJOU0NeUQ0RkXkPn/PFBjhA0dm4AgaBurTg==", - "dev": true, - "dependencies": { - "level-filesystem": "^1.0.1", - "level-js": "^2.1.3", - "levelup": "^0.18.2" - } - }, - "node_modules/browserify-rsa": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.1.tgz", - "integrity": "sha512-YBjSAiTqM04ZVei6sXighu679a3SqWORA3qZTEqZImnlkDIFtKc6pNutpjyZ8RJTjQtuYfeetkxM11GwoYXMIQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "bn.js": "^5.2.1", - "randombytes": "^2.1.0", - "safe-buffer": "^5.2.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/browserify-sign": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.5.tgz", - "integrity": "sha512-C2AUdAJg6rlM2W5QMp2Q4KGQMVBwR1lIimTsUnutJ8bMpW5B52pGpR2gEnNBNwijumDo5FojQ0L9JrXA8m4YEw==", - "dev": true, - "license": "ISC", - "dependencies": { - "bn.js": "^5.2.2", - "browserify-rsa": "^4.1.1", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "elliptic": "^6.6.1", - "inherits": "^2.0.4", - "parse-asn1": "^5.1.9", - "readable-stream": "^2.3.8", - "safe-buffer": "^5.2.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/browserify-sign/node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/browserify-sign/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dev": true, - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/browserify-sign/node_modules/readable-stream/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/browserify-sign/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/browserify-sign/node_modules/string_decoder/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/browserslist": { - "version": "4.27.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.27.0.tgz", - "integrity": "sha512-AXVQwdhot1eqLihwasPElhX2tAZiBjWdJ9i/Zcj2S6QYIjkx62OKSfnobkriB81C3l4w0rVy3Nt4jaTBltYEpw==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "baseline-browser-mapping": "^2.8.19", - "caniuse-lite": "^1.0.30001751", - "electron-to-chromium": "^1.5.238", - "node-releases": "^2.0.26", - "update-browserslist-db": "^1.1.4" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/bs-logger": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", - "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-json-stable-stringify": "2.x" - }, - "engines": { - "node": ">= 6" - } - }, - "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-es6": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/buffer-es6/-/buffer-es6-4.9.3.tgz", - "integrity": "sha512-Ibt+oXxhmeYJSsCkODPqNpPmyegefiD8rfutH1NYGhMZQhSp95Rz7haemgnJ6dxa6LT+JLLbtgOMORRluwKktw==", - "dev": true, - "license": "MIT" - }, - "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/buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/call-bind": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", - "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.0", - "es-define-property": "^1.0.0", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/call-bind-apply-helpers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", - "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/call-bound": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", - "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "get-intrinsic": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - }, - "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": "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/caniuse-lite": { - "version": "1.0.30001753", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001753.tgz", - "integrity": "sha512-Bj5H35MD/ebaOV4iDLqPEtiliTN29qkGtEHCwawWn4cYm+bPJM2NsaP30vtZcnERClMzp52J4+aw2UNbK4o+zw==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.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": "4.3.1", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.3.1.tgz", - "integrity": "sha512-Wdy2Igu8OcBpI2pZePZ5oWjPC38tmDVx5WKUXKwlLYkA0ozo85sLsLvkBbBn/sZaSCMFOGZJ14fvW9t5/d7kdA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/cipher-base": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.7.tgz", - "integrity": "sha512-Mz9QMT5fJe7bKI7MH31UilT5cEK5EHHRCccw/YRFsRY47AuNgaV6HY3rscp0/I4Q+tTW/5zoqpSeRRI54TkDWA==", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.4", - "safe-buffer": "^5.2.1", - "to-buffer": "^1.2.2" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/cjs-module-lexer": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.1.0.tgz", - "integrity": "sha512-UX0OwmYRYQQetfrLEZeewIFFI+wSTofC+pMBLNuH3RUuu/xzG1oz84UCEDOSoQlN3fZ4+AzmV50ZYvGqkMh9yA==", - "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/clone": { - "version": "0.1.19", - "resolved": "https://registry.npmjs.org/clone/-/clone-0.1.19.tgz", - "integrity": "sha512-IO78I0y6JcSpEPHzK4obKdsL7E7oLdRVDVOLwr2Hkbjsb+Eoz0dxW6tef0WizoKu0gLC4oZSZuEF4U2K6w1WQw==", - "dev": true, - "license": "MIT", - "engines": { - "node": "*" - } - }, - "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.3", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.3.tgz", - "integrity": "sha512-1L5aqIkwPfiodaMgQunkF1zRhNqifHBmtbbbxcr6yVxxBnliw4TDOW6NxpO8DJLgJ16OT+Y4ztZqP6p/FtXnAw==", - "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/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", - "dev": true, - "license": "MIT" - }, - "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/concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "engines": [ - "node >= 0.8" - ], - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "node_modules/concat-stream/node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/concat-stream/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dev": true, - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/concat-stream/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/concat-stream/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/confusing-browser-globals": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz", - "integrity": "sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==", - "dev": true, - "license": "MIT" - }, - "node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true, - "license": "MIT" - }, - "node_modules/copyfiles": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/copyfiles/-/copyfiles-2.4.1.tgz", - "integrity": "sha512-fereAvAvxDrQDOXybk3Qu3dPbOoKoysFMWtkY3mv5BsL8//OSZVL5DCLYqgRfY5cWirgRzlC+WSrxp6Bo3eNZg==", - "dev": true, - "license": "MIT", - "dependencies": { - "glob": "^7.0.5", - "minimatch": "^3.0.3", - "mkdirp": "^1.0.4", - "noms": "0.0.0", - "through2": "^2.0.1", - "untildify": "^4.0.0", - "yargs": "^16.1.0" - }, - "bin": { - "copyfiles": "copyfiles", - "copyup": "copyfiles" - } - }, - "node_modules/copyfiles/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/copyfiles/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/core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/create-ecdh": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", - "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", - "dev": true, - "license": "MIT", - "dependencies": { - "bn.js": "^4.1.0", - "elliptic": "^6.5.3" - } - }, - "node_modules/create-ecdh/node_modules/bn.js": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", - "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", - "dev": true, - "license": "MIT" - }, - "node_modules/create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "dev": true, - "license": "MIT", - "dependencies": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "node_modules/create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "dev": true, - "license": "MIT", - "dependencies": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "node_modules/cross-env": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", - "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", - "dev": true, - "license": "MIT", - "dependencies": { - "cross-spawn": "^7.0.1" - }, - "bin": { - "cross-env": "src/bin/cross-env.js", - "cross-env-shell": "src/bin/cross-env-shell.js" - }, - "engines": { - "node": ">=10.14", - "npm": ">=6", - "yarn": ">=1" - } - }, - "node_modules/cross-fetch": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.1.0.tgz", - "integrity": "sha512-uKm5PU+MHTootlWEY+mZ4vvXoCn4fLQxT9dSc1sXVMSFkINTJVN8cAQROpwcKm8bJ/c7rgZVIBWzH5T78sNZZw==", - "license": "MIT", - "dependencies": { - "node-fetch": "^2.7.0" - } - }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/crypto-browserify": { - "version": "3.12.1", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.1.tgz", - "integrity": "sha512-r4ESw/IlusD17lgQi1O20Fa3qNnsckR126TdUuBgAu7GBYSIPvdNyONd3Zrxh0xCwA4+6w/TDArBPsMvhur+KQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "browserify-cipher": "^1.0.1", - "browserify-sign": "^4.2.3", - "create-ecdh": "^4.0.4", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "diffie-hellman": "^5.0.3", - "hash-base": "~3.0.4", - "inherits": "^2.0.4", - "pbkdf2": "^3.1.2", - "public-encrypt": "^4.0.3", - "randombytes": "^2.1.0", - "randomfill": "^1.0.4" - }, - "engines": { - "node": ">= 0.10" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/data-view-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz", - "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/data-view-byte-length": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz", - "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/inspect-js" - } - }, - "node_modules/data-view-byte-offset": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz", - "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/debug": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", - "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/dedent": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.0.tgz", - "integrity": "sha512-HGFtf8yhuhGhqO07SV79tRp+br4MnbdjeVxotpn1QBl30pcLLCQjX5b2295ll0fv8RKDKsmWYrl05usHM9CewQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "babel-plugin-macros": "^3.1.0" - }, - "peerDependenciesMeta": { - "babel-plugin-macros": { - "optional": true - } - } - }, - "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.3.1", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", - "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/deferred-leveldown": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-0.2.0.tgz", - "integrity": "sha512-+WCbb4+ez/SZ77Sdy1iadagFiVzMB89IKOBhglgnUkVxOxRWmmFsz8UDSNWh4Rhq+3wr/vMFlYj+rdEwWUDdng==", - "deprecated": "Superseded by abstract-level (https://github.com/Level/community#faq)", - "dev": true, - "license": "MIT", - "dependencies": { - "abstract-leveldown": "~0.12.1" - } - }, - "node_modules/define-data-property": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/define-properties": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", - "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/des.js": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.1.0.tgz", - "integrity": "sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "node_modules/detect-indent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-7.0.2.tgz", - "integrity": "sha512-y+8xyqdGLL+6sh0tVeHcfP/QDd8gUgbasolJJpY7NgeQGSZ739bDtSiaiDgtoicy+mtYB81dKLxO9xRhCyIB3A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "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/diffie-hellman": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", - "dev": true, - "license": "MIT", - "dependencies": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - } - }, - "node_modules/diffie-hellman/node_modules/bn.js": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", - "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", - "dev": true, - "license": "MIT" - }, - "node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/dotenv": { - "version": "16.5.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.5.0.tgz", - "integrity": "sha512-m/C+AwOAr9/W1UOIZUo232ejMNnJAJtYQjUbHoNTBNTJSvqzzDh7vnrei3o3r3m9blf6ZoDkvcw0VmozNRFJxg==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://dotenvx.com" - } - }, - "node_modules/dunder-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", - "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-errors": "^1.3.0", - "gopd": "^1.2.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true, - "license": "MIT" - }, - "node_modules/ejs": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", - "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "jake": "^10.8.5" - }, - "bin": { - "ejs": "bin/cli.js" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/electron-to-chromium": { - "version": "1.5.245", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.245.tgz", - "integrity": "sha512-rdmGfW47ZhL/oWEJAY4qxRtdly2B98ooTJ0pdEI4jhVLZ6tNf8fPtov2wS1IRKwFJT92le3x4Knxiwzl7cPPpQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/elliptic": { - "version": "6.6.1", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", - "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", - "dev": true, - "license": "MIT", - "dependencies": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "node_modules/elliptic/node_modules/bn.js": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", - "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", - "dev": true, - "license": "MIT" - }, - "node_modules/emittery": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", - "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", - "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/errno": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", - "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", - "dev": true, - "license": "MIT", - "dependencies": { - "prr": "~1.0.1" - }, - "bin": { - "errno": "cli.js" - } - }, - "node_modules/error-ex": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz", - "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "node_modules/es-abstract": { - "version": "1.24.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.0.tgz", - "integrity": "sha512-WSzPgsdLtTcQwm4CROfS5ju2Wa1QQcVeT37jFjYzdFz1r9ahadC8B8/a4qxJxM+09F18iumCdRmlr96ZYkQvEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-buffer-byte-length": "^1.0.2", - "arraybuffer.prototype.slice": "^1.0.4", - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "data-view-buffer": "^1.0.2", - "data-view-byte-length": "^1.0.2", - "data-view-byte-offset": "^1.0.1", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "es-set-tostringtag": "^2.1.0", - "es-to-primitive": "^1.3.0", - "function.prototype.name": "^1.1.8", - "get-intrinsic": "^1.3.0", - "get-proto": "^1.0.1", - "get-symbol-description": "^1.1.0", - "globalthis": "^1.0.4", - "gopd": "^1.2.0", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "internal-slot": "^1.1.0", - "is-array-buffer": "^3.0.5", - "is-callable": "^1.2.7", - "is-data-view": "^1.0.2", - "is-negative-zero": "^2.0.3", - "is-regex": "^1.2.1", - "is-set": "^2.0.3", - "is-shared-array-buffer": "^1.0.4", - "is-string": "^1.1.1", - "is-typed-array": "^1.1.15", - "is-weakref": "^1.1.1", - "math-intrinsics": "^1.1.0", - "object-inspect": "^1.13.4", - "object-keys": "^1.1.1", - "object.assign": "^4.1.7", - "own-keys": "^1.0.1", - "regexp.prototype.flags": "^1.5.4", - "safe-array-concat": "^1.1.3", - "safe-push-apply": "^1.0.0", - "safe-regex-test": "^1.1.0", - "set-proto": "^1.0.0", - "stop-iteration-iterator": "^1.1.0", - "string.prototype.trim": "^1.2.10", - "string.prototype.trimend": "^1.0.9", - "string.prototype.trimstart": "^1.0.8", - "typed-array-buffer": "^1.0.3", - "typed-array-byte-length": "^1.0.3", - "typed-array-byte-offset": "^1.0.4", - "typed-array-length": "^1.0.7", - "unbox-primitive": "^1.1.0", - "which-typed-array": "^1.1.19" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es-define-property": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", - "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-object-atoms": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", - "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-set-tostringtag": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", - "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-shim-unscopables": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.1.0.tgz", - "integrity": "sha512-d9T8ucsEhh8Bi1woXCf+TIKDIROLG5WCkxg8geBCbvk22kzwC5G2OnXVMO6FUsvQlgUUXQ2itephWDLqDzbeCw==", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-to-primitive": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.0.tgz", - "integrity": "sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-callable": "^1.2.7", - "is-date-object": "^1.0.5", - "is-symbol": "^1.0.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "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": "9.25.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.25.1.tgz", - "integrity": "sha512-E6Mtz9oGQWDCpV12319d59n4tx9zOTXSTmc8BLVxBx+G/0RdM5MvEEJLU9c0+aleoePYYgVTOsRblx433qmhWQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.12.1", - "@eslint/config-array": "^0.20.0", - "@eslint/config-helpers": "^0.2.1", - "@eslint/core": "^0.13.0", - "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.25.1", - "@eslint/plugin-kit": "^0.2.8", - "@humanfs/node": "^0.16.6", - "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.4.2", - "@types/estree": "^1.0.6", - "@types/json-schema": "^7.0.15", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.6", - "debug": "^4.3.2", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^8.3.0", - "eslint-visitor-keys": "^4.2.0", - "espree": "^10.3.0", - "esquery": "^1.5.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^8.0.0", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://eslint.org/donate" - }, - "peerDependencies": { - "jiti": "*" - }, - "peerDependenciesMeta": { - "jiti": { - "optional": true - } - } - }, - "node_modules/eslint-config-airbnb": { - "version": "19.0.4", - "resolved": "https://registry.npmjs.org/eslint-config-airbnb/-/eslint-config-airbnb-19.0.4.tgz", - "integrity": "sha512-T75QYQVQX57jiNgpF9r1KegMICE94VYwoFQyMGhrvc+lB8YF2E/M/PYDaQe1AJcWaEgqLE+ErXV1Og/+6Vyzew==", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-config-airbnb-base": "^15.0.0", - "object.assign": "^4.1.2", - "object.entries": "^1.1.5" - }, - "engines": { - "node": "^10.12.0 || ^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^7.32.0 || ^8.2.0", - "eslint-plugin-import": "^2.25.3", - "eslint-plugin-jsx-a11y": "^6.5.1", - "eslint-plugin-react": "^7.28.0", - "eslint-plugin-react-hooks": "^4.3.0" - } - }, - "node_modules/eslint-config-airbnb-base": { - "version": "15.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz", - "integrity": "sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==", - "dev": true, - "license": "MIT", - "dependencies": { - "confusing-browser-globals": "^1.0.10", - "object.assign": "^4.1.2", - "object.entries": "^1.1.5", - "semver": "^6.3.0" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - }, - "peerDependencies": { - "eslint": "^7.32.0 || ^8.2.0", - "eslint-plugin-import": "^2.25.2" - } - }, - "node_modules/eslint-config-airbnb-base/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/eslint-config-airbnb-typescript": { - "version": "18.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-airbnb-typescript/-/eslint-config-airbnb-typescript-18.0.0.tgz", - "integrity": "sha512-oc+Lxzgzsu8FQyFVa4QFaVKiitTYiiW3frB9KYW5OWdPrqFc7FzxgB20hP4cHMlr+MBzGcLl3jnCOVOydL9mIg==", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-config-airbnb-base": "^15.0.0" - }, - "peerDependencies": { - "@typescript-eslint/eslint-plugin": "^7.0.0", - "@typescript-eslint/parser": "^7.0.0", - "eslint": "^8.56.0" - } - }, - "node_modules/eslint-config-prettier": { - "version": "10.1.5", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.1.5.tgz", - "integrity": "sha512-zc1UmCpNltmVY34vuLRV61r1K27sWuX39E+uyUnY8xS2Bex88VV9cugG+UZbRSRGtGyFboj+D8JODyme1plMpw==", - "dev": true, - "license": "MIT", - "bin": { - "eslint-config-prettier": "bin/cli.js" - }, - "funding": { - "url": "https://opencollective.com/eslint-config-prettier" - }, - "peerDependencies": { - "eslint": ">=7.0.0" - } - }, - "node_modules/eslint-import-resolver-node": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", - "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^3.2.7", - "is-core-module": "^2.13.0", - "resolve": "^1.22.4" - } - }, - "node_modules/eslint-import-resolver-node/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-module-utils": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.0.tgz", - "integrity": "sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^3.2.7" - }, - "engines": { - "node": ">=4" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": true - } - } - }, - "node_modules/eslint-module-utils/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-import": { - "version": "2.31.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.31.0.tgz", - "integrity": "sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rtsao/scc": "^1.1.0", - "array-includes": "^3.1.8", - "array.prototype.findlastindex": "^1.2.5", - "array.prototype.flat": "^1.3.2", - "array.prototype.flatmap": "^1.3.2", - "debug": "^3.2.7", - "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.9", - "eslint-module-utils": "^2.12.0", - "hasown": "^2.0.2", - "is-core-module": "^2.15.1", - "is-glob": "^4.0.3", - "minimatch": "^3.1.2", - "object.fromentries": "^2.0.8", - "object.groupby": "^1.0.3", - "object.values": "^1.2.0", - "semver": "^6.3.1", - "string.prototype.trimend": "^1.0.8", - "tsconfig-paths": "^3.15.0" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9" - } - }, - "node_modules/eslint-plugin-import/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/eslint-plugin-import/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-import/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/eslint-plugin-import/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/eslint-plugin-prettier": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.5.0.tgz", - "integrity": "sha512-8qsOYwkkGrahrgoUv76NZi23koqXOGiiEzXMrT8Q7VcYaUISR+5MorIUxfWqYXN0fN/31WbSrxCxFkVQ43wwrA==", - "dev": true, - "license": "MIT", - "dependencies": { - "prettier-linter-helpers": "^1.0.0", - "synckit": "^0.11.7" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint-plugin-prettier" - }, - "peerDependencies": { - "@types/eslint": ">=8.0.0", - "eslint": ">=8.0.0", - "eslint-config-prettier": ">= 7.0.0 <10.0.0 || >=10.1.0", - "prettier": ">=3.0.0" - }, - "peerDependenciesMeta": { - "@types/eslint": { - "optional": true - }, - "eslint-config-prettier": { - "optional": true - } - } - }, - "node_modules/eslint-scope": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", - "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/eslint/node_modules/eslint-visitor-keys": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", - "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/eslint/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/espree": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", - "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.15.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.2.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", - "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.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.6.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", - "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", - "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/estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", - "dev": true, - "license": "MIT" - }, - "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/evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "dev": true, - "license": "MIT", - "dependencies": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "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-x": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/exit-x/-/exit-x-0.2.2.tgz", - "integrity": "sha512-+I6B/IkJc1o/2tiURyz/ivu/O0nKNEArIUB5O7zBrlDVJr22SCLH3xTeEry428LvFhRzIA1g8izguxJ/gbNcVQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/expect": { - "version": "30.2.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-30.2.0.tgz", - "integrity": "sha512-u/feCi0GPsI+988gU2FLcsHyAHTU0MX1Wg68NhAnN7z/+C5wqG+CY8J53N9ioe8RXgaoz0nBR/TYMf3AycUuPw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/expect-utils": "30.2.0", - "@jest/get-type": "30.1.0", - "jest-matcher-utils": "30.2.0", - "jest-message-util": "30.2.0", - "jest-mock": "30.2.0", - "jest-util": "30.2.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "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==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-diff": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", - "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/fast-glob": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", - "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", - "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.8" - }, - "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==", - "dev": true, - "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.19.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", - "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/fb-watchman": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", - "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "bser": "2.1.1" - } - }, - "node_modules/fdir": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", - "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, - "node_modules/file-entry-cache": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", - "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^4.0.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/filelist": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", - "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "minimatch": "^5.0.1" - } - }, - "node_modules/filelist/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "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/flat-cache": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", - "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.4" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/flatted": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", - "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", - "dev": true, - "license": "ISC" - }, - "node_modules/for-each": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", - "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-callable": "^1.2.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/foreach": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.6.tgz", - "integrity": "sha512-k6GAGDyqLe9JaebCsFCoudPPWfihKu8pylYXRlqP1J7ms39iPoTtk2fviNglIeQEwdh0bQeKJ01ZPyuyQvKzwg==", - "dev": true, - "license": "MIT" - }, - "node_modules/foreground-child": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", - "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", - "dev": true, - "license": "ISC", - "dependencies": { - "cross-spawn": "^7.0.6", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/foreground-child/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "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/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/function.prototype.name": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.8.tgz", - "integrity": "sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "functions-have-names": "^1.2.3", - "hasown": "^2.0.2", - "is-callable": "^1.2.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/fwd-stream": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/fwd-stream/-/fwd-stream-1.0.4.tgz", - "integrity": "sha512-q2qaK2B38W07wfPSQDKMiKOD5Nzv2XyuvQlrmh1q0pxyHNanKHq8lwQ6n9zHucAwA5EbzRJKEgds2orn88rYTg==", - "dev": true, - "dependencies": { - "readable-stream": "~1.0.26-4" - } - }, - "node_modules/generator-function": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/generator-function/-/generator-function-2.0.1.tgz", - "integrity": "sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "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.3.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", - "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "function-bind": "^1.1.2", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "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-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", - "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", - "dev": true, - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "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/get-symbol-description": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", - "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/git-hooks-list": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/git-hooks-list/-/git-hooks-list-4.1.1.tgz", - "integrity": "sha512-cmP497iLq54AZnv4YRAEMnEyQ1eIn4tGKbmswqwmFV4GBnAqE8NLtWxxdXa++AalfgL5EBH4IxTPyquEuGY/jA==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/fisker/git-hooks-list?sponsor=1" - } - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "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/glob/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/glob/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/globals": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", - "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globalthis": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", - "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-properties": "^1.2.1", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/gopd": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", - "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true, - "license": "MIT" - }, - "node_modules/has-bigints": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", - "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "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.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-proto": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz", - "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", - "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", - "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-symbols": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hash-base": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.5.tgz", - "integrity": "sha512-vXm0l45VbcHEVlTCzs8M+s0VeYsB2lnlAaThoLKGXr3bE/VWDOelNUnycUPEhKEaXARL2TEFjBOyUiM6+55KBg==", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.4", - "safe-buffer": "^5.2.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", - "dev": true, - "license": "MIT", - "dependencies": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "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/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/husky": { - "version": "9.1.7", - "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.7.tgz", - "integrity": "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==", - "dev": true, - "license": "MIT", - "bin": { - "husky": "bin.js" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/typicode" - } - }, - "node_modules/idb-wrapper": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/idb-wrapper/-/idb-wrapper-1.7.2.tgz", - "integrity": "sha512-zfNREywMuf0NzDo9mVsL0yegjsirJxHpKHvWcyRozIqQy89g0a3U+oBPOCN4cc0oCiOuYgZHimzaW/R46G1Mpg==", - "dev": true, - "license": "MIT" - }, - "node_modules/ignore": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", - "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/import-fresh": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", - "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", - "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-local": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", - "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", - "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/indexof": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha512-i0G7hLJ1z0DE8dsqJa2rycj9dBmNKgXBvotXtZYXakU9oivfB9Uj2ZBC27qqef2U58/ZLwalxa1X/RDCdkHtVg==", - "dev": true - }, - "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==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "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/internal-slot": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", - "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "hasown": "^2.0.2", - "side-channel": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/is": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/is/-/is-0.2.7.tgz", - "integrity": "sha512-ajQCouIvkcSnl2iRdK70Jug9mohIHVX9uKpoWnl115ov0R5mzBvRrXxrnHbsA+8AdwCwc/sfw7HXmd4I5EJBdQ==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/is-array-buffer": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", - "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "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-async-function": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.1.tgz", - "integrity": "sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "async-function": "^1.0.0", - "call-bound": "^1.0.3", - "get-proto": "^1.0.1", - "has-tostringtag": "^1.0.2", - "safe-regex-test": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-bigint": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz", - "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-bigints": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-boolean-object": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz", - "integrity": "sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-core-module": { - "version": "2.16.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", - "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-data-view": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz", - "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "get-intrinsic": "^1.2.6", - "is-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-date-object": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz", - "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "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-finalizationregistry": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz", - "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "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-generator-function": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.2.tgz", - "integrity": "sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.4", - "generator-function": "^2.0.0", - "get-proto": "^1.0.1", - "has-tostringtag": "^1.0.2", - "safe-regex-test": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "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-map": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", - "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", - "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", - "dev": true, - "license": "MIT" - }, - "node_modules/is-negative-zero": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", - "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "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-number-object": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz", - "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-object": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/is-object/-/is-object-0.1.2.tgz", - "integrity": "sha512-GkfZZlIZtpkFrqyAXPQSRBMsaHAw+CgoKe2HXAkjd/sfoI9+hS8PT4wg2rJxdQyUKr7N2vHJbg7/jQtE5l5vBQ==", - "dev": true - }, - "node_modules/is-plain-obj": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", - "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-reference": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", - "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "*" - } - }, - "node_modules/is-regex": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", - "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-set": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", - "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-shared-array-buffer": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz", - "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "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-string": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz", - "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-symbol": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz", - "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "has-symbols": "^1.1.0", - "safe-regex-test": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-typed-array": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", - "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "which-typed-array": "^1.1.16" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakmap": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", - "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakref": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.1.tgz", - "integrity": "sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakset": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz", - "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/isbuffer": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/isbuffer/-/isbuffer-0.0.0.tgz", - "integrity": "sha512-xU+NoHp+YtKQkaM2HsQchYn0sltxMxew0HavMfHbjnucBoTSGbw745tL+Z7QBANleWM1eEQMenEpi174mIeS4g==", - "dev": true, - "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/istanbul-lib-coverage": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", - "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", - "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/core": "^7.23.9", - "@babel/parser": "^7.23.9", - "@istanbuljs/schema": "^0.1.3", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^7.5.4" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-report": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", - "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^4.0.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-source-maps": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-5.0.6.tgz", - "integrity": "sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.23", - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-reports": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.2.0.tgz", - "integrity": "sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jackspeak": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", - "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } - }, - "node_modules/jake": { - "version": "10.9.4", - "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.4.tgz", - "integrity": "sha512-wpHYzhxiVQL+IV05BLE2Xn34zW1S223hvjtqk0+gsPrwd/8JNLXJgZZM/iPFsYc1xyphF+6M6EvdE5E9MBGkDA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "async": "^3.2.6", - "filelist": "^1.0.4", - "picocolors": "^1.1.1" - }, - "bin": { - "jake": "bin/cli.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/jest": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest/-/jest-30.0.0.tgz", - "integrity": "sha512-/3G2iFwsUY95vkflmlDn/IdLyLWqpQXcftptooaPH4qkyU52V7qVYf1BjmdSPlp1+0fs6BmNtrGaSFwOfV07ew==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/core": "30.0.0", - "@jest/types": "30.0.0", - "import-local": "^3.2.0", - "jest-cli": "30.0.0" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.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": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-30.0.0.tgz", - "integrity": "sha512-rzGpvCdPdEV1Ma83c1GbZif0L2KAm3vXSXGRlpx7yCt0vhruwCNouKNRh3SiVcISHP1mb3iJzjb7tAEnNu1laQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "execa": "^5.1.1", - "jest-util": "30.0.0", - "p-limit": "^3.1.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-changed-files/node_modules/jest-util": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.0.0.tgz", - "integrity": "sha512-fhNBBM9uSUbd4Lzsf8l/kcAdaHD/4SgoI48en3HXcBEMwKwoleKFMZ6cYEYs21SB779PRuRCyNLmymApAm8tZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.0.0", - "@types/node": "*", - "chalk": "^4.1.2", - "ci-info": "^4.2.0", - "graceful-fs": "^4.2.11", - "picomatch": "^4.0.2" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-circus": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-30.0.0.tgz", - "integrity": "sha512-nTwah78qcKVyndBS650hAkaEmwWGaVsMMoWdJwMnH77XArRJow2Ir7hc+8p/mATtxVZuM9OTkA/3hQocRIK5Dw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "30.0.0", - "@jest/expect": "30.0.0", - "@jest/test-result": "30.0.0", - "@jest/types": "30.0.0", - "@types/node": "*", - "chalk": "^4.1.2", - "co": "^4.6.0", - "dedent": "^1.6.0", - "is-generator-fn": "^2.1.0", - "jest-each": "30.0.0", - "jest-matcher-utils": "30.0.0", - "jest-message-util": "30.0.0", - "jest-runtime": "30.0.0", - "jest-snapshot": "30.0.0", - "jest-util": "30.0.0", - "p-limit": "^3.1.0", - "pretty-format": "30.0.0", - "pure-rand": "^7.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.6" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-circus/node_modules/@jest/diff-sequences": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/@jest/diff-sequences/-/diff-sequences-30.0.0.tgz", - "integrity": "sha512-xMbtoCeKJDto86GW6AiwVv7M4QAuI56R7dVBr1RNGYbOT44M2TIzOiske2RxopBqkumDY+A1H55pGvuribRY9A==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-circus/node_modules/@jest/get-type": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/@jest/get-type/-/get-type-30.0.0.tgz", - "integrity": "sha512-VZWMjrBzqfDKngQ7sUctKeLxanAbsBFoZnPxNIG6CmxK7Gv6K44yqd0nzveNIBfuhGZMmk1n5PGbvdSTOu0yTg==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-circus/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/jest-circus/node_modules/jest-diff": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-30.0.0.tgz", - "integrity": "sha512-TgT1+KipV8JTLXXeFX0qSvIJR/UXiNNojjxb/awh3vYlBZyChU/NEmyKmq+wijKjWEztyrGJFL790nqMqNjTHA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/diff-sequences": "30.0.0", - "@jest/get-type": "30.0.0", - "chalk": "^4.1.2", - "pretty-format": "30.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-circus/node_modules/jest-matcher-utils": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-30.0.0.tgz", - "integrity": "sha512-m5mrunqopkrqwG1mMdJxe1J4uGmS9AHHKYUmoxeQOxBcLjEvirIrIDwuKmUYrecPHVB/PUBpXs2gPoeA2FSSLQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/get-type": "30.0.0", - "chalk": "^4.1.2", - "jest-diff": "30.0.0", - "pretty-format": "30.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-circus/node_modules/jest-message-util": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-30.0.0.tgz", - "integrity": "sha512-pV3qcrb4utEsa/U7UI2VayNzSDQcmCllBZLSoIucrESRu0geKThFZOjjh0kACDJFJRAQwsK7GVsmS6SpEceD8w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.27.1", - "@jest/types": "30.0.0", - "@types/stack-utils": "^2.0.3", - "chalk": "^4.1.2", - "graceful-fs": "^4.2.11", - "micromatch": "^4.0.8", - "pretty-format": "30.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.6" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-circus/node_modules/jest-util": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.0.0.tgz", - "integrity": "sha512-fhNBBM9uSUbd4Lzsf8l/kcAdaHD/4SgoI48en3HXcBEMwKwoleKFMZ6cYEYs21SB779PRuRCyNLmymApAm8tZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.0.0", - "@types/node": "*", - "chalk": "^4.1.2", - "ci-info": "^4.2.0", - "graceful-fs": "^4.2.11", - "picomatch": "^4.0.2" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-circus/node_modules/pretty-format": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.0.0.tgz", - "integrity": "sha512-18NAOUr4ZOQiIR+BgI5NhQE7uREdx4ZyV0dyay5izh4yfQ+1T7BSvggxvRGoXocrRyevqW5OhScUjbi9GB8R8Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "30.0.0", - "ansi-styles": "^5.2.0", - "react-is": "^18.3.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-cli": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-30.0.0.tgz", - "integrity": "sha512-fWKAgrhlwVVCfeizsmIrPRTBYTzO82WSba3gJniZNR3PKXADgdC0mmCSK+M+t7N8RCXOVfY6kvCkvjUNtzmHYQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/core": "30.0.0", - "@jest/test-result": "30.0.0", - "@jest/types": "30.0.0", - "chalk": "^4.1.2", - "exit-x": "^0.2.2", - "import-local": "^3.2.0", - "jest-config": "30.0.0", - "jest-util": "30.0.0", - "jest-validate": "30.0.0", - "yargs": "^17.7.2" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-cli/node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/jest-cli/node_modules/jest-util": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.0.0.tgz", - "integrity": "sha512-fhNBBM9uSUbd4Lzsf8l/kcAdaHD/4SgoI48en3HXcBEMwKwoleKFMZ6cYEYs21SB779PRuRCyNLmymApAm8tZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.0.0", - "@types/node": "*", - "chalk": "^4.1.2", - "ci-info": "^4.2.0", - "graceful-fs": "^4.2.11", - "picomatch": "^4.0.2" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-cli/node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^8.0.1", - "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.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/jest-config": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-30.0.0.tgz", - "integrity": "sha512-p13a/zun+sbOMrBnTEUdq/5N7bZMOGd1yMfqtAJniPNuzURMay4I+vxZLK1XSDbjvIhmeVdG8h8RznqYyjctyg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.27.4", - "@jest/get-type": "30.0.0", - "@jest/pattern": "30.0.0", - "@jest/test-sequencer": "30.0.0", - "@jest/types": "30.0.0", - "babel-jest": "30.0.0", - "chalk": "^4.1.2", - "ci-info": "^4.2.0", - "deepmerge": "^4.3.1", - "glob": "^10.3.10", - "graceful-fs": "^4.2.11", - "jest-circus": "30.0.0", - "jest-docblock": "30.0.0", - "jest-environment-node": "30.0.0", - "jest-regex-util": "30.0.0", - "jest-resolve": "30.0.0", - "jest-runner": "30.0.0", - "jest-util": "30.0.0", - "jest-validate": "30.0.0", - "micromatch": "^4.0.8", - "parse-json": "^5.2.0", - "pretty-format": "30.0.0", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - }, - "peerDependencies": { - "@types/node": "*", - "esbuild-register": ">=3.4.0", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "esbuild-register": { - "optional": true - }, - "ts-node": { - "optional": true - } - } - }, - "node_modules/jest-config/node_modules/@jest/get-type": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/@jest/get-type/-/get-type-30.0.0.tgz", - "integrity": "sha512-VZWMjrBzqfDKngQ7sUctKeLxanAbsBFoZnPxNIG6CmxK7Gv6K44yqd0nzveNIBfuhGZMmk1n5PGbvdSTOu0yTg==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-config/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/jest-config/node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", - "dev": true, - "license": "ISC", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/jest-config/node_modules/jest-util": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.0.0.tgz", - "integrity": "sha512-fhNBBM9uSUbd4Lzsf8l/kcAdaHD/4SgoI48en3HXcBEMwKwoleKFMZ6cYEYs21SB779PRuRCyNLmymApAm8tZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.0.0", - "@types/node": "*", - "chalk": "^4.1.2", - "ci-info": "^4.2.0", - "graceful-fs": "^4.2.11", - "picomatch": "^4.0.2" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-config/node_modules/pretty-format": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.0.0.tgz", - "integrity": "sha512-18NAOUr4ZOQiIR+BgI5NhQE7uREdx4ZyV0dyay5izh4yfQ+1T7BSvggxvRGoXocrRyevqW5OhScUjbi9GB8R8Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "30.0.0", - "ansi-styles": "^5.2.0", - "react-is": "^18.3.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-diff": { - "version": "30.2.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-30.2.0.tgz", - "integrity": "sha512-dQHFo3Pt4/NLlG5z4PxZ/3yZTZ1C7s9hveiOj+GCN+uT109NC2QgsoVZsVOAvbJ3RgKkvyLGXZV9+piDpWbm6A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/diff-sequences": "30.0.1", - "@jest/get-type": "30.1.0", - "chalk": "^4.1.2", - "pretty-format": "30.2.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-docblock": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-30.0.0.tgz", - "integrity": "sha512-By/iQ0nvTzghEecGzUMCp1axLtBh+8wB4Hpoi5o+x1stycjEmPcH1mHugL4D9Q+YKV++vKeX/3ZTW90QC8ICPg==", - "dev": true, - "license": "MIT", - "dependencies": { - "detect-newline": "^3.1.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-each": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-30.0.0.tgz", - "integrity": "sha512-qkFEW3cfytEjG2KtrhwtldZfXYnWSanO8xUMXLe4A6yaiHMHJUalk0Yyv4MQH6aeaxgi4sGVrukvF0lPMM7U1w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/get-type": "30.0.0", - "@jest/types": "30.0.0", - "chalk": "^4.1.2", - "jest-util": "30.0.0", - "pretty-format": "30.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-each/node_modules/@jest/get-type": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/@jest/get-type/-/get-type-30.0.0.tgz", - "integrity": "sha512-VZWMjrBzqfDKngQ7sUctKeLxanAbsBFoZnPxNIG6CmxK7Gv6K44yqd0nzveNIBfuhGZMmk1n5PGbvdSTOu0yTg==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-each/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/jest-each/node_modules/jest-util": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.0.0.tgz", - "integrity": "sha512-fhNBBM9uSUbd4Lzsf8l/kcAdaHD/4SgoI48en3HXcBEMwKwoleKFMZ6cYEYs21SB779PRuRCyNLmymApAm8tZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.0.0", - "@types/node": "*", - "chalk": "^4.1.2", - "ci-info": "^4.2.0", - "graceful-fs": "^4.2.11", - "picomatch": "^4.0.2" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-each/node_modules/pretty-format": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.0.0.tgz", - "integrity": "sha512-18NAOUr4ZOQiIR+BgI5NhQE7uREdx4ZyV0dyay5izh4yfQ+1T7BSvggxvRGoXocrRyevqW5OhScUjbi9GB8R8Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "30.0.0", - "ansi-styles": "^5.2.0", - "react-is": "^18.3.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-environment-node": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-30.0.0.tgz", - "integrity": "sha512-sF6lxyA25dIURyDk4voYmGU9Uwz2rQKMfjxKnDd19yk+qxKGrimFqS5YsPHWTlAVBo+YhWzXsqZoaMzrTFvqfg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "30.0.0", - "@jest/fake-timers": "30.0.0", - "@jest/types": "30.0.0", - "@types/node": "*", - "jest-mock": "30.0.0", - "jest-util": "30.0.0", - "jest-validate": "30.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-environment-node/node_modules/jest-mock": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-30.0.0.tgz", - "integrity": "sha512-W2sRA4ALXILrEetEOh2ooZG6fZ01iwVs0OWMKSSWRcUlaLr4ESHuiKXDNTg+ZVgOq8Ei5445i/Yxrv59VT+XkA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.0.0", - "@types/node": "*", - "jest-util": "30.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-environment-node/node_modules/jest-util": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.0.0.tgz", - "integrity": "sha512-fhNBBM9uSUbd4Lzsf8l/kcAdaHD/4SgoI48en3HXcBEMwKwoleKFMZ6cYEYs21SB779PRuRCyNLmymApAm8tZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.0.0", - "@types/node": "*", - "chalk": "^4.1.2", - "ci-info": "^4.2.0", - "graceful-fs": "^4.2.11", - "picomatch": "^4.0.2" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-haste-map": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-30.0.0.tgz", - "integrity": "sha512-p4bXAhXTawTsADgQgTpbymdLaTyPW1xWNu1oIGG7/N3LIAbZVkH2JMJqS8/IUcnGR8Kc7WFE+vWbJvsqGCWZXw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.0.0", - "@types/node": "*", - "anymatch": "^3.1.3", - "fb-watchman": "^2.0.2", - "graceful-fs": "^4.2.11", - "jest-regex-util": "30.0.0", - "jest-util": "30.0.0", - "jest-worker": "30.0.0", - "micromatch": "^4.0.8", - "walker": "^1.0.8" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - }, - "optionalDependencies": { - "fsevents": "^2.3.3" - } - }, - "node_modules/jest-haste-map/node_modules/jest-util": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.0.0.tgz", - "integrity": "sha512-fhNBBM9uSUbd4Lzsf8l/kcAdaHD/4SgoI48en3HXcBEMwKwoleKFMZ6cYEYs21SB779PRuRCyNLmymApAm8tZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.0.0", - "@types/node": "*", - "chalk": "^4.1.2", - "ci-info": "^4.2.0", - "graceful-fs": "^4.2.11", - "picomatch": "^4.0.2" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-leak-detector": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-30.0.0.tgz", - "integrity": "sha512-E/ly1azdVVbZrS0T6FIpyYHvsdek4FNaThJTtggjV/8IpKxh3p9NLndeUZy2+sjAI3ncS+aM0uLLon/dBg8htA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/get-type": "30.0.0", - "pretty-format": "30.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-leak-detector/node_modules/@jest/get-type": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/@jest/get-type/-/get-type-30.0.0.tgz", - "integrity": "sha512-VZWMjrBzqfDKngQ7sUctKeLxanAbsBFoZnPxNIG6CmxK7Gv6K44yqd0nzveNIBfuhGZMmk1n5PGbvdSTOu0yTg==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-leak-detector/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/jest-leak-detector/node_modules/pretty-format": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.0.0.tgz", - "integrity": "sha512-18NAOUr4ZOQiIR+BgI5NhQE7uREdx4ZyV0dyay5izh4yfQ+1T7BSvggxvRGoXocrRyevqW5OhScUjbi9GB8R8Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "30.0.0", - "ansi-styles": "^5.2.0", - "react-is": "^18.3.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-matcher-utils": { - "version": "30.2.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-30.2.0.tgz", - "integrity": "sha512-dQ94Nq4dbzmUWkQ0ANAWS9tBRfqCrn0bV9AMYdOi/MHW726xn7eQmMeRTpX2ViC00bpNaWXq+7o4lIQ3AX13Hg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/get-type": "30.1.0", - "chalk": "^4.1.2", - "jest-diff": "30.2.0", - "pretty-format": "30.2.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-message-util": { - "version": "30.2.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-30.2.0.tgz", - "integrity": "sha512-y4DKFLZ2y6DxTWD4cDe07RglV88ZiNEdlRfGtqahfbIjfsw1nMCPx49Uev4IA/hWn3sDKyAnSPwoYSsAEdcimw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.27.1", - "@jest/types": "30.2.0", - "@types/stack-utils": "^2.0.3", - "chalk": "^4.1.2", - "graceful-fs": "^4.2.11", - "micromatch": "^4.0.8", - "pretty-format": "30.2.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.6" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-message-util/node_modules/@jest/pattern": { - "version": "30.0.1", - "resolved": "https://registry.npmjs.org/@jest/pattern/-/pattern-30.0.1.tgz", - "integrity": "sha512-gWp7NfQW27LaBQz3TITS8L7ZCQ0TLvtmI//4OwlQRx4rnWxcPNIYjxZpDcN4+UlGxgm3jS5QPz8IPTCkb59wZA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "jest-regex-util": "30.0.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-message-util/node_modules/@jest/schemas": { - "version": "30.0.5", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-30.0.5.tgz", - "integrity": "sha512-DmdYgtezMkh3cpU8/1uyXakv3tJRcmcXxBOcO0tbaozPwpmh4YMsnWrQm9ZmZMfa5ocbxzbFk6O4bDPEc/iAnA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@sinclair/typebox": "^0.34.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-message-util/node_modules/@jest/types": { - "version": "30.2.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-30.2.0.tgz", - "integrity": "sha512-H9xg1/sfVvyfU7o3zMfBEjQ1gcsdeTMgqHoYdN79tuLqfTtuu7WckRA1R5whDwOzxaZAeMKTYWqP+WCAi0CHsg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/pattern": "30.0.1", - "@jest/schemas": "30.0.5", - "@types/istanbul-lib-coverage": "^2.0.6", - "@types/istanbul-reports": "^3.0.4", - "@types/node": "*", - "@types/yargs": "^17.0.33", - "chalk": "^4.1.2" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-message-util/node_modules/jest-regex-util": { - "version": "30.0.1", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-30.0.1.tgz", - "integrity": "sha512-jHEQgBXAgc+Gh4g0p3bCevgRCVRkB4VB70zhoAE48gxeSr1hfUOsM/C2WoJgVL7Eyg//hudYENbm3Ne+/dRVVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-mock": { - "version": "30.2.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-30.2.0.tgz", - "integrity": "sha512-JNNNl2rj4b5ICpmAcq+WbLH83XswjPbjH4T7yvGzfAGCPh1rw+xVNbtk+FnRslvt9lkCcdn9i1oAoKUuFsOxRw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.2.0", - "@types/node": "*", - "jest-util": "30.2.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-mock/node_modules/@jest/pattern": { - "version": "30.0.1", - "resolved": "https://registry.npmjs.org/@jest/pattern/-/pattern-30.0.1.tgz", - "integrity": "sha512-gWp7NfQW27LaBQz3TITS8L7ZCQ0TLvtmI//4OwlQRx4rnWxcPNIYjxZpDcN4+UlGxgm3jS5QPz8IPTCkb59wZA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "jest-regex-util": "30.0.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-mock/node_modules/@jest/schemas": { - "version": "30.0.5", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-30.0.5.tgz", - "integrity": "sha512-DmdYgtezMkh3cpU8/1uyXakv3tJRcmcXxBOcO0tbaozPwpmh4YMsnWrQm9ZmZMfa5ocbxzbFk6O4bDPEc/iAnA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@sinclair/typebox": "^0.34.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-mock/node_modules/@jest/types": { - "version": "30.2.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-30.2.0.tgz", - "integrity": "sha512-H9xg1/sfVvyfU7o3zMfBEjQ1gcsdeTMgqHoYdN79tuLqfTtuu7WckRA1R5whDwOzxaZAeMKTYWqP+WCAi0CHsg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/pattern": "30.0.1", - "@jest/schemas": "30.0.5", - "@types/istanbul-lib-coverage": "^2.0.6", - "@types/istanbul-reports": "^3.0.4", - "@types/node": "*", - "@types/yargs": "^17.0.33", - "chalk": "^4.1.2" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-mock/node_modules/jest-regex-util": { - "version": "30.0.1", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-30.0.1.tgz", - "integrity": "sha512-jHEQgBXAgc+Gh4g0p3bCevgRCVRkB4VB70zhoAE48gxeSr1hfUOsM/C2WoJgVL7Eyg//hudYENbm3Ne+/dRVVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-pnp-resolver": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", - "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "jest-resolve": "*" - }, - "peerDependenciesMeta": { - "jest-resolve": { - "optional": true - } - } - }, - "node_modules/jest-regex-util": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-30.0.0.tgz", - "integrity": "sha512-rT84010qRu/5OOU7a9TeidC2Tp3Qgt9Sty4pOZ/VSDuEmRupIjKZAb53gU3jr4ooMlhwScrgC9UixJxWzVu9oQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-resolve": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-30.0.0.tgz", - "integrity": "sha512-zwWl1P15CcAfuQCEuxszjiKdsValhnWcj/aXg/R3aMHs8HVoCWHC4B/+5+1BirMoOud8NnN85GSP2LEZCbj3OA==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.2", - "graceful-fs": "^4.2.11", - "jest-haste-map": "30.0.0", - "jest-pnp-resolver": "^1.2.3", - "jest-util": "30.0.0", - "jest-validate": "30.0.0", - "slash": "^3.0.0", - "unrs-resolver": "^1.7.11" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-resolve-dependencies": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-30.0.0.tgz", - "integrity": "sha512-Yhh7odCAUNXhluK1bCpwIlHrN1wycYaTlZwq1GdfNBEESNNI/z1j1a7dUEWHbmB9LGgv0sanxw3JPmWU8NeebQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-regex-util": "30.0.0", - "jest-snapshot": "30.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-resolve/node_modules/jest-util": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.0.0.tgz", - "integrity": "sha512-fhNBBM9uSUbd4Lzsf8l/kcAdaHD/4SgoI48en3HXcBEMwKwoleKFMZ6cYEYs21SB779PRuRCyNLmymApAm8tZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.0.0", - "@types/node": "*", - "chalk": "^4.1.2", - "ci-info": "^4.2.0", - "graceful-fs": "^4.2.11", - "picomatch": "^4.0.2" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-runner": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-30.0.0.tgz", - "integrity": "sha512-xbhmvWIc8X1IQ8G7xTv0AQJXKjBVyxoVJEJgy7A4RXsSaO+k/1ZSBbHwjnUhvYqMvwQPomWssDkUx6EoidEhlw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "30.0.0", - "@jest/environment": "30.0.0", - "@jest/test-result": "30.0.0", - "@jest/transform": "30.0.0", - "@jest/types": "30.0.0", - "@types/node": "*", - "chalk": "^4.1.2", - "emittery": "^0.13.1", - "exit-x": "^0.2.2", - "graceful-fs": "^4.2.11", - "jest-docblock": "30.0.0", - "jest-environment-node": "30.0.0", - "jest-haste-map": "30.0.0", - "jest-leak-detector": "30.0.0", - "jest-message-util": "30.0.0", - "jest-resolve": "30.0.0", - "jest-runtime": "30.0.0", - "jest-util": "30.0.0", - "jest-watcher": "30.0.0", - "jest-worker": "30.0.0", - "p-limit": "^3.1.0", - "source-map-support": "0.5.13" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-runner/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/jest-runner/node_modules/jest-message-util": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-30.0.0.tgz", - "integrity": "sha512-pV3qcrb4utEsa/U7UI2VayNzSDQcmCllBZLSoIucrESRu0geKThFZOjjh0kACDJFJRAQwsK7GVsmS6SpEceD8w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.27.1", - "@jest/types": "30.0.0", - "@types/stack-utils": "^2.0.3", - "chalk": "^4.1.2", - "graceful-fs": "^4.2.11", - "micromatch": "^4.0.8", - "pretty-format": "30.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.6" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-runner/node_modules/jest-util": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.0.0.tgz", - "integrity": "sha512-fhNBBM9uSUbd4Lzsf8l/kcAdaHD/4SgoI48en3HXcBEMwKwoleKFMZ6cYEYs21SB779PRuRCyNLmymApAm8tZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.0.0", - "@types/node": "*", - "chalk": "^4.1.2", - "ci-info": "^4.2.0", - "graceful-fs": "^4.2.11", - "picomatch": "^4.0.2" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-runner/node_modules/pretty-format": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.0.0.tgz", - "integrity": "sha512-18NAOUr4ZOQiIR+BgI5NhQE7uREdx4ZyV0dyay5izh4yfQ+1T7BSvggxvRGoXocrRyevqW5OhScUjbi9GB8R8Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "30.0.0", - "ansi-styles": "^5.2.0", - "react-is": "^18.3.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-runtime": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-30.0.0.tgz", - "integrity": "sha512-/O07qVgFrFAOGKGigojmdR3jUGz/y3+a/v9S/Yi2MHxsD+v6WcPppglZJw0gNJkRBArRDK8CFAwpM/VuEiiRjA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "30.0.0", - "@jest/fake-timers": "30.0.0", - "@jest/globals": "30.0.0", - "@jest/source-map": "30.0.0", - "@jest/test-result": "30.0.0", - "@jest/transform": "30.0.0", - "@jest/types": "30.0.0", - "@types/node": "*", - "chalk": "^4.1.2", - "cjs-module-lexer": "^2.1.0", - "collect-v8-coverage": "^1.0.2", - "glob": "^10.3.10", - "graceful-fs": "^4.2.11", - "jest-haste-map": "30.0.0", - "jest-message-util": "30.0.0", - "jest-mock": "30.0.0", - "jest-regex-util": "30.0.0", - "jest-resolve": "30.0.0", - "jest-snapshot": "30.0.0", - "jest-util": "30.0.0", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-runtime/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/jest-runtime/node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", - "dev": true, - "license": "ISC", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/jest-runtime/node_modules/jest-message-util": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-30.0.0.tgz", - "integrity": "sha512-pV3qcrb4utEsa/U7UI2VayNzSDQcmCllBZLSoIucrESRu0geKThFZOjjh0kACDJFJRAQwsK7GVsmS6SpEceD8w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.27.1", - "@jest/types": "30.0.0", - "@types/stack-utils": "^2.0.3", - "chalk": "^4.1.2", - "graceful-fs": "^4.2.11", - "micromatch": "^4.0.8", - "pretty-format": "30.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.6" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-runtime/node_modules/jest-mock": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-30.0.0.tgz", - "integrity": "sha512-W2sRA4ALXILrEetEOh2ooZG6fZ01iwVs0OWMKSSWRcUlaLr4ESHuiKXDNTg+ZVgOq8Ei5445i/Yxrv59VT+XkA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.0.0", - "@types/node": "*", - "jest-util": "30.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-runtime/node_modules/jest-util": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.0.0.tgz", - "integrity": "sha512-fhNBBM9uSUbd4Lzsf8l/kcAdaHD/4SgoI48en3HXcBEMwKwoleKFMZ6cYEYs21SB779PRuRCyNLmymApAm8tZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.0.0", - "@types/node": "*", - "chalk": "^4.1.2", - "ci-info": "^4.2.0", - "graceful-fs": "^4.2.11", - "picomatch": "^4.0.2" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-runtime/node_modules/pretty-format": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.0.0.tgz", - "integrity": "sha512-18NAOUr4ZOQiIR+BgI5NhQE7uREdx4ZyV0dyay5izh4yfQ+1T7BSvggxvRGoXocrRyevqW5OhScUjbi9GB8R8Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "30.0.0", - "ansi-styles": "^5.2.0", - "react-is": "^18.3.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-snapshot": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-30.0.0.tgz", - "integrity": "sha512-6oCnzjpvfj/UIOMTqKZ6gedWAUgaycMdV8Y8h2dRJPvc2wSjckN03pzeoonw8y33uVngfx7WMo1ygdRGEKOT7w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.27.4", - "@babel/generator": "^7.27.5", - "@babel/plugin-syntax-jsx": "^7.27.1", - "@babel/plugin-syntax-typescript": "^7.27.1", - "@babel/types": "^7.27.3", - "@jest/expect-utils": "30.0.0", - "@jest/get-type": "30.0.0", - "@jest/snapshot-utils": "30.0.0", - "@jest/transform": "30.0.0", - "@jest/types": "30.0.0", - "babel-preset-current-node-syntax": "^1.1.0", - "chalk": "^4.1.2", - "expect": "30.0.0", - "graceful-fs": "^4.2.11", - "jest-diff": "30.0.0", - "jest-matcher-utils": "30.0.0", - "jest-message-util": "30.0.0", - "jest-util": "30.0.0", - "pretty-format": "30.0.0", - "semver": "^7.7.2", - "synckit": "^0.11.8" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/@jest/diff-sequences": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/@jest/diff-sequences/-/diff-sequences-30.0.0.tgz", - "integrity": "sha512-xMbtoCeKJDto86GW6AiwVv7M4QAuI56R7dVBr1RNGYbOT44M2TIzOiske2RxopBqkumDY+A1H55pGvuribRY9A==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/@jest/expect-utils": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-30.0.0.tgz", - "integrity": "sha512-UiWfsqNi/+d7xepfOv8KDcbbzcYtkWBe3a3kVDtg6M1kuN6CJ7b4HzIp5e1YHrSaQaVS8sdCoyCMCZClTLNKFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/get-type": "30.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/@jest/get-type": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/@jest/get-type/-/get-type-30.0.0.tgz", - "integrity": "sha512-VZWMjrBzqfDKngQ7sUctKeLxanAbsBFoZnPxNIG6CmxK7Gv6K44yqd0nzveNIBfuhGZMmk1n5PGbvdSTOu0yTg==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-snapshot/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/jest-snapshot/node_modules/expect": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-30.0.0.tgz", - "integrity": "sha512-xCdPp6gwiR9q9lsPCHANarIkFTN/IMZso6Kkq03sOm9IIGtzK/UJqml0dkhHibGh8HKOj8BIDIpZ0BZuU7QK6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/expect-utils": "30.0.0", - "@jest/get-type": "30.0.0", - "jest-matcher-utils": "30.0.0", - "jest-message-util": "30.0.0", - "jest-mock": "30.0.0", - "jest-util": "30.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/jest-diff": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-30.0.0.tgz", - "integrity": "sha512-TgT1+KipV8JTLXXeFX0qSvIJR/UXiNNojjxb/awh3vYlBZyChU/NEmyKmq+wijKjWEztyrGJFL790nqMqNjTHA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/diff-sequences": "30.0.0", - "@jest/get-type": "30.0.0", - "chalk": "^4.1.2", - "pretty-format": "30.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/jest-matcher-utils": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-30.0.0.tgz", - "integrity": "sha512-m5mrunqopkrqwG1mMdJxe1J4uGmS9AHHKYUmoxeQOxBcLjEvirIrIDwuKmUYrecPHVB/PUBpXs2gPoeA2FSSLQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/get-type": "30.0.0", - "chalk": "^4.1.2", - "jest-diff": "30.0.0", - "pretty-format": "30.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/jest-message-util": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-30.0.0.tgz", - "integrity": "sha512-pV3qcrb4utEsa/U7UI2VayNzSDQcmCllBZLSoIucrESRu0geKThFZOjjh0kACDJFJRAQwsK7GVsmS6SpEceD8w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.27.1", - "@jest/types": "30.0.0", - "@types/stack-utils": "^2.0.3", - "chalk": "^4.1.2", - "graceful-fs": "^4.2.11", - "micromatch": "^4.0.8", - "pretty-format": "30.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.6" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/jest-mock": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-30.0.0.tgz", - "integrity": "sha512-W2sRA4ALXILrEetEOh2ooZG6fZ01iwVs0OWMKSSWRcUlaLr4ESHuiKXDNTg+ZVgOq8Ei5445i/Yxrv59VT+XkA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.0.0", - "@types/node": "*", - "jest-util": "30.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/jest-util": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.0.0.tgz", - "integrity": "sha512-fhNBBM9uSUbd4Lzsf8l/kcAdaHD/4SgoI48en3HXcBEMwKwoleKFMZ6cYEYs21SB779PRuRCyNLmymApAm8tZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.0.0", - "@types/node": "*", - "chalk": "^4.1.2", - "ci-info": "^4.2.0", - "graceful-fs": "^4.2.11", - "picomatch": "^4.0.2" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/pretty-format": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.0.0.tgz", - "integrity": "sha512-18NAOUr4ZOQiIR+BgI5NhQE7uREdx4ZyV0dyay5izh4yfQ+1T7BSvggxvRGoXocrRyevqW5OhScUjbi9GB8R8Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "30.0.0", - "ansi-styles": "^5.2.0", - "react-is": "^18.3.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-util": { - "version": "30.2.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.2.0.tgz", - "integrity": "sha512-QKNsM0o3Xe6ISQU869e+DhG+4CK/48aHYdJZGlFQVTjnbvgpcKyxpzk29fGiO7i/J8VENZ+d2iGnSsvmuHywlA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.2.0", - "@types/node": "*", - "chalk": "^4.1.2", - "ci-info": "^4.2.0", - "graceful-fs": "^4.2.11", - "picomatch": "^4.0.2" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-util/node_modules/@jest/pattern": { - "version": "30.0.1", - "resolved": "https://registry.npmjs.org/@jest/pattern/-/pattern-30.0.1.tgz", - "integrity": "sha512-gWp7NfQW27LaBQz3TITS8L7ZCQ0TLvtmI//4OwlQRx4rnWxcPNIYjxZpDcN4+UlGxgm3jS5QPz8IPTCkb59wZA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "jest-regex-util": "30.0.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-util/node_modules/@jest/schemas": { - "version": "30.0.5", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-30.0.5.tgz", - "integrity": "sha512-DmdYgtezMkh3cpU8/1uyXakv3tJRcmcXxBOcO0tbaozPwpmh4YMsnWrQm9ZmZMfa5ocbxzbFk6O4bDPEc/iAnA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@sinclair/typebox": "^0.34.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-util/node_modules/@jest/types": { - "version": "30.2.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-30.2.0.tgz", - "integrity": "sha512-H9xg1/sfVvyfU7o3zMfBEjQ1gcsdeTMgqHoYdN79tuLqfTtuu7WckRA1R5whDwOzxaZAeMKTYWqP+WCAi0CHsg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/pattern": "30.0.1", - "@jest/schemas": "30.0.5", - "@types/istanbul-lib-coverage": "^2.0.6", - "@types/istanbul-reports": "^3.0.4", - "@types/node": "*", - "@types/yargs": "^17.0.33", - "chalk": "^4.1.2" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-util/node_modules/jest-regex-util": { - "version": "30.0.1", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-30.0.1.tgz", - "integrity": "sha512-jHEQgBXAgc+Gh4g0p3bCevgRCVRkB4VB70zhoAE48gxeSr1hfUOsM/C2WoJgVL7Eyg//hudYENbm3Ne+/dRVVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-validate": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-30.0.0.tgz", - "integrity": "sha512-d6OkzsdlWItHAikUDs1hlLmpOIRhsZoXTCliV2XXalVQ3ZOeb9dy0CQ6AKulJu/XOZqpOEr/FiMH+FeOBVV+nw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/get-type": "30.0.0", - "@jest/types": "30.0.0", - "camelcase": "^6.3.0", - "chalk": "^4.1.2", - "leven": "^3.1.0", - "pretty-format": "30.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-validate/node_modules/@jest/get-type": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/@jest/get-type/-/get-type-30.0.0.tgz", - "integrity": "sha512-VZWMjrBzqfDKngQ7sUctKeLxanAbsBFoZnPxNIG6CmxK7Gv6K44yqd0nzveNIBfuhGZMmk1n5PGbvdSTOu0yTg==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-validate/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/jest-validate/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/jest-validate/node_modules/pretty-format": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.0.0.tgz", - "integrity": "sha512-18NAOUr4ZOQiIR+BgI5NhQE7uREdx4ZyV0dyay5izh4yfQ+1T7BSvggxvRGoXocrRyevqW5OhScUjbi9GB8R8Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "30.0.0", - "ansi-styles": "^5.2.0", - "react-is": "^18.3.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-watcher": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-30.0.0.tgz", - "integrity": "sha512-fbAkojcyS53bOL/B7XYhahORq9cIaPwOgd/p9qW/hybbC8l6CzxfWJJxjlPBAIVN8dRipLR0zdhpGQdam+YBtw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/test-result": "30.0.0", - "@jest/types": "30.0.0", - "@types/node": "*", - "ansi-escapes": "^4.3.2", - "chalk": "^4.1.2", - "emittery": "^0.13.1", - "jest-util": "30.0.0", - "string-length": "^4.0.2" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-watcher/node_modules/jest-util": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.0.0.tgz", - "integrity": "sha512-fhNBBM9uSUbd4Lzsf8l/kcAdaHD/4SgoI48en3HXcBEMwKwoleKFMZ6cYEYs21SB779PRuRCyNLmymApAm8tZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.0.0", - "@types/node": "*", - "chalk": "^4.1.2", - "ci-info": "^4.2.0", - "graceful-fs": "^4.2.11", - "picomatch": "^4.0.2" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-worker": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-30.0.0.tgz", - "integrity": "sha512-VZvxfWIybIvwK8N/Bsfe43LfQgd/rD0c4h5nLUx78CAqPxIQcW2qDjsVAC53iUR8yxzFIeCFFvWOh8en8hGzdg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "@ungap/structured-clone": "^1.3.0", - "jest-util": "30.0.0", - "merge-stream": "^2.0.0", - "supports-color": "^8.1.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-worker/node_modules/jest-util": { - "version": "30.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.0.0.tgz", - "integrity": "sha512-fhNBBM9uSUbd4Lzsf8l/kcAdaHD/4SgoI48en3HXcBEMwKwoleKFMZ6cYEYs21SB779PRuRCyNLmymApAm8tZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.0.0", - "@types/node": "*", - "chalk": "^4.1.2", - "ci-info": "^4.2.0", - "graceful-fs": "^4.2.11", - "picomatch": "^4.0.2" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.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/jsesc": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", - "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true, - "license": "MIT" - }, - "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-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==", - "dev": true, - "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/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dev": true, - "license": "MIT", - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/level-blobs": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/level-blobs/-/level-blobs-0.1.7.tgz", - "integrity": "sha512-n0iYYCGozLd36m/Pzm206+brIgXP8mxPZazZ6ZvgKr+8YwOZ8/PPpYC5zMUu2qFygRN8RO6WC/HH3XWMW7RMVg==", - "dev": true, - "dependencies": { - "level-peek": "1.0.6", - "once": "^1.3.0", - "readable-stream": "^1.0.26-4" - } - }, - "node_modules/level-filesystem": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/level-filesystem/-/level-filesystem-1.2.0.tgz", - "integrity": "sha512-PhXDuCNYpngpxp3jwMT9AYBMgOvB6zxj3DeuIywNKmZqFj2djj9XfT2XDVslfqmo0Ip79cAd3SBy3FsfOZPJ1g==", - "dev": true, - "dependencies": { - "concat-stream": "^1.4.4", - "errno": "^0.1.1", - "fwd-stream": "^1.0.4", - "level-blobs": "^0.1.7", - "level-peek": "^1.0.6", - "level-sublevel": "^5.2.0", - "octal": "^1.0.0", - "once": "^1.3.0", - "xtend": "^2.2.0" - } - }, - "node_modules/level-fix-range": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/level-fix-range/-/level-fix-range-1.0.2.tgz", - "integrity": "sha512-9llaVn6uqBiSlBP+wKiIEoBa01FwEISFgHSZiyec2S0KpyLUkGR4afW/FCZ/X8y+QJvzS0u4PGOlZDdh1/1avQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/level-hooks": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/level-hooks/-/level-hooks-4.5.0.tgz", - "integrity": "sha512-fxLNny/vL/G4PnkLhWsbHnEaRi+A/k8r5EH/M77npZwYL62RHi2fV0S824z3QdpAk6VTgisJwIRywzBHLK4ZVA==", - "dev": true, - "dependencies": { - "string-range": "~1.2" - } - }, - "node_modules/level-js": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/level-js/-/level-js-2.2.4.tgz", - "integrity": "sha512-lZtjt4ZwHE00UMC1vAb271p9qzg8vKlnDeXfIesH3zL0KxhHRDjClQLGLWhyR0nK4XARnd4wc/9eD1ffd4PshQ==", - "deprecated": "Superseded by browser-level (https://github.com/Level/community#faq)", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "abstract-leveldown": "~0.12.0", - "idb-wrapper": "^1.5.0", - "isbuffer": "~0.0.0", - "ltgt": "^2.1.2", - "typedarray-to-buffer": "~1.0.0", - "xtend": "~2.1.2" - } - }, - "node_modules/level-js/node_modules/object-keys": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", - "integrity": "sha512-ncrLw+X55z7bkl5PnUvHwFK9FcGuFYo9gtjws2XtSzL+aZ8tm830P60WJ0dSmFVaSalWieW5MD7kEdnXda9yJw==", - "dev": true, - "license": "MIT" - }, - "node_modules/level-js/node_modules/xtend": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", - "integrity": "sha512-vMNKzr2rHP9Dp/e1NQFnLQlwlhp9L/LfvnsVdHxN1f+uggyVI3i08uD14GPvCToPkdsRfyPqIyYGmIk58V98ZQ==", - "dev": true, - "dependencies": { - "object-keys": "~0.4.0" - }, - "engines": { - "node": ">=0.4" - } - }, - "node_modules/level-peek": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/level-peek/-/level-peek-1.0.6.tgz", - "integrity": "sha512-TKEzH5TxROTjQxWMczt9sizVgnmJ4F3hotBI48xCTYvOKd/4gA/uY0XjKkhJFo6BMic8Tqjf6jFMLWeg3MAbqQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "level-fix-range": "~1.0.2" - } - }, - "node_modules/level-sublevel": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/level-sublevel/-/level-sublevel-5.2.3.tgz", - "integrity": "sha512-tO8jrFp+QZYrxx/Gnmjawuh1UBiifpvKNAcm4KCogesWr1Nm2+ckARitf+Oo7xg4OHqMW76eAqQ204BoIlscjA==", - "dev": true, - "license": "MIT", - "dependencies": { - "level-fix-range": "2.0", - "level-hooks": ">=4.4.0 <5", - "string-range": "~1.2.1", - "xtend": "~2.0.4" - } - }, - "node_modules/level-sublevel/node_modules/level-fix-range": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/level-fix-range/-/level-fix-range-2.0.0.tgz", - "integrity": "sha512-WrLfGWgwWbYPrHsYzJau+5+te89dUbENBg3/lsxOs4p2tYOhCHjbgXxBAj4DFqp3k/XBwitcRXoCh8RoCogASA==", - "dev": true, - "license": "MIT", - "dependencies": { - "clone": "~0.1.9" - } - }, - "node_modules/level-sublevel/node_modules/object-keys": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.2.0.tgz", - "integrity": "sha512-XODjdR2pBh/1qrjPcbSeSgEtKbYo7LqYNq64/TPuCf7j9SfDD3i21yatKoIy39yIWNvVM59iutfQQpCv1RfFzA==", - "deprecated": "Please update to the latest object-keys", - "dev": true, - "license": "MIT", - "dependencies": { - "foreach": "~2.0.1", - "indexof": "~0.0.1", - "is": "~0.2.6" - } - }, - "node_modules/level-sublevel/node_modules/xtend": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.0.6.tgz", - "integrity": "sha512-fOZg4ECOlrMl+A6Msr7EIFcON1L26mb4NY5rurSkOex/TWhazOrg6eXD/B0XkuiYcYhQDWLXzQxLMVJ7LXwokg==", - "dev": true, - "dependencies": { - "is-object": "~0.1.2", - "object-keys": "~0.2.0" - }, - "engines": { - "node": ">=0.4" - } - }, - "node_modules/levelup": { - "version": "0.18.6", - "resolved": "https://registry.npmjs.org/levelup/-/levelup-0.18.6.tgz", - "integrity": "sha512-uB0auyRqIVXx+hrpIUtol4VAPhLRcnxcOsd2i2m6rbFIDarO5dnrupLOStYYpEcu8ZT087Z9HEuYw1wjr6RL6Q==", - "deprecated": "Superseded by abstract-level (https://github.com/Level/community#faq)", - "dev": true, - "license": "MIT", - "dependencies": { - "bl": "~0.8.1", - "deferred-leveldown": "~0.2.0", - "errno": "~0.1.1", - "prr": "~0.0.0", - "readable-stream": "~1.0.26", - "semver": "~2.3.1", - "xtend": "~3.0.0" - } - }, - "node_modules/levelup/node_modules/prr": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz", - "integrity": "sha512-LmUECmrW7RVj6mDWKjTXfKug7TFGdiz9P18HMcO4RHL+RW7MCOGNvpj5j47Rnp6ne6r4fZ2VzyUWEpKbg+tsjQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/levelup/node_modules/semver": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-2.3.2.tgz", - "integrity": "sha512-abLdIKCosKfpnmhS52NCTjO4RiLspDfsn37prjzGrp9im5DPJOgh82Os92vtwGh6XdQryKI/7SREZnV+aqiXrA==", - "dev": true, - "license": "BSD", - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/levelup/node_modules/xtend": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz", - "integrity": "sha512-sp/sT9OALMjRW1fKDlPeuSZlDQpkqReA0pyJukniWbTGoEKefHxhGJynE3PNhUMlcM8qWIjPwecwCw4LArS5Eg==", - "dev": true, - "engines": { - "node": ">=0.4" - } - }, - "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": "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/lodash.memoize": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", - "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", - "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": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/ltgt": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", - "integrity": "sha512-AI2r85+4MquTw9ZYqabu4nMwy9Oftlfa/e/52t9IjtfG+mGBbTNdAoZ3RQKLHR6r0wQnwZnPIEh/Ya6XTWAKNA==", - "dev": true, - "license": "MIT" - }, - "node_modules/magic-string": { - "version": "0.30.21", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", - "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.5" - } - }, - "node_modules/make-dir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", - "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^7.5.3" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true, - "license": "ISC" - }, - "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/math-intrinsics": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", - "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", - "dev": true, - "license": "MIT", - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "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.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/micromatch/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/miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - }, - "bin": { - "miller-rabin": "bin/miller-rabin" - } - }, - "node_modules/miller-rabin/node_modules/bn.js": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", - "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", - "dev": true, - "license": "MIT" - }, - "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/minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true, - "license": "ISC" - }, - "node_modules/minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", - "dev": true, - "license": "MIT" - }, - "node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/minipass": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true, - "license": "MIT", - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "license": "MIT" - }, - "node_modules/napi-postinstall": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.4.tgz", - "integrity": "sha512-PHI5f1O0EP5xJ9gQmFGMS6IZcrVvTjpXjz7Na41gTE7eE2hK11lg04CECCYEEjdc17EV4DO+fkGEtt7TpTaTiQ==", - "dev": true, - "license": "MIT", - "bin": { - "napi-postinstall": "lib/cli.js" - }, - "engines": { - "node": "^12.20.0 || ^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/napi-postinstall" - } - }, - "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-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "license": "MIT", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "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.27", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz", - "integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==", - "dev": true, - "license": "MIT" - }, - "node_modules/noms": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/noms/-/noms-0.0.0.tgz", - "integrity": "sha512-lNDU9VJaOPxUmXcLb+HQFeUgQQPtMI24Gt6hgfuMHRJgMRHMF/qZ4HJD3GDru4sSw9IQl2jPjAYnQrdIeLbwow==", - "dev": true, - "license": "ISC", - "dependencies": { - "inherits": "^2.0.1", - "readable-stream": "~1.0.31" - } - }, - "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/object-inspect": { - "version": "1.13.4", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", - "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "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.7", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz", - "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0", - "has-symbols": "^1.1.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.entries": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.9.tgz", - "integrity": "sha512-8u/hfXFRBD1O0hPUjioLhoWFHRmt6tKA4/vZPyckBr18l1KE9uHrFaFaUi8MDRTpi4uak2goyPTSNJLXX2k2Hw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.fromentries": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", - "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.groupby": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz", - "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.values": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.1.tgz", - "integrity": "sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/octal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/octal/-/octal-1.0.0.tgz", - "integrity": "sha512-nnda7W8d+A3vEIY+UrDQzzboPf1vhs4JYVhff5CDkq9QNoZY7Xrxeo/htox37j9dZf7yNHevZzqtejWgy1vCqQ==", - "dev": true, - "license": "MIT" - }, - "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/optionator": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", - "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.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/own-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.1.tgz", - "integrity": "sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==", - "dev": true, - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.2.6", - "object-keys": "^1.1.1", - "safe-push-apply": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "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/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/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/package-json-from-dist": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", - "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", - "dev": true, - "license": "BlueOak-1.0.0" - }, - "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-asn1": { - "version": "5.1.9", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.9.tgz", - "integrity": "sha512-fIYNuZ/HastSb80baGOuPRo1O9cf4baWw5WsAp7dBuUzeTD/BoaG8sVTdlPFksBE2lF21dN+A1AnrpIjSWqHHg==", - "dev": true, - "license": "ISC", - "dependencies": { - "asn1.js": "^4.10.1", - "browserify-aes": "^1.2.0", - "evp_bytestokey": "^1.0.3", - "pbkdf2": "^3.1.5", - "safe-buffer": "^5.2.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "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-scurry": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", - "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/pbkdf2": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.5.tgz", - "integrity": "sha512-Q3CG/cYvCO1ye4QKkuH7EXxs3VC/rI1/trd+qX2+PolbaKG0H+bgcZzrTt96mMyRtejk+JMCiLUn3y29W8qmFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "ripemd160": "^2.0.3", - "safe-buffer": "^5.2.1", - "sha.js": "^2.4.12", - "to-buffer": "^1.2.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "dev": true, - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", - "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pirates": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", - "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", - "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/pkg-dir/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/pkg-dir/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/pkg-dir/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/pkg-dir/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/possible-typed-array-names": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", - "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "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": "3.5.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz", - "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/prettier-linter-helpers": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", - "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-diff": "^1.1.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/pretty-format": { - "version": "30.2.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.2.0.tgz", - "integrity": "sha512-9uBdv/B4EefsuAL+pWqueZyZS2Ba+LxfFeQ9DN14HU4bN8bhaxKdkpjpB6fs9+pSjIBu+FXQHImEg8j/Lw0+vA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "30.0.5", - "ansi-styles": "^5.2.0", - "react-is": "^18.3.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/pretty-format/node_modules/@jest/schemas": { - "version": "30.0.5", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-30.0.5.tgz", - "integrity": "sha512-DmdYgtezMkh3cpU8/1uyXakv3tJRcmcXxBOcO0tbaozPwpmh4YMsnWrQm9ZmZMfa5ocbxzbFk6O4bDPEc/iAnA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@sinclair/typebox": "^0.34.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.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/process-es6": { - "version": "0.11.6", - "resolved": "https://registry.npmjs.org/process-es6/-/process-es6-0.11.6.tgz", - "integrity": "sha512-GYBRQtL4v3wgigq10Pv58jmTbFXlIiTbSfgnNqZLY0ldUPqy1rRxDI5fCjoCpnM6TqmHQI8ydzTBXW86OYc0gA==", - "dev": true, - "license": "MIT" - }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true, - "license": "MIT" - }, - "node_modules/prr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==", - "dev": true, - "license": "MIT" - }, - "node_modules/public-encrypt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", - "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/public-encrypt/node_modules/bn.js": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", - "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", - "dev": true, - "license": "MIT" - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/pure-rand": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-7.0.1.tgz", - "integrity": "sha512-oTUZM/NAZS8p7ANR3SHh30kXB+zK2r2BPcEn/awJIbOvq82WoMN4p62AWWp3Hhw50G0xMsw1mhIBLqHw64EcNQ==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/dubzzz" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/fast-check" - } - ], - "license": "MIT" - }, - "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/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", - "dev": true, - "license": "MIT", - "dependencies": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, - "node_modules/react-is": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", - "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", - "dev": true, - "license": "MIT" - }, - "node_modules/readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==", - "dev": true, - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "node_modules/reflect.getprototypeof": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", - "integrity": "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.9", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.7", - "get-proto": "^1.0.1", - "which-builtin-type": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/regexp.prototype.flags": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", - "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-errors": "^1.3.0", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "set-function-name": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "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.11", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz", - "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-core-module": "^2.16.1", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "engines": { - "node": ">= 0.4" - }, - "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-cwd/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-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/reusify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", - "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rimraf": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.0.1.tgz", - "integrity": "sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^11.0.0", - "package-json-from-dist": "^1.0.0" - }, - "bin": { - "rimraf": "dist/esm/bin.mjs" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/glob": { - "version": "11.0.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.3.tgz", - "integrity": "sha512-2Nim7dha1KVkaiF4q6Dj+ngPPMdfvLJEOpZk/jKiUAkqKebpGAWQXAq9z1xu9HKu5lWfqw/FASuccEjyznjPaA==", - "dev": true, - "license": "ISC", - "dependencies": { - "foreground-child": "^3.3.1", - "jackspeak": "^4.1.1", - "minimatch": "^10.0.3", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^2.0.0" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/jackspeak": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.1.tgz", - "integrity": "sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/lru-cache": { - "version": "11.2.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz", - "integrity": "sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==", - "dev": true, - "license": "ISC", - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/rimraf/node_modules/minimatch": { - "version": "10.1.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.1.1.tgz", - "integrity": "sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/brace-expansion": "^5.0.0" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/path-scurry": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz", - "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "lru-cache": "^11.0.0", - "minipass": "^7.1.2" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/ripemd160": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.3.tgz", - "integrity": "sha512-5Di9UC0+8h1L6ZD2d7awM7E/T4uA1fJRlx6zk/NvdCCVEoAnFqvHmCuNeIKoCeIixBX/q8uM+6ycDvF8woqosA==", - "dev": true, - "license": "MIT", - "dependencies": { - "hash-base": "^3.1.2", - "inherits": "^2.0.4" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/ripemd160/node_modules/hash-base": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.2.tgz", - "integrity": "sha512-Bb33KbowVTIj5s7Ked1OsqHUeCpz//tPwR+E2zJgJKo9Z5XolZ9b6bdUgjmYlwnWhoOQKoTd1TYToZGn5mAYOg==", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.4", - "readable-stream": "^2.3.8", - "safe-buffer": "^5.2.1", - "to-buffer": "^1.2.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/ripemd160/node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/ripemd160/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dev": true, - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/ripemd160/node_modules/readable-stream/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/ripemd160/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/ripemd160/node_modules/string_decoder/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/rollup": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.43.0.tgz", - "integrity": "sha512-wdN2Kd3Twh8MAEOEJZsuxuLKCsBEo4PVNLK6tQWAn10VhsVewQLzcucMgLolRlhFybGxfclbPeEYBaP6RvUFGg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "1.0.7" - }, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=18.0.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.43.0", - "@rollup/rollup-android-arm64": "4.43.0", - "@rollup/rollup-darwin-arm64": "4.43.0", - "@rollup/rollup-darwin-x64": "4.43.0", - "@rollup/rollup-freebsd-arm64": "4.43.0", - "@rollup/rollup-freebsd-x64": "4.43.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.43.0", - "@rollup/rollup-linux-arm-musleabihf": "4.43.0", - "@rollup/rollup-linux-arm64-gnu": "4.43.0", - "@rollup/rollup-linux-arm64-musl": "4.43.0", - "@rollup/rollup-linux-loongarch64-gnu": "4.43.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.43.0", - "@rollup/rollup-linux-riscv64-gnu": "4.43.0", - "@rollup/rollup-linux-riscv64-musl": "4.43.0", - "@rollup/rollup-linux-s390x-gnu": "4.43.0", - "@rollup/rollup-linux-x64-gnu": "4.43.0", - "@rollup/rollup-linux-x64-musl": "4.43.0", - "@rollup/rollup-win32-arm64-msvc": "4.43.0", - "@rollup/rollup-win32-ia32-msvc": "4.43.0", - "@rollup/rollup-win32-x64-msvc": "4.43.0", - "fsevents": "~2.3.2" - } - }, - "node_modules/rollup-plugin-dts": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/rollup-plugin-dts/-/rollup-plugin-dts-6.2.1.tgz", - "integrity": "sha512-sR3CxYUl7i2CHa0O7bA45mCrgADyAQ0tVtGSqi3yvH28M+eg1+g5d7kQ9hLvEz5dorK3XVsH5L2jwHLQf72DzA==", - "dev": true, - "license": "LGPL-3.0-only", - "dependencies": { - "magic-string": "^0.30.17" - }, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/Swatinem" - }, - "optionalDependencies": { - "@babel/code-frame": "^7.26.2" - }, - "peerDependencies": { - "rollup": "^3.29.4 || ^4", - "typescript": "^4.5 || ^5.0" - } - }, - "node_modules/rollup-plugin-node-builtins": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/rollup-plugin-node-builtins/-/rollup-plugin-node-builtins-2.1.2.tgz", - "integrity": "sha512-bxdnJw8jIivr2yEyt8IZSGqZkygIJOGAWypXvHXnwKAbUcN4Q/dGTx7K0oAJryC/m6aq6tKutltSeXtuogU6sw==", - "dev": true, - "license": "ISC", - "dependencies": { - "browserify-fs": "^1.0.0", - "buffer-es6": "^4.9.2", - "crypto-browserify": "^3.11.0", - "process-es6": "^0.11.2" - } - }, - "node_modules/rollup-plugin-polyfill-node": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-polyfill-node/-/rollup-plugin-polyfill-node-0.13.0.tgz", - "integrity": "sha512-FYEvpCaD5jGtyBuBFcQImEGmTxDTPbiHjJdrYIp+mFIwgXiXabxvKUK7ZT9P31ozu2Tqm9llYQMRWsfvTMTAOw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rollup/plugin-inject": "^5.0.4" - }, - "peerDependencies": { - "rollup": "^1.20.0 || ^2.0.0 || ^3.0.0 || ^4.0.0" - } - }, - "node_modules/rollup/node_modules/@types/estree": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz", - "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==", - "dev": true, - "license": "MIT" - }, - "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-array-concat": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz", - "integrity": "sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.2", - "get-intrinsic": "^1.2.6", - "has-symbols": "^1.1.0", - "isarray": "^2.0.5" - }, - "engines": { - "node": ">=0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safe-array-concat/node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true, - "license": "MIT" - }, - "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==", - "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/safe-push-apply": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz", - "integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "isarray": "^2.0.5" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safe-push-apply/node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true, - "license": "MIT" - }, - "node_modules/safe-regex-test": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", - "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "is-regex": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/sax": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.3.tgz", - "integrity": "sha512-yqYn1JhPczigF94DMS+shiDMjDowYO6y9+wB/4WgO0Y19jWYk0lQ4tuG5KI7kj4FTp1wxPj5IFfcrz/s1c3jjQ==", - "license": "BlueOak-1.0.0" - }, - "node_modules/semver": { - "version": "7.7.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", - "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/serialize-javascript": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", - "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "node_modules/set-function-length": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", - "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/set-function-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", - "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/set-proto": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/set-proto/-/set-proto-1.0.0.tgz", - "integrity": "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/sha.js": { - "version": "2.4.12", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.12.tgz", - "integrity": "sha512-8LzC5+bvI45BjpfXU8V5fdU2mfeKiQe1D1gIMn7XUlF3OTUrpdJpPPH4EMAnF0DsHHdSZqCdSss5qCmJKuiO3w==", - "dev": true, - "license": "(MIT AND BSD-3-Clause)", - "dependencies": { - "inherits": "^2.0.4", - "safe-buffer": "^5.2.1", - "to-buffer": "^1.2.0" - }, - "bin": { - "sha.js": "bin.js" - }, - "engines": { - "node": ">= 0.10" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "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/side-channel": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", - "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.3", - "side-channel-list": "^1.0.0", - "side-channel-map": "^1.0.1", - "side-channel-weakmap": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-list": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", - "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-map": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", - "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-weakmap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", - "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3", - "side-channel-map": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "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/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/smob": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/smob/-/smob-1.5.0.tgz", - "integrity": "sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig==", - "dev": true, - "license": "MIT" - }, - "node_modules/sort-object-keys": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/sort-object-keys/-/sort-object-keys-1.1.3.tgz", - "integrity": "sha512-855pvK+VkU7PaKYPc+Jjnmt4EzejQHyhhF33q31qG8x7maDzkeFhAAThdCYay11CISO+qAMwjOBP+fPZe0IPyg==", - "dev": true, - "license": "MIT" - }, - "node_modules/sort-package-json": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/sort-package-json/-/sort-package-json-3.2.1.tgz", - "integrity": "sha512-rTfRdb20vuoAn7LDlEtCqOkYfl2X+Qze6cLbNOzcDpbmKEhJI30tTN44d5shbKJnXsvz24QQhlCm81Bag7EOKg==", - "dev": true, - "license": "MIT", - "dependencies": { - "detect-indent": "^7.0.1", - "detect-newline": "^4.0.1", - "git-hooks-list": "^4.0.0", - "is-plain-obj": "^4.1.0", - "semver": "^7.7.1", - "sort-object-keys": "^1.1.3", - "tinyglobby": "^0.2.12" - }, - "bin": { - "sort-package-json": "cli.js" - } - }, - "node_modules/sort-package-json/node_modules/detect-newline": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-4.0.1.tgz", - "integrity": "sha512-qE3Veg1YXzGHQhlA6jzebZN2qVf6NX+A7m7qlhCGG30dJixrAQhYOsJjsnBjJkCSmuOPpCk30145fr8FV0bzog==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "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/stack-utils": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", - "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", - "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/stop-iteration-iterator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz", - "integrity": "sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "internal-slot": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==", - "dev": true, - "license": "MIT" - }, - "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-range": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/string-range/-/string-range-1.2.2.tgz", - "integrity": "sha512-tYft6IFi8SjplJpxCUxyqisD3b+R2CSkomrtJYCkvuf1KuCAWgz7YXt4O0jip7efpfCemwHEzTEAO8EuOYgh3w==", - "dev": true, - "license": "MIT" - }, - "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/string-width-cjs": { - "name": "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/string.prototype.trim": { - "version": "1.2.10", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz", - "integrity": "sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.2", - "define-data-property": "^1.1.4", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-object-atoms": "^1.0.0", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimend": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz", - "integrity": "sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.2", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimstart": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", - "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "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-ansi-cjs": { - "name": "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-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/synckit": { - "version": "0.11.11", - "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.11.11.tgz", - "integrity": "sha512-MeQTA1r0litLUf0Rp/iisCaL8761lKAZHaimlbGK4j0HysC4PLfqygQj9srcs0m2RdtDYnF8UuYyKpbjHYp7Jw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@pkgr/core": "^0.2.9" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/synckit" - } - }, - "node_modules/terser": { - "version": "5.44.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.44.1.tgz", - "integrity": "sha512-t/R3R/n0MSwnnazuPpPNVO60LX0SKL45pyl9YlvxIdkH0Of7D5qM2EVe+yASRIlY5pZ73nclYJfNANGWPwFDZw==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@jridgewell/source-map": "^0.3.3", - "acorn": "^8.15.0", - "commander": "^2.20.0", - "source-map-support": "~0.5.20" - }, - "bin": { - "terser": "bin/terser" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/terser/node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "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/test-exclude/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/test-exclude/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/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "node_modules/through2/node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/through2/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dev": true, - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/through2/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/through2/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/through2/node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.4" - } - }, - "node_modules/tinyglobby": { - "version": "0.2.15", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", - "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "fdir": "^6.5.0", - "picomatch": "^4.0.3" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/SuperchupuDev" - } - }, - "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-buffer": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.2.2.tgz", - "integrity": "sha512-db0E3UJjcFhpDhAF4tLo03oli3pwl3dbnzXOUIlRKrp+ldk/VUxzpWYZENsw2SZiuBjHAk7DfB0VU7NKdpb6sw==", - "dev": true, - "license": "MIT", - "dependencies": { - "isarray": "^2.0.5", - "safe-buffer": "^5.2.1", - "typed-array-buffer": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/to-buffer/node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true, - "license": "MIT" - }, - "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/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "license": "MIT" - }, - "node_modules/ts-api-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", - "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18.12" - }, - "peerDependencies": { - "typescript": ">=4.8.4" - } - }, - "node_modules/ts-jest": { - "version": "29.4.0", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.0.tgz", - "integrity": "sha512-d423TJMnJGu80/eSgfQ5w/R+0zFJvdtTxwtF9KzFFunOpSeD+79lHJQIiAhluJoyGRbvj9NZJsl9WjCUo0ND7Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "ejs": "^3.1.10", - "fast-json-stable-stringify": "^2.1.0", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.2", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "node_modules/ts-jest/node_modules/type-fest": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", - "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/tsconfig-paths": { - "version": "3.15.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", - "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json5": "^0.0.29", - "json5": "^1.0.2", - "minimist": "^1.2.6", - "strip-bom": "^3.0.0" - } - }, - "node_modules/tsconfig-paths/node_modules/json5": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", - "dev": true, - "license": "MIT", - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" - } - }, - "node_modules/tsconfig-paths/node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "dev": true, - "license": "0BSD" - }, - "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.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/typed-array-buffer": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", - "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-typed-array": "^1.1.14" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/typed-array-byte-length": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz", - "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "for-each": "^0.3.3", - "gopd": "^1.2.0", - "has-proto": "^1.2.0", - "is-typed-array": "^1.1.14" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typed-array-byte-offset": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz", - "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "for-each": "^0.3.3", - "gopd": "^1.2.0", - "has-proto": "^1.2.0", - "is-typed-array": "^1.1.15", - "reflect.getprototypeof": "^1.0.9" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typed-array-length": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.7.tgz", - "integrity": "sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "is-typed-array": "^1.1.13", - "possible-typed-array-names": "^1.0.0", - "reflect.getprototypeof": "^1.0.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", - "dev": true, - "license": "MIT" - }, - "node_modules/typedarray-to-buffer": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-1.0.4.tgz", - "integrity": "sha512-vjMKrfSoUDN8/Vnqitw2FmstOfuJ73G6CrSEKnf11A6RmasVxHqfeBcnTb6RsL4pTMuV5Zsv9IiHRphMZyckUw==", - "dev": true, - "license": "MIT" - }, - "node_modules/typescript": { - "version": "5.8.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", - "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/unbox-primitive": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", - "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-bigints": "^1.0.2", - "has-symbols": "^1.1.0", - "which-boxed-primitive": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/undici-types": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz", - "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==", - "dev": true, - "license": "MIT" - }, - "node_modules/unrs-resolver": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.11.1.tgz", - "integrity": "sha512-bSjt9pjaEBnNiGgc9rUiHGKv5l4/TGzDmYw3RhnkJGtLhbnnA/5qJj7x3dNDCRx/PJxu774LlH8lCOlB4hEfKg==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "napi-postinstall": "^0.3.0" - }, - "funding": { - "url": "https://opencollective.com/unrs-resolver" - }, - "optionalDependencies": { - "@unrs/resolver-binding-android-arm-eabi": "1.11.1", - "@unrs/resolver-binding-android-arm64": "1.11.1", - "@unrs/resolver-binding-darwin-arm64": "1.11.1", - "@unrs/resolver-binding-darwin-x64": "1.11.1", - "@unrs/resolver-binding-freebsd-x64": "1.11.1", - "@unrs/resolver-binding-linux-arm-gnueabihf": "1.11.1", - "@unrs/resolver-binding-linux-arm-musleabihf": "1.11.1", - "@unrs/resolver-binding-linux-arm64-gnu": "1.11.1", - "@unrs/resolver-binding-linux-arm64-musl": "1.11.1", - "@unrs/resolver-binding-linux-ppc64-gnu": "1.11.1", - "@unrs/resolver-binding-linux-riscv64-gnu": "1.11.1", - "@unrs/resolver-binding-linux-riscv64-musl": "1.11.1", - "@unrs/resolver-binding-linux-s390x-gnu": "1.11.1", - "@unrs/resolver-binding-linux-x64-gnu": "1.11.1", - "@unrs/resolver-binding-linux-x64-musl": "1.11.1", - "@unrs/resolver-binding-wasm32-wasi": "1.11.1", - "@unrs/resolver-binding-win32-arm64-msvc": "1.11.1", - "@unrs/resolver-binding-win32-ia32-msvc": "1.11.1", - "@unrs/resolver-binding-win32-x64-msvc": "1.11.1" - } - }, - "node_modules/untildify": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", - "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/update-browserslist-db": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.4.tgz", - "integrity": "sha512-q0SPT4xyU84saUX+tomz1WLkxUbuaJnR1xWt17M7fJtEJigJeWUNGUqrauFXsHnqev9y9JTRGwk13tFBuKby4A==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "escalade": "^3.2.0", - "picocolors": "^1.1.1" - }, - "bin": { - "update-browserslist-db": "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==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true, - "license": "MIT" - }, - "node_modules/v8-to-istanbul": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", - "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", - "dev": true, - "license": "ISC", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.12", - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^2.0.0" - }, - "engines": { - "node": ">=10.12.0" - } - }, - "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/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "license": "BSD-2-Clause" - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "license": "MIT", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "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/which-boxed-primitive": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz", - "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-bigint": "^1.1.0", - "is-boolean-object": "^1.2.1", - "is-number-object": "^1.1.1", - "is-string": "^1.1.1", - "is-symbol": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-builtin-type": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz", - "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "function.prototype.name": "^1.1.6", - "has-tostringtag": "^1.0.2", - "is-async-function": "^2.0.0", - "is-date-object": "^1.1.0", - "is-finalizationregistry": "^1.1.0", - "is-generator-function": "^1.0.10", - "is-regex": "^1.2.1", - "is-weakref": "^1.0.2", - "isarray": "^2.0.5", - "which-boxed-primitive": "^1.1.0", - "which-collection": "^1.0.2", - "which-typed-array": "^1.1.16" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-builtin-type/node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true, - "license": "MIT" - }, - "node_modules/which-collection": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", - "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-map": "^2.0.3", - "is-set": "^2.0.3", - "is-weakmap": "^2.0.2", - "is-weakset": "^2.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-typed-array": { - "version": "1.1.19", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz", - "integrity": "sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==", - "dev": true, - "license": "MIT", - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "for-each": "^0.3.5", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "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/wrap-ansi-cjs": { - "name": "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": "5.0.1", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz", - "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==", - "dev": true, - "license": "ISC", - "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/write-file-atomic/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/xml-js": { - "version": "1.6.11", - "resolved": "https://registry.npmjs.org/xml-js/-/xml-js-1.6.11.tgz", - "integrity": "sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g==", - "license": "MIT", - "dependencies": { - "sax": "^1.2.4" - }, - "bin": { - "xml-js": "bin/cli.js" - } - }, - "node_modules/xtend": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.2.0.tgz", - "integrity": "sha512-SLt5uylT+4aoXxXuwtQp5ZnMMzhDb1Xkg4pEqc00WUJCQifPfV9Ub1VrNhp9kXkrjZD2I2Hl8WnjP37jzZLPZw==", - "dev": true, - "engines": { - "node": ">=0.4" - } - }, - "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": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true, - "license": "ISC" - }, - "node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "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.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs/node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "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" - } - } - } -} diff --git a/package.json b/package.json index 1023d49c..71146925 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tsdav", - "version": "2.3.0", + "version": "2.3.1", "description": "WebDAV, CALDAV, and CARDDAV client for Nodejs and the Browser", "keywords": [ "dav", @@ -31,7 +31,7 @@ "package.json" ], "scripts": { - "build": "pnpm -s clean && rollup -c rollup.config.mjs && copyfiles package.json LICENSE README.md ./dist && rimraf ./dist/ts", + "build": "rimraf dist* && rollup -c rollup.config.mjs && copyfiles package.json LICENSE README.md ./dist && rimraf ./dist/ts", "lint": "eslint --ext .ts,.tsx src --ignore-pattern src/__tests__ --ignore-pattern src/util/__tests__", "clean": "rimraf dist*", "prepublishOnly": "pnpm build", @@ -45,7 +45,7 @@ "test:zoho": "jest --testPathPatterns=src/__tests__/integration/zoho --runInBand", "typecheck": "tsc --noEmit", "watch": "tsc --watch --outDir ./dist", - "prepare": "husky" + "prepare": "husky && npm run build" }, "dependencies": { "base-64": "1.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index da7dfbba..64bbc22c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -81,6 +81,9 @@ importers: eslint-plugin-prettier: specifier: 5.5.5 version: 5.5.5(eslint-config-prettier@10.1.8(eslint@8.57.0))(eslint@8.57.0)(prettier@3.8.0) + husky: + specifier: ^9.1.7 + version: 9.1.7 jest: specifier: 30.2.0 version: 30.2.0(@types/node@25.0.9) @@ -561,66 +564,79 @@ packages: resolution: {integrity: sha512-YeGUhkN1oA+iSPzzhEjVPS29YbViOr8s4lSsFaZKLHswgqP911xx25fPOyE9+khmN6W4VeM0aevbDp4kkEoHiA==} cpu: [arm] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm-musleabihf@4.55.3': resolution: {integrity: sha512-eo0iOIOvcAlWB3Z3eh8pVM8hZ0oVkK3AjEM9nSrkSug2l15qHzF3TOwT0747omI6+CJJvl7drwZepT+re6Fy/w==} cpu: [arm] os: [linux] + libc: [musl] '@rollup/rollup-linux-arm64-gnu@4.55.3': resolution: {integrity: sha512-DJay3ep76bKUDImmn//W5SvpjRN5LmK/ntWyeJs/dcnwiiHESd3N4uteK9FDLf0S0W8E6Y0sVRXpOCoQclQqNg==} cpu: [arm64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm64-musl@4.55.3': resolution: {integrity: sha512-BKKWQkY2WgJ5MC/ayvIJTHjy0JUGb5efaHCUiG/39sSUvAYRBaO3+/EK0AZT1RF3pSj86O24GLLik9mAYu0IJg==} cpu: [arm64] os: [linux] + libc: [musl] '@rollup/rollup-linux-loong64-gnu@4.55.3': resolution: {integrity: sha512-Q9nVlWtKAG7ISW80OiZGxTr6rYtyDSkauHUtvkQI6TNOJjFvpj4gcH+KaJihqYInnAzEEUetPQubRwHef4exVg==} cpu: [loong64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-loong64-musl@4.55.3': resolution: {integrity: sha512-2H5LmhzrpC4fFRNwknzmmTvvyJPHwESoJgyReXeFoYYuIDfBhP29TEXOkCJE/KxHi27mj7wDUClNq78ue3QEBQ==} cpu: [loong64] os: [linux] + libc: [musl] '@rollup/rollup-linux-ppc64-gnu@4.55.3': resolution: {integrity: sha512-9S542V0ie9LCTznPYlvaeySwBeIEa7rDBgLHKZ5S9DBgcqdJYburabm8TqiqG6mrdTzfV5uttQRHcbKff9lWtA==} cpu: [ppc64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-ppc64-musl@4.55.3': resolution: {integrity: sha512-ukxw+YH3XXpcezLgbJeasgxyTbdpnNAkrIlFGDl7t+pgCxZ89/6n1a+MxlY7CegU+nDgrgdqDelPRNQ/47zs0g==} cpu: [ppc64] os: [linux] + libc: [musl] '@rollup/rollup-linux-riscv64-gnu@4.55.3': resolution: {integrity: sha512-Iauw9UsTTvlF++FhghFJjqYxyXdggXsOqGpFBylaRopVpcbfyIIsNvkf9oGwfgIcf57z3m8+/oSYTo6HutBFNw==} cpu: [riscv64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-riscv64-musl@4.55.3': resolution: {integrity: sha512-3OqKAHSEQXKdq9mQ4eajqUgNIK27VZPW3I26EP8miIzuKzCJ3aW3oEn2pzF+4/Hj/Moc0YDsOtBgT5bZ56/vcA==} cpu: [riscv64] os: [linux] + libc: [musl] '@rollup/rollup-linux-s390x-gnu@4.55.3': resolution: {integrity: sha512-0CM8dSVzVIaqMcXIFej8zZrSFLnGrAE8qlNbbHfTw1EEPnFTg1U1ekI0JdzjPyzSfUsHWtodilQQG/RA55berA==} cpu: [s390x] os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-gnu@4.55.3': resolution: {integrity: sha512-+fgJE12FZMIgBaKIAGd45rxf+5ftcycANJRWk8Vz0NnMTM5rADPGuRFTYar+Mqs560xuART7XsX2lSACa1iOmQ==} cpu: [x64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-musl@4.55.3': resolution: {integrity: sha512-tMD7NnbAolWPzQlJQJjVFh/fNH3K/KnA7K8gv2dJWCwwnaK6DFCYST1QXYWfu5V0cDwarWC8Sf/cfMHniNq21A==} cpu: [x64] os: [linux] + libc: [musl] '@rollup/rollup-openbsd-x64@4.55.3': resolution: {integrity: sha512-u5KsqxOxjEeIbn7bUK1MPM34jrnPwjeqgyin4/N6e/KzXKfpE9Mi0nCxcQjaM9lLmPcHmn/xx1yOjgTMtu1jWQ==} @@ -822,41 +838,49 @@ packages: resolution: {integrity: sha512-34gw7PjDGB9JgePJEmhEqBhWvCiiWCuXsL9hYphDF7crW7UgI05gyBAi6MF58uGcMOiOqSJ2ybEeCvHcq0BCmQ==} cpu: [arm64] os: [linux] + libc: [glibc] '@unrs/resolver-binding-linux-arm64-musl@1.11.1': resolution: {integrity: sha512-RyMIx6Uf53hhOtJDIamSbTskA99sPHS96wxVE/bJtePJJtpdKGXO1wY90oRdXuYOGOTuqjT8ACccMc4K6QmT3w==} cpu: [arm64] os: [linux] + libc: [musl] '@unrs/resolver-binding-linux-ppc64-gnu@1.11.1': resolution: {integrity: sha512-D8Vae74A4/a+mZH0FbOkFJL9DSK2R6TFPC9M+jCWYia/q2einCubX10pecpDiTmkJVUH+y8K3BZClycD8nCShA==} cpu: [ppc64] os: [linux] + libc: [glibc] '@unrs/resolver-binding-linux-riscv64-gnu@1.11.1': resolution: {integrity: sha512-frxL4OrzOWVVsOc96+V3aqTIQl1O2TjgExV4EKgRY09AJ9leZpEg8Ak9phadbuX0BA4k8U5qtvMSQQGGmaJqcQ==} cpu: [riscv64] os: [linux] + libc: [glibc] '@unrs/resolver-binding-linux-riscv64-musl@1.11.1': resolution: {integrity: sha512-mJ5vuDaIZ+l/acv01sHoXfpnyrNKOk/3aDoEdLO/Xtn9HuZlDD6jKxHlkN8ZhWyLJsRBxfv9GYM2utQ1SChKew==} cpu: [riscv64] os: [linux] + libc: [musl] '@unrs/resolver-binding-linux-s390x-gnu@1.11.1': resolution: {integrity: sha512-kELo8ebBVtb9sA7rMe1Cph4QHreByhaZ2QEADd9NzIQsYNQpt9UkM9iqr2lhGr5afh885d/cB5QeTXSbZHTYPg==} cpu: [s390x] os: [linux] + libc: [glibc] '@unrs/resolver-binding-linux-x64-gnu@1.11.1': resolution: {integrity: sha512-C3ZAHugKgovV5YvAMsxhq0gtXuwESUKc5MhEtjBpLoHPLYM+iuwSj3lflFwK3DPm68660rZ7G8BMcwSro7hD5w==} cpu: [x64] os: [linux] + libc: [glibc] '@unrs/resolver-binding-linux-x64-musl@1.11.1': resolution: {integrity: sha512-rV0YSoyhK2nZ4vEswT/QwqzqQXw5I6CjoaYMOX0TqBlWhojUf8P94mvI7nuJTeaCkkds3QE4+zS8Ko+GdXuZtA==} cpu: [x64] os: [linux] + libc: [musl] '@unrs/resolver-binding-wasm32-wasi@1.11.1': resolution: {integrity: sha512-5u4RkfxJm+Ng7IWgkzi3qrFOvLvQYnPBmjmZQ8+szTK/b31fQCnleNl1GgEt7nIsZRIf5PLhPwT0WM+q45x/UQ==} @@ -1735,6 +1759,11 @@ packages: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} + husky@9.1.7: + resolution: {integrity: sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==} + engines: {node: '>=18'} + hasBin: true + idb-wrapper@1.7.2: resolution: {integrity: sha512-zfNREywMuf0NzDo9mVsL0yegjsirJxHpKHvWcyRozIqQy89g0a3U+oBPOCN4cc0oCiOuYgZHimzaW/R46G1Mpg==} @@ -5051,6 +5080,8 @@ snapshots: human-signals@2.1.0: {} + husky@9.1.7: {} + idb-wrapper@1.7.2: {} ignore@5.3.2: {}