diff --git a/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock index 7c652a3..2e611ef 100644 Binary files a/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/android/.gradle/file-system.probe b/android/.gradle/file-system.probe index 8676c95..d09f36f 100644 Binary files a/android/.gradle/file-system.probe and b/android/.gradle/file-system.probe differ diff --git a/android/app/build/intermediates/android_test_lint_model/debug/generateDebugAndroidTestLintModel/debug-artifact-dependencies.xml b/android/app/build/intermediates/android_test_lint_model/debug/generateDebugAndroidTestLintModel/debug-artifact-dependencies.xml deleted file mode 100644 index 37c996c..0000000 --- a/android/app/build/intermediates/android_test_lint_model/debug/generateDebugAndroidTestLintModel/debug-artifact-dependencies.xml +++ /dev/null @@ -1,260 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/android/app/build/intermediates/android_test_lint_model/debug/generateDebugAndroidTestLintModel/debug-artifact-libraries.xml b/android/app/build/intermediates/android_test_lint_model/debug/generateDebugAndroidTestLintModel/debug-artifact-libraries.xml deleted file mode 100644 index ee28b68..0000000 --- a/android/app/build/intermediates/android_test_lint_model/debug/generateDebugAndroidTestLintModel/debug-artifact-libraries.xml +++ /dev/null @@ -1,597 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/android/app/build/intermediates/android_test_lint_model/debug/generateDebugAndroidTestLintModel/debug.xml b/android/app/build/intermediates/android_test_lint_model/debug/generateDebugAndroidTestLintModel/debug.xml deleted file mode 100644 index 671f2f3..0000000 --- a/android/app/build/intermediates/android_test_lint_model/debug/generateDebugAndroidTestLintModel/debug.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - diff --git a/android/app/build/intermediates/android_test_lint_model/debug/generateDebugAndroidTestLintModel/module.xml b/android/app/build/intermediates/android_test_lint_model/debug/generateDebugAndroidTestLintModel/module.xml deleted file mode 100644 index 8edb90d..0000000 --- a/android/app/build/intermediates/android_test_lint_model/debug/generateDebugAndroidTestLintModel/module.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - diff --git a/android/app/build/intermediates/android_test_lint_partial_results/debug/lintAnalyzeDebugAndroidTest/out/lint-partial.xml b/android/app/build/intermediates/android_test_lint_partial_results/debug/lintAnalyzeDebugAndroidTest/out/lint-partial.xml deleted file mode 100644 index cfe0376..0000000 --- a/android/app/build/intermediates/android_test_lint_partial_results/debug/lintAnalyzeDebugAndroidTest/out/lint-partial.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - diff --git a/android/app/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json b/android/app/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json deleted file mode 100644 index 9e26dfe..0000000 --- a/android/app/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/android/app/build/intermediates/annotation_processor_list/debugUnitTest/javaPreCompileDebugUnitTest/annotationProcessors.json b/android/app/build/intermediates/annotation_processor_list/debugUnitTest/javaPreCompileDebugUnitTest/annotationProcessors.json deleted file mode 100644 index 9e26dfe..0000000 --- a/android/app/build/intermediates/annotation_processor_list/debugUnitTest/javaPreCompileDebugUnitTest/annotationProcessors.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/android/app/build/intermediates/annotation_processor_list/release/javaPreCompileRelease/annotationProcessors.json b/android/app/build/intermediates/annotation_processor_list/release/javaPreCompileRelease/annotationProcessors.json deleted file mode 100644 index 9e26dfe..0000000 --- a/android/app/build/intermediates/annotation_processor_list/release/javaPreCompileRelease/annotationProcessors.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/android/app/build/intermediates/annotation_processor_list/releaseUnitTest/javaPreCompileReleaseUnitTest/annotationProcessors.json b/android/app/build/intermediates/annotation_processor_list/releaseUnitTest/javaPreCompileReleaseUnitTest/annotationProcessors.json deleted file mode 100644 index 9e26dfe..0000000 --- a/android/app/build/intermediates/annotation_processor_list/releaseUnitTest/javaPreCompileReleaseUnitTest/annotationProcessors.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/android/app/build/intermediates/apk_ide_redirect_file/debug/createDebugApkListingFileRedirect/redirect.txt b/android/app/build/intermediates/apk_ide_redirect_file/debug/createDebugApkListingFileRedirect/redirect.txt deleted file mode 100644 index 8ed2aa0..0000000 --- a/android/app/build/intermediates/apk_ide_redirect_file/debug/createDebugApkListingFileRedirect/redirect.txt +++ /dev/null @@ -1,2 +0,0 @@ -#- File Locator - -listingFile=../../../../outputs/apk/debug/output-metadata.json diff --git a/android/app/build/intermediates/apk_ide_redirect_file/release/createReleaseApkListingFileRedirect/redirect.txt b/android/app/build/intermediates/apk_ide_redirect_file/release/createReleaseApkListingFileRedirect/redirect.txt deleted file mode 100644 index 42e784e..0000000 --- a/android/app/build/intermediates/apk_ide_redirect_file/release/createReleaseApkListingFileRedirect/redirect.txt +++ /dev/null @@ -1,2 +0,0 @@ -#- File Locator - -listingFile=../../../../outputs/apk/release/output-metadata.json diff --git a/android/app/build/intermediates/app_metadata/debug/writeDebugAppMetadata/app-metadata.properties b/android/app/build/intermediates/app_metadata/debug/writeDebugAppMetadata/app-metadata.properties deleted file mode 100644 index 12be3a6..0000000 --- a/android/app/build/intermediates/app_metadata/debug/writeDebugAppMetadata/app-metadata.properties +++ /dev/null @@ -1,2 +0,0 @@ -appMetadataVersion=1.1 -androidGradlePluginVersion=8.9.0 diff --git a/android/app/build/intermediates/app_metadata/release/writeReleaseAppMetadata/app-metadata.properties b/android/app/build/intermediates/app_metadata/release/writeReleaseAppMetadata/app-metadata.properties deleted file mode 100644 index 12be3a6..0000000 --- a/android/app/build/intermediates/app_metadata/release/writeReleaseAppMetadata/app-metadata.properties +++ /dev/null @@ -1,2 +0,0 @@ -appMetadataVersion=1.1 -androidGradlePluginVersion=8.9.0 diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/capacitor.config.json b/android/app/build/intermediates/assets/debug/mergeDebugAssets/capacitor.config.json deleted file mode 100644 index 26d38ce..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/capacitor.config.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "appId": "app.timesafari.app", - "appName": "TimeSafari", - "webDir": "dist", - "bundledWebRuntime": false, - "server": { - "cleartext": true - }, - "plugins": { - "App": { - "appUrlOpen": { - "handlers": [ - { - "url": "timesafari://*", - "autoVerify": true - } - ] - } - } - } -} diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/capacitor.plugins.json b/android/app/build/intermediates/assets/debug/mergeDebugAssets/capacitor.plugins.json deleted file mode 100644 index 21a0521..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/capacitor.plugins.json +++ /dev/null @@ -1,6 +0,0 @@ -[ - { - "pkg": "@capacitor/app", - "classpath": "com.capacitorjs.plugins.app.AppPlugin" - } -] diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/native-bridge.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/native-bridge.js deleted file mode 100644 index 17db853..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/native-bridge.js +++ /dev/null @@ -1,1025 +0,0 @@ - -/*! Capacitor: https://capacitorjs.com/ - MIT License */ -/* Generated File. Do not edit. */ - -var nativeBridge = (function (exports) { - 'use strict'; - - var ExceptionCode; - (function (ExceptionCode) { - /** - * API is not implemented. - * - * This usually means the API can't be used because it is not implemented for - * the current platform. - */ - ExceptionCode["Unimplemented"] = "UNIMPLEMENTED"; - /** - * API is not available. - * - * This means the API can't be used right now because: - * - it is currently missing a prerequisite, such as network connectivity - * - it requires a particular platform or browser version - */ - ExceptionCode["Unavailable"] = "UNAVAILABLE"; - })(ExceptionCode || (ExceptionCode = {})); - class CapacitorException extends Error { - constructor(message, code, data) { - super(message); - this.message = message; - this.code = code; - this.data = data; - } - } - - // For removing exports for iOS/Android, keep let for reassignment - // eslint-disable-next-line - let dummy = {}; - const readFileAsBase64 = (file) => new Promise((resolve, reject) => { - const reader = new FileReader(); - reader.onloadend = () => { - const data = reader.result; - resolve(btoa(data)); - }; - reader.onerror = reject; - reader.readAsBinaryString(file); - }); - const convertFormData = async (formData) => { - const newFormData = []; - for (const pair of formData.entries()) { - const [key, value] = pair; - if (value instanceof File) { - const base64File = await readFileAsBase64(value); - newFormData.push({ - key, - value: base64File, - type: 'base64File', - contentType: value.type, - fileName: value.name, - }); - } - else { - newFormData.push({ key, value, type: 'string' }); - } - } - return newFormData; - }; - const convertBody = async (body, contentType) => { - if (body instanceof ReadableStream || body instanceof Uint8Array) { - let encodedData; - if (body instanceof ReadableStream) { - const reader = body.getReader(); - const chunks = []; - while (true) { - const { done, value } = await reader.read(); - if (done) - break; - chunks.push(value); - } - const concatenated = new Uint8Array(chunks.reduce((acc, chunk) => acc + chunk.length, 0)); - let position = 0; - for (const chunk of chunks) { - concatenated.set(chunk, position); - position += chunk.length; - } - encodedData = concatenated; - } - else { - encodedData = body; - } - let data = new TextDecoder().decode(encodedData); - let type; - if (contentType === 'application/json') { - try { - data = JSON.parse(data); - } - catch (ignored) { - // ignore - } - type = 'json'; - } - else if (contentType === 'multipart/form-data') { - type = 'formData'; - } - else if (contentType === null || contentType === void 0 ? void 0 : contentType.startsWith('image')) { - type = 'image'; - } - else if (contentType === 'application/octet-stream') { - type = 'binary'; - } - else { - type = 'text'; - } - return { - data, - type, - headers: { 'Content-Type': contentType || 'application/octet-stream' }, - }; - } - else if (body instanceof URLSearchParams) { - return { - data: body.toString(), - type: 'text', - }; - } - else if (body instanceof FormData) { - const formData = await convertFormData(body); - return { - data: formData, - type: 'formData', - }; - } - else if (body instanceof File) { - const fileData = await readFileAsBase64(body); - return { - data: fileData, - type: 'file', - headers: { 'Content-Type': body.type }, - }; - } - return { data: body, type: 'json' }; - }; - const CAPACITOR_HTTP_INTERCEPTOR = '/_capacitor_http_interceptor_'; - const CAPACITOR_HTTP_INTERCEPTOR_URL_PARAM = 'u'; - // TODO: export as Cap function - const isRelativeOrProxyUrl = (url) => !url || - !(url.startsWith('http:') || url.startsWith('https:')) || - url.indexOf(CAPACITOR_HTTP_INTERCEPTOR) > -1; - // TODO: export as Cap function - const createProxyUrl = (url, win) => { - var _a, _b; - if (isRelativeOrProxyUrl(url)) - return url; - const bridgeUrl = new URL((_b = (_a = win.Capacitor) === null || _a === void 0 ? void 0 : _a.getServerUrl()) !== null && _b !== void 0 ? _b : ''); - bridgeUrl.pathname = CAPACITOR_HTTP_INTERCEPTOR; - bridgeUrl.searchParams.append(CAPACITOR_HTTP_INTERCEPTOR_URL_PARAM, url); - return bridgeUrl.toString(); - }; - const initBridge = (w) => { - const getPlatformId = (win) => { - var _a, _b; - if (win === null || win === void 0 ? void 0 : win.androidBridge) { - return 'android'; - } - else if ((_b = (_a = win === null || win === void 0 ? void 0 : win.webkit) === null || _a === void 0 ? void 0 : _a.messageHandlers) === null || _b === void 0 ? void 0 : _b.bridge) { - return 'ios'; - } - else { - return 'web'; - } - }; - const convertFileSrcServerUrl = (webviewServerUrl, filePath) => { - if (typeof filePath === 'string') { - if (filePath.startsWith('/')) { - return webviewServerUrl + '/_capacitor_file_' + filePath; - } - else if (filePath.startsWith('file://')) { - return (webviewServerUrl + filePath.replace('file://', '/_capacitor_file_')); - } - else if (filePath.startsWith('content://')) { - return (webviewServerUrl + - filePath.replace('content:/', '/_capacitor_content_')); - } - } - return filePath; - }; - const initEvents = (win, cap) => { - cap.addListener = (pluginName, eventName, callback) => { - const callbackId = cap.nativeCallback(pluginName, 'addListener', { - eventName: eventName, - }, callback); - return { - remove: async () => { - var _a; - (_a = win === null || win === void 0 ? void 0 : win.console) === null || _a === void 0 ? void 0 : _a.debug('Removing listener', pluginName, eventName); - cap.removeListener(pluginName, callbackId, eventName, callback); - }, - }; - }; - cap.removeListener = (pluginName, callbackId, eventName, callback) => { - cap.nativeCallback(pluginName, 'removeListener', { - callbackId: callbackId, - eventName: eventName, - }, callback); - }; - cap.createEvent = (eventName, eventData) => { - const doc = win.document; - if (doc) { - const ev = doc.createEvent('Events'); - ev.initEvent(eventName, false, false); - if (eventData && typeof eventData === 'object') { - for (const i in eventData) { - // eslint-disable-next-line no-prototype-builtins - if (eventData.hasOwnProperty(i)) { - ev[i] = eventData[i]; - } - } - } - return ev; - } - return null; - }; - cap.triggerEvent = (eventName, target, eventData) => { - const doc = win.document; - const cordova = win.cordova; - eventData = eventData || {}; - const ev = cap.createEvent(eventName, eventData); - if (ev) { - if (target === 'document') { - if (cordova === null || cordova === void 0 ? void 0 : cordova.fireDocumentEvent) { - cordova.fireDocumentEvent(eventName, eventData); - return true; - } - else if (doc === null || doc === void 0 ? void 0 : doc.dispatchEvent) { - return doc.dispatchEvent(ev); - } - } - else if (target === 'window' && win.dispatchEvent) { - return win.dispatchEvent(ev); - } - else if (doc === null || doc === void 0 ? void 0 : doc.querySelector) { - const targetEl = doc.querySelector(target); - if (targetEl) { - return targetEl.dispatchEvent(ev); - } - } - } - return false; - }; - win.Capacitor = cap; - }; - const initLegacyHandlers = (win, cap) => { - // define cordova if it's not there already - win.cordova = win.cordova || {}; - const doc = win.document; - const nav = win.navigator; - if (nav) { - nav.app = nav.app || {}; - nav.app.exitApp = () => { - var _a; - if (!((_a = cap.Plugins) === null || _a === void 0 ? void 0 : _a.App)) { - win.console.warn('App plugin not installed'); - } - else { - cap.nativeCallback('App', 'exitApp', {}); - } - }; - } - if (doc) { - const docAddEventListener = doc.addEventListener; - doc.addEventListener = (...args) => { - var _a; - const eventName = args[0]; - const handler = args[1]; - if (eventName === 'deviceready' && handler) { - Promise.resolve().then(handler); - } - else if (eventName === 'backbutton' && cap.Plugins.App) { - // Add a dummy listener so Capacitor doesn't do the default - // back button action - if (!((_a = cap.Plugins) === null || _a === void 0 ? void 0 : _a.App)) { - win.console.warn('App plugin not installed'); - } - else { - cap.Plugins.App.addListener('backButton', () => { - // ignore - }); - } - } - return docAddEventListener.apply(doc, args); - }; - } - // deprecated in v3, remove from v4 - cap.platform = cap.getPlatform(); - cap.isNative = cap.isNativePlatform(); - win.Capacitor = cap; - }; - const initVendor = (win, cap) => { - const Ionic = (win.Ionic = win.Ionic || {}); - const IonicWebView = (Ionic.WebView = Ionic.WebView || {}); - const Plugins = cap.Plugins; - IonicWebView.getServerBasePath = (callback) => { - var _a; - (_a = Plugins === null || Plugins === void 0 ? void 0 : Plugins.WebView) === null || _a === void 0 ? void 0 : _a.getServerBasePath().then((result) => { - callback(result.path); - }); - }; - IonicWebView.setServerAssetPath = (path) => { - var _a; - (_a = Plugins === null || Plugins === void 0 ? void 0 : Plugins.WebView) === null || _a === void 0 ? void 0 : _a.setServerAssetPath({ path }); - }; - IonicWebView.setServerBasePath = (path) => { - var _a; - (_a = Plugins === null || Plugins === void 0 ? void 0 : Plugins.WebView) === null || _a === void 0 ? void 0 : _a.setServerBasePath({ path }); - }; - IonicWebView.persistServerBasePath = () => { - var _a; - (_a = Plugins === null || Plugins === void 0 ? void 0 : Plugins.WebView) === null || _a === void 0 ? void 0 : _a.persistServerBasePath(); - }; - IonicWebView.convertFileSrc = (url) => cap.convertFileSrc(url); - win.Capacitor = cap; - win.Ionic.WebView = IonicWebView; - }; - const initLogger = (win, cap) => { - const BRIDGED_CONSOLE_METHODS = [ - 'debug', - 'error', - 'info', - 'log', - 'trace', - 'warn', - ]; - const createLogFromNative = (c) => (result) => { - if (isFullConsole(c)) { - const success = result.success === true; - const tagStyles = success - ? 'font-style: italic; font-weight: lighter; color: gray' - : 'font-style: italic; font-weight: lighter; color: red'; - c.groupCollapsed('%cresult %c' + - result.pluginId + - '.' + - result.methodName + - ' (#' + - result.callbackId + - ')', tagStyles, 'font-style: italic; font-weight: bold; color: #444'); - if (result.success === false) { - c.error(result.error); - } - else { - c.dir(result.data); - } - c.groupEnd(); - } - else { - if (result.success === false) { - c.error('LOG FROM NATIVE', result.error); - } - else { - c.log('LOG FROM NATIVE', result.data); - } - } - }; - const createLogToNative = (c) => (call) => { - if (isFullConsole(c)) { - c.groupCollapsed('%cnative %c' + - call.pluginId + - '.' + - call.methodName + - ' (#' + - call.callbackId + - ')', 'font-weight: lighter; color: gray', 'font-weight: bold; color: #000'); - c.dir(call); - c.groupEnd(); - } - else { - c.log('LOG TO NATIVE: ', call); - } - }; - const isFullConsole = (c) => { - if (!c) { - return false; - } - return (typeof c.groupCollapsed === 'function' || - typeof c.groupEnd === 'function' || - typeof c.dir === 'function'); - }; - const serializeConsoleMessage = (msg) => { - try { - if (typeof msg === 'object') { - msg = JSON.stringify(msg); - } - return String(msg); - } - catch (e) { - return ''; - } - }; - const platform = getPlatformId(win); - if (platform == 'android' || platform == 'ios') { - // patch document.cookie on Android/iOS - win.CapacitorCookiesDescriptor = - Object.getOwnPropertyDescriptor(Document.prototype, 'cookie') || - Object.getOwnPropertyDescriptor(HTMLDocument.prototype, 'cookie'); - let doPatchCookies = false; - // check if capacitor cookies is disabled before patching - if (platform === 'ios') { - // Use prompt to synchronously get capacitor cookies config. - // https://stackoverflow.com/questions/29249132/wkwebview-complex-communication-between-javascript-native-code/49474323#49474323 - const payload = { - type: 'CapacitorCookies.isEnabled', - }; - const isCookiesEnabled = prompt(JSON.stringify(payload)); - if (isCookiesEnabled === 'true') { - doPatchCookies = true; - } - } - else if (typeof win.CapacitorCookiesAndroidInterface !== 'undefined') { - const isCookiesEnabled = win.CapacitorCookiesAndroidInterface.isEnabled(); - if (isCookiesEnabled === true) { - doPatchCookies = true; - } - } - if (doPatchCookies) { - Object.defineProperty(document, 'cookie', { - get: function () { - var _a, _b, _c; - if (platform === 'ios') { - // Use prompt to synchronously get cookies. - // https://stackoverflow.com/questions/29249132/wkwebview-complex-communication-between-javascript-native-code/49474323#49474323 - const payload = { - type: 'CapacitorCookies.get', - }; - const res = prompt(JSON.stringify(payload)); - return res; - } - else if (typeof win.CapacitorCookiesAndroidInterface !== 'undefined') { - // return original document.cookie since Android does not support filtering of `httpOnly` cookies - return (_c = (_b = (_a = win.CapacitorCookiesDescriptor) === null || _a === void 0 ? void 0 : _a.get) === null || _b === void 0 ? void 0 : _b.call(document)) !== null && _c !== void 0 ? _c : ''; - } - }, - set: function (val) { - const cookiePairs = val.split(';'); - const domainSection = val.toLowerCase().split('domain=')[1]; - const domain = cookiePairs.length > 1 && - domainSection != null && - domainSection.length > 0 - ? domainSection.split(';')[0].trim() - : ''; - if (platform === 'ios') { - // Use prompt to synchronously set cookies. - // https://stackoverflow.com/questions/29249132/wkwebview-complex-communication-between-javascript-native-code/49474323#49474323 - const payload = { - type: 'CapacitorCookies.set', - action: val, - domain, - }; - prompt(JSON.stringify(payload)); - } - else if (typeof win.CapacitorCookiesAndroidInterface !== 'undefined') { - win.CapacitorCookiesAndroidInterface.setCookie(domain, val); - } - }, - }); - } - // patch fetch / XHR on Android/iOS - // store original fetch & XHR functions - win.CapacitorWebFetch = window.fetch; - win.CapacitorWebXMLHttpRequest = { - abort: window.XMLHttpRequest.prototype.abort, - constructor: window.XMLHttpRequest.prototype.constructor, - fullObject: window.XMLHttpRequest, - getAllResponseHeaders: window.XMLHttpRequest.prototype.getAllResponseHeaders, - getResponseHeader: window.XMLHttpRequest.prototype.getResponseHeader, - open: window.XMLHttpRequest.prototype.open, - prototype: window.XMLHttpRequest.prototype, - send: window.XMLHttpRequest.prototype.send, - setRequestHeader: window.XMLHttpRequest.prototype.setRequestHeader, - }; - let doPatchHttp = false; - // check if capacitor http is disabled before patching - if (platform === 'ios') { - // Use prompt to synchronously get capacitor http config. - // https://stackoverflow.com/questions/29249132/wkwebview-complex-communication-between-javascript-native-code/49474323#49474323 - const payload = { - type: 'CapacitorHttp', - }; - const isHttpEnabled = prompt(JSON.stringify(payload)); - if (isHttpEnabled === 'true') { - doPatchHttp = true; - } - } - else if (typeof win.CapacitorHttpAndroidInterface !== 'undefined') { - const isHttpEnabled = win.CapacitorHttpAndroidInterface.isEnabled(); - if (isHttpEnabled === true) { - doPatchHttp = true; - } - } - if (doPatchHttp) { - // fetch patch - window.fetch = async (resource, options) => { - const request = new Request(resource, options); - if (request.url.startsWith(`${cap.getServerUrl()}/`)) { - return win.CapacitorWebFetch(resource, options); - } - const { method } = request; - if (method.toLocaleUpperCase() === 'GET' || - method.toLocaleUpperCase() === 'HEAD' || - method.toLocaleUpperCase() === 'OPTIONS' || - method.toLocaleUpperCase() === 'TRACE') { - if (typeof resource === 'string') { - return await win.CapacitorWebFetch(createProxyUrl(resource, win), options); - } - else if (resource instanceof Request) { - const modifiedRequest = new Request(createProxyUrl(resource.url, win), resource); - return await win.CapacitorWebFetch(modifiedRequest, options); - } - } - const tag = `CapacitorHttp fetch ${Date.now()} ${resource}`; - console.time(tag); - try { - const { body } = request; - const optionHeaders = Object.fromEntries(request.headers.entries()); - const { data: requestData, type, headers, } = await convertBody((options === null || options === void 0 ? void 0 : options.body) || body || undefined, optionHeaders['Content-Type'] || optionHeaders['content-type']); - const nativeResponse = await cap.nativePromise('CapacitorHttp', 'request', { - url: request.url, - method: method, - data: requestData, - dataType: type, - headers: Object.assign(Object.assign({}, headers), optionHeaders), - }); - const contentType = nativeResponse.headers['Content-Type'] || - nativeResponse.headers['content-type']; - let data = (contentType === null || contentType === void 0 ? void 0 : contentType.startsWith('application/json')) - ? JSON.stringify(nativeResponse.data) - : nativeResponse.data; - // use null data for 204 No Content HTTP response - if (nativeResponse.status === 204) { - data = null; - } - // intercept & parse response before returning - const response = new Response(data, { - headers: nativeResponse.headers, - status: nativeResponse.status, - }); - /* - * copy url to response, `cordova-plugin-ionic` uses this url from the response - * we need `Object.defineProperty` because url is an inherited getter on the Response - * see: https://stackoverflow.com/a/57382543 - * */ - Object.defineProperty(response, 'url', { - value: nativeResponse.url, - }); - console.timeEnd(tag); - return response; - } - catch (error) { - console.timeEnd(tag); - return Promise.reject(error); - } - }; - window.XMLHttpRequest = function () { - const xhr = new win.CapacitorWebXMLHttpRequest.constructor(); - Object.defineProperties(xhr, { - _headers: { - value: {}, - writable: true, - }, - _method: { - value: xhr.method, - writable: true, - }, - }); - const prototype = win.CapacitorWebXMLHttpRequest.prototype; - const isProgressEventAvailable = () => typeof ProgressEvent !== 'undefined' && - ProgressEvent.prototype instanceof Event; - // XHR patch abort - prototype.abort = function () { - if (isRelativeOrProxyUrl(this._url)) { - return win.CapacitorWebXMLHttpRequest.abort.call(this); - } - this.readyState = 0; - setTimeout(() => { - this.dispatchEvent(new Event('abort')); - this.dispatchEvent(new Event('loadend')); - }); - }; - // XHR patch open - prototype.open = function (method, url) { - this._method = method.toLocaleUpperCase(); - this._url = url; - if (!this._method || - this._method === 'GET' || - this._method === 'HEAD' || - this._method === 'OPTIONS' || - this._method === 'TRACE') { - if (isRelativeOrProxyUrl(url)) { - return win.CapacitorWebXMLHttpRequest.open.call(this, method, url); - } - this._url = createProxyUrl(this._url, win); - return win.CapacitorWebXMLHttpRequest.open.call(this, method, this._url); - } - Object.defineProperties(this, { - readyState: { - get: function () { - var _a; - return (_a = this._readyState) !== null && _a !== void 0 ? _a : 0; - }, - set: function (val) { - this._readyState = val; - setTimeout(() => { - this.dispatchEvent(new Event('readystatechange')); - }); - }, - }, - }); - setTimeout(() => { - this.dispatchEvent(new Event('loadstart')); - }); - this.readyState = 1; - }; - // XHR patch set request header - prototype.setRequestHeader = function (header, value) { - if (isRelativeOrProxyUrl(this._url)) { - return win.CapacitorWebXMLHttpRequest.setRequestHeader.call(this, header, value); - } - this._headers[header] = value; - }; - // XHR patch send - prototype.send = function (body) { - if (isRelativeOrProxyUrl(this._url)) { - return win.CapacitorWebXMLHttpRequest.send.call(this, body); - } - const tag = `CapacitorHttp XMLHttpRequest ${Date.now()} ${this._url}`; - console.time(tag); - try { - this.readyState = 2; - Object.defineProperties(this, { - response: { - value: '', - writable: true, - }, - responseText: { - value: '', - writable: true, - }, - responseURL: { - value: '', - writable: true, - }, - status: { - value: 0, - writable: true, - }, - }); - convertBody(body).then(({ data, type, headers }) => { - const otherHeaders = this._headers != null && Object.keys(this._headers).length > 0 - ? this._headers - : undefined; - // intercept request & pass to the bridge - cap - .nativePromise('CapacitorHttp', 'request', { - url: this._url, - method: this._method, - data: data !== null ? data : undefined, - headers: Object.assign(Object.assign({}, headers), otherHeaders), - dataType: type, - }) - .then((nativeResponse) => { - var _a; - // intercept & parse response before returning - if (this.readyState == 2) { - //TODO: Add progress event emission on native side - if (isProgressEventAvailable()) { - this.dispatchEvent(new ProgressEvent('progress', { - lengthComputable: true, - loaded: nativeResponse.data.length, - total: nativeResponse.data.length, - })); - } - this._headers = nativeResponse.headers; - this.status = nativeResponse.status; - if (this.responseType === '' || - this.responseType === 'text') { - this.response = - typeof nativeResponse.data !== 'string' - ? JSON.stringify(nativeResponse.data) - : nativeResponse.data; - } - else { - this.response = nativeResponse.data; - } - this.responseText = ((_a = (nativeResponse.headers['Content-Type'] || - nativeResponse.headers['content-type'])) === null || _a === void 0 ? void 0 : _a.startsWith('application/json')) - ? JSON.stringify(nativeResponse.data) - : nativeResponse.data; - this.responseURL = nativeResponse.url; - this.readyState = 4; - setTimeout(() => { - this.dispatchEvent(new Event('load')); - this.dispatchEvent(new Event('loadend')); - }); - } - console.timeEnd(tag); - }) - .catch((error) => { - this.status = error.status; - this._headers = error.headers; - this.response = error.data; - this.responseText = JSON.stringify(error.data); - this.responseURL = error.url; - this.readyState = 4; - if (isProgressEventAvailable()) { - this.dispatchEvent(new ProgressEvent('progress', { - lengthComputable: false, - loaded: 0, - total: 0, - })); - } - setTimeout(() => { - this.dispatchEvent(new Event('error')); - this.dispatchEvent(new Event('loadend')); - }); - console.timeEnd(tag); - }); - }); - } - catch (error) { - this.status = 500; - this._headers = {}; - this.response = error; - this.responseText = error.toString(); - this.responseURL = this._url; - this.readyState = 4; - if (isProgressEventAvailable()) { - this.dispatchEvent(new ProgressEvent('progress', { - lengthComputable: false, - loaded: 0, - total: 0, - })); - } - setTimeout(() => { - this.dispatchEvent(new Event('error')); - this.dispatchEvent(new Event('loadend')); - }); - console.timeEnd(tag); - } - }; - // XHR patch getAllResponseHeaders - prototype.getAllResponseHeaders = function () { - if (isRelativeOrProxyUrl(this._url)) { - return win.CapacitorWebXMLHttpRequest.getAllResponseHeaders.call(this); - } - let returnString = ''; - for (const key in this._headers) { - if (key != 'Set-Cookie') { - returnString += key + ': ' + this._headers[key] + '\r\n'; - } - } - return returnString; - }; - // XHR patch getResponseHeader - prototype.getResponseHeader = function (name) { - if (isRelativeOrProxyUrl(this._url)) { - return win.CapacitorWebXMLHttpRequest.getResponseHeader.call(this, name); - } - return this._headers[name]; - }; - Object.setPrototypeOf(xhr, prototype); - return xhr; - }; - Object.assign(window.XMLHttpRequest, win.CapacitorWebXMLHttpRequest.fullObject); - } - } - // patch window.console on iOS and store original console fns - const isIos = getPlatformId(win) === 'ios'; - if (win.console && isIos) { - Object.defineProperties(win.console, BRIDGED_CONSOLE_METHODS.reduce((props, method) => { - const consoleMethod = win.console[method].bind(win.console); - props[method] = { - value: (...args) => { - const msgs = [...args]; - cap.toNative('Console', 'log', { - level: method, - message: msgs.map(serializeConsoleMessage).join(' '), - }); - return consoleMethod(...args); - }, - }; - return props; - }, {})); - } - cap.logJs = (msg, level) => { - switch (level) { - case 'error': - win.console.error(msg); - break; - case 'warn': - win.console.warn(msg); - break; - case 'info': - win.console.info(msg); - break; - default: - win.console.log(msg); - } - }; - cap.logToNative = createLogToNative(win.console); - cap.logFromNative = createLogFromNative(win.console); - cap.handleError = err => win.console.error(err); - win.Capacitor = cap; - }; - function initNativeBridge(win) { - const cap = win.Capacitor || {}; - // keep a collection of callbacks for native response data - const callbacks = new Map(); - const webviewServerUrl = typeof win.WEBVIEW_SERVER_URL === 'string' ? win.WEBVIEW_SERVER_URL : ''; - cap.getServerUrl = () => webviewServerUrl; - cap.convertFileSrc = filePath => convertFileSrcServerUrl(webviewServerUrl, filePath); - // Counter of callback ids, randomized to avoid - // any issues during reloads if a call comes back with - // an existing callback id from an old session - let callbackIdCount = Math.floor(Math.random() * 134217728); - let postToNative = null; - const isNativePlatform = () => true; - const getPlatform = () => getPlatformId(win); - cap.getPlatform = getPlatform; - cap.isPluginAvailable = name => Object.prototype.hasOwnProperty.call(cap.Plugins, name); - cap.isNativePlatform = isNativePlatform; - // create the postToNative() fn if needed - if (getPlatformId(win) === 'android') { - // android platform - postToNative = data => { - var _a; - try { - win.androidBridge.postMessage(JSON.stringify(data)); - } - catch (e) { - (_a = win === null || win === void 0 ? void 0 : win.console) === null || _a === void 0 ? void 0 : _a.error(e); - } - }; - } - else if (getPlatformId(win) === 'ios') { - // ios platform - postToNative = data => { - var _a; - try { - data.type = data.type ? data.type : 'message'; - win.webkit.messageHandlers.bridge.postMessage(data); - } - catch (e) { - (_a = win === null || win === void 0 ? void 0 : win.console) === null || _a === void 0 ? void 0 : _a.error(e); - } - }; - } - cap.handleWindowError = (msg, url, lineNo, columnNo, err) => { - const str = msg.toLowerCase(); - if (str.indexOf('script error') > -1) ; - else { - const errObj = { - type: 'js.error', - error: { - message: msg, - url: url, - line: lineNo, - col: columnNo, - errorObject: JSON.stringify(err), - }, - }; - if (err !== null) { - cap.handleError(err); - } - postToNative(errObj); - } - return false; - }; - if (cap.DEBUG) { - window.onerror = cap.handleWindowError; - } - initLogger(win, cap); - /** - * Send a plugin method call to the native layer - */ - cap.toNative = (pluginName, methodName, options, storedCallback) => { - var _a, _b; - try { - if (typeof postToNative === 'function') { - let callbackId = '-1'; - if (storedCallback && - (typeof storedCallback.callback === 'function' || - typeof storedCallback.resolve === 'function')) { - // store the call for later lookup - callbackId = String(++callbackIdCount); - callbacks.set(callbackId, storedCallback); - } - const callData = { - callbackId: callbackId, - pluginId: pluginName, - methodName: methodName, - options: options || {}, - }; - if (cap.isLoggingEnabled && pluginName !== 'Console') { - cap.logToNative(callData); - } - // post the call data to native - postToNative(callData); - return callbackId; - } - else { - (_a = win === null || win === void 0 ? void 0 : win.console) === null || _a === void 0 ? void 0 : _a.warn(`implementation unavailable for: ${pluginName}`); - } - } - catch (e) { - (_b = win === null || win === void 0 ? void 0 : win.console) === null || _b === void 0 ? void 0 : _b.error(e); - } - return null; - }; - if (win === null || win === void 0 ? void 0 : win.androidBridge) { - win.androidBridge.onmessage = function (event) { - returnResult(JSON.parse(event.data)); - }; - } - /** - * Process a response from the native layer. - */ - cap.fromNative = result => { - returnResult(result); - }; - const returnResult = (result) => { - var _a, _b; - if (cap.isLoggingEnabled && result.pluginId !== 'Console') { - cap.logFromNative(result); - } - // get the stored call, if it exists - try { - const storedCall = callbacks.get(result.callbackId); - if (storedCall) { - // looks like we've got a stored call - if (result.error) { - // ensure stacktraces by copying error properties to an Error - result.error = Object.keys(result.error).reduce((err, key) => { - // use any type to avoid importing util and compiling most of .ts files - err[key] = result.error[key]; - return err; - }, new cap.Exception('')); - } - if (typeof storedCall.callback === 'function') { - // callback - if (result.success) { - storedCall.callback(result.data); - } - else { - storedCall.callback(null, result.error); - } - } - else if (typeof storedCall.resolve === 'function') { - // promise - if (result.success) { - storedCall.resolve(result.data); - } - else { - storedCall.reject(result.error); - } - // no need to keep this stored callback - // around for a one time resolve promise - callbacks.delete(result.callbackId); - } - } - else if (!result.success && result.error) { - // no stored callback, but if there was an error let's log it - (_a = win === null || win === void 0 ? void 0 : win.console) === null || _a === void 0 ? void 0 : _a.warn(result.error); - } - if (result.save === false) { - callbacks.delete(result.callbackId); - } - } - catch (e) { - (_b = win === null || win === void 0 ? void 0 : win.console) === null || _b === void 0 ? void 0 : _b.error(e); - } - // always delete to prevent memory leaks - // overkill but we're not sure what apps will do with this data - delete result.data; - delete result.error; - }; - cap.nativeCallback = (pluginName, methodName, options, callback) => { - if (typeof options === 'function') { - console.warn(`Using a callback as the 'options' parameter of 'nativeCallback()' is deprecated.`); - callback = options; - options = null; - } - return cap.toNative(pluginName, methodName, options, { callback }); - }; - cap.nativePromise = (pluginName, methodName, options) => { - return new Promise((resolve, reject) => { - cap.toNative(pluginName, methodName, options, { - resolve: resolve, - reject: reject, - }); - }); - }; - // eslint-disable-next-line @typescript-eslint/no-unused-vars - cap.withPlugin = (_pluginId, _fn) => dummy; - cap.Exception = CapacitorException; - initEvents(win, cap); - initLegacyHandlers(win, cap); - initVendor(win, cap); - win.Capacitor = cap; - } - initNativeBridge(w); - }; - initBridge(typeof globalThis !== 'undefined' - ? globalThis - : typeof self !== 'undefined' - ? self - : typeof window !== 'undefined' - ? window - : typeof global !== 'undefined' - ? global - : {}); - - dummy = initBridge; - - Object.defineProperty(exports, '__esModule', { value: true }); - - return exports; - -})({}); diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/AccountViewView-BvsLGx3g.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/AccountViewView-BvsLGx3g.js deleted file mode 100644 index d1e1d7b..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/AccountViewView-BvsLGx3g.js +++ /dev/null @@ -1,11 +0,0 @@ -var re=Object.defineProperty;var ae=(t,e,i)=>e in t?re(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var n=(t,e,i)=>ae(t,typeof e!="symbol"?e+"":e,i);/* empty css */import{V as le,A as de,D as T,a as N,b as U,c as $,l as M,d,e as ue,M as c,f as pe,X as fe,u as Q,g as me,I as ge,C as ye,_ as he,h as f,j as a,k as o,m as h,n as l,w as S,t as m,o as b,v as E,p as X,q as I,s as x,x as L,y as Z,T as we,F as be,z as k,B as p}from"./main.common-DD7dqhZp.js";import{g as D,e as B,t as V,r as ve,b as _,D as ee,a as te,o as ce,f as Pe,c as Se,d as ke}from"./index-ryzpKtgI.js";import"./dexie-export-import-aIN45iyB.js";import{a as Ie}from"./leaflet-src-Dm7ILaeL.js";import{u as Ce}from"./index-CZnn7ED5.js";import{v as Re,u as Ae,i as xe}from"./vue-leaflet.es-DQekxOGR.js";import{E as Le}from"./EntityIcon-DciUb57i.js";import{I as Ee}from"./ImageMethodDialog-zrU-VGNm.js";import{P as De}from"./PushNotificationPermission-BPu7cCY7.js";import{Q as Te}from"./QuickNav-C8jPGtUY.js";import{T as Ne}from"./TopMessage-ZWDDjman.js";import{U as Ue}from"./UserNameDialog-BV49F4GW.js";import"./index-BGoTPXII.js";import"./_isString-B7bbuhPA.js";import"./PhotoDialog-DZbf20A6.js";var $e=Object.getOwnPropertyDescriptor,Me=(t,e,i,r)=>{for(var u=r>1?void 0:r?$e(e,i):e,v=t.length-1,P;v>=0;v--)(P=t[v])&&(u=P(u)||u);return u};const C=pe();let O=class extends le{constructor(){super(...arguments);n(this,"$notify");n(this,"$route");n(this,"$router");n(this,"AppConstants",de);n(this,"DEFAULT_PUSH_SERVER",T);n(this,"DEFAULT_IMAGE_API_SERVER",N);n(this,"DEFAULT_PARTNER_API_SERVER",U);n(this,"activeDid","");n(this,"apiServer","");n(this,"apiServerInput","");n(this,"derivationPath","");n(this,"downloadUrl","");n(this,"endorserLimits",null);n(this,"givenName","");n(this,"hideRegisterPromptOnNewContact",!1);n(this,"imageLimits",null);n(this,"includeUserProfileLocation",!1);n(this,"isRegistered",!1);n(this,"isSearchAreasSet",!1);n(this,"limitsMessage","");n(this,"loadingLimits",!1);n(this,"loadingProfile",!0);n(this,"notifyingNewActivity",!1);n(this,"notifyingNewActivityTime","");n(this,"notifyingReminder",!1);n(this,"notifyingReminderMessage","");n(this,"notifyingReminderTime","");n(this,"partnerApiServer",U);n(this,"partnerApiServerInput",U);n(this,"passkeyExpirationDescription","");n(this,"passkeyExpirationMinutes",$);n(this,"previousPasskeyExpirationMinutes",$);n(this,"profileImageUrl");n(this,"publicHex","");n(this,"publicBase64","");n(this,"savingProfile",!1);n(this,"showAdvanced",!1);n(this,"showB64Copy",!1);n(this,"showContactGives",!1);n(this,"showDidCopy",!1);n(this,"showDerCopy",!1);n(this,"showGeneralAdvanced",!1);n(this,"showLargeIdenticonId");n(this,"showLargeIdenticonUrl");n(this,"showPubCopy",!1);n(this,"showShortcutBvc",!1);n(this,"subscription",null);n(this,"warnIfProdServer",!1);n(this,"warnIfTestServer",!1);n(this,"webPushServer",T);n(this,"webPushServerInput",T);n(this,"userProfileDesc","");n(this,"userProfileLatitude",0);n(this,"userProfileLongitude",0);n(this,"zoom",2)}async mounted(){var i;try{if(await this.initializeState(),await this.processIdentity(),this.isRegistered)try{const r=await D(this.activeDid),u=await this.axios.get(this.apiServer+"/api/partner/userProfileForIssuer/"+this.activeDid,{headers:r});if(u.status===200)this.userProfileDesc=u.data.data.description||"",this.userProfileLatitude=u.data.data.locLat||0,this.userProfileLongitude=u.data.data.locLon||0,this.userProfileLatitude&&this.userProfileLongitude&&(this.includeUserProfileLocation=!0);else throw Error("Unable to load profile.")}catch(r){r.status===404||(M("Error loading profile: "+B(r)),this.$notify({group:"alert",type:"danger",title:"Error Loading Profile",text:"Your server profile is not available."},5e3))}finally{this.loadingProfile=!1}}catch(r){console.error("Telling user to clear cache at page create because:",r),console.error("To repeat with concatenated error: telling user to clear cache at page create because: "+r),this.$notify({group:"alert",type:"danger",title:"Error Loading Profile",text:"See the Help page about errors with your personal data."},5e3)}try{const r=await((i=navigator.serviceWorker)==null?void 0:i.ready);this.subscription=await r.pushManager.getSubscription(),this.subscription||(this.notifyingNewActivity||this.notifyingReminder)&&this.turnOffNotifyingFlags()}catch{this.$notify({group:"alert",type:"warning",title:"Cannot Set Notifications",text:"This browser does not support notifications. Use Chrome, or install this to the home screen, or try other suggestions on the 'Troubleshoot your notifications' page."},3e3)}this.passkeyExpirationDescription=V()}beforeUnmount(){this.downloadUrl&&URL.revokeObjectURL(this.downloadUrl)}async initializeState(){await d.open();const i=await ue();this.activeDid=i.activeDid||"",this.apiServer=i.apiServer||"",this.apiServerInput=i.apiServer||"",this.givenName=((i==null?void 0:i.firstName)||"")+(i!=null&&i.lastName?` ${i.lastName}`:""),this.hideRegisterPromptOnNewContact=!!i.hideRegisterPromptOnNewContact,this.isRegistered=!!(i!=null&&i.isRegistered),this.isSearchAreasSet=!!i.searchBoxes,this.notifyingNewActivity=!!i.notifyingNewActivityTime,this.notifyingNewActivityTime=i.notifyingNewActivityTime||"",this.notifyingReminder=!!i.notifyingReminderTime,this.notifyingReminderMessage=i.notifyingReminderMessage||"",this.notifyingReminderTime=i.notifyingReminderTime||"",this.partnerApiServer=i.partnerApiServer||this.partnerApiServer,this.partnerApiServerInput=i.partnerApiServer||this.partnerApiServerInput,this.profileImageUrl=i.profileImageUrl,this.showContactGives=!!i.showContactGivesInline,this.passkeyExpirationMinutes=i.passkeyExpirationMinutes??$,this.previousPasskeyExpirationMinutes=this.passkeyExpirationMinutes,this.showGeneralAdvanced=!!i.showGeneralAdvanced,this.showShortcutBvc=!!i.showShortcutBvc,this.warnIfProdServer=!!i.warnIfProdServer,this.warnIfTestServer=!!i.warnIfTestServer,this.webPushServer=i.webPushServer||this.webPushServer,this.webPushServerInput=i.webPushServer||this.webPushServerInput}doCopyTwoSecRedo(i,r){r(),Ce().copy(i).then(()=>setTimeout(r,2e3))}async toggleShowContactAmounts(){this.showContactGives=!this.showContactGives,await d.open(),await d.settings.update(c,{showContactGivesInline:this.showContactGives})}async toggleShowGeneralAdvanced(){this.showGeneralAdvanced=!this.showGeneralAdvanced,await d.open(),await d.settings.update(c,{showGeneralAdvanced:this.showGeneralAdvanced})}async toggleProdWarning(){this.warnIfProdServer=!this.warnIfProdServer,await d.open(),await d.settings.update(c,{warnIfProdServer:this.warnIfProdServer})}async toggleTestWarning(){this.warnIfTestServer=!this.warnIfTestServer,await d.open(),await d.settings.update(c,{warnIfTestServer:this.warnIfTestServer})}async toggleShowShortcutBvc(){this.showShortcutBvc=!this.showShortcutBvc,await d.open(),await d.settings.update(c,{showShortcutBvc:this.showShortcutBvc})}readableDate(i){return i?i.substring(0,i.indexOf("T")):"?"}async processIdentity(){var r;const i=await ve(this.activeDid);if(i!=null&&i.identity){const u=JSON.parse(i.identity);this.publicHex=u.keys[0].publicKeyHex,this.publicBase64=_.Buffer.from(this.publicHex,"hex").toString("base64"),this.derivationPath=(r=u.keys[0].meta)==null?void 0:r.derivationPath,await this.checkLimits()}else i!=null&&i.publicKeyHex&&(this.publicHex=i.publicKeyHex,this.publicBase64=_.Buffer.from(this.publicHex,"hex").toString("base64"),await this.checkLimits())}async showNewActivityNotificationInfo(){this.$notify({group:"modal",type:"confirm",title:"New Activity Notification",text:` - This will only notify you when there is new relevant activity for you personally. - Note that it runs on your device and many factors may affect delivery, - so if you want a reliable but simple daily notification then choose a 'Reminder'. - Do you want more details? - `,onYes:async()=>{await this.$router.push({name:"help-notification-types"})},yesText:"tell me more."},-1)}async showNewActivityNotificationChoice(){this.notifyingNewActivity?this.$notify({group:"modal",type:"notification-off",title:ee,text:"",callback:async i=>{i&&(await d.settings.update(c,{notifyingNewActivityTime:""}),this.notifyingNewActivity=!1,this.notifyingNewActivityTime="")}},-1):this.$refs.pushNotificationPermission.open(ee,async(i,r)=>{i&&(await d.settings.update(c,{notifyingNewActivityTime:r}),this.notifyingNewActivity=!0,this.notifyingNewActivityTime=r)})}async showReminderNotificationInfo(){this.$notify({group:"modal",type:"confirm",title:"Reminder Notification",text:` - This will notify you at a specific time each day. - Note that it does not give you personalized notifications, - so if you want less reliable but personalized notification then choose a 'New Activity' Notification. - Do you want more details? - `,onYes:async()=>{await this.$router.push({name:"help-notification-types"})},yesText:"tell me more."},-1)}async showReminderNotificationChoice(){this.notifyingReminder?this.$notify({group:"modal",type:"notification-off",title:te,text:"",callback:async i=>{i&&(await d.settings.update(c,{notifyingReminderMessage:"",notifyingReminderTime:""}),this.notifyingReminder=!1,this.notifyingReminderMessage="",this.notifyingReminderTime="")}},-1):this.$refs.pushNotificationPermission.open(te,async(i,r,u)=>{i&&(await d.settings.update(c,{notifyingReminderMessage:u,notifyingReminderTime:r}),this.notifyingReminder=!0,this.notifyingReminderMessage=u||"",this.notifyingReminderTime=r)})}async toggleHideRegisterPromptOnNewContact(){const i=!this.hideRegisterPromptOnNewContact;await d.open(),await d.settings.update(c,{hideRegisterPromptOnNewContact:i}),this.hideRegisterPromptOnNewContact=i}async updatePasskeyExpiration(){await d.open(),await d.settings.update(c,{passkeyExpirationMinutes:this.passkeyExpirationMinutes}),ke(),this.passkeyExpirationDescription=V()}async turnOffNotifyingFlags(){await d.open(),await d.settings.update(c,{notifyingNewActivityTime:"",notifyingReminderMessage:"",notifyingReminderTime:""}),this.notifyingNewActivity=!1,this.notifyingNewActivityTime="",this.notifyingReminder=!1,this.notifyingReminderMessage="",this.notifyingReminderTime=""}async exportDatabase(){try{const i=await this.generateDatabaseBlob();this.downloadUrl=this.createBlobURL(i),this.downloadDatabaseBackup(this.downloadUrl),this.notifyDownloadStarted(),setTimeout(()=>URL.revokeObjectURL(this.downloadUrl),1e3)}catch(i){this.handleExportError(i)}}async generateDatabaseBlob(){return await d.export({prettyJson:!0})}createBlobURL(i){return URL.createObjectURL(i)}downloadDatabaseBackup(i){const r=this.$refs.downloadLink;r.href=i,r.download=`${d.name}-backup.json`,r.click()}computedStartDownloadLinkClassNames(){return{hidden:this.downloadUrl}}computedDownloadLinkClassNames(){return{hidden:!this.downloadUrl}}notifyDownloadStarted(){this.$notify({group:"alert",type:"success",title:"Download Started",text:"See your downloads directory for the backup. It is in the Dexie format."},-1)}handleExportError(i){console.error("Export Error:",i),this.$notify({group:"alert",type:"danger",title:"Export Error",text:"There was an error exporting the data."},3e3)}async uploadImportFile(i){C.value=i.target.files[0]}showContactImport(){return!!C.value}confirmSubmitImportFile(){C.value!=null&&this.$notify({group:"modal",type:"confirm",title:"Replace All",text:"This will replace all settings and contacts, so we recommend you first do the backup step above. Are you sure you want to import and replace all contacts and settings?",onYes:this.submitImportFile},-1)}async submitImportFile(){C.value!=null&&(await d.delete(),await fe.import(C.value,{progressCallback:this.progressCallback}))}async checkContactImports(){const i=new FileReader;i.onload=r=>{var v,P,w,g;const u=((v=r.target)==null?void 0:v.result)||"{}";try{const R=((g=(w=(P=JSON.parse(u).data)==null?void 0:P.data)==null?void 0:w.find(A=>A.tableName==="contacts"))==null?void 0:g.rows).map(A=>ce(["$types"],A));this.$router.push({name:"contact-import",query:{contacts:JSON.stringify(R)}})}catch(y){console.error("Error checking contact imports:",y),this.$notify({group:"alert",type:"danger",title:"Error Importing",text:"There was an error reading that Dexie file."},3e3)}},i.readAsText(C.value)}progressCallback(i){return console.log(`Import progress: ${i.completedRows} of ${i.totalRows} rows completed.`),i.done&&this.$notify({group:"alert",type:"success",title:"Import Complete",text:""},5e3),!0}async checkLimits(){this.activeDid?this.checkLimitsFor(this.activeDid):this.limitsMessage="You have no identifier, or your data has been corrupted."}async checkLimitsFor(i){this.loadingLimits=!0,this.limitsMessage="";try{const r=await Pe(this.apiServer,this.axios,i);if(r.status===200){if(this.endorserLimits=r.data,!this.isRegistered)try{await Q(i,{isRegistered:!0}),this.isRegistered=!0}catch(u){console.error("Got an error updating settings:",u),this.$notify({group:"alert",type:"danger",title:"Update Error",text:"Unable to update your settings. Check claim limits again."},5e3)}try{const u=await Se(this.axios,i);u.status===200?this.imageLimits=u.data:this.limitsMessage="You don't have access to upload images."}catch{this.limitsMessage="You cannot upload images."}}}catch(r){this.handleRateLimitsError(r)}this.loadingLimits=!1}handleRateLimitsError(i){var r,u;if(i instanceof me)if(i.status==400||i.status==404)console.log("Got 400 or 404 response retrieving limits which probably means they're not registered:",i),this.limitsMessage="No limits were found, so no actions are allowed.";else{const v=(r=i.response)==null?void 0:r.data;this.limitsMessage=((u=v==null?void 0:v.error)==null?void 0:u.message)||"Bad server response.",console.error("Got bad response retrieving limits:",i)}else this.limitsMessage="Got an error retrieving limits.",console.error("Got some error retrieving limits:",i)}async onClickSaveApiServer(){await d.open(),await d.settings.update(c,{apiServer:this.apiServerInput}),this.apiServer=this.apiServerInput}async onClickSavePartnerServer(){await d.open(),await d.settings.update(c,{partnerApiServer:this.partnerApiServerInput}),this.partnerApiServer=this.partnerApiServerInput}async onClickSavePushServer(){await d.open(),await d.settings.update(c,{webPushServer:this.webPushServerInput}),this.webPushServer=this.webPushServerInput,this.$notify({group:"alert",type:"warning",title:"Reload",text:"Now reload the app to get a new VAPID to use with this push server."},5e3)}openImageDialog(){this.$refs.imageMethodDialog.open(async i=>{await d.open(),await d.settings.update(c,{profileImageUrl:i}),this.profileImageUrl=i},ge,!0)}confirmDeleteImage(){this.$notify({group:"modal",type:"confirm",title:"Note that anyone with you already as a contact will no longer see a picture, and you will have to reshare your data with them if you save a new picture. Are you sure you want to delete your profile picture?",text:"",onYes:this.deleteImage},-1)}async deleteImage(){if(this.profileImageUrl)try{const i=await D(this.activeDid);this.passkeyExpirationDescription=V(),window.location.hostname==="localhost"&&!N.includes("localhost")&&console.log("Using shared image API server, so only users on that server can play with images.");const r=await this.axios.delete(N+"/image/"+encodeURIComponent(this.profileImageUrl),{headers:i});r.status===204||(console.error("Non-success deleting image:",r),this.$notify({group:"alert",type:"danger",title:"Error",text:"There was a problem deleting the image. Contact support if you want it removed from the servers."},5e3)),await d.open(),await d.settings.update(c,{profileImageUrl:void 0}),this.profileImageUrl=void 0}catch(i){console.error("Error deleting image:",i),i.response.status===404?(console.error("The image was already deleted:",i),await Q(this.activeDid,{profileImageUrl:void 0}),this.profileImageUrl=void 0):this.$notify({group:"alert",type:"danger",title:"Error",text:"There was an error deleting the image."},3e3)}}onMapReady(i){const r=this.userProfileLatitude&&this.userProfileLongitude?12:2;i.setView([this.userProfileLatitude,this.userProfileLongitude],r)}showProfileInfo(){this.$notify({group:"alert",type:"info",title:"Public Profile Information",text:"This data will be published for all to see, so be careful what your write. Your ID will only be shared with people who you allow to see your activity."},7e3)}async saveProfile(){var i,r,u,v,P;this.savingProfile=!0;try{const w=await D(this.activeDid),g={description:this.userProfileDesc};if(this.userProfileLatitude&&this.userProfileLongitude?(g.locLat=this.userProfileLatitude,g.locLon=this.userProfileLongitude):this.includeUserProfileLocation&&this.$notify({group:"alert",type:"toast",title:"",text:"No profile location is saved."},3e3),(await this.axios.post(this.apiServer+"/api/partner/userProfile",g,{headers:w})).status===201)this.$notify({group:"alert",type:"success",title:"Profile Saved",text:"Your profile has been updated successfully."},3e3);else throw Error("Profile not saved")}catch(w){M("Error saving profile: "+B(w));const g=((u=(r=(i=w.response)==null?void 0:i.data)==null?void 0:r.error)==null?void 0:u.message)||((P=(v=w.response)==null?void 0:v.data)==null?void 0:P.error)||w.message||"There was an error saving your profile.";this.$notify({group:"alert",type:"danger",title:"Error Saving Profile",text:g},3e3)}finally{this.savingProfile=!1}}toggleUserProfileLocation(){this.includeUserProfileLocation=!this.includeUserProfileLocation,this.includeUserProfileLocation||(this.userProfileLatitude=0,this.userProfileLongitude=0,this.zoom=2)}confirmEraseLatLong(){this.$notify({group:"modal",type:"confirm",title:"Erase Marker",text:"Are you sure you don't want to mark a location? This will erase the current location.",onYes:async()=>{this.eraseLatLong()}},-1)}eraseLatLong(){this.userProfileLatitude=0,this.userProfileLongitude=0,this.zoom=2,this.includeUserProfileLocation=!1}async confirmDeleteProfile(){this.$notify({group:"modal",type:"confirm",title:"Delete Profile",text:"Are you sure you want to delete your public profile? This will remove your description and location from the server, and it cannot be undone.",onYes:this.deleteProfile},-1)}async deleteProfile(){var i,r,u,v,P;this.savingProfile=!0;try{const w=await D(this.activeDid);if((await this.axios.delete(this.apiServer+"/api/partner/userProfile",{headers:w})).status===204)this.userProfileDesc="",this.userProfileLatitude=0,this.userProfileLongitude=0,this.includeUserProfileLocation=!1,this.$notify({group:"alert",type:"success",title:"Profile Deleted",text:"Your profile has been deleted successfully."},3e3);else throw Error("Profile not deleted")}catch(w){M("Error deleting profile: "+B(w));const g=((u=(r=(i=w.response)==null?void 0:i.data)==null?void 0:r.error)==null?void 0:u.message)||((P=(v=w.response)==null?void 0:v.data)==null?void 0:P.error)||w.message||"There was an error deleting your profile.";this.$notify({group:"alert",type:"danger",title:"Error Deleting Profile",text:g},3e3)}finally{this.savingProfile=!1}}};O=Me([ye({components:{EntityIcon:Le,ImageMethodDialog:Ee,LeafletMouseEvent:Ie.LeafletMouseEvent,LMap:xe,LMarker:Ae,LTileLayer:Re,PushNotificationPermission:De,QuickNav:Te,TopMessage:Ne,UserNameDialog:Ue}})],O);const Be={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},Ve={key:0,id:"noticeBeforeShare",class:"bg-amber-200 text-amber-900 border-amber-500 border-dashed border text-center rounded-md overflow-hidden px-4 py-3 mt-4"},Oe={id:"sectionIdentityDetails",class:"bg-slate-100 rounded-md overflow-hidden px-4 py-3 mt-4"},Ge={key:0},je={class:"text-xl font-semibold mb-2"},Fe={class:"whitespace-nowrap"},Ye={key:1,class:"block w-full text-center text-md bg-amber-200 border border-dashed border-slate-400 px-1.5 py-2 rounded-md mb-2"},He={class:"flex justify-center mt-4"},We={key:0,class:"flex justify-between"},ze={key:1,class:"text-center"},Ke={class:"mt-6"},qe={class:"flex justify-center text-center"},Je={class:"flex justify-center"},Qe={key:2,class:"fixed z-[100] top-0 inset-x-0 w-full"},Xe={class:"absolute inset-0 h-screen flex flex-col items-center justify-center bg-slate-900/50"},Ze={class:"text-sm text-slate-500 flex justify-start items-center mb-1","data-testId":"didWrapper"},_e={class:"truncate"},et={class:"text-blue-500 text-sm font-bold"},tt={key:1,id:"noticeBeforeAnnounce",class:"bg-amber-200 text-amber-900 border-amber-500 border-dashed border text-center rounded-md overflow-hidden px-4 py-3 mt-4"},ot={key:2,id:"sectionNotifications",class:"bg-slate-100 rounded-md overflow-hidden px-4 py-4 mt-8 mb-8"},it={class:"flex items-center justify-between"},st={key:0,class:"w-full flex justify-between"},nt={class:"ml-8 mr-8"},rt={class:"mt-2 flex items-center justify-between"},at={key:1,class:"w-full text-right"},lt={id:"sectionSearchLocation",class:"flex justify-between bg-slate-100 rounded-md overflow-hidden px-4 py-4 mt-8 mb-8"},dt={key:3,class:"bg-slate-100 rounded-md overflow-hidden px-4 py-4 mt-8 mb-8"},ut={key:0,class:"text-center mb-2"},pt={key:1,class:"flex items-center mb-2"},ft=["readonly"],mt={key:2,class:"mb-4 aspect-video"},gt={key:3},yt={class:"flex justify-between items-center"},ht=["disabled"],wt=["disabled"],bt={key:4},vt={key:5},ct={key:4,id:"sectionUsageLimits",class:"bg-slate-100 rounded-md overflow-hidden px-4 py-4 mt-8 mb-8"},Pt={key:0,class:"text-center"},St={class:"mb-4 text-center"},kt={class:"text-sm"},It={class:"whitespace-nowrap"},Ct={class:"mt-3 text-sm"},Rt={class:"whitespace-nowrap"},At={class:"mt-3 text-sm"},xt={class:"whitespace-nowrap"},Lt={id:"sectionDataExport",class:"bg-slate-100 rounded-md overflow-hidden px-4 py-4 mt-8 mb-8"},Et={class:"mt-4"},Dt={class:"list-disc list-outside ml-4"},Tt={key:5,id:"sectionAdvanced"},Nt={id:"sectionDeepIdentifier",class:"bg-slate-100 rounded-md overflow-hidden px-4 py-3 mb-4"},Ut={class:"text-sm text-slate-500 flex justify-start items-center mb-1"},$t={class:"truncate"},Mt={class:"text-sm text-slate-500 flex justify-start items-center mb-1"},Bt={class:"truncate"},Vt={key:0,class:"text-sm text-slate-500 flex justify-start items-center mb-1"},Ot={class:"truncate"},Gt={key:1,class:"text-sm text-slate-500 flex justify-start items-center mb-1"},jt={id:"sectionImportContactsSettings",class:"mt-4"},Ft={class:"ml-4 mt-2"},Yt={key:0,class:"mt-4"},Ht={class:"flex justify-center"},Wt={class:"flex justify-center"},zt={class:"relative ml-2"},Kt={id:"sectionClaimServer"},qt={class:"px-4 py-4"},Jt={class:"relative ml-2"},Qt={class:"relative ml-2"},Xt={class:"px-3 py-4"},Zt={key:0,class:"px-4 text-sm"},_t={class:"px-3 py-4"},eo={key:1,class:"px-4 text-sm"},to={class:"mt-2"},oo={class:"text-sm"},io={class:"relative ml-2"},so={class:"relative ml-2"},no={class:"flex mt-4"},ro={id:"sectionPasskeyExpiration",class:"flex justify-between"},ao={class:"text-sm ml-2"},lo={class:"relative ml-2"},uo={class:"relative ml-2"};function po(t,e,i,r,u,v){var j,F,Y,H,W,z,K,q,J;const P=k("QuickNav"),w=k("TopMessage"),g=k("router-link"),y=k("font-awesome"),G=k("UserNameDialog"),R=k("EntityIcon"),A=k("ImageMethodDialog"),oe=k("PushNotificationPermission"),ie=k("l-tile-layer"),se=k("l-marker"),ne=k("l-map");return p(),f(be,null,[a(P,{selected:"Profile"}),a(w),o("section",Be,[e[132]||(e[132]=o("h1",{id:"ViewHeading",class:"text-4xl text-center font-light"}," Your Identity ",-1)),t.activeDid?h("",!0):(p(),f("div",Ve,[e[56]||(e[56]=o("p",{class:"mb-4"},[o("b",null,"Note:"),l(" Before you can share with others or take any action, you need an identifier. ")],-1)),a(g,{to:{name:"start"},class:"inline-block text-md bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-4 py-2 rounded-md"},{default:S(()=>e[55]||(e[55]=[l(" Create An Identifier ")])),_:1})])),o("div",Oe,[t.givenName?(p(),f("div",Ge,[o("h2",je,[o("span",Fe,[a(g,{to:{name:"contact-qr"},class:"bg-slate-500 text-white px-1.5 py-1 rounded-md"},{default:S(()=>[a(y,{icon:"qrcode",class:"fa-fw text-xl"})]),_:1})]),l(" "+m(t.givenName)+" ",1),a(g,{to:{name:"new-edit-account"}},{default:S(()=>[a(y,{icon:"pen",class:"text-xs text-blue-500 ml-2 mb-1"})]),_:1})])])):(p(),f("span",Ye,[o("button",{class:"inline-block text-md uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-4 py-2 rounded-md",onClick:e[0]||(e[0]=()=>t.$refs.userNameDialog.open(s=>t.givenName=s))}," Set Your Name "),a(G,{ref:"userNameDialog"},null,512)])),o("div",He,[t.profileImageUrl?(p(),f("span",We,[a(R,{"icon-size":96,"profile-image-url":t.profileImageUrl,class:"inline-block align-text-bottom border border-slate-300 rounded",onClick:e[1]||(e[1]=s=>t.showLargeIdenticonUrl=t.profileImageUrl)},null,8,["profile-image-url"]),a(y,{icon:"trash-can",class:"text-red-500 fa-fw ml-8 mt-8 w-12 h-12",onClick:t.confirmDeleteImage},null,8,["onClick"])])):(p(),f("div",ze,[o("div",{class:"",onClick:e[2]||(e[2]=s=>t.openImageDialog())},[a(y,{icon:"image-portrait",class:"bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-2 rounded-l"}),a(y,{icon:"camera",class:"bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-2 rounded-r"})])])),a(A,{ref:"imageMethodDialog"},null,512)]),o("div",Ke,[o("div",qe,[l(" People "+m(t.profileImageUrl?"without your image":"")+" see this ",1),e[57]||(e[57]=o("br",null,null,-1)),e[58]||(e[58]=l(" (if you've let them see your activity): "))]),o("div",Je,[a(R,{"entity-id":t.activeDid,"icon-size":64,class:"inline-block align-middle border border-slate-300 rounded-md mr-1",onClick:e[3]||(e[3]=s=>t.showLargeIdenticonId=t.activeDid)},null,8,["entity-id"])])]),t.showLargeIdenticonId||t.showLargeIdenticonUrl?(p(),f("div",Qe,[o("div",Xe,[a(R,{"entity-id":t.showLargeIdenticonId,"icon-size":512,"profile-image-url":t.showLargeIdenticonUrl,class:"flex w-11/12 max-w-sm mx-auto mb-3 overflow-hidden bg-white rounded-lg shadow-lg",onClick:e[4]||(e[4]=s=>{t.showLargeIdenticonId=void 0,t.showLargeIdenticonUrl=void 0})},null,8,["entity-id","profile-image-url"])])])):h("",!0),e[60]||(e[60]=o("div",{class:"text-slate-500 text-sm font-bold"},"ID",-1)),o("div",Ze,[o("code",_e,m(t.activeDid),1),o("button",{class:"ml-2",onClick:e[5]||(e[5]=s=>t.doCopyTwoSecRedo(t.activeDid,()=>t.showDidCopy=!t.showDidCopy))},[a(y,{icon:"copy",class:"text-slate-400 fa-fw"})]),b(o("span",null,"Copied",512),[[E,t.showDidCopy]])]),o("div",et,[a(g,{to:{path:"/did/"+encodeURIComponent(t.activeDid)}},{default:S(()=>e[59]||(e[59]=[l(" Your Activity ")])),_:1},8,["to"])])]),t.isRegistered?h("",!0):(p(),f("div",tt,[e[62]||(e[62]=o("p",{class:"mb-4"},[o("b",null,"Note:"),l(" Before you can publicly announce a new project or time commitment, a friend needs to register you. ")],-1)),a(g,{to:{name:"contact-qr"},class:"inline-block text-md uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-4 py-2 rounded-md"},{default:S(()=>e[61]||(e[61]=[l(" Share Your Info ")])),_:1})])),t.isRegistered?(p(),f("div",ot,[e[70]||(e[70]=o("div",{class:"mb-2 font-bold"},"Notifications",-1)),o("div",it,[o("div",null,[e[63]||(e[63]=l(" Reminder Notification ")),a(y,{icon:"question-circle",class:"text-slate-400 fa-fw ml-2 cursor-pointer",onClick:X(t.showReminderNotificationInfo,["stop"])},null,8,["onClick"])]),o("div",{class:"relative ml-2 cursor-pointer",onClick:e[7]||(e[7]=s=>t.showReminderNotificationChoice())},[b(o("input",{"onUpdate:modelValue":e[6]||(e[6]=s=>t.notifyingReminder=s),type:"checkbox",class:"sr-only"},null,512),[[I,t.notifyingReminder]]),e[64]||(e[64]=o("div",{class:"block bg-slate-500 w-14 h-8 rounded-full"},null,-1)),e[65]||(e[65]=o("div",{class:"dot absolute left-1 top-1 bg-slate-400 w-6 h-6 rounded-full transition"},null,-1))])]),t.notifyingReminder?(p(),f("div",st,[o("span",nt,'Message: "'+m(t.notifyingReminderMessage)+'"',1),o("span",null,m(t.notifyingReminderTime.replace(" "," ")),1)])):h("",!0),o("div",rt,[o("div",null,[e[66]||(e[66]=l(" New Activity Notification ")),a(y,{icon:"question-circle",class:"text-slate-400 fa-fw ml-2 cursor-pointer",onClick:X(t.showNewActivityNotificationInfo,["stop"])},null,8,["onClick"])]),o("div",{class:"relative ml-2 cursor-pointer",onClick:e[9]||(e[9]=s=>t.showNewActivityNotificationChoice())},[b(o("input",{"onUpdate:modelValue":e[8]||(e[8]=s=>t.notifyingNewActivity=s),type:"checkbox",class:"sr-only"},null,512),[[I,t.notifyingNewActivity]]),e[67]||(e[67]=o("div",{class:"block bg-slate-500 w-14 h-8 rounded-full"},null,-1)),e[68]||(e[68]=o("div",{class:"dot absolute left-1 top-1 bg-slate-400 w-6 h-6 rounded-full transition"},null,-1))])]),t.notifyingNewActivityTime?(p(),f("div",at,m(t.notifyingNewActivityTime.replace(" "," ")),1)):h("",!0),a(g,{class:"pl-4 text-sm text-blue-500",to:"/help-notifications"},{default:S(()=>e[69]||(e[69]=[l(" Troubleshoot your notifications. ")])),_:1})])):h("",!0),a(oe,{ref:"pushNotificationPermission"},null,512),o("div",lt,[e[71]||(e[71]=o("span",{class:"mb-2 font-bold"},"Location for Searches",-1)),a(g,{to:{name:"search-area"},class:"text-m bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md mb-2"},{default:S(()=>[l(m(t.isSearchAreasSet?"Change":"Set")+" Search Area… ",1)]),_:1})]),t.isRegistered?(p(),f("div",dt,[t.loadingProfile?(p(),f("div",ut,[a(y,{icon:"spinner",class:"fa-spin text-slate-400"}),e[72]||(e[72]=l(" Loading profile... "))])):(p(),f("div",pt,[e[73]||(e[73]=o("span",{class:"font-bold"},"Public Profile",-1)),a(y,{icon:"circle-info",class:"text-slate-400 fa-fw ml-2 cursor-pointer",onClick:t.showProfileInfo},null,8,["onClick"])])),b(o("textarea",{"onUpdate:modelValue":e[10]||(e[10]=s=>t.userProfileDesc=s),class:L(["w-full h-32 p-2 border border-slate-300 rounded-md",{"bg-slate-100":t.loadingProfile||t.savingProfile}]),placeholder:"Write something about yourself for the public...",readonly:t.loadingProfile||t.savingProfile},null,10,ft),[[x,t.userProfileDesc]]),o("div",{class:"flex items-center mb-4",onClick:e[12]||(e[12]=(...s)=>t.toggleUserProfileLocation&&t.toggleUserProfileLocation(...s))},[b(o("input",{"onUpdate:modelValue":e[11]||(e[11]=s=>t.includeUserProfileLocation=s),type:"checkbox",class:"mr-2"},null,512),[[I,t.includeUserProfileLocation]]),e[74]||(e[74]=o("label",{for:"includeUserProfileLocation"},"Include Location",-1))]),t.includeUserProfileLocation?(p(),f("div",mt,[e[75]||(e[75]=o("p",{class:"text-sm mb-2 text-slate-500"}," For your security, choose a location nearby but not exactly at your place. ",-1)),a(ne,{ref:"profileMap",class:"!z-40 rounded-md",onClick:e[14]||(e[14]=s=>{t.userProfileLatitude=s.latlng.lat,t.userProfileLongitude=s.latlng.lng}),onReady:t.onMapReady},{default:S(()=>[a(ie,{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png","layer-type":"base",name:"OpenStreetMap"}),t.userProfileLatitude&&t.userProfileLongitude?(p(),Z(se,{key:0,"lat-lng":[t.userProfileLatitude,t.userProfileLongitude],onClick:e[13]||(e[13]=s=>t.confirmEraseLatLong())},null,8,["lat-lng"])):h("",!0)]),_:1},8,["onReady"])])):h("",!0),!t.loadingProfile&&!t.savingProfile?(p(),f("div",gt,[o("div",yt,[o("button",{class:L(["mt-2 px-4 py-2 bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white rounded-md",{"opacity-50 cursor-not-allowed":t.loadingProfile||t.savingProfile}]),disabled:t.loadingProfile||t.savingProfile,onClick:e[15]||(e[15]=(...s)=>t.saveProfile&&t.saveProfile(...s))}," Save Profile ",10,ht),o("button",{class:L(["mt-2 px-4 py-2 bg-gradient-to-b from-red-400 to-red-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white rounded-md",{"opacity-50 cursor-not-allowed":t.loadingProfile||t.savingProfile||!t.userProfileDesc&&!t.includeUserProfileLocation}]),disabled:t.loadingProfile||t.savingProfile,onClick:e[16]||(e[16]=(...s)=>t.confirmDeleteProfile&&t.confirmDeleteProfile(...s))}," Delete Profile ",10,wt)])])):t.loadingProfile?(p(),f("div",bt,"Loading...")):(p(),f("div",vt,"Saving..."))])):h("",!0),t.activeDid?(p(),f("div",ct,[e[88]||(e[88]=o("div",{class:"mb-2 font-bold"},"Usage Limits",-1)),t.loadingLimits?(p(),f("div",Pt,[e[76]||(e[76]=l(" Checking… ")),a(y,{icon:"spinner",class:"fa-spin"})])):h("",!0),o("div",St,m(t.limitsMessage),1),o("div",null,[o("p",kt,[e[77]||(e[77]=l(" You have done ")),o("b",null,m(((j=t.endorserLimits)==null?void 0:j.doneClaimsThisWeek)||"?")+" claims",1),e[78]||(e[78]=l(" out of ")),o("b",null,m(((F=t.endorserLimits)==null?void 0:F.maxClaimsPerWeek)||"?"),1),e[79]||(e[79]=l(" for this week. Your claims counter resets at ")),o("b",It,m(t.readableDate((Y=t.endorserLimits)==null?void 0:Y.nextWeekBeginDateTime)),1)]),o("p",Ct,[e[80]||(e[80]=l(" You have done ")),o("b",null,m(((H=t.endorserLimits)==null?void 0:H.doneRegistrationsThisMonth)||"?")+" registrations",1),e[81]||(e[81]=l(" out of ")),o("b",null,m(((W=t.endorserLimits)==null?void 0:W.maxRegistrationsPerMonth)||"?"),1),e[82]||(e[82]=l(" for this this month. ")),e[83]||(e[83]=o("i",null,"(You cannot register anyone on your first day.)",-1)),e[84]||(e[84]=l(" Your registration counter resets at ")),o("b",Rt,m(t.readableDate((z=t.endorserLimits)==null?void 0:z.nextMonthBeginDateTime)),1)]),o("p",At,[e[85]||(e[85]=l(" You have uploaded ")),o("b",null,m(((K=t.imageLimits)==null?void 0:K.doneImagesThisWeek)||"?")+" images",1),e[86]||(e[86]=l(" out of ")),o("b",null,m(((q=t.imageLimits)==null?void 0:q.maxImagesPerWeek)||"?"),1),e[87]||(e[87]=l(" for this week. Your image counter resets at ")),o("b",xt,m(t.readableDate((J=t.imageLimits)==null?void 0:J.nextWeekBeginDateTime)),1)])]),o("button",{class:"block float-right w-fit text-center text-md bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-4 py-2 rounded-md mt-2",onClick:e[17]||(e[17]=s=>t.checkLimits())}," Recheck Limits ")])):h("",!0),o("div",Lt,[e[95]||(e[95]=o("div",{class:"mb-2 font-bold"},"Data Export",-1)),t.activeDid?(p(),Z(g,{key:0,to:{name:"seed-backup"},class:"block w-full text-center text-md bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md mb-2 mt-2"},{default:S(()=>e[89]||(e[89]=[l(" Backup Identifier Seed ")])),_:1})):h("",!0),o("button",{class:L([t.computedStartDownloadLinkClassNames(),"block w-full text-center text-md bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md"]),onClick:e[18]||(e[18]=s=>t.exportDatabase())},e[90]||(e[90]=[l(" Download Settings & Contacts "),o("br",null,null,-1),l(" (excluding Identifier Data) ")]),2),o("a",{ref:"downloadLink",class:L([t.computedDownloadLinkClassNames(),"block w-full text-center text-md bg-gradient-to-b from-green-500 to-green-800 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md mb-6"])}," If no download happened yet, click again here to download now. ",2),o("div",Et,[e[94]||(e[94]=o("p",null," After the download, you can save the file in your preferred storage location. ",-1)),o("ul",null,[e[93]||(e[93]=o("li",{class:"list-disc list-outside ml-4"},' On iOS: Choose "More..." and select a place in iCloud, or go "Back" and save to another location. ',-1)),o("li",Dt,[e[91]||(e[91]=l(' On Android: Choose "Open" and then share ')),a(y,{icon:"share-nodes",class:"fa-fw"}),e[92]||(e[92]=l(" to your prefered place. "))])])])]),o("h3",{id:"advanced",class:"text-sm uppercase font-semibold mb-3",onClick:e[19]||(e[19]=s=>t.showAdvanced=!t.showAdvanced)}," Advanced "),t.showAdvanced||t.showGeneralAdvanced?(p(),f("div",Tt,[e[128]||(e[128]=o("p",{class:"text-rose-600 mb-8"}," Beware: the features here can be confusing and even change data in ways you do not expect. But we support your freedom! ",-1)),e[129]||(e[129]=o("span",{class:"text-slate-500 text-sm font-bold mb-2"}," Deep Identifier Details ",-1)),o("div",Nt,[e[96]||(e[96]=o("div",{class:"text-slate-500 text-sm font-bold"},"Public Key (base 64)",-1)),o("div",Ut,[o("code",$t,m(t.publicBase64),1),o("button",{class:"ml-2",onClick:e[20]||(e[20]=s=>t.doCopyTwoSecRedo(t.publicBase64,()=>t.showB64Copy=!t.showB64Copy))},[a(y,{icon:"copy",class:"text-slate-400 fa-fw"})]),b(o("span",null,"Copied",512),[[E,t.showB64Copy]])]),e[97]||(e[97]=o("div",{class:"text-slate-500 text-sm font-bold"},"Public Key (hex)",-1)),o("div",Mt,[o("code",Bt,m(t.publicHex),1),o("button",{class:"ml-2",onClick:e[21]||(e[21]=s=>t.doCopyTwoSecRedo(t.publicHex,()=>t.showPubCopy=!t.showPubCopy))},[a(y,{icon:"copy",class:"text-slate-400 fa-fw"})]),b(o("span",null,"Copied",512),[[E,t.showPubCopy]])]),e[98]||(e[98]=o("div",{class:"text-slate-500 text-sm font-bold"},"Derivation Path",-1)),t.derivationPath?(p(),f("div",Vt,[o("code",Ot,m(t.derivationPath),1),o("button",{class:"ml-2",onClick:e[22]||(e[22]=s=>t.doCopyTwoSecRedo(t.derivationPath,()=>t.showDerCopy=!t.showDerCopy))},[a(y,{icon:"copy",class:"text-slate-400 fa-fw"})]),b(o("span",null,"Copied",512),[[E,t.showDerCopy]])])):(p(),f("div",Gt," (none) "))]),a(g,{id:"switch-identity-link",to:{name:"identity-switcher"},class:"block w-fit text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-4 py-2 rounded-md mb-2"},{default:S(()=>e[99]||(e[99]=[l(" Switch Identifier ")])),_:1}),o("div",jt,[e[102]||(e[102]=o("h2",{class:"text-slate-500 text-sm font-bold"}," Import Contacts & Settings Database ",-1)),o("div",Ft,[o("input",{type:"file",class:"ml-2",onChange:e[23]||(e[23]=(...s)=>t.uploadImportFile&&t.uploadImportFile(...s))},null,32),a(we,{"enter-active-class":"transform ease-out duration-300 transition","enter-from-class":"translate-y-2 opacity-0 sm:translate-y-4","enter-to-class":"translate-y-0 opacity-100 sm:translate-y-0","leave-active-class":"transition ease-in duration-500","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:S(()=>[t.showContactImport()?(p(),f("div",Yt,[o("div",Ht,[o("button",{class:"block text-center text-md bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md mb-6",onClick:e[24]||(e[24]=s=>t.confirmSubmitImportFile())},e[100]||(e[100]=[l(" Overwrite Settings & Contacts "),o("br",null,null,-1),l(" (which doesn't include Identifier Data) ")]))]),o("div",Wt,[o("button",{class:"block text-center text-md bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md mb-6",onClick:e[25]||(e[25]=s=>t.checkContactImports())},e[101]||(e[101]=[l(" Import Only Contacts "),o("br",null,null,-1),l(" after comparing ")]))])])):h("",!0)]),_:1})])]),o("label",{for:"toggleShowAmounts",class:"flex items-center justify-between cursor-pointer my-4",onClick:e[27]||(e[27]=(...s)=>t.toggleShowContactAmounts&&t.toggleShowContactAmounts(...s))},[e[105]||(e[105]=o("span",{class:"text-slate-500 text-sm font-bold"},"Contacts Display",-1)),e[106]||(e[106]=o("span",{class:"ml-2"},"Show hours given & received",-1)),o("div",zt,[b(o("input",{"onUpdate:modelValue":e[26]||(e[26]=s=>t.showContactGives=s),type:"checkbox",name:"showContactGives",class:"sr-only"},null,512),[[I,t.showContactGives]]),e[103]||(e[103]=o("div",{class:"block bg-slate-500 w-14 h-8 rounded-full"},null,-1)),e[104]||(e[104]=o("div",{class:"dot absolute left-1 top-1 bg-slate-400 w-6 h-6 rounded-full transition"},null,-1))])]),o("div",Kt,[e[113]||(e[113]=o("h2",{class:"text-slate-500 text-sm font-bold mt-4"},"Claim Server",-1)),o("div",qt,[b(o("input",{"onUpdate:modelValue":e[28]||(e[28]=s=>t.apiServerInput=s),type:"text",class:"block w-full rounded border border-slate-400 px-4 py-2"},null,512),[[x,t.apiServerInput]]),t.apiServerInput!=t.apiServer?(p(),f("button",{key:0,class:"w-full px-4 rounded bg-yellow-500 border border-slate-400",onClick:e[29]||(e[29]=s=>t.onClickSaveApiServer())},[a(y,{icon:"floppy-disk",class:"fa-fw",color:"white"})])):h("",!0),o("button",{class:"px-3 rounded bg-slate-200 border border-slate-400",onClick:e[30]||(e[30]=s=>t.apiServerInput=t.AppConstants.PROD_ENDORSER_API_SERVER)}," Use Prod "),o("button",{class:"px-3 rounded bg-slate-200 border border-slate-400",onClick:e[31]||(e[31]=s=>t.apiServerInput=t.AppConstants.TEST_ENDORSER_API_SERVER)}," Use Test "),o("button",{class:"px-3 rounded bg-slate-200 border border-slate-400",onClick:e[32]||(e[32]=s=>t.apiServerInput=t.AppConstants.LOCAL_ENDORSER_API_SERVER)}," Use Local ")]),o("label",{for:"toggleProdWarningMessage",class:"flex items-center justify-between cursor-pointer px-4 py-4",onClick:e[34]||(e[34]=(...s)=>t.toggleProdWarning&&t.toggleProdWarning(...s))},[e[109]||(e[109]=o("h2",null,"Show warning if on prod server",-1)),o("div",Jt,[b(o("input",{"onUpdate:modelValue":e[33]||(e[33]=s=>t.warnIfProdServer=s),type:"checkbox",class:"sr-only"},null,512),[[I,t.warnIfProdServer]]),e[107]||(e[107]=o("div",{class:"block bg-slate-500 w-14 h-8 rounded-full"},null,-1)),e[108]||(e[108]=o("div",{class:"dot absolute left-1 top-1 bg-slate-400 w-6 h-6 rounded-full transition"},null,-1))])]),o("label",{for:"toggleTestWarningMessage",class:"flex items-center justify-between cursor-pointer px-4 py-4",onClick:e[36]||(e[36]=(...s)=>t.toggleTestWarning&&t.toggleTestWarning(...s))},[e[112]||(e[112]=o("h2",null,"Show warning if on non-prod server",-1)),o("div",Qt,[b(o("input",{"onUpdate:modelValue":e[35]||(e[35]=s=>t.warnIfTestServer=s),type:"checkbox",class:"sr-only"},null,512),[[I,t.warnIfTestServer]]),e[110]||(e[110]=o("div",{class:"block bg-slate-500 w-14 h-8 rounded-full"},null,-1)),e[111]||(e[111]=o("div",{class:"dot absolute left-1 top-1 bg-slate-400 w-6 h-6 rounded-full transition"},null,-1))])])]),e[130]||(e[130]=o("h2",{class:"text-slate-500 text-sm font-bold mb-2"}," Notification Push Server ",-1)),o("div",Xt,[b(o("input",{"onUpdate:modelValue":e[37]||(e[37]=s=>t.webPushServerInput=s),type:"text",class:"block w-full rounded border border-slate-400 px-3 py-2"},null,512),[[x,t.webPushServerInput]]),t.webPushServerInput!=t.webPushServer?(p(),f("button",{key:0,class:"w-full px-4 rounded bg-yellow-500 border border-slate-400",onClick:e[38]||(e[38]=s=>t.onClickSavePushServer())},[a(y,{icon:"floppy-disk",class:"fa-fw",color:"white"})])):h("",!0),o("button",{class:"px-3 rounded bg-slate-200 border border-slate-400",onClick:e[39]||(e[39]=s=>t.webPushServerInput=t.AppConstants.PROD_PUSH_SERVER)}," Use Prod "),o("button",{class:"px-3 rounded bg-slate-200 border border-slate-400",onClick:e[40]||(e[40]=s=>t.webPushServerInput=t.AppConstants.TEST1_PUSH_SERVER)}," Use Test 1 "),o("button",{class:"px-3 rounded bg-slate-200 border border-slate-400",onClick:e[41]||(e[41]=s=>t.webPushServerInput=t.AppConstants.TEST2_PUSH_SERVER)}," Use Test 2 ")]),t.webPushServerInput?h("",!0):(p(),f("span",Zt," When that setting is blank, this app will use the default web push server URL: "+m(t.DEFAULT_PUSH_SERVER),1)),e[131]||(e[131]=o("h2",{class:"text-slate-500 text-sm font-bold mb-2"},"Partner Server URL",-1)),o("div",_t,[b(o("input",{"onUpdate:modelValue":e[42]||(e[42]=s=>t.partnerApiServerInput=s),type:"text",class:"block w-full rounded border border-slate-400 px-3 py-2"},null,512),[[x,t.partnerApiServerInput]]),t.partnerApiServerInput!=t.partnerApiServer?(p(),f("button",{key:0,class:"w-full px-4 rounded bg-yellow-500 border border-slate-400",onClick:e[43]||(e[43]=s=>t.onClickSavePartnerServer())},[a(y,{icon:"floppy-disk",class:"fa-fw",color:"white"})])):h("",!0),o("button",{class:"px-3 rounded bg-slate-200 border border-slate-400",onClick:e[44]||(e[44]=s=>t.partnerApiServerInput=t.AppConstants.PROD_PARTNER_API_SERVER)}," Use Prod "),o("button",{class:"px-3 rounded bg-slate-200 border border-slate-400",onClick:e[45]||(e[45]=s=>t.partnerApiServerInput=t.AppConstants.TEST_PARTNER_API_SERVER)}," Use Test "),o("button",{class:"px-3 rounded bg-slate-200 border border-slate-400",onClick:e[46]||(e[46]=s=>t.partnerApiServerInput=t.AppConstants.LOCAL_PARTNER_API_SERVER)}," Use Local ")]),t.partnerApiServerInput?h("",!0):(p(),f("span",eo," When that setting is blank, this app will use the default partner server URL: "+m(t.DEFAULT_PARTNER_API_SERVER),1)),o("div",to,[e[114]||(e[114]=o("span",{class:"text-slate-500 text-sm font-bold"},"Image Server URL",-1)),e[115]||(e[115]=l("   ")),o("span",oo,m(t.DEFAULT_IMAGE_API_SERVER),1)]),o("label",{for:"toggleHideRegisterPromptOnNewContact",class:"flex items-center justify-between cursor-pointer mt-4",onClick:e[48]||(e[48]=s=>t.toggleHideRegisterPromptOnNewContact())},[e[118]||(e[118]=o("span",{class:"text-slate-500 text-sm font-bold"}," Hide Register Prompt on New Contact ",-1)),o("div",io,[b(o("input",{"onUpdate:modelValue":e[47]||(e[47]=s=>t.hideRegisterPromptOnNewContact=s),type:"checkbox",class:"sr-only"},null,512),[[I,t.hideRegisterPromptOnNewContact]]),e[116]||(e[116]=o("div",{class:"block bg-slate-500 w-14 h-8 rounded-full"},null,-1)),e[117]||(e[117]=o("div",{class:"dot absolute left-1 top-1 bg-slate-400 w-6 h-6 rounded-full transition"},null,-1))])]),o("label",{for:"toggleShowShortcutBvc",class:"flex items-center justify-between cursor-pointer mt-4",onClick:e[50]||(e[50]=(...s)=>t.toggleShowShortcutBvc&&t.toggleShowShortcutBvc(...s))},[e[121]||(e[121]=o("span",{class:"text-slate-500 text-sm font-bold"}," Show BVC Shortcut on Home Page ",-1)),o("div",so,[b(o("input",{"onUpdate:modelValue":e[49]||(e[49]=s=>t.showShortcutBvc=s),type:"checkbox",class:"sr-only"},null,512),[[I,t.showShortcutBvc]]),e[119]||(e[119]=o("div",{class:"block bg-slate-500 w-14 h-8 rounded-full"},null,-1)),e[120]||(e[120]=o("div",{class:"dot absolute left-1 top-1 bg-slate-400 w-6 h-6 rounded-full transition"},null,-1))])]),o("div",no,[o("button",null,[a(g,{to:{name:"statistics"},class:"block w-fit text-center text-md bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-4 py-2 rounded-md mb-2"},{default:S(()=>e[122]||(e[122]=[l(" See Global Animated History of Giving ")])),_:1})])]),o("div",ro,[o("span",null,[e[123]||(e[123]=o("span",{class:"text-slate-500 text-sm font-bold mb-2"}," Passkey Expiration Minutes ",-1)),e[124]||(e[124]=o("br",null,null,-1)),o("span",ao,m(t.passkeyExpirationDescription),1)]),o("div",lo,[b(o("input",{"onUpdate:modelValue":e[51]||(e[51]=s=>t.passkeyExpirationMinutes=s),type:"number",class:"border border-slate-400 rounded px-2 py-2 text-center w-20",onChange:e[52]||(e[52]=(...s)=>t.updatePasskeyExpiration&&t.updatePasskeyExpiration(...s))},null,544),[[x,t.passkeyExpirationMinutes]])])]),o("label",{for:"toggleShowGeneralAdvanced",class:"flex items-center justify-between cursor-pointer mt-4",onClick:e[54]||(e[54]=(...s)=>t.toggleShowGeneralAdvanced&&t.toggleShowGeneralAdvanced(...s))},[e[127]||(e[127]=o("span",{class:"text-slate-500 text-sm font-bold"}," Show All General Advanced Functions ",-1)),o("div",uo,[b(o("input",{"onUpdate:modelValue":e[53]||(e[53]=s=>t.showGeneralAdvanced=s),type:"checkbox",class:"sr-only"},null,512),[[I,t.showGeneralAdvanced]]),e[125]||(e[125]=o("div",{class:"block bg-slate-500 w-14 h-8 rounded-full"},null,-1)),e[126]||(e[126]=o("div",{class:"dot absolute left-1 top-1 bg-slate-400 w-6 h-6 rounded-full transition"},null,-1))])])])):h("",!0)])],64)}const Eo=he(O,[["render",po]]);export{Eo as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ClaimAddRawView-MjnUQPZ5.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ClaimAddRawView-MjnUQPZ5.js deleted file mode 100644 index b6bc36a..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ClaimAddRawView-MjnUQPZ5.js +++ /dev/null @@ -1 +0,0 @@ -var h=Object.defineProperty;var f=(a,e,t)=>e in a?h(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var o=(a,e,t)=>f(a,typeof e!="symbol"?e+"":e,t);import{V as w,e as g,l as v,C,_ as x,h as y,j as u,k as l,n as S,o as b,s as _,F as $,z as d,B as D}from"./main.common-DD7dqhZp.js";import{Q as N}from"./QuickNav-C8jPGtUY.js";import{j as V,g as k,x as J,e as F,v as I}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var A=Object.getOwnPropertyDescriptor,E=(a,e,t,r)=>{for(var i=r>1?void 0:r?A(e,t):e,s=a.length-1,n;s>=0;s--)(n=a[s])&&(i=n(i)||i);return i};let m=class extends w{constructor(){super(...arguments);o(this,"$notify");o(this,"$route");o(this,"$router");o(this,"axios");o(this,"accountIdentityStr","null");o(this,"activeDid","");o(this,"apiServer","");o(this,"claimStr","")}async mounted(){await this.initializeSettings(),await this.loadClaimData()}async initializeSettings(){const t=await g();this.activeDid=t.activeDid||"",this.apiServer=t.apiServer||""}async loadClaimData(){await this.loadClaimFromQueryParam()||await this.loadClaimFromJwtId()}async loadClaimFromQueryParam(){if(this.claimStr=this.$route.query.claim||"",!this.claimStr)return!1;try{const t=JSON.parse(this.claimStr);return this.claimStr=JSON.stringify(t,null,2),!0}catch{return!1}}async loadClaimFromJwtId(){const t=this.$route.query.claimJwtId||"";if(!t)return;const r=V(t)?"/api/claim/byHandle/":"/api/claim/",i=this.apiServer+r+encodeURIComponent(t);try{const s=await this.fetchClaimData(i,t);this.formatClaimResponse(s,t)}catch(s){this.handleClaimError(s)}}async fetchClaimData(t,r){const i=await k(this.activeDid);return await this.axios.get(t,{headers:i})}formatClaimResponse(t,r){var i;if(t.status===200){const s=(i=t.data)==null?void 0:i.claim;s.lastClaimId=J(r),this.claimStr=JSON.stringify(s,null,2)}else throw{message:"Got an error loading that claim.",response:{status:t.status,statusText:t.statusText}}}handleClaimError(t){v("Error retrieving claim: "+F(t),!0),this.$notify({group:"alert",type:"danger",title:"Error",text:"Got an error retrieving claim data."},3e3)}async submitClaim(){const t=JSON.parse(this.claimStr),r=await I(t,this.activeDid,this.apiServer,this.axios);r.type==="success"?this.$notify({group:"alert",type:"success",title:"Success",text:"Claim submitted."},5e3):(console.error("Got error submitting the claim:",r),this.$notify({group:"alert",type:"danger",title:"Error",text:"There was a problem submitting the claim."},5e3))}};m=E([C({components:{QuickNav:N}})],m);const O={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},R={id:"ViewBreadcrumb",class:"mb-8"},P={class:"text-lg text-center font-light relative px-7"},Q={class:"flex"};function B(a,e,t,r,i,s){const n=d("QuickNav"),p=d("font-awesome");return D(),y($,null,[u(n),l("section",O,[l("div",R,[l("h1",P,[l("button",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:e[0]||(e[0]=c=>a.$router.back())},[u(p,{icon:"chevron-left",class:"fa-fw"})]),e[3]||(e[3]=S(" Raw Claim "))])]),l("div",Q,[b(l("textarea",{"onUpdate:modelValue":e[1]||(e[1]=c=>a.claimStr=c),rows:"20",class:"border-2 w-full"},null,512),[[_,a.claimStr]])]),l("button",{class:"block w-full text-center text-lg font-bold uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md",onClick:e[2]||(e[2]=c=>a.submitClaim())}," Sign & Send ")])],64)}const M=x(m,[["render",B]]);export{M as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ClaimCertificateView-WsWhMks_.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ClaimCertificateView-WsWhMks_.js deleted file mode 100644 index afd87e2..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ClaimCertificateView-WsWhMks_.js +++ /dev/null @@ -1,8 +0,0 @@ -var Ut=Object.defineProperty;var kt=(e,t,o)=>t in e?Ut(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var M=(e,t,o)=>kt(e,typeof t!="symbol"?t+"":t,o);import{V as Ft,e as zt,G as Gt,d as gt,H as $t,C as xt,_ as Kt,h as ht,k as mt,m as Wt,j as Jt,w as Ot,z as Yt,B as wt}from"./main.common-DD7dqhZp.js";import{s as jt,g as Ct,y as q,z as Qt,A as qt}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var z={},Zt=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},Et={},N={};let ct;const Xt=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];N.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};N.getSymbolTotalCodewords=function(t){return Xt[t]};N.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};N.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');ct=t};N.isKanjiModeEnabled=function(){return typeof ct<"u"};N.toSJIS=function(t){return ct(t)};var J={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+o)}}e.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},e.from=function(r,n){if(e.isValid(r))return r;try{return t(r)}catch{return n}}})(J);function Tt(){this.buffer=[],this.length=0}Tt.prototype={get:function(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let o=0;o>>t-o-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var te=Tt;function G(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}G.prototype.set=function(e,t,o,r){const n=e*this.size+t;this.data[n]=o,r&&(this.reservedBit[n]=!0)};G.prototype.get=function(e,t){return this.data[e*this.size+t]};G.prototype.xor=function(e,t,o){this.data[e*this.size+t]^=o};G.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var ee=G,It={};(function(e){const t=N.getSymbolSize;e.getRowColCoords=function(r){if(r===1)return[];const n=Math.floor(r/7)+2,i=t(r),a=i===145?26:Math.ceil((i-13)/(2*n-2))*2,c=[i-7];for(let s=1;s=0&&n<=7},e.from=function(n){return e.isValid(n)?parseInt(n,10):void 0},e.getPenaltyN1=function(n){const i=n.size;let a=0,c=0,s=0,l=null,f=null;for(let y=0;y=5&&(a+=t.N1+(c-5)),l=d,c=1),d=n.get(m,y),d===f?s++:(s>=5&&(a+=t.N1+(s-5)),f=d,s=1)}c>=5&&(a+=t.N1+(c-5)),s>=5&&(a+=t.N1+(s-5))}return a},e.getPenaltyN2=function(n){const i=n.size;let a=0;for(let c=0;c=10&&(c===1488||c===93)&&a++,s=s<<1&2047|n.get(f,l),f>=10&&(s===1488||s===93)&&a++}return a*t.N3},e.getPenaltyN4=function(n){let i=0;const a=n.data.length;for(let s=0;s=0;){const a=i[0];for(let s=0;s0){const i=new Uint8Array(this.degree);return i.set(r,n),i}return r};var oe=lt,bt={},H={},ut={};ut.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var _={};const Pt="[0-9]+",re="[A-Z $%*+\\-./:]+";let F="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";F=F.replace(/u/g,"\\u");const ie="(?:(?![A-Z0-9 $%*+\\-./:]|"+F+`)(?:.|[\r -]))+`;_.KANJI=new RegExp(F,"g");_.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");_.BYTE=new RegExp(ie,"g");_.NUMERIC=new RegExp(Pt,"g");_.ALPHANUMERIC=new RegExp(re,"g");const se=new RegExp("^"+F+"$"),ae=new RegExp("^"+Pt+"$"),ce=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");_.testKanji=function(t){return se.test(t)};_.testNumeric=function(t){return ae.test(t)};_.testAlphanumeric=function(t){return ce.test(t)};(function(e){const t=ut,o=_;e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(i,a){if(!i.ccBits)throw new Error("Invalid mode: "+i);if(!t.isValid(a))throw new Error("Invalid version: "+a);return a>=1&&a<10?i.ccBits[0]:a<27?i.ccBits[1]:i.ccBits[2]},e.getBestModeForData=function(i){return o.testNumeric(i)?e.NUMERIC:o.testAlphanumeric(i)?e.ALPHANUMERIC:o.testKanji(i)?e.KANJI:e.BYTE},e.toString=function(i){if(i&&i.id)return i.id;throw new Error("Invalid mode")},e.isValid=function(i){return i&&i.bit&&i.ccBits};function r(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+n)}}e.from=function(i,a){if(e.isValid(i))return i;try{return r(i)}catch{return a}}})(H);(function(e){const t=N,o=O,r=J,n=H,i=ut,a=7973,c=t.getBCHDigit(a);function s(m,d,C){for(let p=1;p<=40;p++)if(d<=e.getCapacity(p,C,m))return p}function l(m,d){return n.getCharCountIndicator(m,d)+4}function f(m,d){let C=0;return m.forEach(function(p){const T=l(p.mode,d);C+=T+p.getBitsLength()}),C}function y(m,d){for(let C=1;C<=40;C++)if(f(m,C)<=e.getCapacity(C,d,n.MIXED))return C}e.from=function(d,C){return i.isValid(d)?parseInt(d,10):C},e.getCapacity=function(d,C,p){if(!i.isValid(d))throw new Error("Invalid QR Code version");typeof p>"u"&&(p=n.BYTE);const T=t.getSymbolTotalCodewords(d),u=o.getTotalCodewordsCount(d,C),w=(T-u)*8;if(p===n.MIXED)return w;const h=w-l(p,d);switch(p){case n.NUMERIC:return Math.floor(h/10*3);case n.ALPHANUMERIC:return Math.floor(h/11*2);case n.KANJI:return Math.floor(h/13);case n.BYTE:default:return Math.floor(h/8)}},e.getBestVersionForData=function(d,C){let p;const T=r.from(C,r.M);if(Array.isArray(d)){if(d.length>1)return y(d,T);if(d.length===0)return 1;p=d[0]}else p=d;return s(p.mode,p.getLength(),T)},e.getEncodedBits=function(d){if(!i.isValid(d)||d<7)throw new Error("Invalid QR Code version");let C=d<<12;for(;t.getBCHDigit(C)-c>=0;)C^=a<=0;)n^=Rt<0&&(r=this.data.substr(o),n=parseInt(r,10),t.put(n,i*3+1))};var fe=L;const de=H,Z=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function V(e){this.mode=de.ALPHANUMERIC,this.data=e}V.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};V.prototype.getLength=function(){return this.data.length};V.prototype.getBitsLength=function(){return V.getBitsLength(this.data.length)};V.prototype.write=function(t){let o;for(o=0;o+2<=this.data.length;o+=2){let r=Z.indexOf(this.data[o])*45;r+=Z.indexOf(this.data[o+1]),t.put(r,11)}this.data.length%2&&t.put(Z.indexOf(this.data[o]),6)};var ge=V;const he=H;function D(e){this.mode=he.BYTE,typeof e=="string"?this.data=new TextEncoder().encode(e):this.data=new Uint8Array(e)}D.getBitsLength=function(t){return t*8};D.prototype.getLength=function(){return this.data.length};D.prototype.getBitsLength=function(){return D.getBitsLength(this.data.length)};D.prototype.write=function(e){for(let t=0,o=this.data.length;t=33088&&o<=40956)o-=33088;else if(o>=57408&&o<=60351)o-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+` -Make sure your charset is UTF-8`);o=(o>>>8&255)*192+(o&255),e.put(o,13)}};var pe=v,Lt={exports:{}};(function(e){var t={single_source_shortest_paths:function(o,r,n){var i={},a={};a[r]=0;var c=t.PriorityQueue.make();c.push(r,0);for(var s,l,f,y,m,d,C,p,T;!c.empty();){s=c.pop(),l=s.value,y=s.cost,m=o[l]||{};for(f in m)m.hasOwnProperty(f)&&(d=m[f],C=y+d,p=a[f],T=typeof a[f]>"u",(T||p>C)&&(a[f]=C,c.push(f,C),i[f]=l))}if(typeof n<"u"&&typeof a[n]>"u"){var u=["Could not find a path from ",r," to ",n,"."].join("");throw new Error(u)}return i},extract_shortest_path_from_predecessor_list:function(o,r){for(var n=[],i=r;i;)n.push(i),o[i],i=o[i];return n.reverse(),n},find_path:function(o,r,n){var i=t.single_source_shortest_paths(o,r,n);return t.extract_shortest_path_from_predecessor_list(i,n)},PriorityQueue:{make:function(o){var r=t.PriorityQueue,n={},i;o=o||{};for(i in r)r.hasOwnProperty(i)&&(n[i]=r[i]);return n.queue=[],n.sorter=o.sorter||r.default_sorter,n},default_sorter:function(o,r){return o.cost-r.cost},push:function(o,r){var n={value:o,cost:r};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(Lt);var Ae=Lt.exports;(function(e){const t=H,o=fe,r=ge,n=me,i=pe,a=_,c=N,s=Ae;function l(u){return unescape(encodeURIComponent(u)).length}function f(u,w,h){const g=[];let A;for(;(A=u.exec(h))!==null;)g.push({data:A[0],index:A.index,mode:w,length:A[0].length});return g}function y(u){const w=f(a.NUMERIC,t.NUMERIC,u),h=f(a.ALPHANUMERIC,t.ALPHANUMERIC,u);let g,A;return c.isKanjiModeEnabled()?(g=f(a.BYTE,t.BYTE,u),A=f(a.KANJI,t.KANJI,u)):(g=f(a.BYTE_KANJI,t.BYTE,u),A=[]),w.concat(h,g,A).sort(function(I,B){return I.index-B.index}).map(function(I){return{data:I.data,mode:I.mode,length:I.length}})}function m(u,w){switch(w){case t.NUMERIC:return o.getBitsLength(u);case t.ALPHANUMERIC:return r.getBitsLength(u);case t.KANJI:return i.getBitsLength(u);case t.BYTE:return n.getBitsLength(u)}}function d(u){return u.reduce(function(w,h){const g=w.length-1>=0?w[w.length-1]:null;return g&&g.mode===h.mode?(w[w.length-1].data+=h.data,w):(w.push(h),w)},[])}function C(u){const w=[];for(let h=0;h=0&&c<=6&&(s===0||s===6)||s>=0&&s<=6&&(c===0||c===6)||c>=2&&c<=4&&s>=2&&s<=4?e.set(i+c,a+s,!0,!0):e.set(i+c,a+s,!1,!0))}}function be(e){const t=e.size;for(let o=8;o>c&1)===1,e.set(n,i,a,!0),e.set(i,n,a,!0)}function et(e,t,o){const r=e.size,n=Be.getEncodedBits(t,o);let i,a;for(i=0;i<15;i++)a=(n>>i&1)===1,i<6?e.set(i,8,a,!0):i<8?e.set(i+1,8,a,!0):e.set(r-15+i,8,a,!0),i<8?e.set(8,r-i-1,a,!0):i<9?e.set(8,15-i-1+1,a,!0):e.set(8,15-i-1,a,!0);e.set(r-8,8,1,!0)}function Re(e,t){const o=e.size;let r=-1,n=o-1,i=7,a=0;for(let c=o-1;c>0;c-=2)for(c===6&&c--;;){for(let s=0;s<2;s++)if(!e.isReserved(n,c-s)){let l=!1;a>>i&1)===1),e.set(n,c-s,l),i--,i===-1&&(a++,i=7)}if(n+=r,n<0||o<=n){n-=r,r=-r;break}}}function He(e,t,o){const r=new ye;o.forEach(function(s){r.put(s.mode.bit,4),r.put(s.getLength(),Se.getCharCountIndicator(s.mode,e)),s.write(r)});const n=j.getSymbolTotalCodewords(e),i=it.getTotalCodewordsCount(e,t),a=(n-i)*8;for(r.getLengthInBits()+4<=a&&r.put(0,4);r.getLengthInBits()%8!==0;)r.putBit(0);const c=(a-r.getLengthInBits())/8;for(let s=0;s=7&&Me(s,t),Re(s,a),isNaN(r)&&(r=rt.getBestMask(s,et.bind(null,s,o))),rt.applyMask(r,s),et(s,o,r),{modules:s,version:t,errorCorrectionLevel:o,maskPattern:r,segments:n}}Et.create=function(t,o){if(typeof t>"u"||t==="")throw new Error("No input text");let r=X.M,n,i;return typeof o<"u"&&(r=X.from(o.errorCorrectionLevel,X.M),n=W.from(o.version),i=rt.from(o.maskPattern),o.toSJISFunc&&j.setToSJISFunction(o.toSJISFunc)),Ve(t,n,r,i)};var Vt={},ft={};(function(e){function t(o){if(typeof o=="number"&&(o=o.toString()),typeof o!="string")throw new Error("Color should be defined as hex string");let r=o.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+o);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(i){return[i,i]}))),r.length===6&&r.push("F","F");const n=parseInt(r.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:"#"+r.slice(0,6).join("")}}e.getOptions=function(r){r||(r={}),r.color||(r.color={});const n=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,i=r.width&&r.width>=21?r.width:void 0,a=r.scale||4;return{width:i,scale:i?4:a,margin:n,color:{dark:t(r.color.dark||"#000000ff"),light:t(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},e.getScale=function(r,n){return n.width&&n.width>=r+n.margin*2?n.width/(r+n.margin*2):n.scale},e.getImageWidth=function(r,n){const i=e.getScale(r,n);return Math.floor((r+n.margin*2)*i)},e.qrToImageData=function(r,n,i){const a=n.modules.size,c=n.modules.data,s=e.getScale(a,i),l=Math.floor((a+i.margin*2)*s),f=i.margin*s,y=[i.color.light,i.color.dark];for(let m=0;m=f&&d>=f&&m"u"&&(!a||!a.getContext)&&(s=a,a=void 0),a||(l=r()),s=t.getOptions(s);const f=t.getImageWidth(i.modules.size,s),y=l.getContext("2d"),m=y.createImageData(f,f);return t.qrToImageData(m.data,i,s),o(y,l,f),y.putImageData(m,0,0),l},e.renderToDataURL=function(i,a,c){let s=c;typeof s>"u"&&(!a||!a.getContext)&&(s=a,a=void 0),s||(s={});const l=e.render(i,a,s),f=s.type||"image/png",y=s.rendererOpts||{};return l.toDataURL(f,y.quality)}})(Vt);var Dt={};const De=ft;function yt(e,t){const o=e.a/255,r=t+'="'+e.hex+'"';return o<1?r+" "+t+'-opacity="'+o.toFixed(2).slice(1)+'"':r}function nt(e,t,o){let r=e+t;return typeof o<"u"&&(r+=" "+o),r}function ve(e,t,o){let r="",n=0,i=!1,a=0;for(let c=0;c0&&s>0&&e[c-1]||(r+=i?nt("M",s+o,.5+l+o):nt("m",n,0),n=0,i=!1),s+1':"",l="',f='viewBox="0 0 '+c+" "+c+'"',m=''+s+l+` -`;return typeof r=="function"&&r(null,m),m};const Ue=Zt,st=Et,vt=Vt,ke=Dt;function dt(e,t,o,r,n){const i=[].slice.call(arguments,1),a=i.length,c=typeof i[a-1]=="function";if(!c&&!Ue())throw new Error("Callback required as last argument");if(c){if(a<2)throw new Error("Too few arguments provided");a===2?(n=o,o=t,t=r=void 0):a===3&&(t.getContext&&typeof n>"u"?(n=r,r=void 0):(n=r,r=o,o=t,t=void 0))}else{if(a<1)throw new Error("Too few arguments provided");return a===1?(o=t,t=r=void 0):a===2&&!t.getContext&&(r=o,o=t,t=void 0),new Promise(function(s,l){try{const f=st.create(o,r);s(e(f,t,r))}catch(f){l(f)}})}try{const s=st.create(o,r);n(null,e(s,t,r))}catch(s){n(s)}}z.create=st.create;z.toCanvas=dt.bind(null,vt.render);z.toDataURL=dt.bind(null,vt.renderToDataURL);z.toString=dt.bind(null,function(e,t,o){return ke.render(e,o)});var Fe=Object.getOwnPropertyDescriptor,ze=(e,t,o,r)=>{for(var n=r>1?void 0:r?Fe(t,o):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(n=a(n)||n);return n};let at=class extends Ft{constructor(){super(...arguments);M(this,"$notify");M(this,"activeDid","");M(this,"allMyDids",[]);M(this,"apiServer","");M(this,"claimId","");M(this,"claimData",null);M(this,"serverUtil",jt)}async created(){const o=await zt();this.activeDid=o.activeDid||"",this.apiServer=o.apiServer||"";const r=window.location.pathname.substring(12);this.claimId=r,await this.fetchClaim()}async fetchClaim(){try{const o=await Ct(this.activeDid),r=await this.axios.get(`${this.apiServer}/api/claim/${this.claimId}`,{headers:o});if(r.status===200){this.claimData=await r.data;const n=[this.claimId],i=await Ct(this.activeDid),a=await this.axios.post(`${this.apiServer}/api/v2/report/confirmers/?claimEntryIds=${this.claimId}`,{claimEntryIds:n},{headers:i});let c=[];a.status===200&&(c=await a.data.data),await Gt(),this.claimData&&this.drawCanvas(this.claimData,c)}else throw new Error(`Error fetching claim: ${r.statusText}`)}catch(o){console.error("Failed to load claim:",o),this.$notify({group:"alert",type:"danger",title:"Error",text:"There was a problem loading the claim."})}}async drawCanvas(o,r){await gt.open();const n=await gt.contacts.toArray(),i=this.$refs.claimCanvas;if(i){i.width=1100,i.height=850;const s=i.getContext("2d");if(s){const l=new Image;l.src="/img/background/cert-frame-2.jpg",l.onload=async()=>{var p,T;s.drawImage(l,0,0,1100,850),s.fillStyle="black",s.font="bold 20px Arial";const f=o.claimType==="GiveAction"?"Gift":o.claimType==="PlanAction"?"Project":this.serverUtil.capitalizeAndInsertSpacesBeforeCaps(o.claimType||""),y=s.measureText(f).width;if(s.fillText(f,(1100-y)/2,850*.33),o.claimType==="GiveAction"&&o.claim.agent){const u="Thanks To";s.font="14px Arial";const w=s.measureText(u).width;s.fillText(u,(1100-w)/2,850*.37);const h=o.claim.agent.identifier||o.claim.agent,g=q(h,n);s.font="bold 20px Arial";const A=s.measureText(g).width;s.fillText(g,(1100-A)/2,850*.41)}if(o.claimType==="Offer"){const u="To";s.font="14px Arial";const w=s.measureText(u).width;s.fillText(u,(1100-w)/2,850*.37);const h=o.claim.agent.identifier||o.claim.agent,g=q(h,n);s.font="bold 20px Arial";const A=s.measureText(g).width;s.fillText(g,(1100-A)/2,850*.41)}const m=o.claim.name||o.claim.description||((p=o.claim.itemOffered)==null?void 0:p.description);if(m){const u=m.length>50?m.substring(0,75)+"...":m;s.font="14px Arial";const w=s.measureText(u).width;s.fillText(u,(1100-w)/2,850*.495)}const d=o.claim.object||o.claim.includesObject;if(d!=null&&d.amountOfThisGood&&(d!=null&&d.unitCode)){const u=d.amountOfThisGood,w=d.unitCode,h=Qt(w,u),g=s.measureText(h).width,A=m?850*.525:850*.495;s.font="14px Arial",s.fillText(h,(1100-g)/2,A)}if(o.issuer==null||qt(o.issuer)||o.issuer!==((T=o.claim.agent)==null?void 0:T.identifier)){s.font="14px Arial";let u=q(o.issuer,n);u.length>30&&(u=u.substring(0,30)+"...");const w="Issued by "+u;s.fillText(w,1100*.3,850*.6)}if(r.length>0){const u="Confirmed by "+r.length+(r.length===1?" person":" people");s.font="14px Arial",s.fillText(u,1100*.3,850*.63)}s.font="14px Arial",s.fillText(this.claimId,1100*.3,850*.7),s.fillText("via EndorserSearch.com",1100*.3,850*.73);const C=document.createElement("canvas");await z.toCanvas(C,$t+"/claim/"+this.claimId,{width:150,color:{light:"#0000"}}),s.drawImage(C,1100*.6,850*.55)}}}}};at=ze([xt],at);const Ge={id:"Content"},$e={class:"flex items-center justify-center h-screen"},xe={key:0},Ke={ref:"claimCanvas",class:"w-full block mx-auto"};function We(e,t,o,r,n,i){const a=Yt("router-link");return wt(),ht("section",Ge,[mt("div",$e,[e.claimData?(wt(),ht("div",xe,[Jt(a,{to:"/claim/"+e.claimId},{default:Ot(()=>[mt("canvas",Ke,null,512)]),_:1},8,["to"])])):Wt("",!0)])])}const Xe=Kt(at,[["render",We]]);export{Xe as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ClaimView-BUQRK2PH.css b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ClaimView-BUQRK2PH.css deleted file mode 100644 index 4ba121a..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ClaimView-BUQRK2PH.css +++ /dev/null @@ -1 +0,0 @@ -.tooltip{position:relative;display:inline-block;border-bottom:1px dotted black}.tooltip .tooltiptext{visibility:hidden;width:200px;background-color:#000;color:#fff;text-align:center;padding:5px 0;border-radius:6px;position:absolute;z-index:1}.tooltip:hover .tooltiptext,.tooltip:hover .tooltiptext-left{visibility:visible} diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ClaimView-c0v_AehR.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ClaimView-c0v_AehR.js deleted file mode 100644 index b9223fd..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ClaimView-c0v_AehR.js +++ /dev/null @@ -1 +0,0 @@ -var Y=Object.defineProperty;var z=(e,i,l)=>i in e?Y(e,i,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[i]=l;var r=(e,i,l)=>z(e,typeof i!="symbol"?i+"":i,l);import{y as Q,d as B}from"./js-yaml-CxlQHuPU.js";import{R as J}from"./index-BtEdi1q-.js";import{V as W,e as Z,d as K,l as X,C as x,_ as ee,h as o,j as f,k as t,m as d,n as a,t as p,w as V,F as D,E as T,y as S,z as A,B as s}from"./main.common-DD7dqhZp.js";import{u as ie}from"./index-CZnn7ED5.js";import{G as te}from"./GiftedDialog-DmRkVexW.js";import{Q as se}from"./QuickNav-C8jPGtUY.js";import{B as _,l as oe,s as le,h as re,i as ae,j as ne,g as $,k as de,m as me,n as fe,p as he,q as ue,u as ce,v as pe,w as ve}from"./index-ryzpKtgI.js";import"./_isString-B7bbuhPA.js";import"./concat-Ro2w9qwP.js";import"./set-BrilI7kO.js";import"./sort-DzTCGCnH.js";import"./index-BGoTPXII.js";var Ce=Object.getOwnPropertyDescriptor,ye=(e,i,l,h)=>{for(var v=h>1?void 0:h?Ce(i,l):i,g=e.length-1,C;g>=0;g--)(C=e[g])&&(v=C(v)||v);return v};let L=class extends W{constructor(){super(...arguments);r(this,"$notify");r(this,"$route");r(this,"$router");r(this,"activeDid","");r(this,"allMyDids",[]);r(this,"allContacts",[]);r(this,"apiServer","");r(this,"canShare",!1);r(this,"confirmerIdList",[]);r(this,"confsVisibleErrorMessage","");r(this,"confsVisibleToIdList",[]);r(this,"detailsForGive",null);r(this,"detailsForOffer",null);r(this,"fullClaim",null);r(this,"fullClaimDump","");r(this,"fullClaimMessage","");r(this,"isEditedGlobalId",!1);r(this,"isRegistered",!1);r(this,"issuerName","");r(this,"numConfsNotVisible",0);r(this,"providersForGive",[]);r(this,"showIdCopy",!1);r(this,"showVeriClaimDump",!1);r(this,"veriClaim",_);r(this,"veriClaimDump","");r(this,"veriClaimDidsVisible",{});r(this,"windowLocation",window.location.href);r(this,"R",J);r(this,"yaml",Q);r(this,"libsUtil",oe);r(this,"serverUtil",le);r(this,"window",window)}resetThisValues(){this.confirmerIdList=[],this.confsVisibleErrorMessage="",this.confsVisibleToIdList=[],this.detailsForGive=null,this.detailsForOffer=null,this.fullClaim=null,this.fullClaimDump="",this.fullClaimMessage="",this.isEditedGlobalId=!1,this.numConfsNotVisible=0,this.providersForGive=[],this.veriClaim=_,this.veriClaimDump="",this.veriClaimDidsVisible={}}async created(){console.log("ClaimView created");const l=await Z();this.activeDid=l.activeDid||"",this.apiServer=l.apiServer||"",this.allContacts=await K.contacts.toArray(),this.isRegistered=l.isRegistered||!1;try{this.allMyDids=await re()}catch(v){X("Error retrieving all account DIDs on home page:"+v,!0),this.$notify({group:"alert",type:"danger",title:"Error Loading Profile",text:"See the Help page for problems with your personal data."},5e3)}const h=this.$route.params.id;h?await this.loadClaim(h,this.activeDid):this.$notify({group:"alert",type:"danger",title:"Error",text:"No claim ID was provided."},5e3),this.canShare=!!navigator.share}capitalizeAndInsertSpacesBeforeCaps(l){return l?l[0].toUpperCase()+l.substr(1).replace(/([A-Z])/g," $1"):""}totalConfirmers(){return this.numConfsNotVisible+this.confirmerIdList.length+this.confsVisibleToIdList.length}didInfo(l){return ae(l,this.activeDid,this.allMyDids,this.allContacts)}async loadClaim(l,h){var m;console.log("[ClaimView] loadClaim called with claimId:",l);const v=ne(l)?"/api/claim/byHandle/":"/api/claim/",g=this.apiServer+v+encodeURIComponent(l),C=await $(h);try{console.log("[ClaimView] Making API request to:",g);const u=await this.axios.get(g,{headers:C});if(u.status===200)this.veriClaim=u.data,this.issuerName=this.didInfo(this.veriClaim.issuer),this.veriClaimDump=B(this.veriClaim),this.veriClaimDidsVisible=de(this.veriClaim,!0);else{console.error("Error getting claim:",u),this.$notify({group:"alert",type:"danger",title:"Error",text:"There was a problem retrieving that claim."},5e3);return}if(this.isEditedGlobalId=!this.veriClaim.handleId.endsWith(l),this.veriClaim.claimType==="GiveAction"){const w=this.apiServer+"/api/v2/report/gives?handleId="+encodeURIComponent(this.veriClaim.handleId),k=await $(h),y=await this.axios.get(w,{headers:k});y.status===200&&((m=y.data.data)==null?void 0:m.length)>0?this.detailsForGive=y.data.data[0]:console.error("Error getting detailed give info:",y);const G=this.apiServer+"/api/v2/report/providersToGive?handleId="+encodeURIComponent(this.veriClaim.handleId),U=await $(h),I=await this.axios.get(G,{headers:U});I.status===200&&Array.isArray(I.data.data)?this.providersForGive=I.data.data:(console.error("Error getting give providers:",y),this.$notify({group:"alert",type:"warning",title:"Error",text:"Got error retrieving linked provider data."},5e3))}else if(this.veriClaim.claimType==="Offer"){const w=this.apiServer+"/api/v2/report/offers?handleId="+encodeURIComponent(this.veriClaim.handleId),k=await $(h),y=await this.axios.get(w,{headers:k});y.status===200?this.detailsForOffer=y.data.data[0]:(console.error("Error getting detailed offer info:",y),this.$notify({group:"alert",type:"warning",title:"Error",text:"Got error retrieving linked offer data."},5e3))}const c=await me(this.apiServer,l,this.veriClaim.issuer,h);c?(this.confirmerIdList=c.confirmerIdList,this.confsVisibleToIdList=c.confsVisibleToIdList,this.numConfsNotVisible=c.numConfsNotVisible):this.confsVisibleErrorMessage="Had problems retrieving confirmations."}catch(u){console.error("Error retrieving claim:",u),this.$notify({group:"alert",type:"danger",title:"Error",text:"Something went wrong retrieving claim data."},3e3)}}async showFullClaim(l){var g;const h=this.apiServer+"/api/claim/full/"+encodeURIComponent(l),v=await $(this.activeDid);try{const C=await this.axios.get(h,{headers:v});C.status===200?(this.fullClaim=C.data,this.fullClaimDump=B(this.fullClaim)):(console.error("Error getting full claim:",C),this.$notify({group:"alert",type:"danger",title:"Error",text:"There was a problem getting that claim."},5e3))}catch(C){if(console.error("Error retrieving full claim:",C),((g=C.response)==null?void 0:g.status)===403){let u="";const c=fe(this.veriClaim.issuer,this.allContacts);c!=null&&c.name&&(u+="Ask "+c.name+" to show you the full claim details."),(this.confirmerIdList.length>0||this.confsVisibleToIdList.length>0)&&(c!=null&&c.name?u+="You could also ask someone in the Confirmations section to make an introduction.":u+="Ask someone in the Confirmations section to make an introduction."),this.fullClaimMessage="You are not authorized to view the full contents of this claim."+u+" You might ask someone in your network -- like the person who registered you -- if they can find out more and make an introduction: send them this page and see if they can make a connection for you."}else this.$notify({group:"alert",type:"danger",title:"Error",text:"Something went wrong retrieving that claim."},5e3)}}confirmConfirmClaim(){this.$notify({group:"modal",type:"confirm",title:"Confirm",text:"Do you personally confirm that this is true?",onYes:async()=>{await this.confirmClaim()}},-1)}async confirmClaim(){const h={"@context":"https://schema.org","@type":"AgreeAction",object:he(ue(ce(this.veriClaim.claim,this.veriClaim.id,this.veriClaim.handleId)))},v=await pe(h,this.activeDid,this.apiServer,this.axios);v.type==="success"?this.$notify({group:"alert",type:"success",title:"Success",text:"Confirmation submitted."},5e3):(console.error("Got error submitting the confirmation:",v),this.$notify({group:"alert",type:"danger",title:"Error",text:"There was a problem submitting the confirmation."},5e3))}showDifferentClaimPage(l){const h={path:"/claim/"+encodeURIComponent(l)};this.$router.push(h).then(async()=>{this.resetThisValues(),await this.loadClaim(l,this.activeDid)})}openFulfillGiftDialog(){const l={did:ve(this.veriClaim)};this.$refs.customGiveDialog.open(l,void 0,this.veriClaim.handleId,"Offer fulfilled by "+((l==null?void 0:l.name)||"someone not named"))}copyToClipboard(l,h){ie().copy(h).then(()=>{this.$notify({group:"alert",type:"toast",title:"Copied",text:(l||"That")+" was copied to the clipboard."},2e3)})}onClickShareClaim(){this.copyToClipboard("A link to this page",this.windowLocation),window.navigator.share({title:"Help Connect Me",text:"I'm trying to find the people who recorded this. Can you help me?",url:this.windowLocation})}onClickEditClaim(){if(this.veriClaim.claimType==="GiveAction"){const l={name:"gifted-details",query:{prevCredToEdit:JSON.stringify(this.veriClaim),destinationPathAfter:"/claim/"+encodeURIComponent(this.veriClaim.handleId)}};this.$router.push(l)}else if(this.veriClaim.claimType==="Offer"){const l={name:"offer-details",query:{prevCredToEdit:JSON.stringify(this.veriClaim),destinationPathAfter:"/claim/"+encodeURIComponent(this.veriClaim.handleId)}};this.$router.push(l)}else if(this.veriClaim.claimType==="PlanAction"){const l={name:"new-edit-project",query:{projectId:this.veriClaim.handleId}};this.$router.push(l)}else console.error("Unrecognized claim type for edit:",this.veriClaim.claimType),this.$notify({group:"alert",type:"danger",title:"Error",text:"This is an unrecognized claim type."},3e3)}};L=ye([x({components:{GiftedDialog:te,QuickNav:se}})],L);const ge={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},be={id:"ViewBreadcrumb",class:"mb-8"},we={class:"text-lg text-center font-light relative px-7"},ke={class:"bg-slate-100 rounded-md overflow-hidden px-4 py-3 mb-4 w-full"},Ie={class:"block flex gap-4 overflow-hidden w-full"},De={class:"w-full"},Ee={class:"flex columns-3"},Ve={class:"text-md font-bold w-full"},Te={class:"flex justify-center w-full"},$e={class:"flex justify-end w-full"},Ge={class:"text-sm"},Ue={"data-testId":"description"},Ae={key:0,class:"flex justify-center"},Se=["href"],Le=["src"],Fe={key:1,class:"mt-4"},Re={key:2,class:"mt-4"},Oe={key:3},Ne={key:4},He={key:5,class:"mt-4"},Pe={class:"ml-4"},je={class:"flex gap-4"},Me={class:"grow overflow-hidden"},Be=["onClick"],_e={class:"mt-2"},qe={class:"mt-8"},Ye={key:0},ze={class:"flex columns-3"},Qe={key:1,class:"font-bold uppercase text-xl mt-2"},Je={class:"mt-0.5 px-4 py-2"},We={class:"mt-2"},Ze={key:0},Ke={key:1},Xe={key:2},xe={key:0},ei={key:0},ii={key:1},ti={key:2},si={class:"ml-4"},oi={class:"flex gap-4"},li={class:"grow overflow-hidden"},ri={class:"text-sm"},ai={key:0},ni=["href"],di={key:3},mi={class:"ml-4"},fi={class:"flex gap-4"},hi={class:"grow overflow-hidden"},ui={class:"text-sm"},ci={key:0},pi=["href"],vi={key:1},Ci={key:2},yi={key:3},gi={key:1},bi={key:0,class:"mb-2"},wi={key:0},ki={key:1},Ii={key:1},Di={key:0},Ei={key:1},Vi={class:"text-sm"},Ti={class:"ml-12 p-1"},$i={class:"text-sm mt-2"},Gi={key:0},Ui=["href"],Ai={key:1},Si=["href"],Li={key:2,class:"mt-2"},Fi={key:3,class:"text-sm overflow-x-scroll bg-slate-100 px-4 py-3 rounded-md"},Ri={key:4},Oi={key:0,class:"mb-4"},Ni={key:5},Hi={class:"text-sm overflow-x-scroll bg-slate-100 px-4 py-3 rounded-md"},Pi=["href"];function ji(e,i,l,h,v,g){var w,k,y,G,U,I,F,R,O,N,H,P;const C=A("QuickNav"),m=A("font-awesome"),u=A("router-link"),c=A("GiftedDialog");return s(),o(D,null,[f(C),t("section",ge,[t("div",be,[t("h1",we,[t("button",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:i[0]||(i[0]=n=>e.$router.go(-1))},[f(m,{icon:"chevron-left",class:"fa-fw"})]),i[12]||(i[12]=a(" Verifiable Claim Details "))])]),t("div",ke,[t("div",Ie,[t("div",De,[t("div",Ee,[t("h2",Ve,[a(p(e.capitalizeAndInsertSpacesBeforeCaps(e.veriClaim.claimType||""))+" ",1),["GiveAction","Offer","PlanAction"].includes(e.veriClaim.claimType)&&e.veriClaim.issuer===e.activeDid?(s(),o("button",{key:0,title:"Edit","data-testId":"editClaimButton",onClick:i[1]||(i[1]=(...n)=>e.onClickEditClaim&&e.onClickEditClaim(...n))},[f(m,{icon:"pen",class:"text-sm text-blue-500 ml-2 mb-1"})])):d("",!0)]),t("div",Te,[f(u,{to:"/claim-cert/"+encodeURIComponent(e.veriClaim.id),class:"text-blue-500 mt-2",title:"Printable Certificate"},{default:V(()=>[f(m,{icon:"square",class:"text-white bg-yellow-500 p-1"})]),_:1},8,["to"])]),t("div",$e,[t("button",{title:"Copy Link",onClick:i[2]||(i[2]=n=>e.copyToClipboard("A link to this page",e.window.location.href))},[f(m,{icon:"link",class:"text-slate-500"})])])]),t("div",Ge,[t("div",Ue,[f(m,{icon:"message",class:"fa-fw text-slate-400"}),a(" "+p(((k=(w=e.veriClaim.claim)==null?void 0:w.itemOffered)==null?void 0:k.description)||((y=e.veriClaim.claim)==null?void 0:y.description)||""),1)]),t("div",null,[f(m,{icon:"user",class:"fa-fw text-slate-400"}),a(" "+p(e.didInfo(e.veriClaim.issuer)),1)]),t("div",null,[f(m,{icon:"calendar",class:"fa-fw text-slate-400"}),a(" Recorded "+p((G=e.veriClaim.issuedAt)==null?void 0:G.replace(/T/," ").replace(/Z/," UTC")),1)]),e.veriClaim.claim.image?(s(),o("div",Ae,[t("a",{href:e.veriClaim.claim.image,target:"_blank"},[t("img",{src:e.veriClaim.claim.image,class:"h-24 rounded-xl"},null,8,Le)],8,Se)])):d("",!0),e.veriClaim.claimType==="PlanAction"?(s(),o("div",Fe,[f(u,{to:"/project/"+encodeURIComponent(e.veriClaim.handleId),class:"text-blue-500 mt-2"},{default:V(()=>i[13]||(i[13]=[a(" Go to Project page ")])),_:1},8,["to"])])):d("",!0),(U=e.detailsForGive)!=null&&U.fulfillsPlanHandleId?(s(),o("div",Re,[f(u,{to:"/project/"+encodeURIComponent((I=e.detailsForGive)==null?void 0:I.fulfillsPlanHandleId),class:"text-blue-500 mt-2"},{default:V(()=>i[14]||(i[14]=[a(" Fulfills a bigger plan... ")])),_:1},8,["to"])])):d("",!0),(F=e.detailsForGive)!=null&&F.fulfillsType&&((R=e.detailsForGive)==null?void 0:R.fulfillsType)!=="PlanAction"&&((O=e.detailsForGive)!=null&&O.fulfillsHandleId)?(s(),o("div",Oe,[t("a",{class:"text-blue-500 mt-4 cursor-pointer",onClick:i[3]||(i[3]=n=>{var E;return e.showDifferentClaimPage((E=e.detailsForGive)==null?void 0:E.fulfillsHandleId)})}," Fulfills "+p(e.capitalizeAndInsertSpacesBeforeCaps(e.detailsForGive.fulfillsType))+"... ",1)])):d("",!0),(N=e.detailsForOffer)!=null&&N.fulfillsPlanHandleId?(s(),o("div",Ne,[f(u,{to:"/project/"+encodeURIComponent((H=e.detailsForOffer)==null?void 0:H.fulfillsPlanHandleId),class:"text-blue-500 mt-4"},{default:V(()=>i[15]||(i[15]=[a(" Offered to a bigger plan... ")])),_:1},8,["to"])])):d("",!0),((P=e.providersForGive)==null?void 0:P.length)>0?(s(),o("div",He,[i[16]||(i[16]=t("span",null,"Other assistance provided by:",-1)),t("ul",Pe,[(s(!0),o(D,null,T(e.providersForGive,n=>(s(),o("li",{key:n.identifier,class:"list-disc ml-4"},[t("div",je,[t("div",Me,[t("a",{class:"text-blue-500 mt-4 cursor-pointer",onClick:E=>n.identifier.startsWith("did:")?e.$router.push("/did/"+encodeURIComponent(n.identifier)):e.showDifferentClaimPage(n.identifier)}," an activity... ",8,Be)])])]))),128))])])):d("",!0)])])])]),t("div",_e,[f(m,{icon:"comment",class:"text-slate-400"}),a(" "+p(e.issuerName)+" posted that. ",1)]),t("div",qe,[e.libsUtil.canFulfillOffer(e.veriClaim)?(s(),o("button",{key:0,class:"col-span-1 block w-fit text-center text-md bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md",onClick:i[4]||(i[4]=n=>e.openFulfillGiftDialog())},[i[17]||(i[17]=a(" Affirm Delivery ")),f(m,{icon:"hand-holding-heart",class:"ml-2 text-white cursor-pointer"})])):d("",!0)]),f(c,{ref:"customGiveDialog"},null,512),e.libsUtil.isGiveAction(e.veriClaim)?(s(),o("div",Ye,[t("div",ze,[e.libsUtil.isGiveRecordTheUserCanConfirm(e.isRegistered,e.veriClaim,e.activeDid,e.confirmerIdList)?(s(),o("button",{key:0,class:"col-span-1 bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white mt-2 px-4 py-2 rounded-md",onClick:i[5]||(i[5]=n=>e.confirmConfirmClaim())},[i[18]||(i[18]=a(" Confirm ")),f(m,{icon:"circle-check",class:"ml-2 text-white cursor-pointer"})])):(s(),o("h2",Qe,"Confirmations")),t("span",Je,[e.libsUtil.isGiveAction(e.veriClaim)?(s(),S(u,{key:0,to:"/confirm-gift/"+encodeURIComponent(e.veriClaim.id),class:"col-span-1 text-blue-500","data-testId":"confirmGiftLink"},{default:V(()=>i[19]||(i[19]=[a(" Details... ")])),_:1},8,["to"])):d("",!0)])]),t("div",We,[e.totalConfirmers()===0?(s(),o("span",Ze,"Nobody has confirmed this.")):e.totalConfirmers()===1?(s(),o("span",Ke," One person has confirmed this. ")):(s(),o("span",Xe,p(e.totalConfirmers())+" people have confirmed this. ",1))]),e.totalConfirmers()>0?(s(),o("div",xe,[e.confirmerIdList.length===0&&e.confsVisibleToIdList.length===0?(s(),o("div",ei," Nobody that you know confirmed this claim, nor do they have any confirmers in their network. ")):d("",!0),e.confirmerIdList.length===0&&e.confsVisibleToIdList.length>0?(s(),o("div",ii," Nobody that you know has issued or confirmed this claim. ")):d("",!0),e.confirmerIdList.length>0?(s(),o("div",ti,[i[20]||(i[20]=a(" The following people have confirmed this claim. ")),t("ul",si,[(s(!0),o(D,null,T(e.confirmerIdList,n=>(s(),o("li",{key:n,class:"list-disc ml-4"},[t("div",oi,[t("div",li,[t("div",ri,[a(p(e.didInfo(n))+" ",1),e.serverUtil.isEmptyOrHiddenDid(n)?d("",!0):(s(),o("span",ai,[t("a",{href:`/did/${n}`,target:"_blank",class:"text-blue-500"},[f(m,{icon:"arrow-up-right-from-square",class:"fa-fw"})],8,ni)]))])])])]))),128))])])):d("",!0),e.confsVisibleToIdList.length>0?(s(),o("div",di,[i[21]||(i[21]=a(" The following people can connect you with people who have issued or confirmed this claim. ")),t("ul",mi,[(s(!0),o(D,null,T(e.confsVisibleToIdList,n=>(s(),o("li",{key:n,class:"list-disc ml-4"},[t("div",fi,[t("div",hi,[t("div",ui,[a(p(e.didInfo(n))+" ",1),e.serverUtil.isEmptyOrHiddenDid(n)?d("",!0):(s(),o("span",ci,[t("a",{href:`/did/${n}`,target:"_blank",class:"text-blue-500"},[f(m,{icon:"arrow-up-right-from-square",class:"fa-fw"})],8,pi)]))])])])]))),128))])])):d("",!0)])):d("",!0),e.confirmerIdList.includes(e.activeDid)?(s(),o("div",vi," You have confirmed this claim. ")):e.veriClaim.issuer==e.activeDid?(s(),o("div",Ci," You cannot confirm this because you issued this claim, so you already count as confirming it. ")):e.serverUtil.containsHiddenDid(e.veriClaim.claim)?(s(),o("div",yi," You cannot confirm this because it contains hidden identifiers. ")):d("",!0)])):d("",!0),t("h2",{class:"font-bold uppercase text-xl text-blue-500 mt-8 cursor-pointer",onClick:i[6]||(i[6]=n=>e.showVeriClaimDump=!e.showVeriClaimDump)},[i[22]||(i[22]=a(" Details ")),e.showVeriClaimDump?(s(),S(m,{key:0,icon:"chevron-up"})):(s(),S(m,{key:1,icon:"chevron-right"}))]),e.showVeriClaimDump?(s(),o("div",gi,[e.serverUtil.containsHiddenDid(e.veriClaim)&&e.R.isEmpty(e.veriClaimDidsVisible)?(s(),o("div",bi,[i[27]||(i[27]=a(' Some of the details are not visible to you; they show as "HIDDEN". They are not visible to any of your direct contacts, either. ')),e.canShare?(s(),o("span",wi,[i[23]||(i[23]=a(" You can ask one of your contacts to take a look and see if their contacts can see more details: ")),t("a",{class:"text-blue-500",onClick:i[7]||(i[7]=n=>e.onClickShareClaim())},"click to send them this page info"),i[24]||(i[24]=a(" and see if they can make an introduction. Someone is connected to people closer to them; if you don't know who to ask, try the person who registered you. "))])):(s(),o("span",ki,[i[25]||(i[25]=a(" You can ask one of your contacts to take a look and see if their contacts can see more details: ")),t("a",{class:"text-blue-500",onClick:i[8]||(i[8]=n=>e.copyToClipboard("A link to this page",e.windowLocation))},"click to copy this page info"),i[26]||(i[26]=a(" and see if they can make an introduction. Someone is connected to people closer to them; if you don't know who to ask, try the person who registered you. "))]))])):d("",!0),e.R.isEmpty(e.veriClaimDidsVisible)?d("",!0):(s(),o("div",Ii,[i[31]||(i[31]=a(" Some of the details are not visible to you but they are visible to some of your contacts. ")),e.canShare?(s(),o("span",Di,[i[28]||(i[28]=a(" If you'd like an introduction, ")),t("a",{class:"text-blue-500",onClick:i[9]||(i[9]=n=>e.onClickShareClaim())},"click to share the information with them and ask if they'll tell you more about the participants.")])):(s(),o("span",Ei,[i[29]||(i[29]=a(" If you'd like an introduction, ")),t("a",{class:"text-blue-500",onClick:i[10]||(i[10]=n=>e.copyToClipboard("A link to this page",e.windowLocation))},"share this page with them and ask if they'll tell you more about about the participants.")])),(s(!0),o(D,null,T(Object.keys(e.veriClaimDidsVisible),(n,E)=>(s(),o("div",{key:E,class:"list-disc p-4"},[t("div",Vi,[f(m,{icon:"minus",class:"fa-fw"}),a(" The "+p(n)+" is visible to: ",1)]),t("div",Ti,[t("ul",null,[(s(!0),o(D,null,T(e.veriClaimDidsVisible[n],(b,q)=>{var j,M;return s(),o("li",{key:q,class:"list-disc"},[t("div",$i,[t("span",null,[a(p(e.didInfo(b))+" ",1),e.serverUtil.isEmptyOrHiddenDid(b)?d("",!0):(s(),o("span",Gi,[t("a",{href:`/did/${b}`,target:"_blank",class:"text-blue-500"},[f(m,{icon:"arrow-up-right-from-square",class:"fa-fw"})],8,Ui)])),(j=e.veriClaim.publicUrls)!=null&&j[b]?(s(),o("span",Ai,[i[30]||(i[30]=a(", found at ")),t("a",{href:(M=e.veriClaim.publicUrls)==null?void 0:M[b],target:"_blank",class:"text-blue-500"},[f(m,{icon:"globe",class:"fa-fw"}),a(" "+p(e.veriClaim.publicUrls[b].substring(e.veriClaim.publicUrls[b].indexOf("//")+2)),1)],8,Si)])):d("",!0)])])])}),128))])])]))),128))])),e.isEditedGlobalId?(s(),o("span",Li," This record is an edited version. The latest version is shown. ")):d("",!0),i[34]||(i[34]=t("br",null,null,-1)),e.showVeriClaimDump?(s(),o("pre",Fi,p(e.veriClaimDump),1)):d("",!0),i[35]||(i[35]=t("h2",{class:"text-xl mt-8 mb-2"},"Full Claim",-1)),i[36]||(i[36]=t("p",{class:"mb-4"}," The full claim includes the claim as it was originally issued, including the signature (ie. the proof of issuance by that person). ",-1)),e.fullClaim?(s(),o("div",Ni,[t("pre",Hi,p(e.fullClaimDump),1)])):(s(),o("div",Ri,[e.fullClaimMessage?(s(),o("p",Oi,p(e.fullClaimMessage),1)):(s(),o("button",{key:1,class:"text-blue-500 cursor-pointer",onClick:i[11]||(i[11]=n=>e.showFullClaim(e.veriClaim.id))},[f(m,{icon:"file-lines",class:"fa-fw"}),i[32]||(i[32]=a(" Load Full Claim Details "))]))])),t("a",{href:e.apiServer+"/api/claim/"+e.veriClaim.id,target:"_blank",class:"text-blue-500 cursor-pointer"},[f(m,{icon:"file-lines",class:"fa-fw"}),f(m,{icon:"arrow-up-right-from-square",class:"ml-1 fa-fw"}),i[33]||(i[33]=a(" View on the Public Server "))],8,Pi)])):d("",!0)])],64)}const it=ee(L,[["render",ji]]);export{it as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ConfirmContactView-CXS4FvMu.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ConfirmContactView-CXS4FvMu.js deleted file mode 100644 index 737c319..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ConfirmContactView-CXS4FvMu.js +++ /dev/null @@ -1 +0,0 @@ -import{V as m,C as x,_ as u,h as _,k as c,J as f,j as d,n as b,w as v,z as i,B as w}from"./main.common-DD7dqhZp.js";import"./index-BGoTPXII.js";var g=Object.getOwnPropertyDescriptor,C=(o,t,r,a)=>{for(var e=a>1?void 0:a?g(t,r):t,s=o.length-1,n;s>=0;s--)(n=o[s])&&(e=n(e)||e);return e};let l=class extends m{};l=C([x({components:{}})],l);const h={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},k={id:"ViewBreadcrumb",class:"mb-8"},V={class:"text-lg text-center font-light relative px-7"};function y(o,t,r,a,e,s){const n=i("font-awesome"),p=i("router-link");return w(),_("section",h,[c("div",k,[c("h1",V,[d(p,{to:{name:"account"},class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1"},{default:v(()=>[d(n,{icon:"chevron-left",class:"fa-fw"})]),_:1}),t[0]||(t[0]=b(" Confirm Contact "))])]),t[1]||(t[1]=f('

Would you like to add Firstname to your network?

Firstname Lastname

ID
did:peer:kl45kj41lk451kl3
',3))])}const j=u(l,[["render",y]]);export{j as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ConfirmGiftView-BDAczKwI.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ConfirmGiftView-BDAczKwI.js deleted file mode 100644 index dde0f6d..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ConfirmGiftView-BDAczKwI.js +++ /dev/null @@ -1 +0,0 @@ -var B=Object.defineProperty;var O=(e,i,n)=>i in e?B(e,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[i]=n;var r=(e,i,n)=>O(e,typeof i!="symbol"?i+"":i,n);import{y as P,d as M}from"./js-yaml-CxlQHuPU.js";import{R as Y}from"./index-BtEdi1q-.js";import{V as j,e as _,d as z,C as W,_ as Q,h as s,j as h,k as o,m as f,n as a,t as u,w as A,F as b,E as I,y as E,z as N,B as t}from"./main.common-DD7dqhZp.js";import{u as q}from"./index-CZnn7ED5.js";import{Q as K}from"./QuickNav-C8jPGtUY.js";import{B as G,l as Z,s as J,z as X,h as x,i as ee,j as ie,g as H,k as te,m as se,p as oe,q as ne,u as re,v as ae,C as le,E as de,F as me}from"./index-ryzpKtgI.js";import{T as he}from"./TopMessage-ZWDDjman.js";import"./_isString-B7bbuhPA.js";import"./concat-Ro2w9qwP.js";import"./set-BrilI7kO.js";import"./sort-DzTCGCnH.js";import"./index-BGoTPXII.js";var fe=Object.getOwnPropertyDescriptor,ce=(e,i,n,m)=>{for(var c=m>1?void 0:m?fe(i,n):i,g=e.length-1,p;g>=0;g--)(p=e[g])&&(c=p(c)||c);return c};let R=class extends j{constructor(){super(...arguments);r(this,"$notify");r(this,"$route");r(this,"$router");r(this,"activeDid","");r(this,"allMyDids",[]);r(this,"allContacts",[]);r(this,"apiServer","");r(this,"canShare",!1);r(this,"confirmerIdList",[]);r(this,"confsVisibleErrorMessage","");r(this,"confsVisibleToIdList",[]);r(this,"giveDetails");r(this,"giverName","");r(this,"issuerName","");r(this,"isLoading",!1);r(this,"isRegistered",!1);r(this,"numConfsNotVisible",0);r(this,"recipientName","");r(this,"showVeriClaimDump",!1);r(this,"urlForNewGive","");r(this,"veriClaim",G);r(this,"veriClaimDump","");r(this,"veriClaimDidsVisible",{});r(this,"windowLocation",window.location.href);r(this,"R",Y);r(this,"yaml",P);r(this,"libsUtil",Z);r(this,"serverUtil",J);r(this,"displayAmount",X)}resetThisValues(){this.confirmerIdList=[],this.confsVisibleErrorMessage="",this.confsVisibleToIdList=[],this.giveDetails=void 0,this.isRegistered=!1,this.numConfsNotVisible=0,this.urlForNewGive="",this.veriClaim=G,this.veriClaimDump=""}async mounted(){this.isLoading=!0;const n=await _();this.activeDid=n.activeDid||"",this.apiServer=n.apiServer||"",this.allContacts=await z.contacts.toArray(),this.isRegistered=n.isRegistered||!1,this.allMyDids=await x();const m=window.location.pathname.substring(14);let c;m?(c=decodeURIComponent(m),await this.loadClaim(c,this.activeDid)):this.$notify({group:"alert",type:"danger",title:"Error",text:"No claim ID was provided."},3e3),this.canShare=!!navigator.share,this.isLoading=!1}capitalizeAndInsertSpacesBeforeCaps(n){return n?n[0].toUpperCase()+n.substr(1).replace(/([A-Z])/g," $1"):""}capitalizeAndInsertSpacesBeforeCapsWithAPrefix(n){const m=this.capitalizeAndInsertSpacesBeforeCaps(n);if(m){const c=m[0].toLowerCase();return(["a","e","i","o","u"].includes(c)?"an":"a")+" "+m}else return""}totalConfirmers(){return this.numConfsNotVisible+this.confirmerIdList.length+this.confsVisibleToIdList.length}didInfo(n){return ee(n,this.activeDid,this.allMyDids,this.allContacts)}async loadClaim(n,m){var p;const c=ie(n)?"/api/claim/byHandle/":"/api/claim/",g=this.apiServer+c+encodeURIComponent(n);try{const w=await H(m),l=await this.axios.get(g,{headers:w});if(l.status===200)this.veriClaim=l.data,this.veriClaimDump=M(this.veriClaim),this.veriClaimDidsVisible=te(this.veriClaim,!0);else{console.error("Error getting claim:",l),this.$notify({group:"alert",type:"danger",title:"Error",text:"There was a problem retrieving that claim."},3e3);return}if(this.veriClaim.claimType!=="GiveAction")return;this.issuerName=this.didInfo(this.veriClaim.issuer);const k=this.apiServer+"/api/v2/report/gives?handleId="+encodeURIComponent(this.veriClaim.handleId),D=await H(m),C=await this.axios.get(k,{headers:D});if(C.status===200)this.giveDetails=C.data.data[0];else{console.error("Error getting detailed give info:",C),this.$notify({group:"alert",type:"danger",title:"Error",text:"Something went wrong retrieving gift data."},3e3);return}if(!this.giveDetails)return;this.urlForNewGive="/gifted-details?",this.giveDetails.amount&&(this.urlForNewGive+="&amountInput="+encodeURIComponent(String(this.giveDetails.amount))),this.giveDetails.unit&&(this.urlForNewGive+="&unitCode="+encodeURIComponent(this.giveDetails.unit)),this.giveDetails.description&&(this.urlForNewGive+="&description="+encodeURIComponent(this.giveDetails.description)),this.giverName=this.didInfo(this.giveDetails.agentDid),this.giveDetails.agentDid&&(this.urlForNewGive+="&giverDid="+encodeURIComponent(this.giveDetails.agentDid)+"&giverName="+encodeURIComponent(this.giverName)),this.recipientName=this.didInfo(this.giveDetails.recipientDid),this.giveDetails.recipientDid&&(this.urlForNewGive+="&recipientDid="+encodeURIComponent(this.giveDetails.recipientDid)+"&recipientName="+encodeURIComponent(this.recipientName)),this.giveDetails.fullClaim.image&&(this.urlForNewGive+="&image="+encodeURIComponent(this.giveDetails.fullClaim.image)),this.giveDetails.type=="Offer"&&this.giveDetails.fulfillsHandleId&&(this.urlForNewGive+="&offerId="+encodeURIComponent((p=this.giveDetails)==null?void 0:p.fulfillsHandleId)),this.giveDetails.fulfillsPlanHandleId&&(this.urlForNewGive+="&fulfillsProjectId="+encodeURIComponent(this.giveDetails.fulfillsPlanHandleId));const y=await se(this.apiServer,n,this.veriClaim.issuer,m);y?(this.confirmerIdList=y.confirmerIdList,this.confsVisibleToIdList=y.confsVisibleToIdList,this.numConfsNotVisible=y.numConfsNotVisible):this.confsVisibleErrorMessage="Had problems retrieving confirmations."}catch(w){console.error("Error retrieving claim:",w),this.$notify({group:"alert",type:"danger",title:"Error",text:"Something went wrong retrieving claim data."},3e3)}}confirmConfirmClaim(){this.$notify({group:"modal",type:"confirm",title:"Confirm",text:"Do you personally confirm that this is true?",onYes:async()=>{await this.confirmClaim()}},-1)}async confirmClaim(){const m={"@context":"https://schema.org","@type":"AgreeAction",object:oe(ne(re(this.veriClaim.claim,this.veriClaim.id,this.veriClaim.handleId)))},c=await ae(m,this.activeDid,this.apiServer,this.axios);c.type==="success"?this.$notify({group:"alert",type:"success",title:"Success",text:"Confirmation submitted."},3e3):(console.error("Got error submitting the confirmation:",c),this.$notify({group:"alert",type:"danger",title:"Error",text:"There was a problem submitting the confirmation."},5e3))}showClaimPage(n){const m={path:"/claim/"+encodeURIComponent(n)};this.$router.push(m).then(async()=>{this.resetThisValues(),await this.loadClaim(n,this.activeDid)})}copyToClipboard(n,m){q().copy(m).then(()=>{this.$notify({group:"alert",type:"toast",title:"Copied",text:(n||"That")+" was copied to the clipboard."},2e3)})}notifyWhyCannotConfirm(){le(this.$notify,this.isRegistered,this.veriClaim.claimType,this.giveDetails,this.activeDid,this.confirmerIdList)}notifyWhyCannotConfirmBak(){var n,m;this.isRegistered?de(this.veriClaim)?this.confirmerIdList.includes(this.activeDid)?this.$notify({group:"alert",type:"info",title:"Already Confirmed",text:"You already confirmed this claim."},3e3):((n=this.giveDetails)==null?void 0:n.issuerDid)==this.activeDid?this.$notify({group:"alert",type:"info",title:"Cannot Confirm",text:"You cannot confirm this because you issued this claim."},3e3):me((m=this.giveDetails)==null?void 0:m.fullClaim)?this.$notify({group:"alert",type:"info",title:"Cannot Confirm",text:"You cannot confirm this because some people are hidden."},3e3):this.$notify({group:"alert",type:"info",title:"Cannot Confirm",text:"You cannot confirm this claim. There are no other details, but we can help more if you contact us and send us screenshots."},3e3):this.$notify({group:"alert",type:"info",title:"Not A Give",text:"This is not a giving action to confirm."},3e3):this.$notify({group:"alert",type:"info",title:"Not Registered",text:"Someone needs to register you before you can contribute."},3e3)}onClickShareClaim(){this.copyToClipboard("A link to this page",this.windowLocation),window.navigator.share({title:"Help Connect Me",text:"I'm trying to find the full details of this claim. Can you help me?",url:this.windowLocation})}};R=ce([W({components:{TopMessage:he,QuickNav:K}})],R);const ue={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},pe={id:"ViewBreadcrumb",class:"mb-8"},ve={class:"text-lg text-center font-light relative px-7"},ge={key:0},ye={key:1},Ce={key:0},we={class:"flex justify-center"},be={class:"bg-slate-100 rounded-md overflow-hidden px-4 py-3 mt-4"},ke={class:"flex gap-4 overflow-hidden"},De={class:"overflow-hidden"},Ie={class:"text-sm"},Ne={key:0},Te={key:1},Re={key:2,class:"mt-2"},Le={key:3},Ve={class:"mt-2"},$e={key:0,class:"mt-4"},Ue={key:0},Se={key:1},Ae={key:2},Ee={key:3},Ge={key:0},He={key:1},Fe={key:2},Be={class:"ml-4"},Oe={class:"flex gap-4"},Pe={class:"grow overflow-hidden"},Me={class:"text-sm"},Ye={key:0},je=["onClick"],_e={key:3},ze={class:"ml-4"},We={class:"flex gap-4"},Qe={class:"grow overflow-hidden"},qe={class:"text-sm"},Ke={key:0},Ze=["onClick"],Je={key:4},Xe={key:5},xe={key:6},ei={key:1},ii={key:0,class:"mb-2"},ti={key:0},si={key:1},oi={key:1},ni={key:0},ri={key:1},ai={class:"text-sm"},li={class:"ml-12 p-1"},di={class:"text-sm mt-2"},mi={key:0},hi=["onClick"],fi={key:1},ci=["href"],ui={class:"text-sm overflow-x-scroll px-4 py-3 bg-slate-100 rounded-md"},pi={class:"mt-2 ml-2"},vi={class:"mt-2 ml-2"},gi=["href"],yi={key:1},Ci={key:2,class:"fixed left-6 bottom-24 text-center text-4xl leading-none bg-slate-400 text-white w-14 py-2.5 rounded-full"};function wi(e,i,n,m,c,g){var D,C,y,L,V,$;const p=N("QuickNav"),w=N("TopMessage"),l=N("font-awesome"),k=N("router-link");return t(),s(b,null,[h(p),h(w),o("section",ue,[o("div",pe,[o("h1",ve,[o("button",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:i[0]||(i[0]=d=>e.$router.go(-1))},[h(l,{icon:"chevron-left",class:"fa-fw"})]),e.libsUtil.isGiveRecordTheUserCanConfirm(e.isRegistered,e.veriClaim,e.activeDid,e.confirmerIdList)?(t(),s("span",ge," Do you agree? ")):(t(),s("span",ye," Confirmation Details "))])]),e.giveDetails&&!e.isLoading?(t(),s("div",Ce,[o("div",we,[e.libsUtil.isGiveRecordTheUserCanConfirm(e.isRegistered,e.veriClaim,e.activeDid,e.confirmerIdList)?(t(),s("button",{key:0,class:"col-span-1 bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-4 py-2 rounded-md",onClick:i[1]||(i[1]=d=>e.confirmConfirmClaim())},[i[9]||(i[9]=a(" Confirm ")),h(l,{icon:"circle-check",class:"ml-2 text-white cursor-pointer"})])):(t(),s("button",{key:1,class:"col-span-1 bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-4 py-2 rounded-md",onClick:i[2]||(i[2]=d=>e.notifyWhyCannotConfirm())},[i[10]||(i[10]=a(" Confirm ")),h(l,{icon:"circle-check",class:"ml-2 text-white cursor-pointer"})]))]),o("div",be,[o("div",ke,[o("div",De,[o("div",Ie,[o("div",null,[h(l,{icon:"arrow-left",class:"fa-fw text-slate-400"}),a(" "+u(e.giverName),1)]),i[12]||(i[12]=o("div",{class:"ml-6"},"gave",-1)),e.giveDetails.amount?(t(),s("div",Ne,[h(l,{icon:"hand-holding-dollar",class:"fa-fw text-slate-400"}),a(" "+u(e.displayAmount(e.giveDetails.unit,e.giveDetails.amount)),1)])):f("",!0),e.giveDetails.description?(t(),s("div",Te,[h(l,{icon:"message",class:"fa-fw text-slate-400"}),a(" "+u(e.giveDetails.amount?"and:":"")+" "+u(e.giveDetails.description),1)])):f("",!0),i[13]||(i[13]=o("div",{class:"ml-6"},"to",-1)),o("div",null,[h(l,{icon:"arrow-right",class:"fa-fw text-slate-400"}),a(" "+u(e.recipientName),1)]),o("div",null,[h(l,{icon:"calendar",class:"fa-fw text-slate-400"}),a(" on "+u(e.giveDetails.issuedAt.substring(0,10)),1)]),(D=e.giveDetails)!=null&&D.fulfillsPlanHandleId?(t(),s("div",Re,[h(k,{to:"/project/"+encodeURIComponent(((C=e.giveDetails)==null?void 0:C.fulfillsPlanHandleId)||""),class:"text-blue-500 mt-2 cursor-pointer",target:"_blank"},{default:A(()=>[i[11]||(i[11]=a(" This fulfills a bigger plan ")),h(l,{icon:"arrow-up-right-from-square",class:"fa-fw"})]),_:1},8,["to"])])):f("",!0),(y=e.giveDetails)!=null&&y.fulfillsType&&((L=e.giveDetails)==null?void 0:L.fulfillsType)!=="PlanAction"&&((V=e.giveDetails)!=null&&V.fulfillsHandleId)?(t(),s("div",Le,[h(k,{to:"/claim/"+encodeURIComponent((($=e.giveDetails)==null?void 0:$.fulfillsHandleId)||""),class:"text-blue-500 mt-2 cursor-pointer",target:"_blank"},{default:A(()=>{var d;return[a(" This fulfills "+u(e.capitalizeAndInsertSpacesBeforeCapsWithAPrefix(((d=e.giveDetails)==null?void 0:d.fulfillsType)||""))+" ",1),h(l,{icon:"arrow-up-right-from-square",class:"fa-fw"})]}),_:1},8,["to"])])):f("",!0)])])])]),o("div",Ve,[h(l,{icon:"comment",class:"text-slate-400"}),a(" "+u(e.issuerName)+" posted that. ",1)]),e.libsUtil.isGiveAction(e.veriClaim)?(t(),s("div",$e,[i[16]||(i[16]=o("h2",{class:"font-bold uppercase text-xl mt-8 mb-2"},"Confirmations",-1)),e.totalConfirmers()===0?(t(),s("span",Ue,"Nobody has confirmed this.")):e.totalConfirmers()===1?(t(),s("span",Se," One person confirmed this. ")):(t(),s("span",Ae,u(e.totalConfirmers())+" people confirmed this. ",1)),e.totalConfirmers()>0?(t(),s("div",Ee,[e.confirmerIdList.length===0&&e.confsVisibleToIdList.length===0?(t(),s("div",Ge," Nobody that you know confirmed this claim, nor do they have any confirmers in their network. ")):f("",!0),e.confirmerIdList.length===0&&e.confsVisibleToIdList.length>0?(t(),s("div",He," Nobody that you know issued or confirmed this claim. ")):f("",!0),e.confirmerIdList.length>0?(t(),s("div",Fe,[i[14]||(i[14]=a(" The following people confirmed this claim. ")),o("ul",Be,[(t(!0),s(b,null,I(e.confirmerIdList,d=>(t(),s("li",{key:d,class:"list-disc ml-4"},[o("div",Oe,[o("div",Pe,[o("div",Me,[a(u(e.didInfo(d))+" ",1),e.serverUtil.isEmptyOrHiddenDid(d)?f("",!0):(t(),s("span",Ye,[o("button",{onClick:T=>e.copyToClipboard("The DID of "+d,d)},[h(l,{icon:"copy",class:"text-slate-400 fa-fw"})],8,je)]))])])])]))),128))])])):f("",!0),e.confsVisibleToIdList.length>0?(t(),s("div",_e,[i[15]||(i[15]=a(" The following people can connect you with people who issued or confirmed this claim. ")),o("ul",ze,[(t(!0),s(b,null,I(e.confsVisibleToIdList,d=>(t(),s("li",{key:d,class:"list-disc ml-4"},[o("div",We,[o("div",Qe,[o("div",qe,[a(u(e.didInfo(d))+" ",1),e.serverUtil.isEmptyOrHiddenDid(d)?f("",!0):(t(),s("span",Ke,[o("button",{onClick:T=>e.copyToClipboard("The DID of "+d,d)},[h(l,{icon:"copy",class:"text-slate-400 fa-fw"})],8,Ze)]))])])])]))),128))])])):f("",!0)])):f("",!0),e.isRegistered?e.giveDetails.issuerDid==e.activeDid?(t(),s("div",Xe," You cannot confirm this because you issued this claim, so you already count as confirming it. ")):e.serverUtil.containsHiddenDid(e.veriClaim.claim)?(t(),s("div",xe," You cannot confirm this because some people are hidden. ")):f("",!0):(t(),s("div",Je," You cannot confirm this because you are not registered. Find someone to register you, maybe on the Help page. "))])):f("",!0),o("h2",{class:"font-bold uppercase text-xl text-blue-500 mt-8 cursor-pointer",onClick:i[3]||(i[3]=d=>e.showVeriClaimDump=!e.showVeriClaimDump)},[i[17]||(i[17]=a(" Details ")),e.showVeriClaimDump?(t(),E(l,{key:0,icon:"chevron-up"})):(t(),E(l,{key:1,icon:"chevron-right"}))]),e.showVeriClaimDump?(t(),s("div",ei,[e.serverUtil.containsHiddenDid(e.veriClaim)&&e.R.isEmpty(e.veriClaimDidsVisible)?(t(),s("div",ii,[i[22]||(i[22]=a(' Some of the details are not visible to you; they show as "HIDDEN". They are not visible to any of your direct contacts, either. ')),e.canShare?(t(),s("span",ti,[i[18]||(i[18]=a(" You can ask one of your contacts to take a look and see if their contacts can see more details: ")),o("a",{class:"text-blue-500",onClick:i[4]||(i[4]=d=>e.onClickShareClaim())},"click to send them this page info"),i[19]||(i[19]=a(" and see if they can make an introduction. Someone is connected to people closer to them; if you don't know who to ask, try the person who registered you. "))])):(t(),s("span",si,[i[20]||(i[20]=a(" You can ask one of your contacts to take a look and see if their contacts can see more details: ")),o("a",{class:"text-blue-500",onClick:i[5]||(i[5]=d=>e.copyToClipboard("A link to this page",e.windowLocation))},"click to copy this page info"),i[21]||(i[21]=a(" and see if they can make an introduction. Someone is connected to people closer to them; if you don't know who to ask, try the person who registered you. "))]))])):f("",!0),e.R.isEmpty(e.veriClaimDidsVisible)?f("",!0):(t(),s("div",oi,[i[26]||(i[26]=a(" Some of the details are not visible to you but they are visible to some of your contacts. ")),e.canShare?(t(),s("span",ni,[i[23]||(i[23]=a(" If you'd like an introduction, ")),o("a",{class:"text-blue-500",onClick:i[6]||(i[6]=d=>e.onClickShareClaim())},"click to share the information with them and ask if they'll tell you more about the participants.")])):(t(),s("span",ri,[i[24]||(i[24]=a(" If you'd like an introduction, ")),o("a",{class:"text-blue-500",onClick:i[7]||(i[7]=d=>e.copyToClipboard("A link to this page",e.windowLocation))},"share this page with them and ask if they'll tell you more about about the participants.")])),(t(!0),s(b,null,I(Object.keys(e.veriClaimDidsVisible),(d,T)=>(t(),s("div",{key:T,class:"list-disc p-4"},[o("div",ai,[h(l,{icon:"minus",class:"fa-fw"}),a(" The "+u(d)+" is visible to: ",1)]),o("div",li,[o("ul",null,[(t(!0),s(b,null,I(e.veriClaimDidsVisible[d],(v,F)=>{var U,S;return t(),s("li",{key:F,class:"list-disc"},[o("div",di,[o("span",null,[a(u(e.didInfo(v))+" ",1),e.serverUtil.isEmptyOrHiddenDid(v)?f("",!0):(t(),s("span",mi,[o("button",{onClick:bi=>e.copyToClipboard("The DID of "+v,v)},[h(l,{icon:"copy",class:"text-slate-400 fa-fw"})],8,hi)])),(U=e.veriClaim.publicUrls)!=null&&U[v]?(t(),s("span",fi,[i[25]||(i[25]=a(", found at ")),h(l,{icon:"globe",class:"fa-fw text-slate-400"}),o("a",{href:(S=e.veriClaim.publicUrls)==null?void 0:S[v],class:"text-blue-500"},u(e.veriClaim.publicUrls[v].substring(e.veriClaim.publicUrls[v].indexOf("//")+2)),9,ci)])):f("",!0)])])])}),128))])])]))),128))])),o("pre",ui,u(e.veriClaimDump),1),o("div",pi,[o("a",{class:"text-blue-500 cursor-pointer",onClick:i[8]||(i[8]=d=>e.showClaimPage(e.veriClaim.id))},[h(l,{icon:"file-lines"}),i[27]||(i[27]=a(" See All Generic Info "))])]),o("div",vi,[e.isRegistered?(t(),s("a",{key:0,class:"text-blue-500 cursor-pointer",href:e.urlForNewGive},[h(l,{icon:"file-lines"}),i[28]||(i[28]=a(" Record a Give Similar to the Original "))],8,gi)):f("",!0)])])):f("",!0)])):e.isLoading?f("",!0):(t(),s("div",yi,"This does not have details to confirm.")),e.isLoading?(t(),s("div",Ci,[h(l,{icon:"spinner",class:"fa-spin-pulse"})])):f("",!0)])],64)}const Hi=Q(R,[["render",wi]]);export{Hi as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ContactAmountsView-Bsd4-O6A.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ContactAmountsView-Bsd4-O6A.js deleted file mode 100644 index e0f1032..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ContactAmountsView-Bsd4-O6A.js +++ /dev/null @@ -1 +0,0 @@ -var $=Object.defineProperty;var E=(a,t,s)=>t in a?$(a,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):a[t]=s;var p=(a,t,s)=>E(a,typeof t!="symbol"?t+"":t,s);import{V as T,d as N,e as O,C as V,_ as j,h as c,j as h,k as e,w as G,t as y,F as b,E as R,z as x,B as l,m as D,n as k}from"./main.common-DD7dqhZp.js";import{Q as I}from"./QuickNav-C8jPGtUY.js";import{z as U,G as B,g as _,H as F,S as A,I as J}from"./index-ryzpKtgI.js";import{c as M}from"./concat-Ro2w9qwP.js";import{s as H}from"./sort-DzTCGCnH.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var Q=Object.getOwnPropertyDescriptor,W=(a,t,s,i)=>{for(var u=i>1?void 0:i?Q(t,s):t,v=a.length-1,n;v>=0;v--)(n=a[v])&&(u=n(u)||u);return u};let w=class extends T{constructor(){super(...arguments);p(this,"$notify");p(this,"$route");p(this,"$router");p(this,"activeDid","");p(this,"apiServer","");p(this,"contact",null);p(this,"giveRecords",[]);p(this,"numAccounts",0);p(this,"displayAmount",U)}async beforeCreate(){this.numAccounts=await B()}async created(){try{const t=this.$route.query.contactDid;this.contact=await N.contacts.get(t)||null;const s=await O();this.activeDid=(s==null?void 0:s.activeDid)||"",this.apiServer=(s==null?void 0:s.apiServer)||"",this.activeDid&&this.contact&&this.loadGives(this.activeDid,this.contact)}catch(t){console.error("Error retrieving settings or gives.",t),this.$notify({group:"alert",type:"danger",title:"Error",text:t.userMessage||"There was an error retrieving your settings or contacts or gives."},5e3)}}async loadGives(t,s){try{let i=[];const u=this.apiServer+"/api/v2/report/gives?agentDid="+encodeURIComponent(this.activeDid)+"&recipientDid="+encodeURIComponent(s.did),v=await _(t),n=await this.axios.get(u,{headers:v});n.status===200?i=n.data.data:(console.error("Got bad response status & data of",n.status,n.data),this.$notify({group:"alert",type:"danger",title:"Error With Server",text:"Got an error retrieving your given time from the server."},5e3));const r=this.apiServer+"/api/v2/report/gives?agentDid="+encodeURIComponent(s.did)+"&recipientDid="+encodeURIComponent(this.activeDid),g=await _(t),d=await this.axios.get(r,{headers:g});d.status===200?i=M(i,d.data.data):(console.error("Got bad response status & data of",d.status,d.data),this.$notify({group:"alert",type:"danger",title:"Error With Server",text:"Got an error retrieving your given time from the server."},5e3));const o=H((m,f)=>new Date(f.issuedAt).getTime()-new Date(m.issuedAt).getTime(),i);this.giveRecords=o}catch(i){this.$notify({group:"alert",type:"danger",title:"Error With Server",text:i},5e3)}}async confirm(t){var g,d;const s=F(t.fullClaim);t.fullClaim["@context"]==A&&delete s["@context"],s.identifier=t.handleId;const i={"@context":A,"@type":"AgreeAction",object:s},u=await J(this.activeDid,i),v=JSON.stringify({jwtEncoded:u}),n=this.apiServer+"/api/v2/claim",r=await _(this.activeDid);try{(g=(await this.axios.post(n,v,{headers:r})).data)!=null&&g.success&&(t.amountConfirmed=((d=s.object)==null?void 0:d.amountOfThisGood)||1)}catch(o){let m="There was an error.";const f=o;f?f.message?m=f.message:m=JSON.stringify(f.toJSON()):m=o,this.$notify({group:"alert",type:"danger",title:"Error With Server",text:m},5e3)}}cannotConfirmMessage(){this.$notify({group:"alert",type:"danger",title:"Not Allowed",text:"Only the recipient can confirm final receipt."},5e3)}};w=W([V({components:{QuickNav:I}})],w);const z={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},L={class:"mb-8"},P={id:"ViewBreadcrumb",class:"text-lg text-center font-light relative px-7"},q={id:"ViewHeading",class:"text-4xl text-center font-light pt-4"},X={class:"table-auto w-full border-t border-slate-300 text-sm sm:text-base text-center"},K={class:"p-1 text-xs sm:text-sm text-left text-slate-500"},Y={class:"p-1"},Z={key:0},tt={class:"font-bold"},et={key:0,title:"Confirmed"},st=["onClick"],ot={class:"italic text-xs sm:text-sm text-slate-500"},at={class:"p-1"},it={key:0},nt={key:1},rt={class:"p-1"},ct={key:0},lt={class:"font-bold"},dt={key:0,title:"Confirmed"},pt={class:"italic text-xs sm:text-sm text-slate-500"};function ut(a,t,s,i,u,v){var d;const n=x("QuickNav"),r=x("font-awesome"),g=x("router-link");return l(),c(b,null,[h(n,{selected:"Contacts"}),e("section",z,[e("div",L,[e("h1",P,[h(g,{to:{name:"contacts"},class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1"},{default:G(()=>[h(r,{icon:"chevron-left",class:"fa-fw"})]),_:1})]),e("h1",q," Transferred with "+y((d=a.contact)==null?void 0:d.name),1)]),t[2]||(t[2]=e("div",{class:"flex justify-around"},[e("span"),e("span",{class:"justify-around"},"(Only 50 most recent)"),e("span")],-1)),t[3]||(t[3]=e("div",{class:"flex justify-around"},[e("span"),e("span",{class:"justify-around"}," (This does not include claims by them if they're not visible to you.) "),e("span")],-1)),e("table",X,[t[1]||(t[1]=e("thead",{class:"bg-slate-100"},[e("tr",{class:"border-b border-slate-300"},[e("th"),e("th",{class:"px-1 py-2"},"From Them"),e("th"),e("th",{class:"px-1 py-2"},"To Them")])],-1)),e("tbody",null,[(l(!0),c(b,null,R(a.giveRecords,o=>{var m,f,C;return l(),c("tr",{key:o.id,class:"border-b border-slate-300"},[e("td",K,y(new Date(o.issuedAt).toLocaleString()),1),e("td",Y,[o.agentDid==((m=a.contact)==null?void 0:m.did)?(l(),c("span",Z,[e("div",tt,[k(y(a.displayAmount(o.unit,o.amount))+" ",1),o.amountConfirmed?(l(),c("span",et,[h(r,{icon:"circle-check",class:"text-green-600 fa-fw"})])):(l(),c("button",{key:1,title:"Unconfirmed",onClick:S=>a.confirm(o)},[h(r,{icon:"circle",class:"text-blue-600 fa-fw"})],8,st))]),e("div",ot,y(o.description),1)])):D("",!0)]),e("td",at,[o.agentDid==((f=a.contact)==null?void 0:f.did)?(l(),c("span",it,[h(r,{icon:"arrow-left",class:"text-slate-400 fa-fw"})])):(l(),c("span",nt,[h(r,{icon:"arrow-right",class:"text-slate-400 fa-fw"})]))]),e("td",rt,[o.agentDid!=((C=a.contact)==null?void 0:C.did)?(l(),c("span",ct,[e("div",lt,[k(y(a.displayAmount(o.unit,o.amount))+" ",1),o.amountConfirmed?(l(),c("span",dt,[h(r,{icon:"circle-check",class:"text-green-600 fa-fw"})])):(l(),c("button",{key:1,title:"Unconfirmed",onClick:t[0]||(t[0]=S=>a.cannotConfirmMessage())},[h(r,{icon:"circle",class:"text-slate-600 fa-fw"})]))]),e("div",pt,y(o.description),1)])):D("",!0)])])}),128))])])])],64)}const Ct=j(w,[["render",ut]]);export{Ct as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ContactEditView-Dw42tFmc.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ContactEditView-Dw42tFmc.js deleted file mode 100644 index 8125335..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ContactEditView-Dw42tFmc.js +++ /dev/null @@ -1 +0,0 @@ -var M=Object.defineProperty;var k=(e,t,s)=>t in e?M(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var r=(e,t,s)=>k(e,typeof t!="symbol"?t+"":t,s);import{V as x,A as $,d as w,C as V,_ as T,h as b,j as i,k as o,n as _,t as E,o as p,s as u,F as C,E as A,z as y,B as f,m as I}from"./main.common-DD7dqhZp.js";import{Q as S}from"./QuickNav-C8jPGtUY.js";import{T as U}from"./TopMessage-ZWDDjman.js";import{s as D,l as L}from"./set-BrilI7kO.js";import{e as O}from"./_isString-B7bbuhPA.js";import"./index-BGoTPXII.js";var P=Object.getOwnPropertyDescriptor,B=(e,t,s,a)=>{for(var c=a>1?void 0:a?P(t,s):t,m=e.length-1,h;m>=0;m--)(h=e[m])&&(c=h(c)||c);return c};let v=class extends x{constructor(){super(...arguments);r(this,"$notify");r(this,"$route");r(this,"$router");r(this,"contact",{did:"",name:"",notes:""});r(this,"contactName","");r(this,"contactNotes","");r(this,"contactMethods",[]);r(this,"dropdownIndex",null);r(this,"AppString",$)}async created(){const s=this.$route.params.did,a=await w.contacts.get(s||"");if(a)this.contact=a,this.contactName=a.name||"",this.contactNotes=a.notes||"",this.contactMethods=a.contactMethods||[];else{this.$notify({group:"alert",type:"danger",title:"Contact Not Found",text:"There is no contact with DID "+s}),this.$router.push({path:"/contacts"});return}}addContactMethod(){this.contactMethods.push({label:"",type:"",value:""})}removeContactMethod(s){this.contactMethods.splice(s,1)}toggleDropdown(s){this.dropdownIndex=this.dropdownIndex===s?null:s}setMethodType(s,a){this.contactMethods[s].type=a,this.dropdownIndex=null}async saveEdit(){const s=JSON.parse(JSON.stringify(this.contactMethods)),a=s.map(c=>D(L("type"),c.type.toUpperCase(),c));if(!O(s,a)){this.contactMethods=a,this.$notify({group:"alert",type:"warning",title:"Contact Methods Updated",text:"Note that some methods have been updated, such as uppercasing 'email' to 'EMAIL'. Save again if the changes are acceptable."},15e3);return}await w.contacts.update(this.contact.did,{name:this.contactName,notes:this.contactNotes,contactMethods:a}),this.$notify({group:"alert",type:"success",title:"Contact Saved",text:"The contact info has been updated successfully."}),this.$router.push({path:"/did/"+encodeURIComponent(this.contact.did)})}};v=B([V({components:{QuickNav:S,TopMessage:U}})],v);const j={id:"ContactEdit",class:"p-6 max-w-3xl mx-auto"},Q={id:"ViewBreadcrumb",class:"mb-8"},F={class:"text-4xl text-center font-light relative px-7"},H={class:"mt-4 flex","data-testId":"contactName"},J={class:"mt-4"},W={class:"mt-4"},q=["onUpdate:modelValue"],z=["onUpdate:modelValue"],R={class:"relative"},G=["onClick"],K={key:0,class:"absolute bg-white border border-gray-300 rounded-md mt-1"},X=["onClick"],Y=["onClick"],Z=["onClick"],tt=["onUpdate:modelValue"],et=["onClick"],ot={class:"mt-8 flex justify-between"};function st(e,t,s,a,c,m){const h=y("QuickNav"),N=y("TopMessage"),g=y("font-awesome");return f(),b(C,null,[i(h,{selected:"Contacts"}),i(N),o("section",j,[o("div",Q,[o("h1",F,[o("button",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:t[0]||(t[0]=n=>e.$router.go(-1))},[i(g,{icon:"chevron-left",class:"fa-fw"})]),_(" "+E(e.contact.name||e.AppString.NO_CONTACT_NAME),1)])]),o("div",H,[t[6]||(t[6]=o("label",{for:"contactName",class:"block text-sm font-medium text-gray-700 mt-2"}," Name ",-1)),p(o("input",{"onUpdate:modelValue":t[1]||(t[1]=n=>e.contactName=n),type:"text",class:"block w-full ml-2 mt-1 border border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500"},null,512),[[u,e.contactName]])]),o("div",J,[t[7]||(t[7]=o("label",{for:"contactNotes",class:"block text-sm font-medium text-gray-700"}," Notes ",-1)),p(o("textarea",{id:"contactNotes","onUpdate:modelValue":t[2]||(t[2]=n=>e.contactNotes=n),rows:"4",class:"block w-full mt-1 border border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500"},null,512),[[u,e.contactNotes]])]),o("div",W,[t[8]||(t[8]=o("h2",{class:"text-lg font-medium text-gray-700"},"Contact Methods",-1)),(f(!0),b(C,null,A(e.contactMethods,(n,l)=>(f(),b("div",{key:l,class:"flex mt-2"},[p(o("input",{"onUpdate:modelValue":d=>n.label=d,type:"text",class:"block w-1/4 border border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500",placeholder:"Label"},null,8,q),[[u,n.label]]),p(o("input",{"onUpdate:modelValue":d=>n.type=d,type:"text",class:"block ml-2 w-1/4 border border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500",placeholder:"Type"},null,8,z),[[u,n.type]]),o("div",R,[o("button",{class:"px-2 py-1 bg-gray-200 rounded-md",onClick:d=>e.toggleDropdown(l)},[i(g,{icon:"caret-down",class:"fa-fw"})],8,G),e.dropdownIndex===l?(f(),b("div",K,[o("div",{class:"px-4 py-2 hover:bg-gray-100 cursor-pointer",onClick:d=>e.setMethodType(l,"CELL")}," CELL ",8,X),o("div",{class:"px-4 py-2 hover:bg-gray-100 cursor-pointer",onClick:d=>e.setMethodType(l,"EMAIL")}," EMAIL ",8,Y),o("div",{class:"px-4 py-2 hover:bg-gray-100 cursor-pointer",onClick:d=>e.setMethodType(l,"WHATSAPP")}," WHATSAPP ",8,Z)])):I("",!0)]),p(o("input",{"onUpdate:modelValue":d=>n.value=d,type:"text",class:"block ml-2 w-1/2 border border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500",placeholder:"Number, email, etc."},null,8,tt),[[u,n.value]]),o("button",{class:"ml-2 text-red-500",onClick:d=>e.removeContactMethod(l)},[i(g,{icon:"trash-can",class:"fa-fw"})],8,et)]))),128)),o("button",{class:"mt-2",onClick:t[3]||(t[3]=(...n)=>e.addContactMethod&&e.addContactMethod(...n))},[i(g,{icon:"plus",class:"fa-fw px-2 py-2.5 bg-green-500 text-green-100 rounded-full"})])]),o("div",ot,[o("button",{class:"px-4 py-2 bg-blue-500 text-white rounded-md",onClick:t[4]||(t[4]=(...n)=>e.saveEdit&&e.saveEdit(...n))}," Save "),o("button",{class:"ml-4 px-4 py-2 bg-slate-500 text-white rounded-md",onClick:t[5]||(t[5]=n=>e.$router.go(-1))}," Cancel ")])])],64)}const ut=T(v,[["render",st]]);export{ut as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ContactGiftingView-CgQUVeDX.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ContactGiftingView-CgQUVeDX.js deleted file mode 100644 index c056309..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ContactGiftingView-CgQUVeDX.js +++ /dev/null @@ -1 +0,0 @@ -var y=Object.defineProperty;var v=(o,t,e)=>t in o?y(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e;var n=(o,t,e)=>v(o,typeof t!="symbol"?t+"":t,e);import{V as C,e as k,d as D,C as $,_ as j,h as u,j as a,k as s,n as _,w as G,F as g,E as V,z as d,B as b,t as E}from"./main.common-DD7dqhZp.js";import{G as I}from"./GiftedDialog-DmRkVexW.js";import{Q as N}from"./QuickNav-C8jPGtUY.js";import{E as B}from"./EntityIcon-DciUb57i.js";import{_ as S}from"./blank-square-D9dGgMJw.js";import"./index-BGoTPXII.js";import"./index-ryzpKtgI.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var Q=Object.getOwnPropertyDescriptor,A=(o,t,e,r)=>{for(var i=r>1?void 0:r?Q(t,e):t,c=o.length-1,p;c>=0;c--)(p=o[c])&&(i=p(i)||i);return i};let f=class extends C{constructor(){super(...arguments);n(this,"$notify");n(this,"$route");n(this,"$router");n(this,"activeDid","");n(this,"allContacts",[]);n(this,"apiServer","");n(this,"description","");n(this,"projectId","");n(this,"prompt","")}async created(){try{const e=await k();this.apiServer=e.apiServer||"",this.activeDid=e.activeDid||"";const r=await D.contacts.toArray();this.allContacts=r.sort((i,c)=>(i.name||"").localeCompare(c.name||"")),this.projectId=this.$route.query.projectId||"",this.prompt=this.$route.query.prompt??this.prompt}catch(e){console.error("Error retrieving settings & contacts:",e),this.$notify({group:"alert",type:"danger",title:"Error",text:e.message||"There was an error retrieving your settings or contacts."},5e3)}}openDialog(e){const r=this.projectId?void 0:{did:this.activeDid,name:"you"};this.$refs.customDialog.open(e,r,void 0,"Given by "+((e==null?void 0:e.name)||"someone not named"),this.prompt)}};f=A([$({components:{GiftedDialog:I,QuickNav:N,EntityIcon:B}})],f);const F={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},O={id:"ViewBreadcrumb",class:"mb-8"},q={class:"text-lg text-center font-light relative px-7"},z={class:"border-t border-slate-300"},P={class:"border-b border-slate-300 py-3"},T={class:"text-base flex gap-4 items-center"},U={class:"text-right"},H={class:"text-base flex gap-4 items-center"},L={class:"grow font-semibold"},J={class:"text-right"},K=["onClick"];function M(o,t,e,r,i,c){const p=d("QuickNav"),m=d("font-awesome"),h=d("router-link"),x=d("EntityIcon"),w=d("GiftedDialog");return b(),u(g,null,[a(p,{selected:"Home"}),s("section",F,[s("div",O,[s("h1",q,[a(h,{to:{name:"home"},class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1"},{default:G(()=>[a(m,{icon:"chevron-left",class:"fa-fw"})]),_:1}),t[1]||(t[1]=_(" Given by... "))])]),s("ul",z,[s("li",P,[s("h2",T,[t[2]||(t[2]=s("span",{class:"grow"},[s("img",{src:S,width:"32",class:"inline-block align-middle border border-slate-300 rounded-md mr-1"}),_(" Unnamed/Unknown ")],-1)),s("span",U,[s("button",{type:"button",class:"block w-full text-center text-sm uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-3 py-1.5 rounded-md",onClick:t[0]||(t[0]=l=>o.openDialog())},[a(m,{icon:"gift",class:"fa-fw"})])])])]),(b(!0),u(g,null,V(o.allContacts,l=>(b(),u("li",{key:l.did,class:"border-b border-slate-300 py-3"},[s("h2",H,[s("span",L,[a(x,{contact:l,"icon-size":32,class:"inline-block align-middle border border-slate-300 rounded-md mr-1"},null,8,["contact"]),_(" "+E(l.name||"(no name)"),1)]),s("span",J,[s("button",{type:"button",class:"block w-full text-center text-sm uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-3 py-1.5 rounded-md",onClick:R=>o.openDialog(l)},[a(m,{icon:"gift",class:"fa-fw"})],8,K)])])]))),128))]),a(w,{ref:"customDialog","to-project-id":o.projectId},null,8,["to-project-id"])])],64)}const at=j(f,[["render",M]]);export{at as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ContactImportView-CH0ouLM8.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ContactImportView-CH0ouLM8.js deleted file mode 100644 index 1898c96..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ContactImportView-CH0ouLM8.js +++ /dev/null @@ -1 +0,0 @@ -var J=Object.defineProperty;var _=(t,e,s)=>e in t?J(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var c=(t,e,s)=>_(t,typeof e!="symbol"?e+"":e,s);import{R as D,i as S}from"./index-BtEdi1q-.js";import{V as N,A as T,e as O,d as u,H as E,l as P,C as R,_ as U,h as l,j as y,k as a,m as f,o as w,n as C,q as A,t as h,F as v,E as V,s as B,z as $,B as d}from"./main.common-DD7dqhZp.js";import{Q as F}from"./QuickNav-C8jPGtUY.js";import{E as z}from"./EntityIcon-DciUb57i.js";import{O as Q}from"./OfferDialog-DDi7ax_Z.js";import{J as W,l as M,K as x,L as q,e as L,H as j,M as H}from"./index-ryzpKtgI.js";import{e as K}from"./_isString-B7bbuhPA.js";import"./concat-Ro2w9qwP.js";import"./set-BrilI7kO.js";import"./sort-DzTCGCnH.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";var Y=Object.getOwnPropertyDescriptor,G=(t,e,s,p)=>{for(var o=p>1?void 0:p?Y(e,s):e,i=t.length-1,r;i>=0;i--)(r=t[i])&&(o=r(o)||o);return o};let b=class extends N{constructor(){super(...arguments);c(this,"$notify");c(this,"$route");c(this,"$router");c(this,"AppString",T);c(this,"capitalizeAndInsertSpacesBeforeCaps",W);c(this,"libsUtil",M);c(this,"R",D);c(this,"activeDid","");c(this,"apiServer","");c(this,"contactsExisting",{});c(this,"contactsImporting",[]);c(this,"contactsSelected",[]);c(this,"contactDifferences",{});c(this,"checkingImports",!1);c(this,"inputJwt","");c(this,"makeVisible",!0);c(this,"sameCount",0)}async created(){await this.initializeSettings(),await this.processQueryParams(),await this.processJwtFromPath(),await this.handleAutoImport()}async initializeSettings(){const s=await O();this.activeDid=s.activeDid||"",this.apiServer=s.apiServer||""}async processQueryParams(){const s=this.$route.query.contacts;s&&await this.setContactsSelected(JSON.parse(s))}async processJwtFromPath(){var o;const s=/\/contact-import\/(ey.+)$/,p=(o=window.location.pathname.match(s))==null?void 0:o[1];if(p){const i=x(p),r=i.payload.contacts||(Array.isArray(i.payload)?i.payload:void 0);if(!r&&i.payload.own){this.$router.push({name:"contacts",query:{contactJwt:p}});return}r&&await this.setContactsSelected(r)}}async handleAutoImport(){this.contactsImporting.length===1&&S(this.contactsExisting)&&(this.contactsSelected[0]=!0,await this.importContacts())}async setContactsSelected(s){this.contactsImporting=s,this.contactsSelected=new Array(this.contactsImporting.length).fill(!0),await u.open();const p=await u.contacts.toArray();for(let o=0;om.did===i.did);if(r){this.contactsExisting[i.did]=r;const m={};Object.keys(i).forEach(n=>{K(i[n],r[n])||(m[n]={old:r[n],new:i[n]})}),this.contactDifferences[i.did]=m,S(m)&&this.sameCount++,this.contactsSelected[o]=!1}}}async checkContactJwt(s){(s.endsWith(E)||s.endsWith(E+"/")||s.endsWith("contact-import")||s.endsWith("contact-import/"))&&this.$notify({group:"alert",type:"danger",title:"Error",text:"That is only part of the contact-import data; it's missing data at the end. Try another way to get the full data."},5e3)}async processContactJwt(s){this.checkingImports=!0;try{const p=q(s),o=x(p).payload;if(Array.isArray(o.contacts))await this.setContactsSelected(o.contacts);else throw new Error("Invalid contact-import JWT or URL: "+s)}catch(p){const o="Error importing contacts: "+L(p);P(o,!0),this.$notify({group:"alert",type:"danger",title:"Error",text:"There was an error processing the contact-import data."},3e3)}this.checkingImports=!1}async importContacts(){this.checkingImports=!0;let s=0,p=0;for(let o=0;o0&&this.$notify({group:"alert",type:"danger",title:"Visibility Error",text:`Failed to set visibility for ${o.length} contact${o.length==1?"":"s"}. You must set them individually: ${o.map(i=>i.name).join(", ")}`},-1)}this.checkingImports=!1,this.$notify({group:"alert",type:"success",title:"Imported",text:`${s} contact${s==1?"":"s"} imported.`+(p?` ${p} updated.`:"")},3e3),this.$router.push({name:"contacts"})}};b=G([R({components:{EntityIcon:z,OfferDialog:Q,QuickNav:F}})],b);const X={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},Z={class:"text-lg text-center font-light relative px-7"},tt={key:0,class:"text-center"},et={key:1},st={key:0,class:"flex justify-center"},ot={key:1},it={key:0},nt={key:1},at={key:2,class:"border-t border-slate-300"},rt={key:0,class:"grow overflow-hidden border-b border-slate-300 pt-2.5 pb-4"},ct={class:"text-base font-semibold"},lt=["onUpdate:modelValue"],dt={key:0,class:"text-orange-500"},pt={key:1,class:"text-green-500"},mt={class:"text-sm truncate"},ht={key:0},ut={class:"border font-bold p-1"},gt={class:"border p-1"},ft={class:"border p-1"},yt={key:3},wt={key:4},Ct={class:"mt-4 text-center"};function vt(t,e,s,p,o,i){const r=$("QuickNav"),m=$("font-awesome");return d(),l(v,null,[y(r,{selected:"Contacts"}),a("section",X,[a("div",Z,[a("h1",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:e[0]||(e[0]=n=>t.$router.back())},[y(m,{icon:"chevron-left",class:"fa-fw"})])]),e[10]||(e[10]=a("h1",{id:"ViewHeading",class:"text-4xl text-center font-light pt-4 mb-8"}," Contact Import ",-1)),t.checkingImports?(d(),l("div",tt,[y(m,{icon:"spinner",class:"animate-spin"})])):(d(),l("div",et,[t.contactsImporting.length>t.sameCount?(d(),l("span",st,[w(a("input",{"onUpdate:modelValue":e[1]||(e[1]=n=>t.makeVisible=n),type:"checkbox",class:"mr-2"},null,512),[[A,t.makeVisible]]),e[6]||(e[6]=C(" Make my activity visible to these contacts. "))])):f("",!0),t.sameCount>0?(d(),l("div",ot,[t.sameCount==1?(d(),l("span",it,"One contact is the same as an existing contact")):(d(),l("span",nt,h(t.sameCount)+" contacts are the same as existing contacts",1))])):f("",!0),t.contactsImporting.length>t.sameCount?(d(),l("ul",at,[(d(!0),l(v,null,V(t.contactsImporting,(n,k)=>(d(),l("li",{key:n.did},[!t.contactsExisting[n.did]||!t.R.isEmpty(t.contactDifferences[n.did])?(d(),l("div",rt,[a("h2",ct,[w(a("input",{"onUpdate:modelValue":g=>t.contactsSelected[k]=g,type:"checkbox"},null,8,lt),[[A,t.contactsSelected[k]]]),C(" "+h(n.name||t.AppString.NO_CONTACT_NAME)+" - ",1),t.contactsExisting[n.did]?(d(),l("span",dt,"Existing")):(d(),l("span",pt,"New"))]),a("div",mt,h(n.did),1),t.contactDifferences[n.did]?(d(),l("div",ht,[a("div",null,[e[7]||(e[7]=a("div",{class:"grid grid-cols-3 gap-2"},[a("div"),a("div",{class:"font-bold"},"Old Value"),a("div",{class:"font-bold"},"New Value")],-1)),(d(!0),l(v,null,V(t.contactDifferences[n.did],(g,I)=>(d(),l("div",{key:I,class:"grid grid-cols-3 border"},[a("div",ut,h(t.capitalizeAndInsertSpacesBeforeCaps(I)),1),a("div",gt,h(g.old),1),a("div",ft,h(g.new),1)]))),128))])])):f("",!0)])):f("",!0)]))),128)),a("button",{class:"bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-sm text-white mt-2 px-2 py-1.5 rounded",onClick:e[2]||(e[2]=(...n)=>t.importContacts&&t.importContacts(...n))}," Import Selected Contacts ")])):t.contactsImporting.length>0?(d(),l("p",yt," All those contacts are already in your list with the same information. ")):(d(),l("div",wt,[e[9]||(e[9]=C(" There are no contacts in that import. If some were sent, try again to get the full text and paste it. (Note that iOS cuts off data in text messages.) Ask the person to send the data a different way, eg. email. ")),a("div",Ct,[w(a("textarea",{"onUpdate:modelValue":e[3]||(e[3]=n=>t.inputJwt=n),placeholder:"Contact-import data",class:"mt-4 border-2 border-gray-300 p-2 rounded",cols:"30",onInput:e[4]||(e[4]=()=>t.checkContactJwt(t.inputJwt))},null,544),[[B,t.inputJwt]]),e[8]||(e[8]=a("br",null,null,-1)),a("button",{class:"ml-2 p-2 bg-blue-500 text-white rounded",onClick:e[5]||(e[5]=()=>t.processContactJwt(t.inputJwt))}," Check Import ")])]))]))])],64)}const Ot=U(b,[["render",vt]]);export{Ot as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ContactNameDialog-B32CzJRA.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ContactNameDialog-B32CzJRA.js deleted file mode 100644 index e13b449..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ContactNameDialog-B32CzJRA.js +++ /dev/null @@ -1 +0,0 @@ -var b=Object.defineProperty;var p=(t,e,s)=>e in t?b(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var o=(t,e,s)=>p(t,typeof e!="symbol"?e+"":e,s);import{C as h,V as C,_ as m,h as v,m as g,B as u,k as i,n as k,o as x,t as d,s as f}from"./main.common-DD7dqhZp.js";var _=Object.getOwnPropertyDescriptor,w=(t,e,s,c)=>{for(var l=c>1?void 0:c?_(e,s):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(l=a(l)||l);return l};let r=class extends C{constructor(){super(...arguments);o(this,"cancelCallback",()=>{});o(this,"saveCallback",()=>{});o(this,"message","");o(this,"newText","");o(this,"title","Contact Name");o(this,"visible",!1)}async open(s,c,l,n,a){this.cancelCallback=n||this.cancelCallback,this.saveCallback=l||this.saveCallback,this.message=c??this.message,this.newText=a??"",this.title=s??this.title,this.visible=!0}async onClickSaveChanges(){this.visible=!1,this.saveCallback&&this.saveCallback(this.newText)}onClickCancel(){this.visible=!1,this.cancelCallback&&this.cancelCallback()}};r=w([h],r);const y={key:0,class:"dialog-overlay"},N={class:"dialog"},D={class:"text-xl font-bold text-center mb-4"},T={class:"mt-8"},$={class:"grid grid-cols-1 sm:grid-cols-2 gap-2"};function V(t,e,s,c,l,n){return t.visible?(u(),v("div",y,[i("div",N,[i("h1",D,d(t.title),1),k(" "+d(t.message)+" Note that their name is only stored on this device. ",1),x(i("input",{"onUpdate:modelValue":e[0]||(e[0]=a=>t.newText=a),type:"text",placeholder:"Name",class:"block w-full rounded border border-slate-400 mb-4 px-3 py-2"},null,512),[[f,t.newText]]),i("div",T,[i("div",$,[i("button",{type:"button",class:"block w-full text-center text-lg font-bold uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md mb-2",onClick:e[1]||(e[1]=a=>t.onClickSaveChanges())}," Save "),i("button",{type:"button",class:"block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md mb-2",onClick:e[2]||(e[2]=a=>t.onClickCancel())}," Cancel ")])])])])):g("",!0)}const P=m(r,[["render",V]]);export{P as C}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ContactQRScanShowView-wtOPMc0J.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ContactQRScanShowView-wtOPMc0J.js deleted file mode 100644 index 684b31d..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ContactQRScanShowView-wtOPMc0J.js +++ /dev/null @@ -1,5 +0,0 @@ -var Ca=Object.defineProperty;var xa=(r,a,i)=>a in r?Ca(r,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[a]=i;var et=(r,a,i)=>xa(r,typeof a!="symbol"?a+"":a,i);import{K as _a,L as Sa,N as Pa,f as dt,O as Dt,P as Oa,Q as Ta,R as or,h as gt,B as yt,k as Ie,o as Ma,S as Da,v as $a,U as ka,V as Ea,e as Ra,d as ht,M as Br,C as Aa,_ as Ia,j as pt,m as ja,n as Nt,w as Ba,F as Fa,z as vt}from"./main.common-DD7dqhZp.js";import{u as Fr}from"./index-CZnn7ED5.js";import{Q as Na}from"./QuickNav-C8jPGtUY.js";import{U as qa}from"./UserNameDialog-BV49F4GW.js";import{N as La,r as za,O as Ua,L as Wa,K as Ha,P as Va,M as Qa,Q as Ga}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./_isString-B7bbuhPA.js";var Yr={exports:{}};(function(r,a){(function(i,h){r.exports=h(_a)})(self,function(i){return(()=>{var h={192:(F,P)=>{var B,V,W=function(){var ae=function(R,k){var E=R,T=$e[k],w=null,d=0,n=null,c=[],u={},l=function(p,D){w=function(b){for(var y=new Array(b),O=0;O=7&&I(p),n==null&&(n=ee(E,T,c)),$(n,D)},g=function(p,D){for(var b=-1;b<=7;b+=1)if(!(p+b<=-1||d<=p+b))for(var y=-1;y<=7;y+=1)D+y<=-1||d<=D+y||(w[p+b][D+y]=0<=b&&b<=6&&(y==0||y==6)||0<=y&&y<=6&&(b==0||b==6)||2<=b&&b<=4&&2<=y&&y<=4)},x=function(){for(var p=8;p>b&1)==1;w[Math.floor(b/3)][b%3+d-8-3]=y}for(b=0;b<18;b+=1)y=!p&&(D>>b&1)==1,w[b%3+d-8-3][Math.floor(b/3)]=y},N=function(p,D){for(var b=T<<3|D,y=he.getBCHTypeInfo(b),O=0;O<15;O+=1){var H=!p&&(y>>O&1)==1;O<6?w[O][8]=H:O<8?w[O+1][8]=H:w[d-15+O][8]=H}for(O=0;O<15;O+=1)H=!p&&(y>>O&1)==1,O<8?w[8][d-O-1]=H:O<9?w[8][15-O-1+1]=H:w[8][15-O-1]=H;w[d-8][8]=!p},$=function(p,D){for(var b=-1,y=d-1,O=7,H=0,Q=he.getMaskFunction(D),U=d-1;U>0;U-=2)for(U==6&&(U-=1);;){for(var ne=0;ne<2;ne+=1)if(w[y][U-ne]==null){var te=!1;H>>O&1)==1),Q(y,U-ne)&&(te=!te),w[y][U-ne]=te,(O-=1)==-1&&(H+=1,O=7)}if((y+=b)<0||d<=y){y-=b,b=-b;break}}},ee=function(p,D,b){for(var y=We.getRSBlocks(p,D),O=qe(),H=0;H8*U)throw"code length overflow. ("+O.getLengthInBits()+">"+8*U+")";for(O.getLengthInBits()+4<=8*U&&O.put(0,4);O.getLengthInBits()%8!=0;)O.putBit(!1);for(;!(O.getLengthInBits()>=8*U||(O.put(236,8),O.getLengthInBits()>=8*U));)O.put(17,8);return function(ne,te){for(var Y=0,ye=0,we=0,J=new Array(te.length),ve=new Array(te.length),ce=0;ce=0?Re.getAt(Be):0}}var at=0;for(ue=0;uete)&&(Q=te,U=ne)}return U}())},u.createTableTag=function(p,D){p=p||2;var b="";b+='";for(var O=0;O';b+=""}return(b+="")+"
"},u.createSvgTag=function(p,D,b,y){var O={};typeof arguments[0]=="object"&&(p=(O=arguments[0]).cellSize,D=O.margin,b=O.alt,y=O.title),p=p||2,D=D===void 0?4*p:D,(b=typeof b=="string"?{text:b}:b||{}).text=b.text||null,b.id=b.text?b.id||"qrcode-description":null,(y=typeof y=="string"?{text:y}:y||{}).text=y.text||null,y.id=y.text?y.id||"qrcode-title":null;var H,Q,U,ne,te=u.getModuleCount()*p+2*D,Y="";for(ne="l"+p+",0 0,"+p+" -"+p+",0 0,-"+p+"z ",Y+=''+j(y.text)+"":"",Y+=b.text?''+j(b.text)+"":"",Y+='',Y+='"},u.createDataURL=function(p,D){p=p||2,D=D===void 0?4*p:D;var b=u.getModuleCount()*p+2*D,y=D,O=b-D;return lt(b,b,function(H,Q){if(y<=H&&H"};var j=function(p){for(var D="",b=0;b":D+=">";break;case"&":D+="&";break;case'"':D+=""";break;default:D+=y}}return D};return u.createASCII=function(p,D){if((p=p||1)<2)return function(J){J=J===void 0?2:J;var ve,ce,je,Le,ue,Ee=1*u.getModuleCount()+2*J,Re=J,Be=Ee-J,at={"██":"█","█ ":"▀"," █":"▄"," ":" "},Xe={"██":"▀","█ ":"▀"," █":" "," ":" "},be="";for(ve=0;ve=Be?Xe[ue]:at[ue];be+=` -`}return Ee%2&&J>0?be.substring(0,be.length-Ee-1)+Array(Ee+1).join("▀"):be.substring(0,be.length-1)}(D);p-=1,D=D===void 0?2*p:D;var b,y,O,H,Q=u.getModuleCount()*p+2*D,U=D,ne=Q-D,te=Array(p+1).join("██"),Y=Array(p+1).join(" "),ye="",we="";for(b=0;b>>8),d.push(255&u)):d.push(T)}}return d}};var fe,K,de,re,ge,$e={L:1,M:0,Q:3,H:2},he=(fe=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],K=1335,de=7973,ge=function(R){for(var k=0;R!=0;)k+=1,R>>>=1;return k},(re={}).getBCHTypeInfo=function(R){for(var k=R<<10;ge(k)-ge(K)>=0;)k^=K<=0;)k^=de<5&&(E+=3+d-5)}for(T=0;T=256;)T-=255;return R[T]}}}();function oe(R,k){if(R.length===void 0)throw R.length+"/"+k;var E=function(){for(var w=0;w>>7-T%8&1)==1},put:function(T,w){for(var d=0;d>>w-d-1&1)==1)},getLengthInBits:function(){return k},putBit:function(T){var w=Math.floor(k/8);R.length<=w&&R.push(0),T&&(R[w]|=128>>>k%8),k+=1}};return E},He=function(R){var k=R,E={getMode:function(){return 1},getLength:function(d){return k.length},write:function(d){for(var n=k,c=0;c+2>>8&255)+(255&n),T.put(n,13),d+=2}if(d>>8)},writeBytes:function(E,T,w){T=T||0,w=w||E.length;for(var d=0;d0&&(E+=","),E+=R[T];return E+"]"}};return k},ut=function(R){var k=R,E=0,T=0,w=0,d={read:function(){for(;w<8;){if(E>=k.length){if(w==0)return-1;throw"unexpected end of file./"+w}var c=k.charAt(E);if(E+=1,c=="=")return w=0,-1;c.match(/^\s$/)||(T=T<<6|n(c.charCodeAt(0)),w+=6)}var u=T>>>w-8&255;return w-=8,u}},n=function(c){if(65<=c&&c<=90)return c-65;if(97<=c&&c<=122)return c-97+26;if(48<=c&&c<=57)return c-48+52;if(c==43)return 62;if(c==47)return 63;throw"c:"+c};return d},lt=function(R,k,E){for(var T=function(g,x){var q=g,I=x,N=new Array(g*x),$={setPixel:function(p,D,b){N[D*q+p]=b},write:function(p){p.writeString("GIF87a"),p.writeShort(q),p.writeShort(I),p.writeByte(128),p.writeByte(0),p.writeByte(0),p.writeByte(0),p.writeByte(0),p.writeByte(0),p.writeByte(255),p.writeByte(255),p.writeByte(255),p.writeString(","),p.writeShort(0),p.writeShort(0),p.writeShort(q),p.writeShort(I),p.writeByte(0);var D=ee(2);p.writeByte(2);for(var b=0;D.length-b>255;)p.writeByte(255),p.writeBytes(D,b,255),b+=255;p.writeByte(D.length-b),p.writeBytes(D,b,D.length-b),p.writeByte(0),p.writeString(";")}},ee=function(p){for(var D=1<>>ce)throw"length over";for(;U+ce>=8;)Q.writeByte(255&(ve<>>=8-U,ne=0,U=0;ne|=ve<0&&Q.writeByte(ne)}});Y.write(D,y);var ye=0,we=String.fromCharCode(N[ye]);for(ye+=1;ye=6;)$(g>>>x-6),x-=6},N.flush=function(){if(x>0&&($(g<<6-x),g=0,x=0),q%3!=0)for(var j=3-q%3,p=0;p>6,128|63&re):re<55296||re>=57344?K.push(224|re>>12,128|re>>6&63,128|63&re):(de++,re=65536+((1023&re)<<10|1023&fe.charCodeAt(de)),K.push(240|re>>18,128|re>>12&63,128|re>>6&63,128|63&re))}return K}(ae)},(V=typeof(B=function(){return W})=="function"?B.apply(P,[]):B)===void 0||(F.exports=V)},103:F=>{F.exports=i}},m={};function _(F){var P=m[F];if(P!==void 0)return P.exports;var B=m[F]={exports:{}};return h[F](B,B.exports,_),B.exports}_.n=F=>{var P=F&&F.__esModule?()=>F.default:()=>F;return _.d(P,{a:P}),P},_.d=(F,P)=>{for(var B in P)_.o(P,B)&&!_.o(F,B)&&Object.defineProperty(F,B,{enumerable:!0,get:P[B]})},_.o=(F,P)=>Object.prototype.hasOwnProperty.call(F,P);var M={};return(()=>{_.d(M,{default:()=>w});var F=_(103);const P={key:1};var B=function(){return(B=Object.assign||function(d){for(var n,c=1,u=arguments.length;c2||q&&I||N&&$)this._basicSquare({x:c,y:u,size:l,context:g,rotation:0});else{if(ee===2){var j=0;return q&&N?j=Math.PI/2:N&&I?j=Math.PI:I&&$&&(j=-Math.PI/2),void this._basicCornerRounded({x:c,y:u,size:l,context:g,rotation:j})}ee===1&&(j=0,N?j=Math.PI/2:I?j=Math.PI:$&&(j=-Math.PI/2),this._basicSideRounded({x:c,y:u,size:l,context:g,rotation:j}))}else this._basicDot({x:c,y:u,size:l,context:g,rotation:0})},d.prototype._drawExtraRounded=function(n){var c=n.x,u=n.y,l=n.size,g=n.context,x=n.getNeighbor,q=+x(-1,0),I=+x(1,0),N=+x(0,-1),$=+x(0,1),ee=q+I+N+$;if(ee!==0)if(ee>2||q&&I||N&&$)this._basicSquare({x:c,y:u,size:l,context:g,rotation:0});else{if(ee===2){var j=0;return q&&N?j=Math.PI/2:N&&I?j=Math.PI:I&&$&&(j=-Math.PI/2),void this._basicCornerExtraRounded({x:c,y:u,size:l,context:g,rotation:j})}ee===1&&(j=0,N?j=Math.PI/2:I?j=Math.PI:$&&(j=-Math.PI/2),this._basicSideRounded({x:c,y:u,size:l,context:g,rotation:j}))}else this._basicDot({x:c,y:u,size:l,context:g,rotation:0})},d.prototype._drawClassy=function(n){var c=n.x,u=n.y,l=n.size,g=n.context,x=n.getNeighbor,q=+x(-1,0),I=+x(1,0),N=+x(0,-1),$=+x(0,1);q+I+N+$!==0?q||N?I||$?this._basicSquare({x:c,y:u,size:l,context:g,rotation:0}):this._basicCornerRounded({x:c,y:u,size:l,context:g,rotation:Math.PI/2}):this._basicCornerRounded({x:c,y:u,size:l,context:g,rotation:-Math.PI/2}):this._basicCornersRounded({x:c,y:u,size:l,context:g,rotation:Math.PI/2})},d.prototype._drawClassyRounded=function(n){var c=n.x,u=n.y,l=n.size,g=n.context,x=n.getNeighbor,q=+x(-1,0),I=+x(1,0),N=+x(0,-1),$=+x(0,1);q+I+N+$!==0?q||N?I||$?this._basicSquare({x:c,y:u,size:l,context:g,rotation:0}):this._basicCornerExtraRounded({x:c,y:u,size:l,context:g,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:c,y:u,size:l,context:g,rotation:-Math.PI/2}):this._basicCornersRounded({x:c,y:u,size:l,context:g,rotation:Math.PI/2})},d}();var re=function(){return(re=Object.assign||function(d){for(var n,c=1,u=arguments.length;c0&&U[U.length-1])||J[0]!==6&&J[0]!==2)){te=0;continue}if(J[0]===3&&(!U||J[1]>U[0]&&J[1]U||ne&&ne=(x-N.hideXDots)/2&&O<(x+N.hideXDots)/2&&H>=(x-N.hideYDots)/2&&H<(x+N.hideYDots)/2||!((Q=Z[O])===null||Q===void 0)&&Q[H]||!((U=Z[O-x+7])===null||U===void 0)&&U[H]||!((ne=Z[O])===null||ne===void 0)&&ne[H-x+7]||!((te=oe[O])===null||te===void 0)&&te[H]||!((Y=oe[O-x+7])===null||Y===void 0)&&Y[H]||!((ye=oe[O])===null||ye===void 0)&&ye[H-x+7])}),this.drawCorners(),this._options.image&&this.drawImage({width:N.width,height:N.height,count:x,dotSize:I}),[2]}})},new((l=void 0)||(l=Promise))(function(x,q){function I(ee){try{$(g.next(ee))}catch(j){q(j)}}function N(ee){try{$(g.throw(ee))}catch(j){q(j)}}function $(ee){var j;ee.done?x(ee.value):(j=ee.value,j instanceof l?j:new l(function(p){p(j)})).then(I,N)}$((g=g.apply(c,u||[])).next())});var c,u,l,g},d.prototype.drawBackground=function(){var n=this.context,c=this._options;if(n){if(c.backgroundOptions.gradient){var u=c.backgroundOptions.gradient,l=this._createGradient({context:n,options:u,additionalRotation:0,x:0,y:0,size:this._canvas.width>this._canvas.height?this._canvas.width:this._canvas.height});u.colorStops.forEach(function(g){var x=g.offset,q=g.color;l.addColorStop(x,q)}),n.fillStyle=l}else c.backgroundOptions.color&&(n.fillStyle=c.backgroundOptions.color);n.fillRect(0,0,this._canvas.width,this._canvas.height)}},d.prototype.drawDots=function(n){var c=this;if(!this._qr)throw"QR code is not defined";var u=this.context;if(!u)throw"QR code is not defined";var l=this._options,g=this._qr.getModuleCount();if(g>l.width||g>l.height)throw"The canvas is too small.";var x=Math.min(l.width,l.height)-2*l.margin,q=Math.floor(x/g),I=Math.floor((l.width-g*q)/2),N=Math.floor((l.height-g*q)/2),$=new de({context:u,type:l.dotsOptions.type});u.beginPath();for(var ee=function(y){for(var O=function(Q){return n&&!n(y,Q)?"continue":j._qr.isDark(y,Q)?void $.draw(I+y*q,N+Q*q,q,function(U,ne){return!(y+U<0||Q+ne<0||y+U>=g||Q+ne>=g)&&!(n&&!n(y+U,Q+ne))&&!!c._qr&&c._qr.isDark(y+U,Q+ne)}):"continue"},H=0;H=0&&$<=.25*Math.PI||$>1.75*Math.PI&&$<=2*Math.PI?(ee-=I/2,j-=I/2*Math.tan(N),p+=I/2,D+=I/2*Math.tan(N)):$>.25*Math.PI&&$<=.75*Math.PI?(j-=I/2,ee-=I/2/Math.tan(N),D+=I/2,p+=I/2/Math.tan(N)):$>.75*Math.PI&&$<=1.25*Math.PI?(ee+=I/2,j+=I/2*Math.tan(N),p-=I/2,D-=I/2*Math.tan(N)):$>1.25*Math.PI&&$<=1.75*Math.PI&&(j+=I/2,ee+=I/2/Math.tan(N),D-=I/2,p-=I/2/Math.tan(N)),c=u.createLinearGradient(Math.round(ee),Math.round(j),Math.round(p),Math.round(D))}return c},d}();for(var qe={},He=0;He<=40;He++)qe[He]=He;const Ge={width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:qe[0],mode:void 0,errorCorrectionLevel:"Q"},imageOptions:{hideBackgroundDots:!0,imageSize:.4,crossOrigin:void 0,margin:0},dotsOptions:{type:"square",color:"#000"},backgroundOptions:{color:"#fff"}};var ke=function(){return(ke=Object.assign||function(d){for(var n,c=1,u=arguments.length;cMath.min(n.width,n.height)&&(n.margin=Math.min(n.width,n.height)),n.dotsOptions=ke({},n.dotsOptions),n.dotsOptions.gradient&&(n.dotsOptions.gradient=Ve(n.dotsOptions.gradient)),n.cornersSquareOptions&&(n.cornersSquareOptions=ke({},n.cornersSquareOptions),n.cornersSquareOptions.gradient&&(n.cornersSquareOptions.gradient=Ve(n.cornersSquareOptions.gradient))),n.cornersDotOptions&&(n.cornersDotOptions=ke({},n.cornersDotOptions),n.cornersDotOptions.gradient&&(n.cornersDotOptions.gradient=Ve(n.cornersDotOptions.gradient))),n.backgroundOptions&&(n.backgroundOptions=ke({},n.backgroundOptions),n.backgroundOptions.gradient&&(n.backgroundOptions.gradient=Ve(n.backgroundOptions.gradient))),n}var ut=_(192),lt=_.n(ut);const R=function(){function d(n){this._options=n?Je(ae(Ge,n)):Ge,this.update()}return d._clearContainer=function(n){n&&(n.innerHTML="")},d.prototype.update=function(n){d._clearContainer(this._container),this._options=n?Je(ae(this._options,n)):this._options,this._options.data&&(this._qr=lt()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||function(c){switch(!0){case/^[0-9]*$/.test(c):return"Numeric";case/^[0-9A-Z $%*+\-./:]*$/.test(c):return"Alphanumeric";default:return"Byte"}}(this._options.data)),this._qr.make(),this._canvas=new We(this._options),this._drawingPromise=this._canvas.drawQR(this._qr),this.append(this._container))},d.prototype.append=function(n){if(n){if(typeof n.appendChild!="function")throw"Container should be a single DOM node";this._canvas&&n.appendChild(this._canvas.getCanvas()),this._container=n}},d.prototype.getImageUrl=function(n){return c=this,u=void 0,g=function(){return function(x,q){var I,N,$,ee,j={label:0,sent:function(){if(1&$[0])throw $[1];return $[1]},trys:[],ops:[]};return ee={next:p(0),throw:p(1),return:p(2)},typeof Symbol=="function"&&(ee[Symbol.iterator]=function(){return this}),ee;function p(D){return function(b){return function(y){if(I)throw new TypeError("Generator is already executing.");for(;j;)try{if(I=1,N&&($=2&y[0]?N.return:y[0]?N.throw||(($=N.return)&&$.call(N),0):N.next)&&!($=$.call(N,y[1])).done)return $;switch(N=0,$&&(y=[2&y[0],$.value]),y[0]){case 0:case 1:$=y;break;case 4:return j.label++,{value:y[1],done:!1};case 5:j.label++,N=y[1],y=[0];continue;case 7:y=j.ops.pop(),j.trys.pop();continue;default:if(!(($=($=j.trys).length>0&&$[$.length-1])||y[0]!==6&&y[0]!==2)){j=0;continue}if(y[0]===3&&(!$||y[1]>$[0]&&y[1]<$[3])){j.label=y[1];break}if(y[0]===6&&j.label<$[1]){j.label=$[1],$=y;break}if($&&j.label<$[2]){j.label=$[2],j.ops.push(y);break}$[2]&&j.ops.pop(),j.trys.pop();continue}y=q.call(x,j)}catch(O){y=[6,O],N=0}finally{I=$=0}if(5&y[0])throw y[1];return{value:y[0]?y[1]:void 0,done:!0}}([D,b])}}}(this,function(x){switch(x.label){case 0:return this._drawingPromise?[4,this._drawingPromise]:[2,""];case 1:return x.sent()===void 0&&this._canvas?[2,this._canvas.getCanvas().toDataURL("image/"+n)]:[2,""]}})},new((l=void 0)||(l=Promise))(function(x,q){function I(ee){try{$(g.next(ee))}catch(j){q(j)}}function N(ee){try{$(g.throw(ee))}catch(j){q(j)}}function $(ee){var j;ee.done?x(ee.value):(j=ee.value,j instanceof l?j:new l(function(p){p(j)})).then(I,N)}$((g=g.apply(c,u||[])).next())});var c,u,l,g},d.prototype.download=function(n){var c=this;this._drawingPromise&&this._drawingPromise.then(function(){if(c._canvas){var u=n,l=u.extension||"png",g=u.name||"qr";(function(x,q){var I=document.createElement("a");I.download=q,I.href=x,document.body.appendChild(I),I.click(),document.body.removeChild(I)})(c._canvas.getCanvas().toDataURL("image/"+l),g+"."+l)}})},d}();var k=function(d,n,c,u){return new(c||(c=Promise))(function(l,g){function x(N){try{I(u.next(N))}catch($){g($)}}function q(N){try{I(u.throw(N))}catch($){g($)}}function I(N){var $;N.done?l(N.value):($=N.value,$ instanceof c?$:new c(function(ee){ee($)})).then(x,q)}I((u=u.apply(d,[])).next())})},E=function(d,n){var c,u,l,g,x={label:0,sent:function(){if(1&l[0])throw l[1];return l[1]},trys:[],ops:[]};return g={next:q(0),throw:q(1),return:q(2)},typeof Symbol=="function"&&(g[Symbol.iterator]=function(){return this}),g;function q(I){return function(N){return function($){if(c)throw new TypeError("Generator is already executing.");for(;x;)try{if(c=1,u&&(l=2&$[0]?u.return:$[0]?u.throw||((l=u.return)&&l.call(u),0):u.next)&&!(l=l.call(u,$[1])).done)return l;switch(u=0,l&&($=[2&$[0],l.value]),$[0]){case 0:case 1:l=$;break;case 4:return x.label++,{value:$[1],done:!1};case 5:x.label++,u=$[1],$=[0];continue;case 7:$=x.ops.pop(),x.trys.pop();continue;default:if(!((l=(l=x.trys).length>0&&l[l.length-1])||$[0]!==6&&$[0]!==2)){x=0;continue}if($[0]===3&&(!l||$[1]>l[0]&&$[1]d.onDownloadClick&&d.onDownloadClick(...x))},(0,F.toDisplayString)(d.buttonName),3)])):(0,F.createCommentVNode)("v-if",!0)])};const w=T})(),M.default})()})})(Yr);var Ya=Yr.exports;const Ja=Sa(Ya);var Jr=(r,a,i)=>{if(!a.has(r))throw TypeError("Cannot "+i)},Nr=(r,a,i)=>(Jr(r,a,"read from private field"),i?i.call(r):a.get(r)),Xa=(r,a,i)=>{if(a.has(r))throw TypeError("Cannot add the same private member more than once");a instanceof WeakSet?a.add(r):a.set(r,i)},Ka=(r,a,i,h)=>(Jr(r,a,"write to private field"),a.set(r,i),i);const Xr=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["data_matrix","DataMatrix"],["dx_film_edge","DXFilmEdge"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["maxi_code","MaxiCode"],["micro_qr_code","MicroQRCode"],["pdf417","PDF417"],["qr_code","QRCode"],["rm_qr_code","rMQRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"],["linear_codes","Linear-Codes"],["matrix_codes","Matrix-Codes"]],Za=[...Xr,["unknown"]].map(r=>r[0]),Lt=new Map(Xr);function ei(r){for(const[a,i]of Lt)if(r===i)return a;return"unknown"}function ti(r){if(Kr(r))return{width:r.naturalWidth,height:r.naturalHeight};if(Zr(r))return{width:r.width.baseVal.value,height:r.height.baseVal.value};if(en(r))return{width:r.videoWidth,height:r.videoHeight};if(rn(r))return{width:r.width,height:r.height};if(on(r))return{width:r.displayWidth,height:r.displayHeight};if(tn(r))return{width:r.width,height:r.height};if(nn(r))return{width:r.width,height:r.height};throw new TypeError("The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.")}function Kr(r){try{return r instanceof HTMLImageElement}catch{return!1}}function Zr(r){try{return r instanceof SVGImageElement}catch{return!1}}function en(r){try{return r instanceof HTMLVideoElement}catch{return!1}}function tn(r){try{return r instanceof HTMLCanvasElement}catch{return!1}}function rn(r){try{return r instanceof ImageBitmap}catch{return!1}}function nn(r){try{return r instanceof OffscreenCanvas}catch{return!1}}function on(r){try{return r instanceof VideoFrame}catch{return!1}}function an(r){try{return r instanceof Blob}catch{return!1}}function ri(r){try{return r instanceof ImageData}catch{return!1}}function ni(r,a){try{const i=new OffscreenCanvas(r,a);if(i.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return i;throw void 0}catch{const h=document.createElement("canvas");return h.width=r,h.height=a,h}}async function sn(r){if(Kr(r)&&!await si(r))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(Zr(r)&&!await ci(r))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(on(r)&&ui(r))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(en(r)&&(r.readyState===0||r.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(rn(r)&&di(r))throw new DOMException("The image source is detached.","InvalidStateError");const{width:a,height:i}=ti(r);if(a===0||i===0)return null;const h=ni(a,i).getContext("2d");h.drawImage(r,0,0);try{return h.getImageData(0,0,a,i)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function oi(r){let a;try{if(globalThis.createImageBitmap)a=await createImageBitmap(r);else if(globalThis.Image){a=new Image;let i="";try{i=URL.createObjectURL(r),a.src=i,await a.decode()}finally{URL.revokeObjectURL(i)}}else return r}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await sn(a)}function ai(r){const{width:a,height:i}=r;if(a===0||i===0)return null;const h=r.getContext("2d");try{return h.getImageData(0,0,a,i)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function ii(r){if(an(r))return await oi(r);if(ri(r)){if(li(r))throw new DOMException("The image data has been detached.","InvalidStateError");return r}return tn(r)||nn(r)?ai(r):await sn(r)}async function si(r){try{return await r.decode(),!0}catch{return!1}}async function ci(r){var a;try{return await((a=r.decode)==null?void 0:a.call(r)),!0}catch{return!1}}function ui(r){return r.format===null}function li(r){return r.data.buffer.byteLength===0}function di(r){return r.width===0&&r.height===0}function qr(r,a){return r instanceof DOMException?new DOMException(`${a}: ${r.message}`,r.name):r instanceof Error?new r.constructor(`${a}: ${r.message}`):new Error(`${a}: ${r}`)}const Lr=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","DXFilmEdge","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","rMQRCode","UPC-A","UPC-E"];function fi(r){return r.join("|")}function hi(r){const a=zr(r);let i=0,h=Lr.length-1;for(;i<=h;){const m=Math.floor((i+h)/2),_=Lr[m],M=zr(_);if(M===a)return _;M{const i=r.match(/_(.+?)\.wasm$/);return i?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.1.3/dist/${i[1]}/${r}`:a+r}};let Ur=new WeakMap;function sr(r,a){var i;const h=Ur.get(r);if(h!=null&&h.modulePromise&&a===void 0)return h.modulePromise;const m=(i=h==null?void 0:h.moduleOverrides)!=null?i:bi,_=r({...m});return Ur.set(r,{moduleOverrides:m,modulePromise:_}),_}async function Ci(r,a,i=bt){const h={...bt,...i},m=await sr(r),{size:_}=a,M=new Uint8Array(await a.arrayBuffer()),F=m._malloc(_);m.HEAPU8.set(M,F);const P=m.readBarcodesFromImage(F,_,cn(m,h));m._free(F);const B=[];for(let V=0;V{var r=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(a={}){var i=a,h,m;i.ready=new Promise((e,t)=>{h=e,m=t});var _=Object.assign({},i),M="./this.program",F=typeof window=="object",P=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var B="";function V(e){return i.locateFile?i.locateFile(e,B):B+e}var W;(F||P)&&(P?B=self.location.href:typeof document<"u"&&document.currentScript&&(B=document.currentScript.src),r&&(B=r),B.indexOf("blob:")!==0?B=B.substr(0,B.replace(/[?#].*/,"").lastIndexOf("/")+1):B="",P&&(W=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)})),i.print||console.log.bind(console);var ae=i.printErr||console.error.bind(console);Object.assign(i,_),_=null,i.arguments&&i.arguments,i.thisProgram&&(M=i.thisProgram),i.quit&&i.quit;var fe;i.wasmBinary&&(fe=i.wasmBinary),typeof WebAssembly!="object"&&c("no native wasm support detected");var K,de=!1,re,ge,$e,he,Z,oe,We,qe;function He(){var e=K.buffer;i.HEAP8=re=new Int8Array(e),i.HEAP16=$e=new Int16Array(e),i.HEAPU8=ge=new Uint8Array(e),i.HEAPU16=he=new Uint16Array(e),i.HEAP32=Z=new Int32Array(e),i.HEAPU32=oe=new Uint32Array(e),i.HEAPF32=We=new Float32Array(e),i.HEAPF64=qe=new Float64Array(e)}var Ge=[],ke=[],Ve=[];function Je(){if(i.preRun)for(typeof i.preRun=="function"&&(i.preRun=[i.preRun]);i.preRun.length;)R(i.preRun.shift());ee(Ge)}function ut(){ee(ke)}function lt(){if(i.postRun)for(typeof i.postRun=="function"&&(i.postRun=[i.postRun]);i.postRun.length;)E(i.postRun.shift());ee(Ve)}function R(e){Ge.unshift(e)}function k(e){ke.unshift(e)}function E(e){Ve.unshift(e)}var T=0,w=null;function d(e){var t;T++,(t=i.monitorRunDependencies)===null||t===void 0||t.call(i,T)}function n(e){var t;if(T--,(t=i.monitorRunDependencies)===null||t===void 0||t.call(i,T),T==0&&w){var o=w;w=null,o()}}function c(e){var t;(t=i.onAbort)===null||t===void 0||t.call(i,e),e="Aborted("+e+")",ae(e),de=!0,e+=". Build with -sASSERTIONS for more info.";var o=new WebAssembly.RuntimeError(e);throw m(o),o}var u="data:application/octet-stream;base64,",l=e=>e.startsWith(u),g;g="zxing_reader.wasm",l(g)||(g=V(g));function x(e){if(e==g&&fe)return new Uint8Array(fe);if(W)return W(e);throw"both async and sync fetching of the wasm failed"}function q(e){return!fe&&(F||P)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()}).catch(()=>x(e)):Promise.resolve().then(()=>x(e))}function I(e,t,o){return q(e).then(s=>WebAssembly.instantiate(s,t)).then(s=>s).then(o,s=>{ae(`failed to asynchronously prepare wasm: ${s}`),c(s)})}function N(e,t,o,s){return!e&&typeof WebAssembly.instantiateStreaming=="function"&&!l(t)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(f=>{var v=WebAssembly.instantiateStreaming(f,o);return v.then(s,function(C){return ae(`wasm streaming compile failed: ${C}`),ae("falling back to ArrayBuffer instantiation"),I(t,o,s)})}):I(t,o,s)}function $(){var e={a:Zo};function t(s,f){return De=s.exports,K=De.ia,He(),gr=De.ma,k(De.ja),n(),De}d();function o(s){t(s.instance)}if(i.instantiateWasm)try{return i.instantiateWasm(e,t)}catch(s){ae(`Module.instantiateWasm callback failed with error: ${s}`),m(s)}return N(fe,g,e,o).catch(m),{}}var ee=e=>{for(;e.length>0;)e.shift()(i)};i.noExitRuntime;var j=[],p=0,D=e=>{var t=new O(e);return t.get_caught()||(t.set_caught(!0),p--),t.set_rethrown(!1),j.push(t),$r(t.excPtr),t.get_exception_ptr()},b=0,y=()=>{xe(0,0);var e=j.pop();Dr(e.excPtr),b=0};function O(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(t){oe[this.ptr+4>>2]=t},this.get_type=function(){return oe[this.ptr+4>>2]},this.set_destructor=function(t){oe[this.ptr+8>>2]=t},this.get_destructor=function(){return oe[this.ptr+8>>2]},this.set_caught=function(t){t=t?1:0,re[this.ptr+12>>0]=t},this.get_caught=function(){return re[this.ptr+12>>0]!=0},this.set_rethrown=function(t){t=t?1:0,re[this.ptr+13>>0]=t},this.get_rethrown=function(){return re[this.ptr+13>>0]!=0},this.init=function(t,o){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(o)},this.set_adjusted_ptr=function(t){oe[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return oe[this.ptr+16>>2]},this.get_exception_ptr=function(){var t=Er(this.get_type());if(t)return oe[this.excPtr>>2];var o=this.get_adjusted_ptr();return o!==0?o:this.excPtr}}var H=e=>{throw b||(b=e),b},Q=e=>{var t=b;if(!t)return Mt(0),0;var o=new O(t);o.set_adjusted_ptr(t);var s=o.get_type();if(!s)return Mt(0),t;for(var f in e){var v=e[f];if(v===0||v===s)break;var C=o.ptr+16;if(kr(v,s,C))return Mt(v),t}return Mt(s),t},U=()=>Q([]),ne=e=>Q([e]),te=(e,t)=>Q([e,t]),Y=()=>{var e=j.pop();e||c("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(j.push(e),e.set_rethrown(!0),e.set_caught(!1),p++),b=t,b},ye=(e,t,o)=>{var s=new O(e);throw s.init(t,o),b=e,p++,b},we=()=>p,J={},ve=e=>{for(;e.length;){var t=e.pop(),o=e.pop();o(t)}};function ce(e){return this.fromWireType(Z[e>>2])}var je={},Le={},ue={},Ee,Re=e=>{throw new Ee(e)},Be=(e,t,o)=>{e.forEach(function(S){ue[S]=t});function s(S){var A=o(S);A.length!==e.length&&Re("Mismatched type converter count");for(var z=0;z{Le.hasOwnProperty(S)?f[A]=Le[S]:(v.push(S),je.hasOwnProperty(S)||(je[S]=[]),je[S].push(()=>{f[A]=Le[S],++C,C===v.length&&s(f)}))}),v.length===0&&s(f)},at=e=>{var t=J[e];delete J[e];var o=t.rawConstructor,s=t.rawDestructor,f=t.fields,v=f.map(C=>C.getterReturnType).concat(f.map(C=>C.setterArgumentType));Be([e],v,C=>{var S={};return f.forEach((A,z)=>{var G=A.fieldName,ie=C[z],se=A.getter,le=A.getterContext,_e=C[z+f.length],Te=A.setter,Ce=A.setterContext;S[G]={read:Ne=>ie.fromWireType(se(le,Ne)),write:(Ne,L)=>{var X=[];Te(Ce,Ne,_e.toWireType(X,L)),ve(X)}}}),[{name:t.name,fromWireType:A=>{var z={};for(var G in S)z[G]=S[G].read(A);return s(A),z},toWireType:(A,z)=>{for(var G in S)if(!(G in z))throw new TypeError(`Missing field: "${G}"`);var ie=o();for(G in S)S[G].write(ie,z[G]);return A!==null&&A.push(s,ie),ie},argPackAdvance:Ze,readValueFromPointer:ce,destructorFunction:s}]})},Xe=(e,t,o,s,f)=>{},be=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Ke=e},Ke,me=e=>{for(var t="",o=e;ge[o];)t+=Ke[ge[o++]];return t},ze,pe=e=>{throw new ze(e)};function Ct(e,t){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var s=t.name;if(e||pe(`type "${s}" must have a positive integer typeid pointer`),Le.hasOwnProperty(e)){if(o.ignoreDuplicateRegistrations)return;pe(`Cannot register type '${s}' twice`)}if(Le[e]=t,delete ue[e],je.hasOwnProperty(e)){var f=je[e];delete je[e],f.forEach(v=>v())}}function Fe(e,t){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Ct(e,t,o)}var Ze=8,Pn=(e,t,o,s)=>{t=me(t),Fe(e,{name:t,fromWireType:function(f){return!!f},toWireType:function(f,v){return v?o:s},argPackAdvance:Ze,readValueFromPointer:function(f){return this.fromWireType(ge[f])},destructorFunction:null})},On=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),Wt=e=>{function t(o){return o.$$.ptrType.registeredClass.name}pe(t(e)+" instance already deleted")},Ht=!1,ur=e=>{},Tn=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},lr=e=>{e.count.value-=1;var t=e.count.value===0;t&&Tn(e)},dr=(e,t,o)=>{if(t===o)return e;if(o.baseClass===void 0)return null;var s=dr(e,t,o.baseClass);return s===null?null:o.downcast(s)},fr={},Mn=()=>Object.keys(St).length,Dn=()=>{var e=[];for(var t in St)St.hasOwnProperty(t)&&e.push(St[t]);return e},xt=[],Vt=()=>{for(;xt.length;){var e=xt.pop();e.$$.deleteScheduled=!1,e.delete()}},_t,$n=e=>{_t=e,xt.length&&_t&&_t(Vt)},kn=()=>{i.getInheritedInstanceCount=Mn,i.getLiveInheritedInstances=Dn,i.flushPendingDeletes=Vt,i.setDelayFunction=$n},St={},En=(e,t)=>{for(t===void 0&&pe("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},Rn=(e,t)=>(t=En(e,t),St[t]),kt=(e,t)=>{(!t.ptrType||!t.ptr)&&Re("makeClassHandle requires ptr and ptrType");var o=!!t.smartPtrType,s=!!t.smartPtr;return o!==s&&Re("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Pt(Object.create(e,{$$:{value:t,writable:!0}}))};function An(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var o=Rn(this.registeredClass,t);if(o!==void 0){if(o.$$.count.value===0)return o.$$.ptr=t,o.$$.smartPtr=e,o.clone();var s=o.clone();return this.destructor(e),s}function f(){return this.isSmartPointer?kt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):kt(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var v=this.registeredClass.getActualType(t),C=fr[v];if(!C)return f.call(this);var S;this.isConst?S=C.constPointerType:S=C.pointerType;var A=dr(t,this.registeredClass,S.registeredClass);return A===null?f.call(this):this.isSmartPointer?kt(S.registeredClass.instancePrototype,{ptrType:S,ptr:A,smartPtrType:this,smartPtr:e}):kt(S.registeredClass.instancePrototype,{ptrType:S,ptr:A})}var Pt=e=>typeof FinalizationRegistry>"u"?(Pt=t=>t,e):(Ht=new FinalizationRegistry(t=>{lr(t.$$)}),Pt=t=>{var o=t.$$,s=!!o.smartPtr;if(s){var f={$$:o};Ht.register(t,f,t)}return t},ur=t=>Ht.unregister(t),Pt(e)),In=()=>{Object.assign(Et.prototype,{isAliasOf(e){if(!(this instanceof Et)||!(e instanceof Et))return!1;var t=this.$$.ptrType.registeredClass,o=this.$$.ptr;e.$$=e.$$;for(var s=e.$$.ptrType.registeredClass,f=e.$$.ptr;t.baseClass;)o=t.upcast(o),t=t.baseClass;for(;s.baseClass;)f=s.upcast(f),s=s.baseClass;return t===s&&o===f},clone(){if(this.$$.ptr||Wt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=Pt(Object.create(Object.getPrototypeOf(this),{$$:{value:On(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||Wt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&pe("Object already scheduled for deletion"),ur(this),lr(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Wt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&pe("Object already scheduled for deletion"),xt.push(this),xt.length===1&&_t&&_t(Vt),this.$$.deleteScheduled=!0,this}})};function Et(){}var Ot=(e,t)=>Object.defineProperty(t,"name",{value:e}),hr=(e,t,o)=>{if(e[t].overloadTable===void 0){var s=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||pe(`Function '${o}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[s.argCount]=s}},Qt=(e,t,o)=>{i.hasOwnProperty(e)?((o===void 0||i[e].overloadTable!==void 0&&i[e].overloadTable[o]!==void 0)&&pe(`Cannot register public name '${e}' twice`),hr(i,e,e),i.hasOwnProperty(o)&&pe(`Cannot register multiple overloads of a function with the same number of arguments (${o})!`),i[e].overloadTable[o]=t):(i[e]=t,o!==void 0&&(i[e].numArguments=o))},jn=48,Bn=57,Fn=e=>{if(e===void 0)return"_unknown";e=e.replace(/[^a-zA-Z0-9_]/g,"$");var t=e.charCodeAt(0);return t>=jn&&t<=Bn?`_${e}`:e};function Nn(e,t,o,s,f,v,C,S){this.name=e,this.constructor=t,this.instancePrototype=o,this.rawDestructor=s,this.baseClass=f,this.getActualType=v,this.upcast=C,this.downcast=S,this.pureVirtualFunctions=[]}var Gt=(e,t,o)=>{for(;t!==o;)t.upcast||pe(`Expected null or instance of ${o.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function qn(e,t){if(t===null)return this.isReference&&pe(`null is not a valid ${this.name}`),0;t.$$||pe(`Cannot pass "${Zt(t)}" as a ${this.name}`),t.$$.ptr||pe(`Cannot pass deleted object as a pointer of type ${this.name}`);var o=t.$$.ptrType.registeredClass,s=Gt(t.$$.ptr,o,this.registeredClass);return s}function Ln(e,t){var o;if(t===null)return this.isReference&&pe(`null is not a valid ${this.name}`),this.isSmartPointer?(o=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,o),o):0;(!t||!t.$$)&&pe(`Cannot pass "${Zt(t)}" as a ${this.name}`),t.$$.ptr||pe(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&pe(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var s=t.$$.ptrType.registeredClass;if(o=Gt(t.$$.ptr,s,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&pe("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?o=t.$$.smartPtr:pe(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:o=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)o=t.$$.smartPtr;else{var f=t.clone();o=this.rawShare(o,nt.toHandle(()=>f.delete())),e!==null&&e.push(this.rawDestructor,o)}break;default:pe("Unsupporting sharing policy")}return o}function zn(e,t){if(t===null)return this.isReference&&pe(`null is not a valid ${this.name}`),0;t.$$||pe(`Cannot pass "${Zt(t)}" as a ${this.name}`),t.$$.ptr||pe(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&pe(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var o=t.$$.ptrType.registeredClass,s=Gt(t.$$.ptr,o,this.registeredClass);return s}function pr(e){return this.fromWireType(oe[e>>2])}var Un=()=>{Object.assign(Rt.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){var t;(t=this.rawDestructor)===null||t===void 0||t.call(this,e)},argPackAdvance:Ze,readValueFromPointer:pr,deleteObject(e){e!==null&&e.delete()},fromWireType:An})};function Rt(e,t,o,s,f,v,C,S,A,z,G){this.name=e,this.registeredClass=t,this.isReference=o,this.isConst=s,this.isSmartPointer=f,this.pointeeType=v,this.sharingPolicy=C,this.rawGetPointee=S,this.rawConstructor=A,this.rawShare=z,this.rawDestructor=G,!f&&t.baseClass===void 0?s?(this.toWireType=qn,this.destructorFunction=null):(this.toWireType=zn,this.destructorFunction=null):this.toWireType=Ln}var vr=(e,t,o)=>{i.hasOwnProperty(e)||Re("Replacing nonexistant public symbol"),i[e].overloadTable!==void 0&&o!==void 0?i[e].overloadTable[o]=t:(i[e]=t,i[e].argCount=o)},Wn=(e,t,o)=>{var s=i["dynCall_"+e];return o&&o.length?s.apply(null,[t].concat(o)):s.call(null,t)},At=[],gr,Se=e=>{var t=At[e];return t||(e>=At.length&&(At.length=e+1),At[e]=t=gr.get(e)),t},Hn=(e,t,o)=>{if(e.includes("j"))return Wn(e,t,o);var s=Se(t).apply(null,o);return s},Vn=(e,t)=>{var o=[];return function(){return o.length=0,Object.assign(o,arguments),Hn(e,t,o)}},Ye=(e,t)=>{e=me(e);function o(){return e.includes("j")?Vn(e,t):Se(t)}var s=o();return typeof s!="function"&&pe(`unknown function pointer with signature ${e}: ${t}`),s},Qn=(e,t)=>{var o=Ot(t,function(s){this.name=t,this.message=s;var f=new Error(s).stack;f!==void 0&&(this.stack=this.toString()+` -`+f.replace(/^Error(:[^\n]*)?\n/,""))});return o.prototype=Object.create(e.prototype),o.prototype.constructor=o,o.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},o},yr,mr=e=>{var t=Mr(e),o=me(t);return ot(t),o},It=(e,t)=>{var o=[],s={};function f(v){if(!s[v]&&!Le[v]){if(ue[v]){ue[v].forEach(f);return}o.push(v),s[v]=!0}}throw t.forEach(f),new yr(`${e}: `+o.map(mr).join([", "]))},Gn=(e,t,o,s,f,v,C,S,A,z,G,ie,se)=>{G=me(G),v=Ye(f,v),S&&(S=Ye(C,S)),z&&(z=Ye(A,z)),se=Ye(ie,se);var le=Fn(G);Qt(le,function(){It(`Cannot construct ${G} due to unbound types`,[s])}),Be([e,t,o],s?[s]:[],function(_e){_e=_e[0];var Te,Ce;s?(Te=_e.registeredClass,Ce=Te.instancePrototype):Ce=Et.prototype;var Ne=Ot(G,function(){if(Object.getPrototypeOf(this)!==L)throw new ze("Use 'new' to construct "+G);if(X.constructor_body===void 0)throw new ze(G+" has no accessible constructor");var jr=X.constructor_body[arguments.length];if(jr===void 0)throw new ze(`Tried to invoke ctor of ${G} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(X.constructor_body).toString()}) parameters instead!`);return jr.apply(this,arguments)}),L=Object.create(Ce,{constructor:{value:Ne}});Ne.prototype=L;var X=new Nn(G,Ne,L,se,Te,v,S,z);if(X.baseClass){var Me,Ae;(Ae=(Me=X.baseClass).__derivedClasses)!==null&&Ae!==void 0||(Me.__derivedClasses=[]),X.baseClass.__derivedClasses.push(X)}var ft=new Rt(G,X,!0,!1,!1),Ft=new Rt(G+"*",X,!1,!1,!1),Ir=new Rt(G+" const*",X,!1,!0,!1);return fr[e]={pointerType:Ft,constPointerType:Ir},vr(le,Ne),[ft,Ft,Ir]})},Yt=(e,t)=>{for(var o=[],s=0;s>2]);return o};function Yn(e){for(var t=1;t{var C=Yt(t,o);f=Ye(s,f),Be([],[e],function(S){S=S[0];var A=`constructor ${S.name}`;if(S.registeredClass.constructor_body===void 0&&(S.registeredClass.constructor_body=[]),S.registeredClass.constructor_body[t-1]!==void 0)throw new ze(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${S.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return S.registeredClass.constructor_body[t-1]=()=>{It(`Cannot construct ${S.name} due to unbound types`,C)},Be([],C,z=>(z.splice(1,0,null),S.registeredClass.constructor_body[t-1]=Jt(A,z,null,f,v),[])),[]})},wr=e=>{e=e.trim();const t=e.indexOf("(");return t!==-1?e.substr(0,t):e},Xn=(e,t,o,s,f,v,C,S,A)=>{var z=Yt(o,s);t=me(t),t=wr(t),v=Ye(f,v),Be([],[e],function(G){G=G[0];var ie=`${G.name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),S&&G.registeredClass.pureVirtualFunctions.push(t);function se(){It(`Cannot call ${ie} due to unbound types`,z)}var le=G.registeredClass.instancePrototype,_e=le[t];return _e===void 0||_e.overloadTable===void 0&&_e.className!==G.name&&_e.argCount===o-2?(se.argCount=o-2,se.className=G.name,le[t]=se):(hr(le,t,ie),le[t].overloadTable[o-2]=se),Be([],z,function(Te){var Ce=Jt(ie,Te,G,v,C);return le[t].overloadTable===void 0?(Ce.argCount=o-2,le[t]=Ce):le[t].overloadTable[o-2]=Ce,[]}),[]})};function Kn(){Object.assign(br.prototype,{get(e){return this.allocated[e]},has(e){return this.allocated[e]!==void 0},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function br(){this.allocated=[void 0],this.freelist=[]}var Qe=new br,Xt=e=>{e>=Qe.reserved&&--Qe.get(e).refcount===0&&Qe.free(e)},Zn=()=>{for(var e=0,t=Qe.reserved;t{Qe.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),Qe.reserved=Qe.allocated.length,i.count_emval_handles=Zn},nt={toValue:e=>(e||pe("Cannot use deleted val. handle = "+e),Qe.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Qe.allocate({refcount:1,value:e})}}},to=(e,t)=>{t=me(t),Fe(e,{name:t,fromWireType:o=>{var s=nt.toValue(o);return Xt(o),s},toWireType:(o,s)=>nt.toHandle(s),argPackAdvance:Ze,readValueFromPointer:ce,destructorFunction:null})},ro=(e,t,o)=>{switch(t){case 1:return o?function(s){return this.fromWireType(re[s>>0])}:function(s){return this.fromWireType(ge[s>>0])};case 2:return o?function(s){return this.fromWireType($e[s>>1])}:function(s){return this.fromWireType(he[s>>1])};case 4:return o?function(s){return this.fromWireType(Z[s>>2])}:function(s){return this.fromWireType(oe[s>>2])};default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},no=(e,t,o,s)=>{t=me(t);function f(){}f.values={},Fe(e,{name:t,constructor:f,fromWireType:function(v){return this.constructor.values[v]},toWireType:(v,C)=>C.value,argPackAdvance:Ze,readValueFromPointer:ro(t,o,s),destructorFunction:null}),Qt(t,f)},Kt=(e,t)=>{var o=Le[e];return o===void 0&&pe(t+" has unknown type "+mr(e)),o},oo=(e,t,o)=>{var s=Kt(e,"enum");t=me(t);var f=s.constructor,v=Object.create(s.constructor.prototype,{value:{value:o},constructor:{value:Ot(`${s.name}_${t}`,function(){})}});f.values[o]=v,f[t]=v},Zt=e=>{if(e===null)return"null";var t=typeof e;return t==="object"||t==="array"||t==="function"?e.toString():""+e},ao=(e,t)=>{switch(t){case 4:return function(o){return this.fromWireType(We[o>>2])};case 8:return function(o){return this.fromWireType(qe[o>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},io=(e,t,o)=>{t=me(t),Fe(e,{name:t,fromWireType:s=>s,toWireType:(s,f)=>f,argPackAdvance:Ze,readValueFromPointer:ao(t,o),destructorFunction:null})},so=(e,t,o,s,f,v,C)=>{var S=Yt(t,o);e=me(e),e=wr(e),f=Ye(s,f),Qt(e,function(){It(`Cannot call ${e} due to unbound types`,S)},t-1),Be([],S,function(A){var z=[A[0],null].concat(A.slice(1));return vr(e,Jt(e,z,null,f,v),t-1),[]})},co=(e,t,o)=>{switch(t){case 1:return o?s=>re[s>>0]:s=>ge[s>>0];case 2:return o?s=>$e[s>>1]:s=>he[s>>1];case 4:return o?s=>Z[s>>2]:s=>oe[s>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},uo=(e,t,o,s,f)=>{t=me(t);var v=G=>G;if(s===0){var C=32-8*o;v=G=>G<>>C}var S=t.includes("unsigned"),A=(G,ie)=>{},z;S?z=function(G,ie){return A(ie,this.name),ie>>>0}:z=function(G,ie){return A(ie,this.name),ie},Fe(e,{name:t,fromWireType:v,toWireType:z,argPackAdvance:Ze,readValueFromPointer:co(t,o,s!==0),destructorFunction:null})},lo=(e,t,o)=>{var s=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],f=s[t];function v(C){var S=oe[C>>2],A=oe[C+4>>2];return new f(re.buffer,A,S)}o=me(o),Fe(e,{name:o,fromWireType:v,argPackAdvance:Ze,readValueFromPointer:v},{ignoreDuplicateRegistrations:!0})},Cr=(e,t,o,s)=>{if(!(s>0))return 0;for(var f=o,v=o+s-1,C=0;C=55296&&S<=57343){var A=e.charCodeAt(++C);S=65536+((S&1023)<<10)|A&1023}if(S<=127){if(o>=v)break;t[o++]=S}else if(S<=2047){if(o+1>=v)break;t[o++]=192|S>>6,t[o++]=128|S&63}else if(S<=65535){if(o+2>=v)break;t[o++]=224|S>>12,t[o++]=128|S>>6&63,t[o++]=128|S&63}else{if(o+3>=v)break;t[o++]=240|S>>18,t[o++]=128|S>>12&63,t[o++]=128|S>>6&63,t[o++]=128|S&63}}return t[o]=0,o-f},fo=(e,t,o)=>Cr(e,ge,t,o),xr=e=>{for(var t=0,o=0;o=55296&&s<=57343?(t+=4,++o):t+=3}return t},_r=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,ho=(e,t,o)=>{for(var s=t+o,f=t;e[f]&&!(f>=s);)++f;if(f-t>16&&e.buffer&&_r)return _r.decode(e.subarray(t,f));for(var v="";t>10,56320|z&1023)}}return v},er=(e,t)=>e?ho(ge,e,t):"",po=(e,t)=>{t=me(t);var o=t==="std::string";Fe(e,{name:t,fromWireType(s){var f=oe[s>>2],v=s+4,C;if(o)for(var S=v,A=0;A<=f;++A){var z=v+A;if(A==f||ge[z]==0){var G=z-S,ie=er(S,G);C===void 0?C=ie:(C+="\0",C+=ie),S=z+1}}else{for(var se=new Array(f),A=0;A>2]=v,o&&C)fo(f,A,v+1);else if(C)for(var z=0;z255&&(ot(A),pe("String has UTF-16 code units that do not fit in 8 bits")),ge[A+z]=G}else for(var z=0;z{for(var o=e,s=o>>1,f=s+t/2;!(s>=f)&&he[s];)++s;if(o=s<<1,o-e>32&&Sr)return Sr.decode(ge.subarray(e,o));for(var v="",C=0;!(C>=t/2);++C){var S=$e[e+C*2>>1];if(S==0)break;v+=String.fromCharCode(S)}return v},go=(e,t,o)=>{var s;if((s=o)!==null&&s!==void 0||(o=2147483647),o<2)return 0;o-=2;for(var f=t,v=o>1]=S,t+=2}return $e[t>>1]=0,t-f},yo=e=>e.length*2,mo=(e,t)=>{for(var o=0,s="";!(o>=t/4);){var f=Z[e+o*4>>2];if(f==0)break;if(++o,f>=65536){var v=f-65536;s+=String.fromCharCode(55296|v>>10,56320|v&1023)}else s+=String.fromCharCode(f)}return s},wo=(e,t,o)=>{var s;if((s=o)!==null&&s!==void 0||(o=2147483647),o<4)return 0;for(var f=t,v=f+o-4,C=0;C=55296&&S<=57343){var A=e.charCodeAt(++C);S=65536+((S&1023)<<10)|A&1023}if(Z[t>>2]=S,t+=4,t+4>v)break}return Z[t>>2]=0,t-f},bo=e=>{for(var t=0,o=0;o=55296&&s<=57343&&++o,t+=4}return t},Co=(e,t,o)=>{o=me(o);var s,f,v,C,S;t===2?(s=vo,f=go,C=yo,v=()=>he,S=1):t===4&&(s=mo,f=wo,C=bo,v=()=>oe,S=2),Fe(e,{name:o,fromWireType:A=>{for(var z=oe[A>>2],G=v(),ie,se=A+4,le=0;le<=z;++le){var _e=A+4+le*t;if(le==z||G[_e>>S]==0){var Te=_e-se,Ce=s(se,Te);ie===void 0?ie=Ce:(ie+="\0",ie+=Ce),se=_e+t}}return ot(A),ie},toWireType:(A,z)=>{typeof z!="string"&&pe(`Cannot pass non-string to C++ string type ${o}`);var G=C(z),ie=nr(4+G+t);return oe[ie>>2]=G>>S,f(z,ie+4,G+t),A!==null&&A.push(ot,ie),ie},argPackAdvance:Ze,readValueFromPointer:ce,destructorFunction(A){ot(A)}})},xo=(e,t,o,s,f,v)=>{J[e]={name:me(t),rawConstructor:Ye(o,s),rawDestructor:Ye(f,v),fields:[]}},_o=(e,t,o,s,f,v,C,S,A,z)=>{J[e].fields.push({fieldName:me(t),getterReturnType:o,getter:Ye(s,f),getterContext:v,setterArgumentType:C,setter:Ye(S,A),setterContext:z})},So=(e,t)=>{t=me(t),Fe(e,{isVoid:!0,name:t,argPackAdvance:0,fromWireType:()=>{},toWireType:(o,s)=>{}})},tr=[],Po=(e,t,o,s)=>(e=tr[e],t=nt.toValue(t),e(null,t,o,s)),Oo={},To=e=>{var t=Oo[e];return t===void 0?me(e):t},Pr=()=>{if(typeof globalThis=="object")return globalThis;function e(t){t.$$$embind_global$$$=t;var o=typeof $$$embind_global$$$=="object"&&t.$$$embind_global$$$==t;return o||delete t.$$$embind_global$$$,o}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&e(global)?$$$embind_global$$$=global:typeof self=="object"&&e(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},Mo=e=>e===0?nt.toHandle(Pr()):(e=To(e),nt.toHandle(Pr()[e])),Do=e=>{var t=tr.length;return tr.push(e),t},$o=(e,t)=>{for(var o=new Array(e),s=0;s>2],"parameter "+s);return o},ko=Reflect.construct,Eo=(e,t,o)=>{var s=[],f=e.toWireType(s,o);return s.length&&(oe[t>>2]=nt.toHandle(s)),f},Ro=(e,t,o)=>{var s=$o(e,t),f=s.shift();e--;var v=new Array(e),C=(A,z,G,ie)=>{for(var se=0,le=0;leA.name).join(", ")}) => ${f.name}>`;return Do(Ot(S,C))},Ao=e=>{e>4&&(Qe.get(e).refcount+=1)},Io=e=>{var t=nt.toValue(e);ve(t),Xt(e)},jo=(e,t)=>{e=Kt(e,"_emval_take_value");var o=e.readValueFromPointer(t);return nt.toHandle(o)},Bo=()=>{c("")},Fo=(e,t,o)=>ge.copyWithin(e,t,t+o),No=()=>2147483648,qo=e=>{var t=K.buffer,o=(e-t.byteLength+65535)/65536;try{return K.grow(o),He(),1}catch{}},Lo=e=>{var t=ge.length;e>>>=0;var o=No();if(e>o)return!1;for(var s=(A,z)=>A+(z-A%z)%z,f=1;f<=4;f*=2){var v=t*(1+.2/f);v=Math.min(v,e+100663296);var C=Math.min(o,s(Math.max(e,v),65536)),S=qo(C);if(S)return!0}return!1},rr={},zo=()=>M||"./this.program",Tt=()=>{if(!Tt.strings){var e=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:e,_:zo()};for(var o in rr)rr[o]===void 0?delete t[o]:t[o]=rr[o];var s=[];for(var o in t)s.push(`${o}=${t[o]}`);Tt.strings=s}return Tt.strings},Uo=(e,t)=>{for(var o=0;o>0]=e.charCodeAt(o);re[t>>0]=0},Wo=(e,t)=>{var o=0;return Tt().forEach((s,f)=>{var v=t+o;oe[e+f*4>>2]=v,Uo(s,v),o+=s.length+1}),0},Ho=(e,t)=>{var o=Tt();oe[e>>2]=o.length;var s=0;return o.forEach(f=>s+=f.length+1),oe[t>>2]=s,0},Vo=e=>e,jt=e=>e%4===0&&(e%100!==0||e%400===0),Qo=(e,t)=>{for(var o=0,s=0;s<=t;o+=e[s++]);return o},Or=[31,29,31,30,31,30,31,31,30,31,30,31],Tr=[31,28,31,30,31,30,31,31,30,31,30,31],Go=(e,t)=>{for(var o=new Date(e.getTime());t>0;){var s=jt(o.getFullYear()),f=o.getMonth(),v=(s?Or:Tr)[f];if(t>v-o.getDate())t-=v-o.getDate()+1,o.setDate(1),f<11?o.setMonth(f+1):(o.setMonth(0),o.setFullYear(o.getFullYear()+1));else return o.setDate(o.getDate()+t),o}return o};function Yo(e,t,o){var s=xr(e)+1,f=new Array(s);return Cr(e,f,0,f.length),f}var Jo=(e,t)=>{re.set(e,t)},Xo=(e,t,o,s)=>{var f=oe[s+40>>2],v={tm_sec:Z[s>>2],tm_min:Z[s+4>>2],tm_hour:Z[s+8>>2],tm_mday:Z[s+12>>2],tm_mon:Z[s+16>>2],tm_year:Z[s+20>>2],tm_wday:Z[s+24>>2],tm_yday:Z[s+28>>2],tm_isdst:Z[s+32>>2],tm_gmtoff:Z[s+36>>2],tm_zone:f?er(f):""},C=er(o),S={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var A in S)C=C.replace(new RegExp(A,"g"),S[A]);var z=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],G=["January","February","March","April","May","June","July","August","September","October","November","December"];function ie(L,X,Me){for(var Ae=typeof L=="number"?L.toString():L||"";Ae.length0?1:0}var Ae;return(Ae=Me(L.getFullYear()-X.getFullYear()))===0&&(Ae=Me(L.getMonth()-X.getMonth()))===0&&(Ae=Me(L.getDate()-X.getDate())),Ae}function _e(L){switch(L.getDay()){case 0:return new Date(L.getFullYear()-1,11,29);case 1:return L;case 2:return new Date(L.getFullYear(),0,3);case 3:return new Date(L.getFullYear(),0,2);case 4:return new Date(L.getFullYear(),0,1);case 5:return new Date(L.getFullYear()-1,11,31);case 6:return new Date(L.getFullYear()-1,11,30)}}function Te(L){var X=Go(new Date(L.tm_year+1900,0,1),L.tm_yday),Me=new Date(X.getFullYear(),0,4),Ae=new Date(X.getFullYear()+1,0,4),ft=_e(Me),Ft=_e(Ae);return le(ft,X)<=0?le(Ft,X)<=0?X.getFullYear()+1:X.getFullYear():X.getFullYear()-1}var Ce={"%a":L=>z[L.tm_wday].substring(0,3),"%A":L=>z[L.tm_wday],"%b":L=>G[L.tm_mon].substring(0,3),"%B":L=>G[L.tm_mon],"%C":L=>{var X=L.tm_year+1900;return se(X/100|0,2)},"%d":L=>se(L.tm_mday,2),"%e":L=>ie(L.tm_mday,2," "),"%g":L=>Te(L).toString().substring(2),"%G":L=>Te(L),"%H":L=>se(L.tm_hour,2),"%I":L=>{var X=L.tm_hour;return X==0?X=12:X>12&&(X-=12),se(X,2)},"%j":L=>se(L.tm_mday+Qo(jt(L.tm_year+1900)?Or:Tr,L.tm_mon-1),3),"%m":L=>se(L.tm_mon+1,2),"%M":L=>se(L.tm_min,2),"%n":()=>` -`,"%p":L=>L.tm_hour>=0&&L.tm_hour<12?"AM":"PM","%S":L=>se(L.tm_sec,2),"%t":()=>" ","%u":L=>L.tm_wday||7,"%U":L=>{var X=L.tm_yday+7-L.tm_wday;return se(Math.floor(X/7),2)},"%V":L=>{var X=Math.floor((L.tm_yday+7-(L.tm_wday+6)%7)/7);if((L.tm_wday+371-L.tm_yday-2)%7<=2&&X++,X){if(X==53){var Me=(L.tm_wday+371-L.tm_yday)%7;Me!=4&&(Me!=3||!jt(L.tm_year))&&(X=1)}}else{X=52;var Ae=(L.tm_wday+7-L.tm_yday-1)%7;(Ae==4||Ae==5&&jt(L.tm_year%400-1))&&X++}return se(X,2)},"%w":L=>L.tm_wday,"%W":L=>{var X=L.tm_yday+7-(L.tm_wday+6)%7;return se(Math.floor(X/7),2)},"%y":L=>(L.tm_year+1900).toString().substring(2),"%Y":L=>L.tm_year+1900,"%z":L=>{var X=L.tm_gmtoff,Me=X>=0;return X=Math.abs(X)/60,X=X/60*100+X%60,(Me?"+":"-")+("0000"+X).slice(-4)},"%Z":L=>L.tm_zone,"%%":()=>"%"};C=C.replace(/%%/g,"\0\0");for(var A in Ce)C.includes(A)&&(C=C.replace(new RegExp(A,"g"),Ce[A](v)));C=C.replace(/\0\0/g,"%");var Ne=Yo(C);return Ne.length>t?0:(Jo(Ne,e),Ne.length-1)},Ko=(e,t,o,s,f)=>Xo(e,t,o,s);Ee=i.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},be(),ze=i.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},In(),kn(),Un(),yr=i.UnboundTypeError=Qn(Error,"UnboundTypeError"),Kn(),eo();var Zo={s:D,u:y,b:U,g:ne,q:te,J:Y,f:ye,V:we,d:H,da:at,Q:Xe,_:Pn,ca:Gn,ba:Jn,w:Xn,Y:to,x:no,h:oo,L:io,M:so,t:uo,o:lo,K:po,C:Co,A:xo,ea:_o,$:So,R:Po,ha:Xt,fa:Mo,Z:Ro,N:Ao,O:Io,aa:jo,B:Bo,X:Fo,W:Lo,T:Wo,U:Ho,E:va,D:oa,F:pa,n:ga,a:ea,e:ia,m:na,k:ca,H:fa,v:la,G:ha,z:ma,P:ba,l:sa,j:aa,c:ra,p:ta,I:da,r:ya,i:ua,y:wa,ga:Vo,S:Ko},De=$(),ot=i._free=e=>(ot=i._free=De.ka)(e),nr=i._malloc=e=>(nr=i._malloc=De.la)(e),Mr=e=>(Mr=De.na)(e),xe=(e,t)=>(xe=De.oa)(e,t),Mt=e=>(Mt=De.pa)(e),Pe=()=>(Pe=De.qa)(),Oe=e=>(Oe=De.ra)(e),Dr=e=>(Dr=De.sa)(e),$r=e=>($r=De.ta)(e),kr=(e,t,o)=>(kr=De.ua)(e,t,o),Er=e=>(Er=De.va)(e);i.dynCall_viijii=(e,t,o,s,f,v,C)=>(i.dynCall_viijii=De.wa)(e,t,o,s,f,v,C);var Rr=i.dynCall_jiiii=(e,t,o,s,f)=>(Rr=i.dynCall_jiiii=De.xa)(e,t,o,s,f);i.dynCall_iiiiij=(e,t,o,s,f,v,C)=>(i.dynCall_iiiiij=De.ya)(e,t,o,s,f,v,C),i.dynCall_iiiiijj=(e,t,o,s,f,v,C,S,A)=>(i.dynCall_iiiiijj=De.za)(e,t,o,s,f,v,C,S,A),i.dynCall_iiiiiijj=(e,t,o,s,f,v,C,S,A,z)=>(i.dynCall_iiiiiijj=De.Aa)(e,t,o,s,f,v,C,S,A,z);function ea(e,t){var o=Pe();try{return Se(e)(t)}catch(s){if(Oe(o),s!==s+0)throw s;xe(1,0)}}function ta(e,t,o,s){var f=Pe();try{Se(e)(t,o,s)}catch(v){if(Oe(f),v!==v+0)throw v;xe(1,0)}}function ra(e,t,o){var s=Pe();try{Se(e)(t,o)}catch(f){if(Oe(s),f!==f+0)throw f;xe(1,0)}}function na(e,t,o,s){var f=Pe();try{return Se(e)(t,o,s)}catch(v){if(Oe(f),v!==v+0)throw v;xe(1,0)}}function oa(e,t,o,s,f){var v=Pe();try{return Se(e)(t,o,s,f)}catch(C){if(Oe(v),C!==C+0)throw C;xe(1,0)}}function aa(e,t){var o=Pe();try{Se(e)(t)}catch(s){if(Oe(o),s!==s+0)throw s;xe(1,0)}}function ia(e,t,o){var s=Pe();try{return Se(e)(t,o)}catch(f){if(Oe(s),f!==f+0)throw f;xe(1,0)}}function sa(e){var t=Pe();try{Se(e)()}catch(o){if(Oe(t),o!==o+0)throw o;xe(1,0)}}function ca(e,t,o,s,f){var v=Pe();try{return Se(e)(t,o,s,f)}catch(C){if(Oe(v),C!==C+0)throw C;xe(1,0)}}function ua(e,t,o,s,f,v,C,S,A,z,G){var ie=Pe();try{Se(e)(t,o,s,f,v,C,S,A,z,G)}catch(se){if(Oe(ie),se!==se+0)throw se;xe(1,0)}}function la(e,t,o,s,f,v,C){var S=Pe();try{return Se(e)(t,o,s,f,v,C)}catch(A){if(Oe(S),A!==A+0)throw A;xe(1,0)}}function da(e,t,o,s,f){var v=Pe();try{Se(e)(t,o,s,f)}catch(C){if(Oe(v),C!==C+0)throw C;xe(1,0)}}function fa(e,t,o,s,f,v){var C=Pe();try{return Se(e)(t,o,s,f,v)}catch(S){if(Oe(C),S!==S+0)throw S;xe(1,0)}}function ha(e,t,o,s,f,v,C,S){var A=Pe();try{return Se(e)(t,o,s,f,v,C,S)}catch(z){if(Oe(A),z!==z+0)throw z;xe(1,0)}}function pa(e,t,o,s){var f=Pe();try{return Se(e)(t,o,s)}catch(v){if(Oe(f),v!==v+0)throw v;xe(1,0)}}function va(e,t,o,s){var f=Pe();try{return Se(e)(t,o,s)}catch(v){if(Oe(f),v!==v+0)throw v;xe(1,0)}}function ga(e){var t=Pe();try{return Se(e)()}catch(o){if(Oe(t),o!==o+0)throw o;xe(1,0)}}function ya(e,t,o,s,f,v,C,S){var A=Pe();try{Se(e)(t,o,s,f,v,C,S)}catch(z){if(Oe(A),z!==z+0)throw z;xe(1,0)}}function ma(e,t,o,s,f,v,C,S,A,z,G,ie){var se=Pe();try{return Se(e)(t,o,s,f,v,C,S,A,z,G,ie)}catch(le){if(Oe(se),le!==le+0)throw le;xe(1,0)}}function wa(e,t,o,s,f,v,C,S,A,z,G,ie,se,le,_e,Te){var Ce=Pe();try{Se(e)(t,o,s,f,v,C,S,A,z,G,ie,se,le,_e,Te)}catch(Ne){if(Oe(Ce),Ne!==Ne+0)throw Ne;xe(1,0)}}function ba(e,t,o,s,f){var v=Pe();try{return Rr(e,t,o,s,f)}catch(C){if(Oe(v),C!==C+0)throw C;xe(1,0)}}var Bt;w=function e(){Bt||Ar(),Bt||(w=e)};function Ar(){if(T>0||(Je(),T>0))return;function e(){Bt||(Bt=!0,i.calledRun=!0,!de&&(ut(),h(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),lt()))}i.setStatus?(i.setStatus("Running..."),setTimeout(function(){setTimeout(function(){i.setStatus("")},1),e()},1)):e()}if(i.preInit)for(typeof i.preInit=="function"&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return Ar(),a.ready}})();function _i(r){return sr(cr,r)}async function Si(r,a){return Ci(cr,r,a)}async function Pi(r,a){return xi(cr,r,a)}var $t;class ar extends EventTarget{constructor(a={}){var i;super(),Xa(this,$t,void 0);try{const h=(i=a==null?void 0:a.formats)==null?void 0:i.filter(m=>m!=="unknown");if((h==null?void 0:h.length)===0)throw new TypeError("Hint option provided, but is empty.");h==null||h.forEach(m=>{if(!Lt.has(m))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${m}' is not a valid enum value of type BarcodeFormat.`)}),Ka(this,$t,h??[]),_i().then(m=>{this.dispatchEvent(new CustomEvent("load",{detail:m}))}).catch(m=>{this.dispatchEvent(new CustomEvent("error",{detail:m}))})}catch(h){throw qr(h,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return Za.filter(a=>a!=="unknown")}async detect(a){try{const i=await ii(a);if(i===null)return[];let h;try{an(i)?h=await Si(i,{tryHarder:!0,formats:Nr(this,$t).map(m=>Lt.get(m))}):h=await Pi(i,{tryHarder:!0,formats:Nr(this,$t).map(m=>Lt.get(m))})}catch(m){throw console.error(m),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return h.map(m=>{const{topLeft:{x:_,y:M},topRight:{x:F,y:P},bottomLeft:{x:B,y:V},bottomRight:{x:W,y:ae}}=m.position,fe=Math.min(_,F,B,W),K=Math.min(M,P,V,ae),de=Math.max(_,F,B,W),re=Math.max(M,P,V,ae);return{boundingBox:new DOMRectReadOnly(fe,K,de-fe,re-K),rawValue:m.text,format:ei(m.format),cornerPoints:[{x:_,y:M},{x:F,y:P},{x:W,y:ae},{x:B,y:V}]}})}catch(i){throw qr(i,"Failed to execute 'detect' on 'BarcodeDetector'")}}}$t=new WeakMap;const ln=(r,a,i="error")=>{let h,m;const _=new Promise((M,F)=>{h=M,m=F,r.addEventListener(a,h),r.addEventListener(i,m)});return _.finally(()=>{r.removeEventListener(a,h),r.removeEventListener(i,m)}),_},Wr=r=>new Promise(a=>setTimeout(a,r));class dn extends Error{constructor(){super("this browser has no Stream API support"),this.name="StreamApiNotSupportedError"}}class Oi extends Error{constructor(){super("camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP."),this.name="InsecureContextError"}}class Ti extends Error{constructor(){super("Loading camera stream timed out after 6 seconds. If you are on iOS in PWA mode, this is a known issue (see https://github.com/gruhn/vue-qrcode-reader/issues/298)"),this.name="StreamLoadTimeoutError"}}const Mi=r=>{let a=!1,i;return(...h)=>(a||(i=r(h),a=!0),i)};function tt(r,a){if(r===!1)throw new Error(a??"assertion failure")}function Hr(r){throw new Error("this code should be unreachable")}function Di(){return navigator.platform.toUpperCase().includes("MAC")}let fn;async function $i(r){if(window.BarcodeDetector===void 0)return console.debug("[vue-qrcode-reader] Native BarcodeDetector not supported. Will use polyfill."),new ar({formats:r});const a=await window.BarcodeDetector.getSupportedFormats(),i=r.filter(h=>!a.includes(h));return i.length>0?(console.debug(`[vue-qrcode-reader] Native BarcodeDetector does not support formats ${JSON.stringify(i)}. Will use polyfill.`),new ar({formats:r})):Di()&&r.includes("pdf417")?(console.debug("[vue-qrcode-reader] Native BarcodeDetector is buggy for PDF417 codes on MacOS. Will use polyfill."),new ar({formats:r})):(console.debug("[vue-qrcode-reader] Will use native BarcodeDetector."),new window.BarcodeDetector({formats:r}))}async function hn(r){fn=await $i(r)}const ki=async(r,{detectHandler:a,locateHandler:i,minDelay:h,formats:m})=>{console.debug("[vue-qrcode-reader] start scanning"),await hn(m);const _=M=>async F=>{if(r.readyState===0)console.debug("[vue-qrcode-reader] stop scanning: video element readyState is 0");else{const{lastScanned:P,contentBefore:B,lastScanHadContent:V}=M;if(F-P!B.includes(de.rawValue));ae&&a(W);const fe=W.length>0;fe&&i(W),!fe&&V&&i(W);const K={lastScanned:F,lastScanHadContent:fe,contentBefore:ae?W.map(de=>de.rawValue):B};window.requestAnimationFrame(_(K))}}};_({lastScanned:performance.now(),contentBefore:[],lastScanHadContent:!1})(performance.now())};var pn={},Ue={};Object.defineProperty(Ue,"__esModule",{value:!0});Ue.compactObject=yn;Ue.deprecated=qi;var Ei=Ue.detectBrowser=Li;Ue.disableLog=Bi;Ue.disableWarnings=Fi;Ue.extractVersion=zt;Ue.filterStats=zi;Ue.log=Ni;Ue.walkStats=Ut;Ue.wrapPeerConnectionEvent=ji;function Ri(r,a,i){return a=Ai(a),a in r?Object.defineProperty(r,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[a]=i,r}function Ai(r){var a=Ii(r,"string");return st(a)==="symbol"?a:String(a)}function Ii(r,a){if(st(r)!=="object"||r===null)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var h=i.call(r,a);if(st(h)!=="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(r)}function st(r){"@babel/helpers - typeof";return st=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},st(r)}var vn=!0,gn=!0;function zt(r,a,i){var h=r.match(a);return h&&h.length>=i&&parseInt(h[i],10)}function ji(r,a,i){if(r.RTCPeerConnection){var h=r.RTCPeerConnection.prototype,m=h.addEventListener;h.addEventListener=function(M,F){if(M!==a)return m.apply(this,arguments);var P=function(B){var V=i(B);V&&(F.handleEvent?F.handleEvent(V):F(V))};return this._eventMap=this._eventMap||{},this._eventMap[a]||(this._eventMap[a]=new Map),this._eventMap[a].set(F,P),m.apply(this,[M,P])};var _=h.removeEventListener;h.removeEventListener=function(M,F){if(M!==a||!this._eventMap||!this._eventMap[a])return _.apply(this,arguments);if(!this._eventMap[a].has(F))return _.apply(this,arguments);var P=this._eventMap[a].get(F);return this._eventMap[a].delete(F),this._eventMap[a].size===0&&delete this._eventMap[a],Object.keys(this._eventMap).length===0&&delete this._eventMap,_.apply(this,[M,P])},Object.defineProperty(h,"on"+a,{get:function(){return this["_on"+a]},set:function(M){this["_on"+a]&&(this.removeEventListener(a,this["_on"+a]),delete this["_on"+a]),M&&this.addEventListener(a,this["_on"+a]=M)},enumerable:!0,configurable:!0})}}function Bi(r){return typeof r!="boolean"?new Error("Argument type: "+st(r)+". Please use a boolean."):(vn=r,r?"adapter.js logging disabled":"adapter.js logging enabled")}function Fi(r){return typeof r!="boolean"?new Error("Argument type: "+st(r)+". Please use a boolean."):(gn=!r,"adapter.js deprecation warnings "+(r?"disabled":"enabled"))}function Ni(){if((typeof window>"u"?"undefined":st(window))==="object"){if(vn)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function qi(r,a){gn&&console.warn(r+" is deprecated, please use "+a+" instead.")}function Li(r){var a={browser:null,version:null};if(typeof r>"u"||!r.navigator||!r.navigator.userAgent)return a.browser="Not a browser.",a;var i=r.navigator;if(i.mozGetUserMedia)a.browser="firefox",a.version=zt(i.userAgent,/Firefox\/(\d+)\./,1);else if(i.webkitGetUserMedia||r.isSecureContext===!1&&r.webkitRTCPeerConnection)a.browser="chrome",a.version=zt(i.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(r.RTCPeerConnection&&i.userAgent.match(/AppleWebKit\/(\d+)\./))a.browser="safari",a.version=zt(i.userAgent,/AppleWebKit\/(\d+)\./,1),a.supportsUnifiedPlan=r.RTCRtpTransceiver&&"currentDirection"in r.RTCRtpTransceiver.prototype;else return a.browser="Not a supported browser.",a;return a}function Vr(r){return Object.prototype.toString.call(r)==="[object Object]"}function yn(r){return Vr(r)?Object.keys(r).reduce(function(a,i){var h=Vr(r[i]),m=h?yn(r[i]):r[i],_=h&&!Object.keys(m).length;return m===void 0||_?a:Object.assign(a,Ri({},i,m))},{}):r}function Ut(r,a,i){!a||i.has(a.id)||(i.set(a.id,a),Object.keys(a).forEach(function(h){h.endsWith("Id")?Ut(r,r.get(a[h]),i):h.endsWith("Ids")&&a[h].forEach(function(m){Ut(r,r.get(m),i)})}))}function zi(r,a,i){var h=i?"outbound-rtp":"inbound-rtp",m=new Map;if(a===null)return m;var _=[];return r.forEach(function(M){M.type==="track"&&M.trackIdentifier===a.id&&_.push(M)}),_.forEach(function(M){r.forEach(function(F){F.type===h&&F.trackId===M.id&&Ut(r,F,m)})}),m}Object.defineProperty(pn,"__esModule",{value:!0});var Ui=pn.shimGetUserMedia=Vi,Wi=Hi(Ue);function mn(r){if(typeof WeakMap!="function")return null;var a=new WeakMap,i=new WeakMap;return(mn=function(h){return h?i:a})(r)}function Hi(r,a){if(r&&r.__esModule)return r;if(r===null||it(r)!=="object"&&typeof r!="function")return{default:r};var i=mn(a);if(i&&i.has(r))return i.get(r);var h={},m=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var _ in r)if(_!=="default"&&Object.prototype.hasOwnProperty.call(r,_)){var M=m?Object.getOwnPropertyDescriptor(r,_):null;M&&(M.get||M.set)?Object.defineProperty(h,_,M):h[_]=r[_]}return h.default=r,i&&i.set(r,h),h}function it(r){"@babel/helpers - typeof";return it=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},it(r)}var Qr=Wi.log;function Vi(r,a){var i=r&&r.navigator;if(i.mediaDevices){var h=function(P){if(it(P)!=="object"||P.mandatory||P.optional)return P;var B={};return Object.keys(P).forEach(function(V){if(!(V==="require"||V==="advanced"||V==="mediaSource")){var W=it(P[V])==="object"?P[V]:{ideal:P[V]};W.exact!==void 0&&typeof W.exact=="number"&&(W.min=W.max=W.exact);var ae=function(K,de){return K?K+de.charAt(0).toUpperCase()+de.slice(1):de==="deviceId"?"sourceId":de};if(W.ideal!==void 0){B.optional=B.optional||[];var fe={};typeof W.ideal=="number"?(fe[ae("min",V)]=W.ideal,B.optional.push(fe),fe={},fe[ae("max",V)]=W.ideal,B.optional.push(fe)):(fe[ae("",V)]=W.ideal,B.optional.push(fe))}W.exact!==void 0&&typeof W.exact!="number"?(B.mandatory=B.mandatory||{},B.mandatory[ae("",V)]=W.exact):["min","max"].forEach(function(K){W[K]!==void 0&&(B.mandatory=B.mandatory||{},B.mandatory[ae(K,V)]=W[K])})}}),P.advanced&&(B.optional=(B.optional||[]).concat(P.advanced)),B},m=function(P,B){if(a.version>=61)return B(P);if(P=JSON.parse(JSON.stringify(P)),P&&it(P.audio)==="object"){var V=function(K,de,re){de in K&&!(re in K)&&(K[re]=K[de],delete K[de])};P=JSON.parse(JSON.stringify(P)),V(P.audio,"autoGainControl","googAutoGainControl"),V(P.audio,"noiseSuppression","googNoiseSuppression"),P.audio=h(P.audio)}if(P&&it(P.video)==="object"){var W=P.video.facingMode;W=W&&(it(W)==="object"?W:{ideal:W});var ae=a.version<66;if(W&&(W.exact==="user"||W.exact==="environment"||W.ideal==="user"||W.ideal==="environment")&&!(i.mediaDevices.getSupportedConstraints&&i.mediaDevices.getSupportedConstraints().facingMode&&!ae)){delete P.video.facingMode;var fe;if(W.exact==="environment"||W.ideal==="environment"?fe=["back","rear"]:(W.exact==="user"||W.ideal==="user")&&(fe=["front"]),fe)return i.mediaDevices.enumerateDevices().then(function(K){K=K.filter(function(re){return re.kind==="videoinput"});var de=K.find(function(re){return fe.some(function(ge){return re.label.toLowerCase().includes(ge)})});return!de&&K.length&&fe.includes("back")&&(de=K[K.length-1]),de&&(P.video.deviceId=W.exact?{exact:de.deviceId}:{ideal:de.deviceId}),P.video=h(P.video),Qr("chrome: "+JSON.stringify(P)),B(P)})}P.video=h(P.video)}return Qr("chrome: "+JSON.stringify(P)),B(P)},_=function(P){return a.version>=64?P:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[P.name]||P.name,message:P.message,constraint:P.constraint||P.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}},M=function(P,B,V){m(P,function(W){i.webkitGetUserMedia(W,B,function(ae){V&&V(_(ae))})})};if(i.getUserMedia=M.bind(i),i.mediaDevices.getUserMedia){var F=i.mediaDevices.getUserMedia.bind(i.mediaDevices);i.mediaDevices.getUserMedia=function(P){return m(P,function(B){return F(B).then(function(V){if(B.audio&&!V.getAudioTracks().length||B.video&&!V.getVideoTracks().length)throw V.getTracks().forEach(function(W){W.stop()}),new DOMException("","NotFoundError");return V},function(V){return Promise.reject(_(V))})})}}}}var wn={};Object.defineProperty(wn,"__esModule",{value:!0});var Qi=wn.shimGetUserMedia=Ji,Gi=Yi(Ue);function bn(r){if(typeof WeakMap!="function")return null;var a=new WeakMap,i=new WeakMap;return(bn=function(h){return h?i:a})(r)}function Yi(r,a){if(r&&r.__esModule)return r;if(r===null||mt(r)!=="object"&&typeof r!="function")return{default:r};var i=bn(a);if(i&&i.has(r))return i.get(r);var h={},m=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var _ in r)if(_!=="default"&&Object.prototype.hasOwnProperty.call(r,_)){var M=m?Object.getOwnPropertyDescriptor(r,_):null;M&&(M.get||M.set)?Object.defineProperty(h,_,M):h[_]=r[_]}return h.default=r,i&&i.set(r,h),h}function mt(r){"@babel/helpers - typeof";return mt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},mt(r)}function Ji(r,a){var i=r&&r.navigator,h=r&&r.MediaStreamTrack;if(i.getUserMedia=function(P,B,V){Gi.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),i.mediaDevices.getUserMedia(P).then(B,V)},!(a.version>55&&"autoGainControl"in i.mediaDevices.getSupportedConstraints())){var m=function(P,B,V){B in P&&!(V in P)&&(P[V]=P[B],delete P[B])},_=i.mediaDevices.getUserMedia.bind(i.mediaDevices);if(i.mediaDevices.getUserMedia=function(P){return mt(P)==="object"&&mt(P.audio)==="object"&&(P=JSON.parse(JSON.stringify(P)),m(P.audio,"autoGainControl","mozAutoGainControl"),m(P.audio,"noiseSuppression","mozNoiseSuppression")),_(P)},h&&h.prototype.getSettings){var M=h.prototype.getSettings;h.prototype.getSettings=function(){var P=M.apply(this,arguments);return m(P,"mozAutoGainControl","autoGainControl"),m(P,"mozNoiseSuppression","noiseSuppression"),P}}if(h&&h.prototype.applyConstraints){var F=h.prototype.applyConstraints;h.prototype.applyConstraints=function(P){return this.kind==="audio"&&mt(P)==="object"&&(P=JSON.parse(JSON.stringify(P)),m(P,"autoGainControl","mozAutoGainControl"),m(P,"noiseSuppression","mozNoiseSuppression")),F.apply(this,[P])}}}}var rt={};Object.defineProperty(rt,"__esModule",{value:!0});rt.shimAudioContext=is;rt.shimCallbacksAPI=ts;rt.shimConstraints=_n;rt.shimCreateOfferLegacy=as;var Xi=rt.shimGetUserMedia=rs;rt.shimLocalStreamsAPI=Zi;rt.shimRTCIceServerUrls=ns;rt.shimRemoteStreamsAPI=es;rt.shimTrackEventTransceiver=os;var Cn=Ki(Ue);function xn(r){if(typeof WeakMap!="function")return null;var a=new WeakMap,i=new WeakMap;return(xn=function(h){return h?i:a})(r)}function Ki(r,a){if(r&&r.__esModule)return r;if(r===null||ct(r)!=="object"&&typeof r!="function")return{default:r};var i=xn(a);if(i&&i.has(r))return i.get(r);var h={},m=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var _ in r)if(_!=="default"&&Object.prototype.hasOwnProperty.call(r,_)){var M=m?Object.getOwnPropertyDescriptor(r,_):null;M&&(M.get||M.set)?Object.defineProperty(h,_,M):h[_]=r[_]}return h.default=r,i&&i.set(r,h),h}function ct(r){"@babel/helpers - typeof";return ct=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},ct(r)}function Zi(r){if(!(ct(r)!=="object"||!r.RTCPeerConnection)){if("getLocalStreams"in r.RTCPeerConnection.prototype||(r.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in r.RTCPeerConnection.prototype)){var a=r.RTCPeerConnection.prototype.addTrack;r.RTCPeerConnection.prototype.addStream=function(i){var h=this;this._localStreams||(this._localStreams=[]),this._localStreams.includes(i)||this._localStreams.push(i),i.getAudioTracks().forEach(function(m){return a.call(h,m,i)}),i.getVideoTracks().forEach(function(m){return a.call(h,m,i)})},r.RTCPeerConnection.prototype.addTrack=function(i){for(var h=this,m=arguments.length,_=new Array(m>1?m-1:0),M=1;M=0)){i._remoteStreams.push(m);var _=new Event("addstream");_.stream=m,i.dispatchEvent(_)}})}),a.apply(i,arguments)}}}function ts(r){if(!(ct(r)!=="object"||!r.RTCPeerConnection)){var a=r.RTCPeerConnection.prototype,i=a.createOffer,h=a.createAnswer,m=a.setLocalDescription,_=a.setRemoteDescription,M=a.addIceCandidate;a.createOffer=function(P,B){var V=arguments.length>=2?arguments[2]:arguments[0],W=i.apply(this,[V]);return B?(W.then(P,B),Promise.resolve()):W},a.createAnswer=function(P,B){var V=arguments.length>=2?arguments[2]:arguments[0],W=h.apply(this,[V]);return B?(W.then(P,B),Promise.resolve()):W};var F=function(P,B,V){var W=m.apply(this,[P]);return V?(W.then(B,V),Promise.resolve()):W};a.setLocalDescription=F,F=function(P,B,V){var W=_.apply(this,[P]);return V?(W.then(B,V),Promise.resolve()):W},a.setRemoteDescription=F,F=function(P,B,V){var W=M.apply(this,[P]);return V?(W.then(B,V),Promise.resolve()):W},a.addIceCandidate=F}}function rs(r){var a=r&&r.navigator;if(a.mediaDevices&&a.mediaDevices.getUserMedia){var i=a.mediaDevices,h=i.getUserMedia.bind(i);a.mediaDevices.getUserMedia=function(m){return h(_n(m))}}!a.getUserMedia&&a.mediaDevices&&a.mediaDevices.getUserMedia&&(a.getUserMedia=(function(m,_,M){a.mediaDevices.getUserMedia(m).then(_,M)}).bind(a))}function _n(r){return r&&r.video!==void 0?Object.assign({},r,{video:Cn.compactObject(r.video)}):r}function ns(r){if(r.RTCPeerConnection){var a=r.RTCPeerConnection;r.RTCPeerConnection=function(i,h){if(i&&i.iceServers){for(var m=[],_=0;_{const r=Ei(window);switch(r.browser){case"chrome":Ui(window,r);break;case"firefox":Qi(window,r);break;case"safari":Xi(window,r);break;default:throw new dn}});let wt=Promise.resolve({type:"stop",data:{}});async function Gr(r,a,i){var h,m,_;if(console.debug("[vue-qrcode-reader] starting camera with constraints: ",JSON.stringify(a)),window.isSecureContext!==!0)throw new Oi;if(((h=navigator==null?void 0:navigator.mediaDevices)==null?void 0:h.getUserMedia)===void 0)throw new dn;ss(),console.debug("[vue-qrcode-reader] calling getUserMedia");const M=await navigator.mediaDevices.getUserMedia({audio:!1,video:a});r.srcObject!==void 0?r.srcObject=M:r.mozSrcObject!==void 0?r.mozSrcObject=M:window.URL.createObjectURL?r.src=window.URL.createObjectURL(M):window.webkitURL?r.src=window.webkitURL.createObjectURL(M):r.src=M.id,r.play(),console.debug("[vue-qrcode-reader] waiting for video element to load"),await Promise.race([ln(r,"loadeddata"),Wr(6e3).then(()=>{throw new Ti})]),console.debug("[vue-qrcode-reader] video element loaded"),await Wr(500);const[F]=M.getVideoTracks(),P=(_=(m=F==null?void 0:F.getCapabilities)==null?void 0:m.call(F))!=null?_:{};let B=!1;return i&&P.torch&&(await F.applyConstraints({advanced:[{torch:!0}]}),B=!0),console.debug("[vue-qrcode-reader] camera ready"),{type:"start",data:{videoEl:r,stream:M,capabilities:P,constraints:a,isTorchOn:B}}}async function cs(r,{constraints:a,torch:i,restart:h=!1}){wt=wt.then(_=>{if(_.type==="start"){const{data:{videoEl:M,stream:F,constraints:P,isTorchOn:B}}=_;return!h&&r===M&&a===P&&i===B?_:Sn(M,F,B).then(()=>Gr(r,a,i))}else if(_.type==="stop"||_.type==="failed")return Gr(r,a,i);Hr()}).catch(_=>(console.debug(`[vue-qrcode-reader] starting camera failed with "${_}"`),{type:"failed",error:_}));const m=await wt;if(m.type==="stop")throw new Error("Something went wrong with the camera task queue (start task).");if(m.type==="failed")throw m.error;if(m.type==="start")return m.data.capabilities;Hr()}async function Sn(r,a,i){console.debug("[vue-qrcode-reader] stopping camera"),r.src="",r.srcObject=null,r.load(),await ln(r,"error");for(const h of a.getTracks())i!=null||await h.applyConstraints({advanced:[{torch:!1}]}),a.removeTrack(h),h.stop();return{type:"stop",data:{}}}async function qt(){if(wt=wt.then(r=>{if(r.type==="stop"||r.type==="failed")return r;const{data:{videoEl:a,stream:i,isTorchOn:h}}=r;return Sn(a,i,h)}),(await wt).type==="start")throw new Error("Something went wrong with the camera task queue (stop task).")}const us=Pa({__name:"QrcodeStream",props:{constraints:{default:()=>({facingMode:"environment"})},formats:{default:()=>["qr_code"]},paused:{type:Boolean,default:!1},torch:{type:Boolean,default:!1},track:{type:Function,default:void 0}},emits:["detect","camera-on","camera-off","error"],setup(r,{emit:a}){const i=r,h=a,m=dt(i.constraints),_=dt(i.formats);Dt(()=>i.constraints,(he,Z)=>{JSON.stringify(he)!==JSON.stringify(Z)&&(m.value=he)},{deep:!0}),Dt(()=>i.formats,(he,Z)=>{JSON.stringify(he)!==JSON.stringify(Z)&&(_.value=he)},{deep:!0});const M=dt(),F=dt(),P=dt(),B=dt(!1),V=dt(!1);Oa(()=>{V.value=!0}),Ta(()=>{qt()});const W=or(()=>({torch:i.torch,constraints:m.value,shouldStream:V.value&&!i.paused}));Dt(W,async he=>{const Z=P.value;tt(Z!==void 0,"cameraSettings watcher should never be triggered when component is not mounted. Thus video element should always be defined.");const oe=M.value;tt(oe!==void 0,"cameraSettings watcher should never be triggered when component is not mounted. Thus canvas should always be defined.");const We=oe.getContext("2d");if(tt(We!==null,"if cavnas is defined, canvas 2d context should also be non-null"),he.shouldStream){qt(),B.value=!1;try{const qe=await cs(Z,he);V.value?(B.value=!0,h("camera-on",qe)):await qt()}catch(qe){h("error",qe)}}else oe.width=Z.videoWidth,oe.height=Z.videoHeight,We.drawImage(Z,0,0,Z.videoWidth,Z.videoHeight),qt(),B.value=!1,h("camera-off")},{deep:!0}),Dt(_,async he=>{V.value&&await hn(he)});const ae=or(()=>W.value.shouldStream&&B.value);Dt(ae,he=>{if(he){tt(M.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus pause frame canvas is defined"),fe(M.value),tt(F.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus tracking canvas is defined"),fe(F.value);const Z=()=>i.track===void 0?500:40;tt(P.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus video element is defined"),ki(P.value,{detectHandler:oe=>h("detect",oe),formats:_.value,locateHandler:K,minDelay:Z()})}});const fe=he=>{const Z=he.getContext("2d");tt(Z!==null,"canvas 2d context should always be non-null"),Z.clearRect(0,0,he.width,he.height)},K=he=>{const Z=F.value;tt(Z!==void 0,"onLocate handler should only be called when component is mounted. Thus tracking canvas is always defined.");const oe=P.value;if(tt(oe!==void 0,"onLocate handler should only be called when component is mounted. Thus video element is always defined."),he.length===0||i.track===void 0)fe(Z);else{const We=oe.offsetWidth,qe=oe.offsetHeight,He=oe.videoWidth,Ge=oe.videoHeight,ke=Math.max(We/He,qe/Ge),Ve=He*ke,Je=Ge*ke,ut=Ve/He,lt=Je/Ge,R=(We-Ve)/2,k=(qe-Je)/2,E=({x:n,y:c})=>({x:Math.floor(n*ut),y:Math.floor(c*lt)}),T=({x:n,y:c})=>({x:Math.floor(n+R),y:Math.floor(c+k)}),w=he.map(n=>{const{boundingBox:c,cornerPoints:u}=n,{x:l,y:g}=T(E({x:c.x,y:c.y})),{x,y:q}=E({x:c.width,y:c.height});return{...n,cornerPoints:u.map(I=>T(E(I))),boundingBox:DOMRectReadOnly.fromRect({x:l,y:g,width:x,height:q})}});Z.width=oe.offsetWidth,Z.height=oe.offsetHeight;const d=Z.getContext("2d");tt(d!==null,"canvas 2d context should always be non-null"),i.track(w,d)}},de={width:"100%",height:"100%",position:"relative","z-index":"0"},re={width:"100%",height:"100%",position:"absolute",top:"0",left:"0"},ge={width:"100%",height:"100%","object-fit":"cover"},$e=or(()=>ae.value?ge:{...ge,visibility:"hidden",position:"absolute"});return(he,Z)=>(yt(),gt("div",{style:de},[Ie("video",{ref_key:"videoRef",ref:P,style:Da($e.value),autoplay:"",muted:"",playsinline:""},null,4),Ma(Ie("canvas",{id:"qrcode-stream-pause-frame",ref_key:"pauseFrameRef",ref:M,style:ge},null,512),[[$a,!ae.value]]),Ie("canvas",{id:"qrcode-stream-tracking-layer",ref_key:"trackingLayerRef",ref:F,style:re},null,512),Ie("div",{style:re},[ka(he.$slots,"default")])]))}});var ls=Object.getOwnPropertyDescriptor,ds=(r,a,i,h)=>{for(var m=h>1?void 0:h?ls(a,i):a,_=r.length-1,M;_>=0;_--)(M=r[_])&&(m=M(m)||m);return m};let ir=class extends Ea{constructor(){super(...arguments);et(this,"$notify");et(this,"$router");et(this,"activeDid","");et(this,"apiServer","");et(this,"givenName","");et(this,"hideRegisterPromptOnNewContact",!1);et(this,"isRegistered",!1);et(this,"qrValue","");et(this,"ETHR_DID_PREFIX",La)}async created(){const a=await Ra();this.activeDid=a.activeDid||"",this.apiServer=a.apiServer||"",this.givenName=a.firstName||"",this.hideRegisterPromptOnNewContact=!!a.hideRegisterPromptOnNewContact,this.isRegistered=!!a.isRegistered;const i=await za(this.activeDid);if(i){const h=(a.firstName||"")+(a.lastName?` ${a.lastName}`:"");this.qrValue=await Ua(i,!!a.isRegistered,h,a.profileImageUrl,!1)}}danger(a,i="Error",h=5e3){this.$notify({group:"alert",type:"danger",title:i,text:a},h)}async onScanDetect(a){var h;const i=(h=a[0])==null?void 0:h.rawValue;if(i){let m;try{const _=Wa(i);if(!_){this.$notify({group:"alert",type:"danger",title:"No Contact Info",text:"The contact info could not be parsed."},3e3);return}const{payload:M}=Ha(_);if(m={did:M.own.did||M.iss,name:M.own.name,nextPubKeyHashB64:M.own.nextPublicEncKeyHash,profileImageUrl:M.own.profileImageUrl,publicKeyBase64:M.own.publicEncKey,registered:M.own.registered},!m.did){this.danger("There is no DID.","Incomplete Contact");return}if(!Va(m.did)){this.danger("The DID must begin with 'did:'","Invalid DID");return}}catch(_){console.error("Error parsing QR info:",_),this.danger("Could not parse the QR info.","Read Error");return}try{await ht.open(),await ht.contacts.add(m);let _;this.activeDid?(await this.setVisibility(m,!0),m.seesMe=!0,_="They were added, and your activity is visible to them."):_="They were added.",this.$notify({group:"alert",type:"success",title:"Contact Added",text:_},3e3),this.isRegistered&&!this.hideRegisterPromptOnNewContact&&!m.registered&&setTimeout(()=>{this.$notify({group:"modal",type:"confirm",title:"Register",text:"Do you want to register them?",onCancel:async M=>{M&&(await ht.settings.update(Br,{hideRegisterPromptOnNewContact:M}),this.hideRegisterPromptOnNewContact=M)},onNo:async M=>{M&&(await ht.settings.update(Br,{hideRegisterPromptOnNewContact:M}),this.hideRegisterPromptOnNewContact=M)},onYes:async()=>{await this.register(m)},promptToStopAsking:!0},-1)},500)}catch(_){console.error("Error saving contact info:",_),this.$notify({group:"alert",type:"danger",title:"Contact Error",text:"Could not save contact info. Check if it already exists."},5e3)}}else this.$notify({group:"alert",type:"danger",title:"Invalid Contact QR Code",text:"No QR code detected with contact information."},5e3)}async setVisibility(a,i){const h=await Qa(this.activeDid,this.apiServer,this.axios,ht,a,i);h.error?this.danger(h.error,"Error Setting Visibility"):h.success||console.error("Got strange result from setting visibility:",h)}async register(a){var i,h,m;this.$notify({group:"alert",type:"toast",text:"",title:"Registration submitted..."},1e3);try{const _=await Ga(this.activeDid,this.apiServer,this.axios,a);_.success?(a.registered=!0,ht.contacts.update(a.did,{registered:!0}),this.$notify({group:"alert",type:"success",title:"Registration Success",text:(a.name||"That unnamed person")+" has been registered."},5e3)):this.$notify({group:"alert",type:"danger",title:"Registration Error",text:_.error||"Something went wrong during registration."},5e3)}catch(_){console.error("Error when registering:",_);let M="There was an error.";const F=_;F?(m=(h=(i=F.response)==null?void 0:i.data)==null?void 0:h.error)!=null&&m.message?M=F.response.data.error.message:F.message?M=F.message:M=JSON.stringify(F.toJSON()):M=_,this.$notify({group:"alert",type:"danger",title:"Registration Error",text:M},5e3)}}onScanError(a){console.error("Scan was invalid:",a),this.$notify({group:"alert",type:"danger",title:"Invalid Scan",text:"The scan was invalid."},5e3)}onCopyUrlToClipboard(){Fr().copy(this.qrValue).then(()=>{this.$notify({group:"alert",type:"toast",title:"Copied",text:"Contact URL was copied to clipboard."},2e3)})}onCopyDidToClipboard(){Fr().copy(this.activeDid).then(()=>{this.$notify({group:"alert",type:"info",title:"Copied",text:"Your DID was copied to the clipboard. Have them paste it in the box on their 'People' screen to add you."},5e3)})}};ir=ds([Aa({components:{QrcodeStream:us,QRCodeVue3:Ja,QuickNav:Na,UserNameDialog:qa}})],ir);const fs={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},hs={class:"mb-8"},ps={class:"text-lg text-center font-light relative px-7"},vs={key:0,class:"bg-amber-200 rounded-md overflow-hidden text-center px-4 py-3 mb-4"},gs={key:1,class:"text-center"},ys={key:2,class:"text-center"},ms={class:"text-center"};function ws(r,a,i,h,m,_){const M=vt("QuickNav"),F=vt("font-awesome"),P=vt("UserNameDialog"),B=vt("QRCodeVue3"),V=vt("router-link"),W=vt("qrcode-stream");return yt(),gt(Fa,null,[pt(M,{selected:"Profile"}),Ie("section",fs,[Ie("div",hs,[Ie("div",ps,[Ie("h1",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:a[0]||(a[0]=ae=>r.$router.back())},[pt(F,{icon:"chevron-left",class:"fa-fw"})])]),a[7]||(a[7]=Ie("h1",{id:"ViewHeading",class:"text-4xl text-center font-light pt-4"}," Your Contact Info ",-1)),r.givenName?ja("",!0):(yt(),gt("p",vs,[a[4]||(a[4]=Ie("span",{class:"text-red"},"Beware!",-1)),a[5]||(a[5]=Nt(" You aren't sharing your name, so quickly ")),a[6]||(a[6]=Ie("br",null,null,-1)),Ie("span",{class:"bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-1 rounded-md",onClick:a[1]||(a[1]=()=>r.$refs.userNameDialog.open(ae=>r.givenName=ae))}," click here to set it for them. ")]))]),pt(P,{ref:"userNameDialog"},null,512),r.activeDid&&r.activeDid.startsWith(r.ETHR_DID_PREFIX)?(yt(),gt("div",{key:0,class:"text-center",onClick:a[2]||(a[2]=ae=>r.onCopyUrlToClipboard())},[pt(B,{value:r.qrValue,"corners-square-options":{type:"extra-rounded"},"dots-options":{type:"square"},class:"flex justify-center"},null,8,["value"]),a[8]||(a[8]=Ie("span",null," Click the QR code to copy your contact info to your clipboard. ",-1))])):r.activeDid?(yt(),gt("div",gs,[Ie("span",{class:"text-blue-500",onClick:a[3]||(a[3]=ae=>r.onCopyDidToClipboard())}," Click here to copy your DID to your clipboard. "),a[9]||(a[9]=Ie("span",null," Then give it to them so they can paste it in their list of People. ",-1))])):(yt(),gt("div",ys,[a[11]||(a[11]=Nt(" You have no identitifiers yet, so ")),pt(V,{to:{name:"start"},class:"bg-blue-500 text-white px-1.5 py-1 rounded-md"},{default:Ba(()=>a[10]||(a[10]=[Nt(" create your identifier. ")])),_:1}),a[12]||(a[12]=Ie("br",null,null,-1)),a[13]||(a[13]=Nt(" If you don't that first, these contacts won't see your activity. "))])),Ie("div",ms,[a[14]||(a[14]=Ie("h1",{class:"text-4xl text-center font-light pt-6"},"Scan Contact Info",-1)),pt(W,{onDetect:r.onScanDetect,onError:r.onScanError},null,8,["onDetect","onError"]),a[15]||(a[15]=Ie("span",null," If you do not see a scanning camera window here, check your camera permissions. ",-1))])])],64)}const Ms=Ia(ir,[["render",ws]]);export{Ms as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ContactScanView-C0FSjMaw.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ContactScanView-C0FSjMaw.js deleted file mode 100644 index ab7b7a5..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ContactScanView-C0FSjMaw.js +++ /dev/null @@ -1 +0,0 @@ -import{V as p,C as u,_ as m,h,k as c,J as w,j as n,n as v,w as x,z as i,B as f}from"./main.common-DD7dqhZp.js";import"./index-BGoTPXII.js";var _=Object.getOwnPropertyDescriptor,g=(o,t,d,r)=>{for(var e=r>1?void 0:r?_(t,d):t,s=o.length-1,a;s>=0;s--)(a=o[s])&&(e=a(e)||e);return e};let l=class extends p{};l=g([u({components:{}})],l);const k={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},C={id:"ViewBreadcrumb",class:"mb-8"},y={class:"text-lg text-center font-light relative px-7"};function V(o,t,d,r,e,s){const a=i("font-awesome"),b=i("router-link");return f(),h("section",k,[c("div",C,[c("h1",y,[n(b,{to:{name:"account"},class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1"},{default:x(()=>[n(a,{icon:"chevron-left",class:"fa-fw"})]),_:1}),t[0]||(t[0]=v(" Scan Contact "))])]),t[1]||(t[1]=w('

Scan a QR Code…

…or Enter Contact Data

',7))])}const $=m(l,[["render",V]]);export{$ as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ContactsView-CiB3UJEn.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ContactsView-CiB3UJEn.js deleted file mode 100644 index 714627f..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ContactsView-CiB3UJEn.js +++ /dev/null @@ -1 +0,0 @@ -var H=Object.defineProperty;var V=(s,r,e)=>r in s?H(s,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[r]=e;var u=(s,r,e)=>V(s,typeof r!="symbol"?r+"":r,e);import{l as j,K as I,R as L,g as M,e as x,T as J,L as E,U as F,V as Y,W as A,b as G,P as W,Q as q,M as z,X as R,Y as Q,H as U}from"./index-ryzpKtgI.js";import{V as X,A as B,d as k,e as Z,u as ee,l as T,W as $,H as te,C as se,_ as oe,h as f,j as m,k as c,m as b,o as ie,w as N,s as ne,S as P,t as _,n as D,x as re,F as K,E as ae,z as S,B as p}from"./main.common-DD7dqhZp.js";import{u as de}from"./index-CZnn7ED5.js";import{Q as le}from"./QuickNav-C8jPGtUY.js";import{E as ce}from"./EntityIcon-DciUb57i.js";import{G as he}from"./GiftedDialog-DmRkVexW.js";import{O as ue}from"./OfferDialog-DDi7ax_Z.js";import{C as me}from"./ContactNameDialog-B32CzJRA.js";import{T as ge}from"./TopMessage-ZWDDjman.js";import{s as fe}from"./sort-DzTCGCnH.js";import"./_isString-B7bbuhPA.js";import"./index-BGoTPXII.js";var pe=Object.getOwnPropertyDescriptor,ye=(s,r,e,o)=>{for(var t=o>1?void 0:o?pe(r,e):r,i=s.length-1,n;i>=0;i--)(n=s[i])&&(t=n(t)||t);return t};let O=class extends X{constructor(){super(...arguments);u(this,"$notify");u(this,"$route");u(this,"$router");u(this,"activeDid","");u(this,"apiServer","");u(this,"contacts",[]);u(this,"contactInput","");u(this,"contactEdit",null);u(this,"contactNewName","");u(this,"contactsSelected",[]);u(this,"givenByMeDescriptions",{});u(this,"givenByMeConfirmed",{});u(this,"givenByMeUnconfirmed",{});u(this,"givenToMeDescriptions",{});u(this,"givenToMeConfirmed",{});u(this,"givenToMeUnconfirmed",{});u(this,"hideRegisterPromptOnNewContact",!1);u(this,"isRegistered",!1);u(this,"showDidCopy",!1);u(this,"showPubKeyCopy",!1);u(this,"showPubKeyHashCopy",!1);u(this,"showGiveNumbers",!1);u(this,"showGiveTotals",!0);u(this,"showGiveConfirmed",!0);u(this,"showLargeIdenticon");u(this,"AppString",B);u(this,"libsUtil",j)}async created(){await k.open();const e=await Z();this.activeDid=e.activeDid||"",this.apiServer=e.apiServer||"",this.isRegistered=!!e.isRegistered,await this.processContactJwt(),await this.processInviteJwt(),this.showGiveNumbers=!!e.showContactGivesInline,this.hideRegisterPromptOnNewContact=!!e.hideRegisterPromptOnNewContact,this.showGiveNumbers&&this.loadGives();const o=await k.contacts.toArray();this.contacts=o.sort((t,i)=>(t.name||"").localeCompare(i.name||""))}async processContactJwt(){const e=this.$route.query.contactJwt;if(e){const{payload:o}=I(e),t=o.own,i={did:t.did||o.iss,name:t.name,nextPubKeyHashB64:t.nextPublicEncKeyHash,profileImageUrl:t.profileImageUrl,publicKeyBase64:t.publicEncKey,registered:t.registered};await this.addContact(i),this.$router.push({path:"/contacts"})}}async processInviteJwt(){const e=this.$route.query.inviteJwt;if(e==="")this.$notify({group:"alert",type:"danger",title:"Blank Invite",text:"The invite was not included, which can happen when your iOS device cuts off the link. Try pasting the full link into a browser."},7e3);else if(e){this.activeDid||(this.activeDid=await L());const o=await M(this.activeDid);try{const t=await this.axios.post(this.apiServer+"/api/v2/claim",{jwtEncoded:e},{headers:o});if(t.status!=201)throw{error:{response:t}};await ee(this.activeDid,{isRegistered:!0}),this.isRegistered=!0,this.$notify({group:"alert",type:"success",title:"Registered",text:"You are now registered."},3e3),await new Promise(a=>setTimeout(a,1e3));const n=I(e).payload;this.$refs.contactNameDialog.open("Who Invited You?","",async a=>{await this.addContact({did:n.vc.credentialSubject.agent.identifier,name:a,registered:!0}),await new Promise(h=>setTimeout(h,1e3)),this.showOnboardingInfo()},async()=>{await this.addContact({did:n.vc.credentialSubject.agent.identifier,name:"(person who invited you)",registered:!0}),await new Promise(a=>setTimeout(a,1e3)),this.showOnboardingInfo()})}catch(t){const i="Error redeeming invite: "+x(t);T(i,!0);let n="Got an error sending the invite.";t.response&&t.response.data&&t.response.data.error?t.response.data.error.message?n=t.response.data.error.message:n=t.response.data.error:t.message&&(n=t.message),this.$notify({group:"alert",type:"danger",title:"Error with Invite",text:n},5e3)}this.$router.push({path:"/contacts"})}}contactNameNonBreakingSpace(e){return(e||B.NO_CONTACT_NAME).replace(/\s/g," ")}danger(e,o="Error",t=5e3){this.$notify({group:"alert",type:"danger",title:o,text:e},t)}warning(e,o="Error",t=5e3){this.$notify({group:"alert",type:"warning",title:o,text:e},t)}showOnboardingInfo(){this.$notify({group:"modal",type:"confirm",title:"They're Added To Your List",text:"Would you like to go to the main page now?",onYes:async()=>{this.$router.push({name:"home"})}},-1)}filteredContacts(){return this.showGiveNumbers?this.contactsSelected.length===0?this.contacts:this.contacts.filter(e=>this.contactsSelected.includes(e.did)):this.contacts}async loadGives(){if(!this.activeDid)return;const e=(o,t,i,n,a)=>{if(o.status===200){const h=o.data.data;for(const l of h){const y=a?l.recipientDid:l.agentDid;if(l.unit==="HUR"){if(l.amountConfirmed){const g=i[y]||0;i[y]=g+l.amount}else{const g=n[y]||0;n[y]=g+l.amount}!t[y]&&l.description&&(t[y]=l.description)}}}else console.error("Got bad response status & data of",o.status,o.data),this.$notify({group:"alert",type:"danger",title:"Retrieval Error",text:"Got an error retrieving your "+(a?"given":"received")+" data from the server."},3e3)};try{const o=await M(this.activeDid,this.$notify),t=this.apiServer+"/api/v2/report/gives?agentDid="+encodeURIComponent(this.activeDid),i=this.apiServer+"/api/v2/report/gives?recipientDid="+encodeURIComponent(this.activeDid),[n,a]=await Promise.all([this.axios.get(t,{headers:o}),this.axios.get(i,{headers:o})]),h={},l={},y={};e(n,h,l,y,!0),this.givenByMeDescriptions=h,this.givenByMeConfirmed=l,this.givenByMeUnconfirmed=y;const g={},w={},v={};e(a,g,w,v,!1),this.givenToMeDescriptions=g,this.givenToMeConfirmed=w,this.givenToMeUnconfirmed=v}catch(o){const t="Error loading gives: "+x(o);T(t,!0),this.$notify({group:"alert",type:"danger",title:"Load Error",text:"Got an error loading your gives."},3e3)}}async onClickNewContact(){const e=this.contactInput.trim();if(!e){this.danger("There was no contact info to add. Try the other green buttons.","No Contact");return}if(e.includes(J)){const o=E(e);this.$router.push({path:"/contact-import/"+o});return}if(e.includes(F)||e.includes(Y)){const o=E(e),{payload:t}=I(o),i=t.own,n={did:i.did||t.iss,name:i.name,nextPubKeyHashB64:i.nextPublicEncKeyHash,profileImageUrl:i.profileImageUrl,publicKeyBase64:i.publicEncKey,registered:i.registered};await this.addContact(n);return}if(e.startsWith(A)){const o=e.split(/\n/),t=[];for(const n of o)!n.trim()||n.startsWith(A)||t.push(this.addContactFromEndorserMobileLine(n));try{await Promise.all(t),this.$notify({group:"alert",type:"success",title:"Contacts Added",text:"Each contact was added. Nothing was sent to the server."},3e3)}catch(n){const a="Error adding contacts from CSV: "+x(n);T(a,!0),this.danger("An error occurred. Some contacts may have been added.")}const i=await k.contacts.toArray();this.contacts=i.sort((n,a)=>(n.name||"").localeCompare(a.name||""));return}if(e.startsWith("did:")){let o=e,t,i,n;const a=e.indexOf(",");if(a>-1){o=e.substring(0,a).trim(),t=e.substring(a+1).trim();const g=e.indexOf(",",a+1);if(g>-1){t=e.substring(a+1,g).trim(),i=e.substring(g+1).trim();const w=e.indexOf(",",g+1);w>-1&&(i=e.substring(g+1,w).trim(),n=e.substring(w+1).trim())}}let h=i;h&&/^[0-9A-Fa-f]{66}$/i.test(h)&&(h=G.Buffer.from(h,"hex").toString("base64"));let l=n;l&&/^[0-9A-Fa-f]{66}$/i.test(l)&&(l=G.Buffer.from(l,"hex").toString("base64"));const y={did:o,name:t,publicKeyBase64:h,nextPubKeyHashB64:l};await this.addContact(y);return}if(e.includes("[")){const o=e.substring(e.indexOf("["),e.lastIndexOf("]")+1);try{const t=JSON.parse(o);this.$router.push({name:"contact-import",query:{contacts:JSON.stringify(t)}})}catch(t){const i="Error adding contacts from array: "+x(t);T(i,!0),this.danger("The input could not be parsed.","Invalid Contact List")}return}this.danger("No contact info was found in that input.","No Contact Info")}async addContactFromEndorserMobileLine(e){let o=e,t="",i,n,a;const h=e.indexOf(",");if(h>-1){o=e.substring(0,h).trim(),t=e.substring(h+1).trim();const g=e.indexOf(",",h+1);if(g>-1){t=e.substring(h+1,g).trim(),i=e.substring(g+1).trim();const w=e.indexOf(",",g+1);if(w>-1){i=e.substring(g+1,w).trim(),n=e.substring(w+1).trim()=="true";const v=e.indexOf(",",w+1);v>-1&&(n=e.substring(w+1,v).trim()=="true",a=e.substring(v+1).trim()=="true")}}}let l=i;l&&/^[0-9A-Fa-f]{66}$/i.test(l)&&(l=G.Buffer.from(l,"hex").toString("base64"));const y={did:t,name:o,publicKeyBase64:l,seesMe:n,registered:a};return k.contacts.add(y)}async addContact(e){if(!e.did){this.danger("Cannot add a contact without a DID.","Incomplete Contact");return}if(!W(e.did)){this.danger("The DID must begin with 'did:'","Invalid DID");return}return k.contacts.add(e).then(()=>{const o=this.contacts.concat([e]);this.contacts=fe((i,n)=>(i.name||"").localeCompare(n.name||""),o);let t;this.activeDid?(this.setVisibility(e,!0,!1),e.seesMe=!0,t="They were added, and your activity is visible to them."):t="They were added.",this.contactInput="",this.isRegistered&&!this.hideRegisterPromptOnNewContact&&!e.registered&&setTimeout(()=>{this.$notify({group:"modal",type:"confirm",title:"Register",text:"Do you want to register them?",onCancel:async i=>{i&&(await $({hideRegisterPromptOnNewContact:i}),this.hideRegisterPromptOnNewContact=i)},onNo:async i=>{i&&(await $({hideRegisterPromptOnNewContact:i}),this.hideRegisterPromptOnNewContact=i)},onYes:async()=>{await this.register(e)},promptToStopAsking:!0},-1)},1e3),this.$notify({group:"alert",type:"success",title:"Contact Added",text:t},3e3)}).catch(o=>{var n;const t="Error when adding contact to storage: "+x(o);T(t,!0);let i="An error prevented this import.";((n=o.message)==null?void 0:n.indexOf("Key already exists in the object store."))>-1&&(i="A contact with that DID is already in your contact list. Edit them directly below."),o.name==="ConstraintError"&&(i+=" Check that the contact doesn't conflict with any you already have."),this.danger(i,"Contact Not Added",5e3)})}async confirmSetVisibility(e,o){const t=o?"Are you sure you want to make your activity visible to them?":"Are you sure you want to hide all your activity from them?";this.$notify({group:"modal",type:"confirm",title:"Set Visibility",text:t,onYes:async()=>{await this.setVisibility(e,o,!0)&&(e.seesMe=o)}},-1)}async register(e){var o;this.$notify({group:"alert",type:"toast",title:"Sent..."},1e3);try{const t=await q(this.activeDid,this.apiServer,this.axios,e);t.success?(e.registered=!0,await k.contacts.update(e.did,{registered:!0}),this.$notify({group:"alert",type:"success",title:"Registration Success",text:(e.name||"That unnamed person")+" has been registered."},3e3)):this.$notify({group:"alert",type:"danger",title:"Registration Error",text:t.error||"Something went wrong during registration."},5e3)}catch(t){const i="Error when registering: "+x(t);T(i,!0);let n="There was an error.";const a=t;a.isAxiosError?(o=a.response)!=null&&o.data&&typeof a.response.data=="object"&&"error"in a.response.data&&typeof a.response.data.error=="object"&&a.response.data.error!==null&&"message"in a.response.data.error?n=a.response.data.error.message:a.message?n=a.message:n=JSON.stringify(a.toJSON()):n=t,this.$notify({group:"alert",type:"danger",title:"Registration Error",text:n},5e3)}}async setVisibility(e,o,t){const i=await z(this.activeDid,this.apiServer,this.axios,k,e,o);if(i.success)return t&&this.$notify({group:"alert",type:"success",title:"Visibility Set",text:(e.name||"That user")+" can "+(o?"":"not ")+"see your activity."},3e3),!0;{console.error("Got strange result from setting visibility. It can happen when setting visibility on oneself.",i);const n=i.error||"Could not set visibility on the server.";return this.$notify({group:"alert",type:"danger",title:"Error Setting Visibility",text:n},5e3),!1}}confirmShowGiftedDialog(e,o){if(o===this.activeDid&&this.givenToMeUnconfirmed[e]>0){const t=this.givenToMeUnconfirmed[e]==1?"is":"are",i=this.givenToMeUnconfirmed[e]==1?"hour":"hours",n="There "+t+" "+this.givenToMeUnconfirmed[e]+" unconfirmed "+i+" from them. Would you like to confirm some of those hours?";this.$notify({group:"modal",type:"confirm",title:"Delete",text:n,onNo:async()=>{this.showGiftedDialog(e,o)},onYes:async()=>{this.$router.push({name:"contact-amounts",query:{contactDid:e}})}},-1)}else this.showGiftedDialog(e,o)}showGiftedDialog(e,o){let t,i;e&&(t={did:e,name:R(this.activeDid,this.contacts,e)}),o&&(i={did:o,name:R(this.activeDid,this.contacts,o)});let n,a="";e==this.activeDid?(n=h=>{const l=U(this.givenByMeUnconfirmed);l[o]=(l[o]||0)+h,this.givenByMeUnconfirmed=l},a="Given to "+((i==null?void 0:i.name)||"Someone Unnamed")):(n=h=>{const l=U(this.givenToMeUnconfirmed);l[e]=(l[e]||0)+h,this.givenToMeUnconfirmed=l},a="Received from "+((t==null?void 0:t.name)||"Someone Unnamed")),this.$refs.customGivenDialog.open(t,i,void 0,a,void 0,n)}openOfferDialog(e,o){this.$refs.customOfferDialog.open(e,o)}async toggleShowContactAmounts(){const e=!this.showGiveNumbers;try{await $({showContactGivesInline:e})}catch(o){const t="Error updating contact-amounts setting: "+x(o);T(t,!0),this.$notify({group:"alert",type:"danger",title:"Error Updating Contact Setting",text:"The setting may not have saved. Try again, maybe after restarting the app."},5e3)}this.showGiveNumbers=e,e&&Object.keys(this.givenByMeDescriptions).length===0&&Object.keys(this.givenByMeConfirmed).length===0&&Object.keys(this.givenByMeUnconfirmed).length===0&&Object.keys(this.givenToMeDescriptions).length===0&&Object.keys(this.givenToMeConfirmed).length===0&&Object.keys(this.givenToMeUnconfirmed).length===0&&this.loadGives()}toggleShowGiveTotals(){this.showGiveTotals?(this.showGiveTotals=!1,this.showGiveConfirmed=!0):this.showGiveConfirmed?(this.showGiveTotals=!1,this.showGiveConfirmed=!1):(this.showGiveTotals=!0,this.showGiveConfirmed=!0)}showGiveAmountsClassNames(){return{"from-slate-400":this.showGiveTotals,"to-slate-700":this.showGiveTotals,"from-green-400":!this.showGiveTotals&&this.showGiveConfirmed,"to-green-700":!this.showGiveTotals&&this.showGiveConfirmed,"from-yellow-400":!this.showGiveTotals&&!this.showGiveConfirmed,"to-yellow-700":!this.showGiveTotals&&!this.showGiveConfirmed}}async copySelectedContacts(){if(this.contactsSelected.length===0){this.danger("You must select contacts to copy.");return}const o=this.contacts.filter(n=>this.contactsSelected.includes(n.did)).map(n=>{const a={did:n.did,name:n.name};return n.nextPubKeyHashB64&&(a.nextPubKeyHashB64=n.nextPubKeyHashB64),n.profileImageUrl&&(a.profileImageUrl=n.profileImageUrl),n.publicKeyBase64&&(a.publicKeyBase64=n.publicKeyBase64),a}),t=await Q(this.activeDid,{contacts:o}),i=te+"/contact-import/"+t;de().copy(i).then(()=>{this.$notify({group:"alert",type:"info",title:"Copied",text:"The link for those contacts is now in the clipboard."},3e3)})}showCopySelectionsInfo(){this.$notify({group:"alert",type:"info",title:"Copying Contacts",text:"Contact info will include name, ID, profile image, and public key."},5e3)}async showOnboardMeetingDialog(){try{const e=await M(this.activeDid);(await this.axios.get(this.apiServer+"/api/partner/groupOnboardMember",{headers:e})).data.data?(await this.axios.get(this.apiServer+"/api/partner/groupOnboard",{headers:e})).data.data?this.$router.push({name:"onboard-meeting-setup"}):this.$router.push({name:"onboard-meeting-list"}):this.$notify({group:"modal",type:"confirm",title:"Onboarding Meeting",text:"Would you like to start a new meeting?",onYes:async()=>{this.$router.push({name:"onboard-meeting-setup"})},yesText:"Start New Meeting",onNo:async()=>{this.$router.push({name:"onboard-meeting-list"})},noText:"Join Existing Meeting"},-1)}catch(e){T("Error checking meeting status:"+x(e)),this.danger("There was an error checking your meeting status.","Meeting Error")}}};O=ye([se({components:{GiftedDialog:he,EntityIcon:ce,OfferDialog:ue,QuickNav:le,ContactNameDialog:me,TopMessage:ge}})],O);const we={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},be={id:"formAddNewContact",class:"mt-4 mb-4 flex items-stretch"},ve={key:0,class:"flex"},Ce={key:1,class:"flex"},xe={class:"flex items-center bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-1 mr-1 rounded-md"},Te={class:"flex items-center bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-1 mr-1 rounded-md"},Se={key:0,class:"flex justify-between"},ke={class:"w-full text-left"},_e={key:0},De=["checked"],Ne={class:"w-full text-right"},Ie={key:1,class:"flex justify-between mt-1"},Me={class:"w-full text-right"},Ge={class:"text-sm uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1 py-1 rounded-md"},$e={key:2,id:"listContacts",class:"border-t border-slate-300 mt-1"},Oe={class:"grow overflow-hidden"},Ee={class:"flex items-center"},Ae=["checked","onClick"],Re={class:"text-base font-semibold ml-2 w-1/3 truncate flex-shrink-0"},Ue={class:"flex items-center"},Be={class:"ml-4 text-sm overflow-hidden"},Pe={class:"ml-4 text-sm"},Ke={id:"ContactActions",class:"flex gap-1.5 mt-2"},He={key:0,class:"ml-auto flex gap-1.5"},Ve=["title","onClick"],je=["title","onClick"],Le=["onClick"],Je={key:3},Fe={key:4,class:"mt-2 w-full text-left"},Ye=["checked"],We={key:5,class:"fixed z-[100] top-0 inset-x-0 w-full"},qe={class:"absolute inset-0 h-screen flex flex-col items-center justify-center bg-slate-900/50"};function ze(s,r,e,o,t,i){const n=S("QuickNav"),a=S("TopMessage"),h=S("font-awesome"),l=S("router-link"),y=S("EntityIcon"),g=S("GiftedDialog"),w=S("OfferDialog"),v=S("ContactNameDialog");return p(),f(K,null,[m(n,{selected:"Contacts"}),m(a),c("section",we,[r[19]||(r[19]=c("h1",{id:"ViewHeading",class:"text-4xl text-center font-light"}," Your Contacts ",-1)),r[20]||(r[20]=c("div",{class:"flex justify-between py-2 mt-8"},[c("span"),c("span",null,[c("a",{href:"/help-onboarding",target:"_blank",class:"text-xs uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-1 rounded-md ml-1"}," Onboarding Guide ")])],-1)),c("div",be,[s.isRegistered?(p(),f("span",ve,[m(l,{to:{name:"invite-one"},class:"flex items-center bg-gradient-to-b from-green-400 to-green-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-1 mr-1 rounded-md"},{default:N(()=>[m(h,{icon:"envelope-open-text",class:"fa-fw text-2xl"})]),_:1}),c("button",{class:"flex items-center bg-gradient-to-b from-green-400 to-green-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-1 mr-1 rounded-md",onClick:r[0]||(r[0]=d=>s.showOnboardMeetingDialog())},[m(h,{icon:"chair",class:"fa-fw text-2xl"})])])):(p(),f("span",Ce,[c("span",xe,[m(h,{icon:"envelope-open-text",class:"fa-fw text-2xl",onClick:r[1]||(r[1]=d=>s.warning("You must get registered before you can create invites.","Not Registered"))})]),c("span",Te,[m(h,{icon:"chair",class:"fa-fw text-2xl",onClick:r[2]||(r[2]=d=>s.warning("You must get registered before you can initiate an onboarding meeting.","Not Registered"))})])])),m(l,{to:{name:"contact-qr"},class:"flex items-center bg-gradient-to-b from-green-400 to-green-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-1 mr-1 rounded-md"},{default:N(()=>[m(h,{icon:"qrcode",class:"fa-fw text-2xl"})]),_:1}),ie(c("textarea",{"onUpdate:modelValue":r[3]||(r[3]=d=>s.contactInput=d),type:"text",placeholder:"New URL or DID, Name, Public Key, Next Public Key Hash",class:"block w-full rounded-l border border-r-0 border-slate-400 px-3 py-2 h-10"},null,512),[[ne,s.contactInput]]),c("button",{class:"px-4 rounded-r bg-green-200 border border-l-0 border-green-400",onClick:r[4]||(r[4]=d=>s.onClickNewContact())},[m(h,{icon:"plus",class:"fa-fw"})])]),s.contacts.length>0?(p(),f("div",Se,[c("div",ke,[s.showGiveNumbers?b("",!0):(p(),f("div",_e,[c("input",{type:"checkbox",checked:s.contactsSelected.length===s.contacts.length,class:"align-middle ml-2 h-6 w-6","data-testId":"contactCheckAllTop",onClick:r[5]||(r[5]=d=>s.contactsSelected.length===s.contacts.length?s.contactsSelected=[]:s.contactsSelected=s.contacts.map(C=>C.did))},null,8,De),s.showGiveNumbers?b("",!0):(p(),f("button",{key:0,href:"",class:"text-md bg-gradient-to-b shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white ml-2 px-1 py-1 rounded-md",style:P(s.contactsSelected.length>0?"background-image: linear-gradient(to bottom, #3b82f6, #1e40af);":"background-image: linear-gradient(to bottom, #94a3b8, #374151);"),"data-testId":"copySelectedContactsButtonTop",onClick:r[6]||(r[6]=d=>s.copySelectedContacts())}," Copy Selections ",4)),c("button",{onClick:r[7]||(r[7]=d=>s.showCopySelectionsInfo())},[m(h,{icon:"circle-info",class:"text-xl text-blue-500 ml-4"})])]))]),c("div",Ne,[c("button",{href:"",class:"text-md bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1 py-1 rounded-md",onClick:r[8]||(r[8]=d=>s.toggleShowContactAmounts())},_(s.showGiveNumbers?"Hide Hours, Offer, etc":"See Hours, Offer, etc"),1)])])):b("",!0),s.showGiveNumbers?(p(),f("div",Ie,[c("div",Me,[r[13]||(r[13]=D(" In the following, only the most recent hours are included. To see more, click ")),c("span",Ge,[m(h,{icon:"file-lines",class:"fa-fw"})]),r[14]||(r[14]=c("br",null,null,-1)),c("button",{href:"",class:re(["text-md bg-gradient-to-b shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-1 rounded-md mt-1",s.showGiveAmountsClassNames()]),onClick:r[9]||(r[9]=d=>s.toggleShowGiveTotals())},[D(_(s.showGiveTotals?"Totals":s.showGiveConfirmed?"Confirmed Amounts":"Unconfirmed Amounts")+" ",1),m(h,{icon:"left-right",class:"fa-fw"})],2)])])):b("",!0),s.contacts.length>0?(p(),f("ul",$e,[(p(!0),f(K,null,ae(s.filteredContacts(),d=>(p(),f("li",{key:d.did,class:"border-b border-slate-300 pt-1 pb-1","data-testId":"contactListItem"},[c("div",Oe,[c("div",Ee,[m(y,{contact:d,"icon-size":24,class:"inline-block align-text-bottom border border-slate-300 rounded cursor-pointer",onClick:C=>s.showLargeIdenticon=d},null,8,["contact","onClick"]),s.showGiveNumbers?b("",!0):(p(),f("input",{key:0,type:"checkbox",checked:s.contactsSelected.includes(d.did),class:"ml-2 h-6 w-6 flex-shrink-0","data-testId":"contactCheckOne",onClick:C=>s.contactsSelected.includes(d.did)?s.contactsSelected.splice(s.contactsSelected.indexOf(d.did),1):s.contactsSelected.push(d.did)},null,8,Ae)),c("h2",Re,_(s.contactNameNonBreakingSpace(d.name)),1),c("span",null,[c("div",Ue,[m(l,{to:{path:"/did/"+encodeURIComponent(d.did)},title:"See more about this person"},{default:N(()=>[m(h,{icon:"circle-info",class:"text-xl text-blue-500 ml-4"})]),_:2},1032,["to"]),c("span",Be,_(s.libsUtil.shortDid(d.did)),1)]),c("div",Pe,_(d.notes),1)])]),c("div",Ke,[s.showGiveNumbers&&d.did!=s.activeDid?(p(),f("div",He,[c("button",{class:"text-sm bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-1.5 rounded-l-md",title:s.givenToMeDescriptions[d.did]||"",onClick:C=>s.confirmShowGiftedDialog(d.did,s.activeDid)},[r[15]||(r[15]=D(" From: ")),r[16]||(r[16]=c("br",null,null,-1)),D(" "+_(s.showGiveTotals?(s.givenToMeConfirmed[d.did]||0)+(s.givenToMeUnconfirmed[d.did]||0):s.showGiveConfirmed?s.givenToMeConfirmed[d.did]||0:s.givenToMeUnconfirmed[d.did]||0),1)],8,Ve),c("button",{class:"text-sm bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white -ml-1.5 px-2 py-1.5 rounded-r-md border-l",title:s.givenByMeDescriptions[d.did]||"",onClick:C=>s.confirmShowGiftedDialog(s.activeDid,d.did)},[r[17]||(r[17]=D(" To: ")),r[18]||(r[18]=c("br",null,null,-1)),D(" "+_(s.showGiveTotals?(s.givenByMeConfirmed[d.did]||0)+(s.givenByMeUnconfirmed[d.did]||0):s.showGiveConfirmed?s.givenByMeConfirmed[d.did]||0:s.givenByMeUnconfirmed[d.did]||0),1)],8,je),c("button",{class:"text-sm bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-1.5 rounded-md border border-blue-400","data-testId":"offerButton",onClick:C=>s.openOfferDialog(d.did,d.name)}," Offer ",8,Le),m(l,{to:{name:"contact-amounts",query:{contactDid:d.did}},class:"text-sm bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-1.5 rounded-md border border-slate-400",title:"See more given activity"},{default:N(()=>[m(h,{icon:"file-lines",class:"fa-fw"})]),_:2},1032,["to"])])):b("",!0)])])]))),128))])):(p(),f("p",Je,"There are no contacts.")),s.contacts.length>0?(p(),f("div",Fe,[s.showGiveNumbers?b("",!0):(p(),f("input",{key:0,type:"checkbox",checked:s.contactsSelected.length===s.contacts.length,class:"align-middle ml-2 h-6 w-6","data-testId":"contactCheckAllBottom",onClick:r[10]||(r[10]=d=>s.contactsSelected.length===s.contacts.length?s.contactsSelected=[]:s.contactsSelected=s.contacts.map(C=>C.did))},null,8,Ye)),s.showGiveNumbers?b("",!0):(p(),f("button",{key:1,href:"",class:"text-md bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white ml-2 px-1 py-1 rounded-md",style:P(s.contactsSelected.length>0?"background-image: linear-gradient(to bottom, #3b82f6, #1e40af);":"background-image: linear-gradient(to bottom, #94a3b8, #374151);"),onClick:r[11]||(r[11]=d=>s.copySelectedContacts())}," Copy Selections ",4))])):b("",!0),m(g,{ref:"customGivenDialog"},null,512),m(w,{ref:"customOfferDialog"},null,512),m(v,{ref:"contactNameDialog"},null,512),s.showLargeIdenticon?(p(),f("div",We,[c("div",qe,[m(y,{contact:s.showLargeIdenticon,"icon-size":512,class:"flex w-11/12 max-w-sm mx-auto mb-3 overflow-hidden bg-white rounded-lg shadow-lg",onClick:r[12]||(r[12]=d=>s.showLargeIdenticon=void 0)},null,8,["contact"])])])):b("",!0)])],64)}const ht=oe(O,[["render",ze]]);export{ht as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/DIDView-CYsX9_-v.css b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/DIDView-CYsX9_-v.css deleted file mode 100644 index ee9f244..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/DIDView-CYsX9_-v.css +++ /dev/null @@ -1 +0,0 @@ -.dialog-overlay{z-index:50;position:fixed;top:0;left:0;right:0;bottom:0;background-color:#00000080;display:flex;justify-content:center;align-items:center;padding:1.5rem}.dialog{background-color:#fff;padding:1rem;border-radius:.5rem;width:100%;max-width:500px} diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/DIDView-DsYtCrHy.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/DIDView-DsYtCrHy.js deleted file mode 100644 index 32e95c3..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/DIDView-DsYtCrHy.js +++ /dev/null @@ -1 +0,0 @@ -var z=Object.defineProperty;var G=(e,i,t)=>i in e?z(e,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[i]=t;var c=(e,i,t)=>G(e,typeof i!="symbol"?i+"":i,t);import{y as Y,d as P}from"./js-yaml-CxlQHuPU.js";import{V as Q,e as q,d as g,C as J,_ as H,h as u,j as h,k as n,m as y,n as k,t as f,w as U,y as b,F as R,z as v,B as d,E as Z}from"./main.common-DD7dqhZp.js";import{Q as K}from"./QuickNav-C8jPGtUY.js";import{I as W}from"./InfiniteScroll-DZwFAI4R.js";import{T as X}from"./TopMessage-ZWDDjman.js";import{l as ee,J as te,Z as ie,z as C,h as se,_ as I,Q as oe,g as O,M as ne}from"./index-ryzpKtgI.js";import{E as re}from"./EntityIcon-DciUb57i.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var ae=Object.getOwnPropertyDescriptor,le=(e,i,t,o)=>{for(var s=o>1?void 0:o?ae(i,t):i,a=e.length-1,r;a>=0;a--)(r=e[a])&&(s=r(s)||s);return s};let x=class extends Q{constructor(){super(...arguments);c(this,"$notify");c(this,"$route");c(this,"$router");c(this,"libsUtil",ee);c(this,"yaml",Y);c(this,"activeDid","");c(this,"apiServer","");c(this,"claims",[]);c(this,"contactFromDid");c(this,"contactYaml","");c(this,"hitEnd",!1);c(this,"isLoading",!1);c(this,"isMyDid",!1);c(this,"searchBox",null);c(this,"showDidDetails",!1);c(this,"showLargeIdenticonId");c(this,"showLargeIdenticonUrl");c(this,"viewingDid");c(this,"capitalizeAndInsertSpacesBeforeCaps",te);c(this,"didInfoForContact",ie);c(this,"displayAmount",C)}async mounted(){const t=await q();this.activeDid=t.activeDid||"",this.apiServer=t.apiServer||"";let s=window.location.pathname.substring(5);if(s||(s=this.activeDid,s&&this.$notify({group:"alert",type:"toast",title:"Your Info",text:"No user was specified so showing your info."},3e3)),s){this.viewingDid=decodeURIComponent(s),this.contactFromDid=await g.contacts.get(this.viewingDid),this.contactFromDid&&(this.contactYaml=P(this.contactFromDid)),await this.loadClaimsAbout();const a=await se();this.isMyDid=a.includes(this.viewingDid)}}async loadMoreData(t){this.claims.length>0&&!this.hitEnd&&t&&this.loadClaimsAbout()}confirmDeleteContact(t){let o="Are you sure you want to remove "+I(t,!1)+" from your contact list?";t.seesMe&&(o+=" Note that they can see your activity, so if you want to hide your activity from them then you should do that first."),this.$notify({group:"modal",type:"confirm",title:"Delete",text:o,onYes:async()=>{await this.deleteContact(t)}},-1)}async deleteContact(t){await g.open(),await g.contacts.delete(t.did),this.$notify({group:"alert",type:"success",title:"Deleted",text:"Contact has been removed."},3e3),this.$router.push({name:"contacts"})}async confirmRegister(t){this.$notify({group:"modal",type:"confirm",title:"Register",text:"Are you sure you want to register "+I(this.contactFromDid,!1)+(t.registered?" -- especially since they are already marked as registered":"")+"?",onYes:async()=>{await this.register(t)}},-1)}async register(t){var o,s,a;this.$notify({group:"alert",type:"toast",title:"Sent..."},1e3);try{const r=await oe(this.activeDid,this.apiServer,this.axios,t);r.success?(t.registered=!0,await g.contacts.update(t.did,{registered:!0}),this.$notify({group:"alert",type:"success",title:"Registration Success",text:(t.name||"That unnamed person")+" has been registered."},5e3)):this.$notify({group:"alert",type:"danger",title:"Registration Error",text:r.error||"Something went wrong during registration."},5e3)}catch(r){console.error("Error when registering:",r);let l="There was an error.";const m=r;m?(a=(s=(o=m.response)==null?void 0:o.data)==null?void 0:s.error)!=null&&a.message?l=m.response.data.error.message:m.message?l=m.message:l=JSON.stringify(m.toJSON()):l=r,this.$notify({group:"alert",type:"danger",title:"Registration Error",text:l},5e3)}}async loadClaimsAbout(){if(!this.viewingDid){console.error("This should never be called without a DID.");return}const t="claimContents="+encodeURIComponent(this.viewingDid);let o="";this.claims.length>0&&(o="&beforeId="+this.claims[this.claims.length-1].id);try{this.isLoading=!0;const s=await fetch(this.apiServer+"/api/v2/report/claims?"+t+o,{method:"GET",headers:await O(this.activeDid)});if(s.status!==200){const r=await s.text();console.error("Problem with full search:",r),this.$notify({group:"alert",type:"danger",title:"Error",text:"There was a problem accessing the server. Try again later."},5e3);return}const a=await s.json();this.claims=this.claims.concat(a.data),this.hitEnd=!a.hitLimit}catch(s){console.error("Error with feed load:",s),this.$notify({group:"alert",type:"danger",title:"Error",text:s.userMessage||"There was a problem retrieving claims."},3e3)}finally{this.isLoading=!1}}onClickLoadClaim(t){const o={path:"/claim/"+encodeURIComponent(t)};this.$router.push(o)}claimAmount(t){var o,s,a,r;if(t.claimType==="GiveAction"){const l=t.claim;return(o=l.object)!=null&&o.unitCode&&((s=l.object)!=null&&s.amountOfThisGood)?C(l.object.unitCode,l.object.amountOfThisGood):""}else if(t.claimType==="Offer"){const l=t.claim;return(a=l.includesObject)!=null&&a.unitCode&&((r=l.includesObject)!=null&&r.amountOfThisGood)?C(l.includesObject.unitCode,l.includesObject.amountOfThisGood):""}return""}claimDescription(t){return t.claim.name||t.claim.description||""}async confirmSetVisibility(t,o){const s=o?"Are you sure you want to make your activity visible to them?":"Are you sure you want to hide all your activity from them?";this.$notify({group:"modal",type:"confirm",title:"Set Visibility",text:s,onYes:async()=>{await this.setVisibility(t,o,!0)&&(t.seesMe=o)}},-1)}async setVisibility(t,o,s){const a=await ne(this.activeDid,this.apiServer,this.axios,g,t,o);if(a.success)return s&&this.$notify({group:"alert",type:"success",title:"Visibility Set",text:(t.name||"That user")+" can "+(o?"":"not ")+"see your activity."},3e3),!0;{console.error("Got strange result from setting visibility:",a);const r=a.error||"Could not set visibility on the server.";return this.$notify({group:"alert",type:"danger",title:"Error Setting Visibility",text:r},5e3),!1}}async checkVisibility(t){var a;const o=this.apiServer+"/api/report/canDidExplicitlySeeMe?did="+encodeURIComponent(t.did),s=await O(this.activeDid);if(!s.Authorization){this.$notify({group:"alert",type:"danger",title:"No Identity",text:"There is no identity to use to check visibility."},3e3);return}try{const r=await this.axios.get(o,{headers:s});if(r.status===200){const l=r.data;t.seesMe=l,await g.contacts.update(t.did,{seesMe:l}),this.$notify({group:"alert",type:"info",title:"Visibility Refreshed",text:I(t,!0)+" can "+(l?"":"not ")+"see your activity."},3e3)}else{console.error("Got bad server response checking visibility:",r);const l=((a=r.data.error)==null?void 0:a.message)||"Got bad server response.";this.$notify({group:"alert",type:"danger",title:"Error Checking Visibility",text:l},5e3)}}catch(r){console.error("Caught error from request to check visibility:",r),this.$notify({group:"alert",type:"danger",title:"Error Checking Visibility",text:"Check connectivity and try again."},3e3)}}};x=le([J({components:{EntityIcon:re,InfiniteScroll:W,QuickNav:K,TopMessage:X}})],x);const de={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},ce={id:"ViewBreadcrumb",class:"mb-8"},me={id:"ViewHeading",class:"text-lg text-center font-light relative px-7"},ue={key:0,class:"bg-slate-100 rounded-md overflow-hidden px-4 py-3 mb-4"},pe={class:"text-xl font-semibold"},he={key:0,class:"text-sm overflow-x-scroll px-4 py-3 bg-slate-100 rounded-md"},ye={class:"flex justify-center mt-4"},fe={key:0,class:"flex justify-between"},ge={class:"flex justify-between mt-4"},ve={class:"flex items-center"},be={key:0,class:"flex justify-between"},we={key:0},De={class:"flex justify-center"},ke={key:0,class:"fixed z-[100] top-0 inset-x-0 w-full"},Ce={class:"absolute inset-0 h-screen flex flex-col items-center justify-center bg-slate-900/50"},Ie={key:1,class:"bg-slate-100 rounded-md overflow-hidden px-4 py-3 mb-4"},xe={class:"text-xl font-semibold"},$e={key:2,class:"fixed left-6 bottom-24 text-center text-4xl leading-none bg-slate-400 text-white w-14 py-2.5 rounded-full"},Fe={key:3,class:"mt-4"},_e={class:"text-l font-bold text-center"},Se={class:"grid grid-cols-12 gap-4"},Te={class:"col-span-2"},Ve={class:"col-span-2"},Ae={class:"col-span-2"},Ee={class:"col-span-5"},Me={class:"col-span-1"},Le=["onClick"],je={key:4,class:"flex justify-center mt-4"},Ue={key:0},Re={key:1};function Oe(e,i,t,o,s,a){var $,F,_,S,T,V,A,E,M,L,j;const r=v("QuickNav"),l=v("TopMessage"),m=v("font-awesome"),B=v("router-link"),w=v("EntityIcon"),N=v("InfiniteScroll");return d(),u(R,null,[h(r,{selected:"Contacts"}),h(l),n("section",de,[n("div",ce,[n("h1",me,[n("button",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:i[0]||(i[0]=p=>e.$router.go(-1))},[h(m,{icon:"chevron-left",class:"fa-fw"})]),i[10]||(i[10]=k(" Identifier Details "))])]),e.contactFromDid?(d(),u("div",ue,[n("div",null,[n("h2",pe,[k(f((($=e.contactFromDid)==null?void 0:$.name)||"(no name)")+" ",1),h(B,{to:{name:"contact-edit",params:{did:(F=e.contactFromDid)==null?void 0:F.did}}},{default:U(()=>[h(m,{icon:"pen",class:"text-sm text-blue-500 ml-2 mb-1"})]),_:1},8,["to"])]),n("button",{class:"ml-2 mr-2 mt-4",onClick:i[1]||(i[1]=p=>e.showDidDetails=!e.showDidDetails)},[i[11]||(i[11]=k(" Details ")),e.showDidDetails?(d(),b(m,{key:0,icon:"chevron-down",class:"text-blue-400"})):(d(),b(m,{key:1,icon:"chevron-right",class:"text-blue-400"}))]),e.showDidDetails?(d(),u("pre",he,f(e.contactYaml),1)):y("",!0)]),n("div",ye,[(_=e.contactFromDid)!=null&&_.profileImageUrl?(d(),u("span",fe,[h(w,{"icon-size":96,"profile-image-url":(S=e.contactFromDid)==null?void 0:S.profileImageUrl,class:"inline-block align-text-bottom border border-slate-300 rounded",onClick:i[2]||(i[2]=p=>{var D;return e.showLargeIdenticonUrl=(D=e.contactFromDid)==null?void 0:D.profileImageUrl})},null,8,["profile-image-url"])])):y("",!0)]),n("div",ge,[n("div",ve,[e.activeDid?(d(),u("div",be,[n("div",null,[(T=e.contactFromDid)!=null&&T.seesMe&&e.contactFromDid.did!==e.activeDid?(d(),u("button",{key:0,class:"text-sm uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white mx-0.5 my-0.5 px-2 py-1.5 rounded-md",title:"They can see you",onClick:i[3]||(i[3]=p=>e.confirmSetVisibility(e.contactFromDid,!1))},[h(m,{icon:"eye",class:"fa-fw"})])):!((V=e.contactFromDid)!=null&&V.seesMe)&&((A=e.contactFromDid)==null?void 0:A.did)!==e.activeDid?(d(),u("button",{key:1,class:"text-sm uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white mx-0.5 my-0.5 px-2 py-1.5 rounded-md",title:"They cannot see you",onClick:i[4]||(i[4]=p=>e.confirmSetVisibility(e.contactFromDid,!0))},[h(m,{icon:"eye-slash",class:"fa-fw"})])):y("",!0),((E=e.contactFromDid)==null?void 0:E.did)!==e.activeDid?(d(),u("button",{key:2,class:"text-sm uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white mx-0.5 my-0.5 px-2 py-1.5 rounded-md",title:"Check Visibility",onClick:i[5]||(i[5]=p=>e.checkVisibility(e.contactFromDid))},[h(m,{icon:"rotate",class:"fa-fw"})])):y("",!0)]),((M=e.contactFromDid)==null?void 0:M.did)!==e.activeDid?(d(),u("button",{key:0,class:"text-sm uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white ml-6 mx-0.5 my-0.5 px-2 py-1.5 rounded-md",title:"Registration",onClick:i[6]||(i[6]=p=>e.confirmRegister(e.contactFromDid))},[(L=e.contactFromDid)!=null&&L.registered?(d(),b(m,{key:0,icon:"person-circle-check",class:"fa-fw"})):(d(),b(m,{key:1,icon:"person-circle-question",class:"fa-fw"}))])):y("",!0)])):y("",!0),n("button",{class:"text-sm uppercase bg-gradient-to-b from-rose-500 to-rose-800 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white ml-6 mx-0.5 my-0.5 px-2 py-1.5 rounded-md",title:"Delete",onClick:i[7]||(i[7]=p=>e.confirmDeleteContact(e.contactFromDid))},[h(m,{icon:"trash-can",class:"fa-fw"})])]),(j=e.contactFromDid)!=null&&j.profileImageUrl?y("",!0):(d(),u("div",we,[i[12]||(i[12]=n("div",null,"Auto-Generated Icon",-1)),n("div",De,[h(w,{"entity-id":e.viewingDid,"icon-size":64,class:"inline-block align-middle border border-slate-300 rounded-md mr-1",onClick:i[8]||(i[8]=p=>e.showLargeIdenticonId=e.viewingDid)},null,8,["entity-id"])])]))]),e.showLargeIdenticonId||e.showLargeIdenticonUrl?(d(),u("div",ke,[n("div",Ce,[h(w,{"entity-id":e.showLargeIdenticonId,"icon-size":512,"profile-image-url":e.showLargeIdenticonUrl,class:"flex w-11/12 max-w-sm mx-auto mb-3 overflow-hidden bg-white rounded-lg shadow-lg",onClick:i[9]||(i[9]=p=>{e.showLargeIdenticonId=void 0,e.showLargeIdenticonUrl=void 0})},null,8,["entity-id","profile-image-url"])])])):y("",!0)])):(d(),u("div",Ie,[n("div",null,[n("h2",xe,f(e.isMyDid?"You":"(no name)"),1)])])),e.isLoading?(d(),u("div",$e,[h(m,{icon:"spinner",class:"fa-spin-pulse"})])):y("",!0),e.claims.length>0?(d(),u("div",Fe,[n("div",_e," Claims That Involve "+f(e.isMyDid?"You":"Them"),1)])):y("",!0),h(N,{onReachedBottom:e.loadMoreData},{default:U(()=>[n("ul",null,[(d(!0),u(R,null,Z(e.claims,p=>(d(),u("li",{key:p.handleId,class:"border-b border-slate-300"},[n("div",Se,[n("span",Te,f(p.issuedAt.substring(0,10)),1),n("span",Ve,f(e.capitalizeAndInsertSpacesBeforeCaps(p.claimType)),1),n("span",Ae,f(e.claimAmount(p)),1),n("span",Ee,f(e.claimDescription(p)),1),n("span",Me,[n("a",{class:"cursor-pointer",onClick:D=>e.onClickLoadClaim(p.id)},[h(m,{icon:"file-lines",class:"pl-2 pt-1 text-blue-500"})],8,Le)])])]))),128))])]),_:1},8,["onReachedBottom"]),!e.isLoading&&e.claims.length===0?(d(),u("div",je,[e.isMyDid?(d(),u("span",Ue,"You have no claims yet.")):(d(),u("span",Re,"They are in no claims visible to you."))])):y("",!0)])],64)}const We=H(x,[["render",Oe]]);export{We as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/DiscoverView-DB9VWQSd.css b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/DiscoverView-DB9VWQSd.css deleted file mode 100644 index 52922c3..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/DiscoverView-DB9VWQSd.css +++ /dev/null @@ -1 +0,0 @@ -.numbered-marker{display:flex;align-items:center;justify-content:center;text-align:center;font-size:14px;font-weight:700;color:#fff;background:#00f;width:24px;height:24px;border-radius:50%;border:2px solid white} diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/DiscoverView-DkKWeZ06.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/DiscoverView-DkKWeZ06.js deleted file mode 100644 index 2bc3448..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/DiscoverView-DkKWeZ06.js +++ /dev/null @@ -1 +0,0 @@ -var $=Object.defineProperty;var x=(e,o,t)=>o in e?$(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t;var n=(e,o,t)=>x(e,typeof o!="symbol"?o+"":o,t);/* empty css */import{a as C}from"./leaflet-src-Dm7ILaeL.js";import{V as B,b as I,e as E,d as R,l as V,C as F,_ as O,h as p,j as f,k as r,m as b,S as q,o as z,s as Z,Y as U,x as g,n as L,t as y,w as M,F as j,z as A,B as u,E as D}from"./main.common-DD7dqhZp.js";import{v as Q,i as J}from"./vue-leaflet.es-DQekxOGR.js";import{Q as G}from"./QuickNav-C8jPGtUY.js";import{I as H}from"./InfiniteScroll-DZwFAI4R.js";import{P as W}from"./ProjectIcon-ChPLhl-Y.js";import{O as X}from"./OnboardingDialog-DKHXNqS_.js";import{T as K}from"./TopMessage-ZWDDjman.js";import{i as Y,h as _,$ as ee,g as T,e as te}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var se=Object.getOwnPropertyDescriptor,oe=(e,o,t,a)=>{for(var c=a>1?void 0:a?se(o,t):o,s=e.length-1,m;s>=0;s--)(m=e[s])&&(c=m(c)||c);return c};let k=class extends B{constructor(){super(...arguments);n(this,"$notify");n(this,"$router");n(this,"$route");n(this,"activeDid","");n(this,"allContacts",[]);n(this,"allMyDids",[]);n(this,"apiServer","");n(this,"isLoading",!1);n(this,"isLocalActive",!1);n(this,"isMappedActive",!1);n(this,"isAnywhereActive",!0);n(this,"isProjectsActive",!0);n(this,"isPeopleActive",!1);n(this,"isSearchVisible",!0);n(this,"localCenterLat",0);n(this,"localCenterLong",0);n(this,"localCount",-1);n(this,"markers",{});n(this,"partnerApiServer",I);n(this,"projects",[]);n(this,"remoteCount",-1);n(this,"searchBox",null);n(this,"searchTerms","");n(this,"tempSearchBox",null);n(this,"userProfiles",[]);n(this,"zoomedSoDoNotMove",!1);n(this,"didInfo",Y)}async mounted(){var c,s;this.searchTerms=((c=this.$route.query.searchText)==null?void 0:c.toString())||"";const t=!!this.$route.query.searchPeople,a=await E();this.activeDid=a.activeDid||"",this.apiServer=a.apiServer||"",this.partnerApiServer=a.partnerApiServer||this.partnerApiServer,this.searchBox=((s=a.searchBoxes)==null?void 0:s[0])||null,this.allContacts=await R.contacts.toArray(),this.allMyDids=await _(),a.finishedOnboarding||this.$refs.onboardingDialog.open(ee.Discover),t&&(this.isPeopleActive=!0,this.isProjectsActive=!1,this.isMappedActive=!0,this.isAnywhereActive=!1),this.isMappedActive||await this.searchSelected()}resetCounts(){this.localCount=-1,this.remoteCount=-1}async searchSelected(){if(this.isLocalActive)await this.searchLocal();else if(this.isMappedActive){const t=this.$refs.projectMap;this.requestTiles(t.leafletObject)}else await this.searchAll()}async searchAll(t){this.resetCounts(),t||(this.projects=[],this.userProfiles=[]);let a="claimContents="+encodeURIComponent(this.searchTerms);t&&(a=a+`&beforeId=${t}`);const c=this.isProjectsActive?this.apiServer+"/api/v2/report/plans":this.partnerApiServer+"/api/partner/userProfile";try{this.isLoading=!0;const s=await fetch(c+"?"+a,{method:"GET",headers:await T(this.activeDid)});if(s.status!==200)throw await s.text();const m=await s.json();if(this.isProjectsActive){this.userProfiles=[];const v=m.data;if(v)this.projects.push(...v),this.remoteCount=this.projects.length;else throw JSON.stringify(m)}else{this.projects=[];const v=m.data;if(v)this.userProfiles.push(...v),this.remoteCount=this.userProfiles.length;else throw JSON.stringify(m)}}catch(s){console.error("Error with search all:",s),console.error("Error with search all (error added): "+s),this.$notify({group:"alert",type:"danger",title:"Error Searching",text:s.userMessage||"There was a problem retrieving "+(this.isProjectsActive?"projects":"profiles")+"."},5e3)}finally{this.isLoading=!1}}async searchLocal(t){var v;this.resetCounts();const a=this.isMappedActive&&this.tempSearchBox||this.isLocalActive&&((v=this.searchBox)==null?void 0:v.bbox);if(!a){this.projects=[],this.userProfiles=[];return}t||(this.projects=[],this.userProfiles=[]);let s=["claimContents="+encodeURIComponent(this.searchTerms),"minLocLat="+a.minLat,"maxLocLat="+a.maxLat,"minLocLon="+a.westLong,"maxLocLon="+a.eastLong].join("&");t&&(s=s+`&beforeId=${t}`);const m=this.isProjectsActive?this.apiServer+"/api/v2/report/plansByLocation":this.partnerApiServer+"/api/partner/userProfile";try{this.isLoading=!0;const h=await fetch(m+"?"+s,{method:"GET",headers:await T(this.activeDid)});if(h.status!==200)throw await h.text();const d=await h.json();if(this.isProjectsActive){this.userProfiles=[];const l=d.data;if(l)this.projects.push(...l),this.localCount=this.projects.length;else throw JSON.stringify(d)}else{this.projects=[];const l=d.data;if(l)this.userProfiles.push(...l),this.localCount=this.userProfiles.length;else throw JSON.stringify(d)}}catch(h){console.error("Error with search local:",h),this.$notify({group:"alert",type:"danger",title:"Error",text:h.userMessage||"There was a problem retrieving "+(this.isProjectsActive?"projects":"profiles")+"."},5e3)}finally{this.isLoading=!1}}async loadMoreData(t){if(t){if(this.isProjectsActive&&this.projects.length>0){const a=this.projects[this.projects.length-1];this.isLocalActive||this.isMappedActive?this.searchLocal(a.rowId):this.isAnywhereActive&&this.searchAll(a.rowId)}else if(this.isPeopleActive&&this.userProfiles.length>0){const a=this.userProfiles[this.userProfiles.length-1];this.isLocalActive||this.isMappedActive?this.searchLocal(a.rowId||""):this.isAnywhereActive&&this.searchAll(a.rowId||"")}}}clearMarkers(){Object.values(this.markers).forEach(t=>t.remove()),this.markers={}}async onMapReady(t){t.setView([this.localCenterLat,this.localCenterLong],2),this.requestTiles(t)}onMoveStart(){}async onMoveEnd(t){this.zoomedSoDoNotMove?this.zoomedSoDoNotMove=!1:await this.requestTiles(t.target)}onZoomStart(){this.clearMarkers(),this.zoomedSoDoNotMove=!0}async onZoomEnd(t){await this.requestTiles(t.target)}async requestTiles(t){var a,c;try{const s=t.getBounds(),m=["minLocLat="+(s==null?void 0:s.getSouthWest().lat),"maxLocLat="+(s==null?void 0:s.getNorthEast().lat),"westLocLon="+(s==null?void 0:s.getSouthWest().lng),"eastLocLon="+(s==null?void 0:s.getNorthEast().lng)].join("&"),v=this.isProjectsActive?this.apiServer+"/api/v2/report/planCountsByBBox":this.partnerApiServer+"/api/partner/userProfileCountsByBBox",h=await fetch(v+"?"+m);if(h.status===200){this.clearMarkers();const d=await h.json();if(((c=(a=d.data)==null?void 0:a.tiles)==null?void 0:c.length)>0)for(const l of d.data.tiles){const w=(l.minFoundLat+l.maxFoundLat)/2,P=(l.minFoundLon+l.maxFoundLon)/2,S=C.divIcon({className:"numbered-marker",html:`${l.recordCount}`,iconSize:[24,24],iconAnchor:[12,12]}),i=C.marker([w,P],{icon:S});i.addTo(t),i.on("click",()=>{this.tempSearchBox={minLat:l.minFoundLat,maxLat:l.maxFoundLat,westLong:l.minFoundLon,eastLong:l.maxFoundLon},this.searchLocal()}),this.markers[""+l.indexLat+"X"+l.indexLon+"_"+l.minFoundLat+"X"+l.minFoundLon+"-"+l.maxFoundLat+"X"+l.maxFoundLon]=i}}else throw{message:"Got an error loading projects on the map.",response:{status:h.status,statusText:h.statusText,url:h.url}}}catch(s){V("Error loading projects on the map: "+te(s),!0),this.$notify({group:"alert",type:"danger",title:"Map Error",text:"There was a problem loading projects on the map."},3e3)}}onClickLoadItem(t){const a={path:this.isProjectsActive?"/project/"+encodeURIComponent(t):"/userProfile/"+encodeURIComponent(t)};this.$router.push(a)}computedLocalTabStyleClassNames(){return{"inline-block":!0,"py-3":!0,"rounded-t-lg":!0,"border-b-2":!0,active:this.isLocalActive,"text-black":this.isLocalActive,"border-black":this.isLocalActive,"font-semibold":this.isLocalActive,"text-blue-600":!this.isLocalActive,"border-transparent":!this.isLocalActive,"hover:border-slate-400":!this.isLocalActive}}computedMappedTabStyleClassNames(){return{"inline-block":!0,"py-3":!0,"rounded-t-lg":!0,"border-b-2":!0,active:this.isMappedActive,"text-black":this.isMappedActive,"border-black":this.isMappedActive,"font-semibold":this.isMappedActive,"text-blue-600":!this.isMappedActive,"border-transparent":!this.isMappedActive,"hover:border-slate-400":!this.isMappedActive}}computedRemoteTabStyleClassNames(){return{"inline-block":!0,"py-3":!0,"rounded-t-lg":!0,"border-b-2":!0,active:this.isAnywhereActive,"text-black":this.isAnywhereActive,"border-black":this.isAnywhereActive,"font-semibold":this.isAnywhereActive,"text-blue-600":!this.isAnywhereActive,"border-transparent":!this.isAnywhereActive,"hover:border-slate-400":!this.isAnywhereActive}}computedProjectsTabStyleClassNames(){return{"inline-block":!0,"py-3":!0,"rounded-t-lg":!0,"border-b-2":!0,active:this.isProjectsActive,"text-black":this.isProjectsActive,"border-black":this.isProjectsActive,"font-semibold":this.isProjectsActive,"text-blue-600":!this.isProjectsActive,"border-transparent":!this.isProjectsActive,"hover:border-slate-400":!this.isProjectsActive}}computedPeopleTabStyleClassNames(){return{"inline-block":!0,"py-3":!0,"rounded-t-lg":!0,"border-b-2":!0,active:this.isPeopleActive,"text-black":this.isPeopleActive,"border-black":this.isPeopleActive,"font-semibold":this.isPeopleActive,"text-blue-600":!this.isPeopleActive,"border-transparent":!this.isPeopleActive,"hover:border-slate-400":!this.isPeopleActive}}};k=oe([F({components:{InfiniteScroll:H,LMap:J,LTileLayer:Q,OnboardingDialog:X,ProjectIcon:W,QuickNav:G,TopMessage:K}})],k);const ie={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},re={class:"text-center text-slate-500 border-b border-slate-300 mb-4"},ae={class:"flex flex-wrap justify-center gap-4 -mb-px"},ne={class:"text-center text-slate-500 border-b border-slate-300"},le={class:"flex flex-wrap justify-center gap-4 -mb-px"},ce={key:0},he={class:"text-center"},de={key:1},pe={class:"mt-4 h-96 w-5/6 mx-auto"},ue={key:2,class:"fixed left-6 bottom-24 text-center text-4xl leading-none bg-slate-400 text-white w-14 py-2.5 rounded-full"},me={key:3,class:"text-center mt-8"},ve={class:"text-lg text-slate-500"},fe={key:0},Ae={key:0},be={key:1},ye={id:"listDiscoverResults"},ge=["onClick"],Le={class:"grow"},we={class:"text-base font-semibold"},Pe={class:"text-sm"},Se=["onClick"],je={class:"grow"},ke={class:"text-sm"},Ce={key:0,class:"mt-1 text-sm text-slate-600"},Me={key:1,class:"mt-1 text-xs text-slate-500"};function De(e,o,t,a,c,s){const m=A("QuickNav"),v=A("TopMessage"),h=A("OnboardingDialog"),d=A("font-awesome"),l=A("l-tile-layer"),w=A("l-map"),P=A("ProjectIcon"),S=A("InfiniteScroll");return u(),p(j,null,[f(m,{selected:"Discover"}),f(v),r("section",ie,[o[9]||(o[9]=r("h1",{id:"ViewHeading",class:"text-4xl text-center font-light"}," Discover Projects & People ",-1)),f(h,{ref:"onboardingDialog"},null,512),r("div",{id:"QuickSearch",class:"mt-8 mb-4 flex",style:q({visibility:e.isSearchVisible?"visible":"hidden"})},[z(r("input",{"onUpdate:modelValue":o[0]||(o[0]=i=>e.searchTerms=i),type:"text",placeholder:"Search…",class:"block w-full rounded-l border border-r-0 border-slate-400 px-3 py-2",onKeyup:o[1]||(o[1]=U(i=>e.searchSelected(),["enter"]))},null,544),[[Z,e.searchTerms]]),r("button",{class:"px-4 rounded-r bg-slate-200 border border-l-0 border-slate-400",onClick:o[2]||(o[2]=i=>e.searchSelected())},[f(d,{icon:"magnifying-glass",class:"fa-fw"})])],4),r("div",re,[r("ul",ae,[r("li",null,[r("a",{href:"#",class:g(e.computedProjectsTabStyleClassNames()),onClick:o[3]||(o[3]=i=>{e.projects=[],e.userProfiles=[],e.isProjectsActive=!0,e.isPeopleActive=!1,e.searchSelected()})}," Projects ",2)]),r("li",null,[r("a",{href:"#",class:g(e.computedPeopleTabStyleClassNames()),onClick:o[4]||(o[4]=i=>{e.projects=[],e.userProfiles=[],e.isProjectsActive=!1,e.isPeopleActive=!0,e.searchSelected()})}," People ",2)])])]),r("div",ne,[r("ul",le,[r("li",null,[r("a",{href:"#",class:g(e.computedLocalTabStyleClassNames()),onClick:o[5]||(o[5]=i=>{e.projects=[],e.userProfiles=[],e.isLocalActive=!0,e.isMappedActive=!1,e.isAnywhereActive=!1,e.isSearchVisible=!0,e.tempSearchBox=null,e.searchLocal()})}," Nearby ",2)]),r("li",null,[r("a",{href:"#",class:g(e.computedMappedTabStyleClassNames()),onClick:o[6]||(o[6]=i=>{e.projects=[],e.userProfiles=[],e.isLocalActive=!1,e.isMappedActive=!0,e.isAnywhereActive=!1,e.isSearchVisible=!1,e.searchTerms="",e.tempSearchBox=null})}," Mapped ",2)]),r("li",null,[r("a",{href:"#",class:g(e.computedRemoteTabStyleClassNames()),onClick:o[7]||(o[7]=i=>{e.projects=[],e.userProfiles=[],e.isLocalActive=!1,e.isMappedActive=!1,e.isAnywhereActive=!0,e.isSearchVisible=!0,e.tempSearchBox=null,e.searchAll()})}," Anywhere ",2)])])]),e.isLocalActive?(u(),p("div",ce,[r("div",he,[r("button",{class:"ml-2 mt-2 px-4 py-2 rounded-md bg-blue-200 text-blue-500",onClick:o[8]||(o[8]=i=>e.$router.push({name:"search-area"}))},[f(d,{icon:"location-dot",class:"fa-fw"}),L(" Select a "+y(e.searchBox?"Different":"")+" Location for Nearby Search ",1)])])])):b("",!0),e.isMappedActive&&!e.tempSearchBox?(u(),p("div",de,[r("div",pe,[f(w,{ref:"projectMap",onReady:e.onMapReady,onMoveend:e.onMoveEnd,onMovestart:e.onMoveStart,onZoomend:e.onZoomEnd,onZoomstart:e.onZoomStart},{default:M(()=>[f(l,{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png","layer-type":"base",name:"OpenStreetMap"})]),_:1},8,["onReady","onMoveend","onMovestart","onZoomend","onZoomstart"])])])):b("",!0),e.isLoading?(u(),p("div",ue,[f(d,{icon:"spinner",class:"fa-spin-pulse"})])):e.projects.length===0&&e.userProfiles.length===0?(u(),p("div",me,[r("p",ve,[e.isLocalActive?(u(),p("span",fe,[e.searchBox?(u(),p("span",Ae," None found in the selected area. ")):b("",!0)])):e.isAnywhereActive?(u(),p("span",be,"No projects were found with that search.")):b("",!0)])])):b("",!0),f(S,{onReachedBottom:e.loadMoreData},{default:M(()=>[r("ul",ye,[e.isProjectsActive?(u(!0),p(j,{key:0},D(e.projects,i=>(u(),p("li",{key:i.handleId,class:"border-b border-slate-300"},[r("a",{class:"block py-4 flex gap-4 cursor-pointer",onClick:N=>e.onClickLoadItem(i.handleId)},[r("div",null,[f(P,{"entity-id":i.handleId,"icon-size":48,"image-url":i.image,class:"block border border-slate-300 rounded-md max-h-12 max-w-12"},null,8,["entity-id","image-url"])]),r("div",Le,[r("h2",we,y(i.name),1),r("div",Pe,[f(d,{icon:"user",class:"fa-fw text-slate-400"}),L(" "+y(e.didInfo(i.issuerDid,e.activeDid,e.allMyDids,e.allContacts)),1)])])],8,ge)]))),128)):(u(!0),p(j,{key:1},D(e.userProfiles,i=>(u(),p("li",{key:i.issuerDid,class:"border-b border-slate-300"},[r("a",{class:"block py-4 flex gap-4 cursor-pointer",onClick:N=>e.onClickLoadItem((i==null?void 0:i.rowId)||"")},[r("div",je,[r("div",ke,[f(d,{icon:"user",class:"fa-fw text-slate-400"}),L(" "+y(e.didInfo(i.issuerDid,e.activeDid,e.allMyDids,e.allContacts)),1)]),i.description?(u(),p("p",Ce,y(i.description),1)):b("",!0),e.isAnywhereActive&&i.locLat&&i.locLon?(u(),p("div",Me,[f(d,{icon:"location-dot",class:"fa-fw"}),L(" "+y((i.locLat>0?"North":"South")+" in "+(i.locLon>0?"Eastern":"Western")+" Hemisphere"),1)])):b("",!0)])],8,Se)]))),128))])]),_:1},8,["onReachedBottom"])])],64)}const Qe=O(k,[["render",De]]);export{Qe as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/EntityIcon-DciUb57i.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/EntityIcon-DciUb57i.js deleted file mode 100644 index 19ac4ca..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/EntityIcon-DciUb57i.js +++ /dev/null @@ -1 +0,0 @@ -var B=Object.defineProperty;var P=(a,l,e)=>l in a?B(a,l,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[l]=e;var C=(a,l,e)=>P(a,typeof l!="symbol"?l+"":l,e);import{a1 as H,C as I,V as O,_ as L,h as j,B as R}from"./main.common-DD7dqhZp.js";function d(a){return a.replace(/&/g,"&").replace(/'/g,"'").replace(/"/g,""").replace(//g,">")}function T(a){var l,e,t,i,c,r,o;const n=(l=a.meta)===null||l===void 0?void 0:l.title,f=(e=a.meta)===null||e===void 0?void 0:e.creator,s=(t=a.meta)===null||t===void 0?void 0:t.source,u=(c=(i=a.meta)===null||i===void 0?void 0:i.license)===null||c===void 0?void 0:c.url,v=E(a);return!n&&!f&&!s&&!u&&!v?"":''+(n?`${d(n)}`:"")+(f?`${d(f)}`:"")+(s?`${d((o=(r=a.meta)===null||r===void 0?void 0:r.source)!==null&&o!==void 0?o:"")}`:"")+(u?`${d(u)}`:"")+(v?`${d(v)}`:"")+""}function E(a){var l,e,t,i,c,r,o,n,f,s,u,v,h,_,y;let g=!((l=a.meta)===null||l===void 0)&&l.title?`„${(e=a.meta)===null||e===void 0?void 0:e.title}”`:"Design",Z=`„${(i=(t=a.meta)===null||t===void 0?void 0:t.creator)!==null&&i!==void 0?i:"Unknown"}”`;!((c=a.meta)===null||c===void 0)&&c.source&&(g+=` (${a.meta.source})`);let b="";return((o=(r=a.meta)===null||r===void 0?void 0:r.license)===null||o===void 0?void 0:o.name)!=="MIT"&&((n=a.meta)===null||n===void 0?void 0:n.creator)!=="DiceBear"&&(!((f=a.meta)===null||f===void 0)&&f.title)&&(b+="Remix of "),b+=`${g} by ${Z}`,!((u=(s=a.meta)===null||s===void 0?void 0:s.license)===null||u===void 0)&&u.name&&(b+=`, licensed under „${(h=(v=a.meta)===null||v===void 0?void 0:v.license)===null||h===void 0?void 0:h.name}”`,!((y=(_=a.meta)===null||_===void 0?void 0:_.license)===null||y===void 0)&&y.url&&(b+=` (${a.meta.license.url})`)),b}function G(a){var l,e,t,i,c,r,o,n,f;const s=E(a);return{"IPTC:ObjectName":(l=a.meta)===null||l===void 0?void 0:l.title,"XMP-dc:Title":(e=a.meta)===null||e===void 0?void 0:e.title,"IPTC:CopyrightNotice":s,"XMP-dc:Rights":s,"IPTC:By-line":(t=a.meta)===null||t===void 0?void 0:t.creator,"XMP-dc:Creator":(i=a.meta)===null||i===void 0?void 0:i.creator,"IPTC:Credit":(c=a.meta)===null||c===void 0?void 0:c.creator,"XMP-photoshop:Credit":(r=a.meta)===null||r===void 0?void 0:r.creator,"XMP-plus:LicensorURL":(o=a.meta)===null||o===void 0?void 0:o.source,"XMP-xmpRights:WebStatement":(f=(n=a.meta)===null||n===void 0?void 0:n.license)===null||f===void 0?void 0:f.url}}const S=-2147483648,W=2147483647;function N(a){return a^=a<<13,a^=a>>17,a^=a<<5,a}function X(a){let l=0;for(let e=0;el=N(l),t=(i,c)=>Math.floor((e()-S)/(W-S)*(c+1-i)+i);return{seed:a,next:e,bool(i=50){return t(0,100)<=i},integer(i,c){return t(i,c)},pick(i,c){var r;return i.length===0?(e(),c):(r=i[t(0,i.length-1)])!==null&&r!==void 0?r:c},shuffle(i){const c=w(e().toString());return i.sort(()=>c.integer(-1,1))},string(i,c="abcdefghijklmnopqrstuvwxyz1234567890"){const r=w(e().toString());let o="";for(let n=0;n`;switch(t){case"solid":return f+a.body;case"gradientLinear":return``+a.body}}function Y(a,l){let{width:e,height:t,x:i,y:c}=$(a),r=l?(l-100)/100:0,o=(e/2+i)*r*-1,n=(t/2+c)*r*-1;return`${a.body}`}function J(a,l,e){let t=$(a),i=(t.width+t.x*2)*((l??0)/100),c=(t.height+t.y*2)*((e??0)/100);return`${a.body}`}function K(a,l){let{width:e,height:t,x:i,y:c}=$(a);return`${a.body}`}function Q(a){let{width:l,x:e}=$(a);return`${a.body}`}function a1(a,l){let{width:e,height:t,x:i,y:c}=$(a),r=l?e*l/100:0,o=l?t*l/100:0;return`${a.body}`}function l1(a){const l={xmlns:"http://www.w3.org/2000/svg",...a.attributes};return Object.keys(l).map(e=>`${d(e)}="${d(l[e])}"`).join(" ")}function e1(a){const l=w(Math.random().toString()),e={};return a.body.replace(/(id="|url\(#)([a-z0-9-_]+)([")])/gi,(t,i,c,r)=>(e[c]=e[c]||l.string(8),`${i}${e[c]}${r}`))}const i1={properties:{seed:{type:"string"},flip:{type:"boolean",default:!1},rotate:{type:"integer",minimum:0,maximum:360,default:0},scale:{type:"integer",minimum:0,maximum:200,default:100},radius:{type:"integer",minimum:0,maximum:50,default:0},size:{type:"integer",minimum:1},backgroundColor:{type:"array",items:{type:"string",pattern:"^(transparent|[a-fA-F0-9]{6})$"}},backgroundType:{type:"array",items:{type:"string",enum:["solid","gradientLinear"]},default:["solid"]},backgroundRotation:{type:"array",items:{type:"integer",minimum:-360,maximum:360},default:[0,360]},translateX:{type:"integer",minimum:-100,maximum:100,default:0},translateY:{type:"integer",minimum:-100,maximum:100,default:0},clip:{type:"boolean",default:!0},randomizeIds:{type:"boolean",default:!1,examples:[!0,!1]}}};function z(a){var l;let e={},t=(l=a.properties)!==null&&l!==void 0?l:{};return Object.keys(t).forEach(i=>{let c=t[i];typeof c=="object"&&c.default!==void 0&&(Array.isArray(c.default)?e[i]=[...c.default]:typeof c.default=="object"?e[i]={...c.default}:e[i]=c.default)}),e}function t1(a,l){var e;let t={...z(i1),...z((e=a.schema)!==null&&e!==void 0?e:{}),...l};return JSON.parse(JSON.stringify(t))}function V(a){switch(a){case"svg":return"image/svg+xml";case"png":case"jpeg":return`image/${a}`;default:throw new Error(`Unsupported format: ${a}`)}}function c1(a,l=512){let e=l;return a=a.replace(/]*)/,(t,i)=>{const c=i.match(/width="([^"]+)"/);return c&&(e=parseInt(c[1])),i.match(/width="([^"]+)"/)?i=i.replace(/width="([^"]+)"/,`width="${e}"`):i+=` width="${e}"`,i.match(/height="([^"]+)"/)?i=i.replace(/height="([^"]+)"/,`height="${e}"`):i+=` height="${e}"`,`F(a,l,e),toFile:t=>n1(t,a,l,e),toArrayBuffer:()=>d1(a,l,e)}};async function F(a,l,e){return l==="svg"?`data:${V(l)};utf8,${encodeURIComponent(a)}`:(await U(a,l,e)).toDataURL(V(l))}async function d1(a,l,e){if(l==="svg")return r1().encode(a);const t=await U(a,l,e);return await new Promise((i,c)=>{t.toBlob(r=>{r?i(r.arrayBuffer()):c(new Error("Could not create blob"))},V(l))})}async function n1(a,l,e,t){const i=document.createElement("a");i.href=await F(l,e,t),i.download=a,i.click(),i.remove()}async function U(a,l,e){e&&console.warn("The `exif` option is not supported in the browser version of `@dicebear/converter`. \nPlease use the node version of `@dicebear/converter` to generate images with exif data.");let{svg:t,size:i}=c1(a);const c=document.createElement("canvas");c.width=i,c.height=i;const r=c.getContext("2d");if(r===null)throw new Error("Could not get canvas context");l==="jpeg"&&(r.fillStyle="white",r.fillRect(0,0,i,i));var o=document.createElement("img");return o.width=i,o.height=i,o.setAttribute("src",await F(t,"svg")),new Promise((n,f)=>{o.onload=()=>{r.drawImage(o,0,0,i,i),n(c)},o.onerror=s=>f(s)})}function D(a){return a==="transparent"?a:`#${a}`}function o1(a,l){var e;let t;l.length<=2?(a.next(),t=l):t=a.shuffle(l),t.length===0&&(t=["transparent"]);const i=t[0],c=(e=t[1])!==null&&e!==void 0?e:t[0];return{primary:D(i),secondary:D(c)}}function f1(a,l={}){var e,t,i,c,r;l=t1(a,l);const o=w(l.seed),n=a.create({prng:o,options:l}),{primary:f,secondary:s}=o1(o,(e=l.backgroundColor)!==null&&e!==void 0?e:[]),u=o.pick((t=l.backgroundType)!==null&&t!==void 0?t:[],"solid"),v=o.integer(!((i=l.backgroundRotation)===null||i===void 0)&&i.length?Math.min(...l.backgroundRotation):0,!((c=l.backgroundRotation)===null||c===void 0)&&c.length?Math.max(...l.backgroundRotation):0);l.size&&(n.attributes.width=l.size.toString(),n.attributes.height=l.size.toString()),l.scale!==void 0&&l.scale!==100&&(n.body=Y(n,l.scale)),l.flip&&(n.body=Q(n)),l.rotate&&(n.body=K(n,l.rotate)),(l.translateX||l.translateY)&&(n.body=J(n,l.translateX,l.translateY)),f!=="transparent"&&s!=="transparent"&&(n.body=q(n,f,s,u,v)),(l.radius||l.clip)&&(n.body=a1(n,(r=l.radius)!==null&&r!==void 0?r:0)),l.randomizeIds&&(n.body=e1(n));const h=l1(n),_=T(a),y=G(a),g=`${_}${n.body}`;return{toString:()=>g,toJson:()=>{var Z;return{svg:g,extra:{primaryBackgroundColor:f,secondaryBackgroundColor:s,backgroundType:u,backgroundRotation:v,...(Z=n.extra)===null||Z===void 0?void 0:Z.call(n)}}},toDataUriSync:()=>`data:image/svg+xml;utf8,${encodeURIComponent(g)}`,...x(g,"svg"),png:({includeExif:Z=!1}={})=>x(g,"png",Z?y:void 0),jpeg:({includeExif:Z=!1}={})=>x(g,"jpeg",Z?y:void 0)}}const s1={circle:(a,l)=>{var e,t,i,c,r,o,n,f,s,u,v,h;return`${(t=(e=a.clothing)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.mouth)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}${(o=(r=a.nose)===null||r===void 0?void 0:r.value(a,l))!==null&&o!==void 0?o:""}${(f=(n=a.eyes)===null||n===void 0?void 0:n.value(a,l))!==null&&f!==void 0?f:""}${(u=(s=a.eyebrows)===null||s===void 0?void 0:s.value(a,l))!==null&&u!==void 0?u:""}${(h=(v=a.top)===null||v===void 0?void 0:v.value(a,l))!==null&&h!==void 0?h:""}`},default:(a,l)=>{var e,t,i,c,r,o,n,f,s,u,v,h;return`${(t=(e=a.clothing)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.mouth)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}${(o=(r=a.nose)===null||r===void 0?void 0:r.value(a,l))!==null&&o!==void 0?o:""}${(f=(n=a.eyes)===null||n===void 0?void 0:n.value(a,l))!==null&&f!==void 0?f:""}${(u=(s=a.eyebrows)===null||s===void 0?void 0:s.value(a,l))!==null&&u!==void 0?u:""}${(h=(v=a.top)===null||v===void 0?void 0:v.value(a,l))!==null&&h!==void 0?h:""}`}},u1={blazerAndShirt:(a,l)=>``,blazerAndSweater:(a,l)=>``,collarAndSweater:(a,l)=>``,graphicShirt:(a,l)=>{var e,t;return`${(t=(e=a.clothingGraphic)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}`},hoodie:(a,l)=>``,overall:(a,l)=>``,shirtCrewNeck:(a,l)=>``,shirtScoopNeck:(a,l)=>``,shirtVNeck:(a,l)=>``},v1={concerned:(a,l)=>'',default:(a,l)=>'',disbelief:(a,l)=>'',eating:(a,l)=>'',grimace:(a,l)=>'',sad:(a,l)=>'',screamOpen:(a,l)=>'',serious:(a,l)=>'',smile:(a,l)=>'',tongue:(a,l)=>'',twinkle:(a,l)=>'',vomit:(a,l)=>''},h1={default:(a,l)=>''},p1={closed:(a,l)=>'',cry:(a,l)=>'',default:(a,l)=>'',eyeRoll:(a,l)=>'',happy:(a,l)=>'',hearts:(a,l)=>'',side:(a,l)=>'',squint:(a,l)=>'',surprised:(a,l)=>'',winkWacky:(a,l)=>'',wink:(a,l)=>'',xDizzy:(a,l)=>''},g1={angryNatural:(a,l)=>'',defaultNatural:(a,l)=>'',flatNatural:(a,l)=>'',frownNatural:(a,l)=>'',raisedExcitedNatural:(a,l)=>'',sadConcernedNatural:(a,l)=>'',unibrowNatural:(a,l)=>'',upDownNatural:(a,l)=>'',angry:(a,l)=>'',default:(a,l)=>'',raisedExcited:(a,l)=>'',sadConcerned:(a,l)=>'',upDown:(a,l)=>''},Z1={eyepatch:(a,l)=>{var e,t;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}`},hat:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},hijab:(a,l)=>{var e,t;return`${(t=(e=a.accessories)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}`},turban:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},winterHat1:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},winterHat02:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},winterHat03:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},winterHat04:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},bob:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},bun:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},curly:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},curvy:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},dreads:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},frida:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},fro:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},froBand:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},longButNotTooLong:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},miaWallace:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},shavedSides:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},straight02:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},straight01:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},straightAndStrand:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},dreads01:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},dreads02:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},frizzle:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},shaggy:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},shaggyMullet:(a,l)=>{var e,t,i,c;return`${(t=(e=a.accessories)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.facialHair)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},shortCurly:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},shortFlat:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},shortRound:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},shortWaved:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},sides:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},theCaesar:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},theCaesarAndSidePart:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},bigHair:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`}},m1={beardLight:(a,l)=>``,beardMagestic:(a,l)=>``,beardMedium:(a,l)=>``,moustacheFancy:(a,l)=>``,moustacheMagnum:(a,l)=>``},M1={kurt:(a,l)=>``,prescription01:(a,l)=>``,prescription02:(a,l)=>``,round:(a,l)=>``,sunglasses:(a,l)=>``,wayfarers:(a,l)=>``},y1={bat:(a,l)=>'',bear:(a,l)=>'',cumbia:(a,l)=>'',deer:(a,l)=>'',diamond:(a,l)=>'',hola:(a,l)=>'',pizza:(a,l)=>'',resist:(a,l)=>'',skull:(a,l)=>'',skullOutline:(a,l)=>''},$1=Object.freeze(Object.defineProperty({__proto__:null,accessories:M1,clothing:u1,clothingGraphic:y1,eyebrows:g1,eyes:p1,facialHair:m1,mouth:v1,nose:h1,style:s1,top:Z1},Symbol.toStringTag,{value:"Module"}));function p({prng:a,group:l,values:e=[]}){const t=$1,i=a.pick(e);if(i&&t[l][i])return{name:i,value:t[l][i]}}function _1({prng:a,options:l}){const e=p({prng:a,group:"style",values:l.style}),t=p({prng:a,group:"clothing",values:l.clothing}),i=p({prng:a,group:"mouth",values:l.mouth}),c=p({prng:a,group:"nose",values:l.nose}),r=p({prng:a,group:"eyes",values:l.eyes}),o=p({prng:a,group:"eyebrows",values:l.eyebrows}),n=p({prng:a,group:"top",values:l.top}),f=p({prng:a,group:"facialHair",values:l.facialHair}),s=p({prng:a,group:"accessories",values:l.accessories}),u=p({prng:a,group:"clothingGraphic",values:l.clothingGraphic});return{style:e,clothing:t,mouth:i,nose:c,eyes:r,eyebrows:o,top:a.bool(l.topProbability)?n:void 0,facialHair:a.bool(l.facialHairProbability)?f:void 0,accessories:a.bool(l.accessoriesProbability)?s:void 0,clothingGraphic:u}}function m(a){return a==="transparent"?a:`#${a}`}function b1({prng:a,options:l}){var e,t,i,c,r,o,n;return{accessories:m(a.pick((e=l.accessoriesColor)!==null&&e!==void 0?e:[],"transparent")),clothes:m(a.pick((t=l.clothesColor)!==null&&t!==void 0?t:[],"transparent")),hat:m(a.pick((i=l.hatColor)!==null&&i!==void 0?i:[],"transparent")),hair:m(a.pick((c=l.hairColor)!==null&&c!==void 0?c:[],"transparent")),skin:m(a.pick((r=l.skinColor)!==null&&r!==void 0?r:[],"transparent")),facialHair:m(a.pick((o=l.facialHairColor)!==null&&o!==void 0?o:[],"transparent")),background:m(a.pick((n=l.backgroundColor)!==null&&n!==void 0?n:[],"transparent"))}}function C1({prng:a,options:l,components:e,colors:t}){var i,c;((i=e.style)===null||i===void 0?void 0:i.name)==="circle"&&(l.backgroundColor=[]),((c=e.style)===null||c===void 0?void 0:c.name)!=="circle"&&l.backgroundColor&&l.backgroundColor.length===1&&l.backgroundColor[0]==="65c9ff"&&(l.backgroundColor=[])}const A1={$schema:"http://json-schema.org/draft-07/schema#",properties:{accessories:{type:"array",items:{type:"string",enum:["kurt","prescription01","prescription02","round","sunglasses","wayfarers"]},default:["kurt","prescription01","prescription02","round","sunglasses","wayfarers"]},accessoriesColor:{type:"array",items:{type:"string",pattern:"^(transparent|[a-fA-F0-9]{6})$"},default:["262e33","65c9ff","5199e4","25557c","e6e6e6","929598","3c4f5c","b1e2ff","a7ffc4","ffdeb5","ffafb9","ffffb1","ff488e","ff5c5c","ffffff"]},accessoriesProbability:{type:"integer",minimum:0,maximum:100,default:10},backgroundColor:{type:"array",items:{type:"string",pattern:"^(transparent|[a-fA-F0-9]{6})$"},default:["65c9ff"]},clothesColor:{type:"array",items:{type:"string",pattern:"^(transparent|[a-fA-F0-9]{6})$"},default:["262e33","65c9ff","5199e4","25557c","e6e6e6","929598","3c4f5c","b1e2ff","a7ffc4","ffafb9","ffffb1","ff488e","ff5c5c","ffffff"]},clothing:{type:"array",items:{type:"string",enum:["blazerAndShirt","blazerAndSweater","collarAndSweater","graphicShirt","hoodie","overall","shirtCrewNeck","shirtScoopNeck","shirtVNeck"]},default:["blazerAndShirt","blazerAndSweater","collarAndSweater","graphicShirt","hoodie","overall","shirtCrewNeck","shirtScoopNeck","shirtVNeck"]},clothingGraphic:{type:"array",items:{type:"string",enum:["bat","bear","cumbia","deer","diamond","hola","pizza","resist","skull","skullOutline"]},default:["bat","bear","cumbia","deer","diamond","hola","pizza","resist","skull","skullOutline"]},eyebrows:{type:"array",items:{type:"string",enum:["angryNatural","defaultNatural","flatNatural","frownNatural","raisedExcitedNatural","sadConcernedNatural","unibrowNatural","upDownNatural","angry","default","raisedExcited","sadConcerned","upDown"]},default:["angryNatural","defaultNatural","flatNatural","frownNatural","raisedExcitedNatural","sadConcernedNatural","unibrowNatural","upDownNatural","angry","default","raisedExcited","sadConcerned","upDown"]},eyes:{type:"array",items:{type:"string",enum:["closed","cry","default","eyeRoll","happy","hearts","side","squint","surprised","winkWacky","wink","xDizzy"]},default:["closed","cry","default","eyeRoll","happy","hearts","side","squint","surprised","winkWacky","wink","xDizzy"]},facialHair:{type:"array",items:{type:"string",enum:["beardLight","beardMagestic","beardMedium","moustacheFancy","moustacheMagnum"]},default:["beardLight","beardMagestic","beardMedium","moustacheFancy","moustacheMagnum"]},facialHairColor:{type:"array",items:{type:"string",pattern:"^(transparent|[a-fA-F0-9]{6})$"},default:["a55728","2c1b18","b58143","d6b370","724133","4a312c","f59797","ecdcbf","c93305","e8e1e1"]},facialHairProbability:{type:"integer",minimum:0,maximum:100,default:10},hairColor:{type:"array",items:{type:"string",pattern:"^(transparent|[a-fA-F0-9]{6})$"},default:["a55728","2c1b18","b58143","d6b370","724133","4a312c","f59797","ecdcbf","c93305","e8e1e1"]},hatColor:{type:"array",items:{type:"string",pattern:"^(transparent|[a-fA-F0-9]{6})$"},default:["262e33","65c9ff","5199e4","25557c","e6e6e6","929598","3c4f5c","b1e2ff","a7ffc4","ffdeb5","ffafb9","ffffb1","ff488e","ff5c5c","ffffff"]},mouth:{type:"array",items:{type:"string",enum:["concerned","default","disbelief","eating","grimace","sad","screamOpen","serious","smile","tongue","twinkle","vomit"]},default:["concerned","default","disbelief","eating","grimace","sad","screamOpen","serious","smile","tongue","twinkle","vomit"]},nose:{type:"array",items:{type:"string",enum:["default"]},default:["default"]},skinColor:{type:"array",items:{type:"string",pattern:"^(transparent|[a-fA-F0-9]{6})$"},default:["614335","d08b5b","ae5d29","edb98a","ffdbb4","fd9841","f8d25c"]},style:{type:"array",items:{type:"string",enum:["circle","default"]},default:["default"]},top:{type:"array",items:{type:"string",enum:["eyepatch","hat","hijab","turban","winterHat1","winterHat02","winterHat03","winterHat04","bob","bun","curly","curvy","dreads","frida","fro","froBand","longButNotTooLong","miaWallace","shavedSides","straight02","straight01","straightAndStrand","dreads01","dreads02","frizzle","shaggy","shaggyMullet","shortCurly","shortFlat","shortRound","shortWaved","sides","theCaesar","theCaesarAndSidePart","bigHair"]},default:["eyepatch","hat","hijab","turban","winterHat1","winterHat02","winterHat03","winterHat04","bob","bun","curly","curvy","dreads","frida","fro","froBand","longButNotTooLong","miaWallace","shavedSides","straight02","straight01","straightAndStrand","dreads01","dreads02","frizzle","shaggy","shaggyMullet","shortCurly","shortFlat","shortRound","shortWaved","sides","theCaesar","theCaesarAndSidePart","bigHair"]},topProbability:{type:"integer",minimum:0,maximum:100,default:100}}},w1={title:"Avataaars",creator:"Pablo Stanley",source:"https://avataaars.com/",homepage:"https://twitter.com/pablostanley",license:{name:"Free for personal and commercial use",url:"https://avataaars.com/"}},H1=({prng:a,options:l})=>{var e,t;const i=_1({prng:a,options:l}),c=b1({prng:a,options:l});return C1({prng:a,options:l,components:i,colors:c}),{attributes:{viewBox:"0 0 280 280",fill:"none","shape-rendering":"auto"},body:`${(t=(e=i.style)===null||e===void 0?void 0:e.value(i,c))!==null&&t!==void 0?t:""}`,extra:()=>({...Object.entries(i).reduce((r,[o,n])=>(r[o]=n==null?void 0:n.name,r),{}),...Object.entries(c).reduce((r,[o,n])=>(r[`${o}Color`]=n,r),{})})}},k1=Object.freeze(Object.defineProperty({__proto__:null,create:H1,meta:w1,schema:A1},Symbol.toStringTag,{value:"Module"}));var x1=Object.defineProperty,V1=Object.getOwnPropertyDescriptor,A=(a,l,e,t)=>{for(var i=t>1?void 0:t?V1(l,e):l,c=a.length-1,r;c>=0;c--)(r=a[c])&&(i=(t?r(l,e,i):r(i))||i);return t&&i&&x1(l,e,i),i};let M=class extends O{constructor(){super(...arguments);C(this,"contact");C(this,"entityId","");C(this,"iconSize",0);C(this,"profileImageUrl","")}generateIcon(){var t,i;const e=((t=this.contact)==null?void 0:t.profileImageUrl)||this.profileImageUrl;if(e)return``;{const c=((i=this.contact)==null?void 0:i.did)||this.entityId;if(!c)return``;const r={seed:c||"",size:this.iconSize};return f1(k1,r).toString()}}};A([H],M.prototype,"contact",2);A([H],M.prototype,"entityId",2);A([H],M.prototype,"iconSize",2);A([H],M.prototype,"profileImageUrl",2);M=A([I],M);const F1=["innerHTML"];function S1(a,l,e,t,i,c){return R(),j("div",{class:"w-fit",innerHTML:a.generateIcon()},null,8,F1)}const N1=L(M,[["render",S1]]);export{N1 as E}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/GiftedDetailsView-Biz6UhaP.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/GiftedDetailsView-Biz6UhaP.js deleted file mode 100644 index fe5e140..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/GiftedDetailsView-Biz6UhaP.js +++ /dev/null @@ -1,3 +0,0 @@ -var z=Object.defineProperty;var K=(t,e,s)=>e in t?z(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var r=(t,e,s)=>K(t,typeof e!="symbol"?e+"":e,s);import{V as X,e as Z,d as _,a as H,C as ee,_ as te,h as m,j as g,k as i,m as b,o as f,t as y,s as Q,y as v,q as j,w as ie,n as W,F as re,z as T,B as h}from"./main.common-DD7dqhZp.js";import{I as oe}from"./ImageMethodDialog-zrU-VGNm.js";import{Q as se}from"./QuickNav-C8jPGtUY.js";import{T as ae}from"./TopMessage-ZWDDjman.js";import{l as ne,h as le,i as J,a0 as L,g as de,a1 as pe,a2 as he,a3 as ce,a4 as ue}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./PhotoDialog-DZbf20A6.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var ge=Object.getOwnPropertyDescriptor,me=(t,e,s,c)=>{for(var a=c>1?void 0:c?ge(e,s):e,p=t.length-1,d;p>=0;p--)(d=t[p])&&(a=d(a)||a);return a};let I=class extends X{constructor(){super(...arguments);r(this,"$notify");r(this,"$route");r(this,"$router");r(this,"activeDid","");r(this,"apiServer","");r(this,"amountInput","0");r(this,"description","");r(this,"destinationPathAfter","");r(this,"fulfillsProjectId","");r(this,"fulfillsProjectName","a project");r(this,"givenToProject",!1);r(this,"givenToRecipient",!1);r(this,"giverDid","");r(this,"giverName","");r(this,"hideBackButton",!1);r(this,"imageUrl","");r(this,"isTrade",!1);r(this,"message","");r(this,"offerId","");r(this,"prevCredToEdit");r(this,"providerProjectId","");r(this,"providerProjectName","a project");r(this,"providedByProject",!1);r(this,"providedByGiver",!1);r(this,"recipientDid","");r(this,"recipientName","");r(this,"showGeneralAdvanced",!1);r(this,"unitCode","HUR");r(this,"libsUtil",ne)}async mounted(){var P,o,$,C,D,k,U,x,N,E,G,A,B,S,q,R,M,O,V,F;try{this.prevCredToEdit=this.$route.query.prevCredToEdit?JSON.parse(this.$route.query.prevCredToEdit):void 0}catch{this.$notify({group:"alert",type:"danger",title:"Retrieval Error",text:"The previous record isn't available for editing. If you submit, you'll create a new record."},6e3)}const e=($=(o=(P=this.prevCredToEdit)==null?void 0:P.claim)==null?void 0:o.object)==null?void 0:$.amountOfThisGood;this.amountInput=this.$route.query.amountInput||(e?String(e):"")||this.amountInput,this.description=this.$route.query.description||((D=(C=this.prevCredToEdit)==null?void 0:C.claim)==null?void 0:D.description)||this.description,this.destinationPathAfter=this.$route.query.destinationPathAfter||"",this.giverDid=this.$route.query.giverDid||((x=(U=(k=this.prevCredToEdit)==null?void 0:k.claim)==null?void 0:U.agent)==null?void 0:x.identifier)||this.giverDid,this.giverName=this.$route.query.giverName||"",this.hideBackButton=this.$route.query.hideBackButton==="true",this.message=this.$route.query.message||"";const s=(E=(N=this.prevCredToEdit)==null?void 0:N.claim)==null?void 0:E.fulfills,c=Array.isArray(s)?s:s?[s]:[],a=c.find(l=>l["@type"]==="Offer");this.offerId=this.$route.query.offerId||(a==null?void 0:a.identifier)||this.offerId;const p=c.find(l=>l["@type"]==="PlanAction");this.fulfillsProjectId=this.$route.query.fulfillsProjectId||(p==null?void 0:p.identifier)||this.fulfillsProjectId;const d=(A=(G=this.prevCredToEdit)==null?void 0:G.claim)==null?void 0:A.provider,n=(Array.isArray(d)?d:d?[d]:[]).find(l=>l["@type"]==="PlanAction");this.providerProjectId=this.$route.query.providerProjectId||(n==null?void 0:n.identifier)||this.providerProjectId,this.recipientDid=this.$route.query.recipientDid||((q=(S=(B=this.prevCredToEdit)==null?void 0:B.claim)==null?void 0:S.recipient)==null?void 0:q.identifier),this.recipientName=this.$route.query.recipientName||"",this.unitCode=this.$route.query.unitCode||((O=(M=(R=this.prevCredToEdit)==null?void 0:R.claim)==null?void 0:M.object)==null?void 0:O.unitCode)||this.unitCode,this.imageUrl=this.$route.query.imageUrl||((F=(V=this.prevCredToEdit)==null?void 0:V.claim)==null?void 0:F.image)||localStorage.getItem("imageUrl")||this.imageUrl,this.$route.query.shareTitle&&(this.description=(this.$route.query.shareTitle||"")+(this.description?` -`+this.description:"")),this.$route.query.shareText&&(this.description=(this.description?this.description+` -`:"")+(this.$route.query.shareText||"")),this.$route.query.shareUrl&&(this.imageUrl=this.$route.query.shareUrl);const w=await Z();if(this.apiServer=w.apiServer||"",this.activeDid=w.activeDid||"",this.giverDid&&!this.giverName||this.recipientDid&&!this.recipientName){const l=await _.contacts.toArray(),Y=await le();this.giverDid&&!this.giverName&&(this.giverName=J(this.giverDid,this.activeDid,Y,l)),this.recipientDid&&!this.recipientName&&(this.recipientName=J(this.recipientDid,this.activeDid,Y,l))}if(this.givenToProject=!!this.fulfillsProjectId,this.givenToRecipient=!this.givenToProject&&!!this.recipientDid,this.providedByProject=!!this.providerProjectId,this.providedByGiver=!this.providedByProject&&!!this.giverDid,this.showGeneralAdvanced=!!w.showGeneralAdvanced,this.fulfillsProjectId){const l=await L(this.fulfillsProjectId,this.axios,this.apiServer,this.activeDid);this.fulfillsProjectName=l!=null&&l.name?`the project "${l.name}"`:"a project"}if(this.providerProjectId){const l=await L(this.providerProjectId,this.axios,this.apiServer,this.activeDid);this.providerProjectName=l!=null&&l.name?`the project "${l.name}"`:"a project"}}changeUnitCode(){const e=Object.keys(this.libsUtil.UNIT_SHORT),s=e.indexOf(this.unitCode);this.unitCode=e[(s+1)%e.length]}increment(){this.amountInput=`${(parseFloat(this.amountInput)||0)+1}`}decrement(){this.amountInput=`${Math.max(0,(parseFloat(this.amountInput)||1)-1)}`}cancel(){this.deleteImage(),this.destinationPathAfter?this.$router.push({path:this.destinationPathAfter}):this.$router.back()}cancelBack(){this.deleteImage(),this.$router.back()}openImageDialog(){this.$refs.imageDialog.open(e=>{this.imageUrl=e},"GiveAction")}confirmDeleteImage(){this.$notify({group:"modal",type:"confirm",title:"Are you sure you want to delete the image?",text:"",onYes:this.deleteImage},-1)}async deleteImage(){if(this.imageUrl)try{const e=await de(this.activeDid);window.location.hostname==="localhost"&&!H.includes("localhost")&&console.log("Using shared image API server, so only users on that server can play with images.");const s=await this.axios.delete(H+"/image/"+encodeURIComponent(this.imageUrl),{headers:e});if(s.status!==204){console.error("Problem deleting image:",s),this.$notify({group:"alert",type:"danger",title:"Error",text:"There was a problem deleting the image."},5e3);return}localStorage.removeItem("imageUrl"),this.imageUrl=""}catch(e){console.error("Error deleting image:",e),e.response.status===404?(console.log("Weird: the image was already deleted.",e),localStorage.removeItem("imageUrl"),this.imageUrl=""):this.$notify({group:"alert",type:"danger",title:"Error",text:"There was an error deleting the image."},5e3)}}async confirm(){if(!this.activeDid){this.$notify({group:"alert",type:"danger",title:"Error",text:"You must select an identifier before you can record a give."},2e3);return}if(parseFloat(this.amountInput)<0){this.$notify({group:"alert",type:"danger",text:"You may not send a negative number.",title:""},2e3);return}if(!this.description&&!parseFloat(this.amountInput)){this.$notify({group:"alert",type:"danger",title:"Error",text:`You must enter a description or some number of ${this.libsUtil.UNIT_LONG[this.unitCode]}.`},2e3);return}this.$notify({group:"alert",type:"toast",text:"Recording the give...",title:""},1e3),await this.recordGive()}notifyUserOfGiver(){this.giverDid?this.$notify({group:"alert",type:"warning",title:"Unavailable",text:"You cannot assign both a giver and a project."},3e3):this.$notify({group:"alert",type:"warning",title:"Go To The Contacts Page",text:"To assign a giver, you must open this page from a contact."},3e3)}notifyUserOfRecipient(){this.recipientDid?this.$notify({group:"alert",type:"warning",title:"Unavailable",text:"You cannot assign both to a recipient and to a project."},3e3):this.$notify({group:"alert",type:"warning",title:"Go To The Contacts Page",text:"To assign to a recipient, you must open this page from a contact."},3e3)}notifyUserOfProvidingProject(){this.providerProjectId?this.$notify({group:"alert",type:"warning",title:"Unavailable",text:"You cannot select both a giving project and person."},3e3):this.$notify({group:"alert",type:"warning",title:"Go To The Project Page",text:"To select a project as a provider, you must open this page through a project."},3e3)}notifyUserFulfillsProject(){this.fulfillsProjectId?this.$notify({group:"alert",type:"warning",title:"Unavailable",text:"You cannot assign both to a project and to a recipient."},3e3):this.$notify({group:"alert",type:"warning",title:"Go To The Project Page",text:"To assign to a project, you must open this page through a project."},3e3)}async recordGive(){var e,s,c;try{const a=this.providedByGiver?this.giverDid:void 0,p=this.givenToRecipient?this.recipientDid:void 0,d=this.givenToProject?this.fulfillsProjectId:void 0;let u;if(this.prevCredToEdit?u=await pe(this.axios,this.apiServer,this.prevCredToEdit,this.activeDid,a,p,this.description,parseFloat(this.amountInput),this.unitCode,d,this.offerId,this.isTrade,this.imageUrl,this.providerProjectId):u=await he(this.axios,this.apiServer,this.activeDid,a,p,this.description,parseFloat(this.amountInput),this.unitCode,d,this.offerId,this.isTrade,this.imageUrl,this.providerProjectId),u.type==="error"||this.isGiveCreationError(u.response)){const n=this.getGiveCreationErrorMessage(u);console.error("Error with give creation result:",u),this.$notify({group:"alert",type:"danger",title:"Error",text:n||"There was an error creating the give."},5e3)}else this.$notify({group:"alert",type:"success",title:"Success",text:`That ${this.isTrade?"trade":"gift"} was recorded.`},3e3),localStorage.removeItem("imageUrl"),this.destinationPathAfter?this.$router.push({path:this.destinationPathAfter}):this.$router.back()}catch(a){console.error("Error with give recordation caught:",a);const p=a.userMessage||((c=(s=(e=a.response)==null?void 0:e.data)==null?void 0:s.error)==null?void 0:c.message)||"There was an error recording the give.";this.$notify({group:"alert",type:"danger",title:"Error",text:p},5e3)}}constructGiveParam(){var d,u;const e=this.providedByGiver?this.giverDid:void 0,s=this.givenToRecipient?this.recipientDid:void 0,c=this.givenToProject?this.fulfillsProjectId:void 0,a=ce((d=this.prevCredToEdit)==null?void 0:d.claim,e,s,this.description,parseFloat(this.amountInput),this.unitCode,c,this.offerId,this.isTrade,this.imageUrl,this.providerProjectId,(u=this.prevCredToEdit)==null?void 0:u.id);return JSON.stringify(a)}isGiveCreationError(e){var s;return e.status!==201||((s=e.data)==null?void 0:s.error)}getGiveCreationErrorMessage(e){var s,c,a,p,d;return((s=e.error)==null?void 0:s.userMessage)||((c=e.error)==null?void 0:c.error)||((d=(p=(a=e.response)==null?void 0:a.data)==null?void 0:p.error)==null?void 0:d.message)}explainData(){this.$notify({group:"alert",type:"success",title:"Data Sharing",text:ue},7e3)}};I=me([ee({components:{ImageMethodDialog:oe,QuickNav:se,TopMessage:ae}})],I);const ve={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},fe={key:0,class:"text-lg text-center font-light relative px-7"},ye={class:"text-xl font-bold text-center mb-4"},be={class:"flex flex-row justify-center"},we={class:"flex justify-center mt-4","data-testId":"imagery"},je={key:0,class:"flex justify-between"},Te=["href"],Pe=["src"],Ie={key:1},$e={class:"mt-4 flex justify-between gap-2"},Ce={class:"flex-grow border border-slate-400 p-2 rounded-md"},De={class:"flex"},ke={class:"text-sm mt-1"},Ue={class:"flex"},xe={class:"text-sm mt-1"},Ne={class:"flex-shrink flex justify-center items-center"},Ee={class:"flex-grow border border-slate-400 p-2 rounded-md"},Ge={class:"flex"},Ae={class:"text-sm mt-1"},Be={class:"flex"},Se={class:"text-sm mt-1"},qe={class:"mt-8 flex"},Re={key:1,class:"mt-4 flex"},Me={class:"text-center mb-2 mt-6 italic"},Oe={class:"grid grid-cols-1 sm:grid-cols-2 gap-2"};function Ve(t,e,s,c,a,p){const d=T("QuickNav"),u=T("TopMessage"),n=T("font-awesome"),w=T("ImageMethodDialog"),P=T("router-link");return h(),m(re,null,[g(d),g(u),i("section",ve,[t.hideBackButton?b("",!0):(h(),m("div",fe,[i("h1",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:e[0]||(e[0]=o=>t.cancelBack())},[g(n,{icon:"chevron-left",class:"fa-fw"})])])),e[22]||(e[22]=i("h1",{class:"text-4xl text-center font-light px-4 mb-4"},"What Was Given",-1)),i("h1",ye,[i("span",null," From "+y(t.providedByProject?t.providerProjectName:t.providedByGiver?t.giverName:"someone not named"),1),e[18]||(e[18]=i("br",null,null,-1)),i("span",null," to "+y(t.givenToProject?t.fulfillsProjectName:t.givenToRecipient?t.recipientName:"someone not named"),1)]),f(i("textarea",{"onUpdate:modelValue":e[1]||(e[1]=o=>t.description=o),class:"block w-full rounded border border-slate-400 mb-2 px-3 py-2",placeholder:"What was received"},null,512),[[Q,t.description]]),i("div",be,[i("span",{class:"rounded-l border border-r-0 border-slate-400 bg-slate-200 text-center text-blue-500 px-2 py-2 w-20",onClick:e[2]||(e[2]=o=>t.changeUnitCode())},y(t.libsUtil.UNIT_SHORT[t.unitCode]||t.unitCode),1),i("div",{class:"border border-r-0 border-slate-400 bg-slate-200 px-4 py-2",onClick:e[3]||(e[3]=o=>t.amountInput==="0"?null:t.decrement())},[g(n,{icon:"chevron-left"})]),f(i("input",{"onUpdate:modelValue":e[4]||(e[4]=o=>t.amountInput=o),type:"number",class:"border border-r-0 border-slate-400 px-2 py-2 text-center w-20"},null,512),[[Q,t.amountInput]]),i("div",{class:"rounded-r border border-slate-400 bg-slate-200 px-4 py-2",onClick:e[5]||(e[5]=o=>t.increment())},[g(n,{icon:"chevron-right"})])]),i("div",we,[t.imageUrl?(h(),m("span",je,[i("a",{href:t.imageUrl,target:"_blank"},[i("img",{src:t.imageUrl,class:"h-24 rounded-xl"},null,8,Pe)],8,Te),g(n,{icon:"trash-can",class:"text-red-500 fa-fw ml-8 mt-10",onClick:t.confirmDeleteImage},null,8,["onClick"])])):(h(),m("span",Ie,[g(n,{icon:"camera",class:"bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-2 rounded-md",onClick:t.openImageDialog},null,8,["onClick"])]))]),g(w,{ref:"imageDialog"},null,512),i("div",$e,[i("div",Ce,[i("div",De,[t.giverDid&&!t.providedByProject?f((h(),m("input",{key:0,"onUpdate:modelValue":e[6]||(e[6]=o=>t.providedByGiver=o),type:"checkbox",class:"h-6 w-6 mr-2"},null,512)),[[j,t.providedByGiver]]):(h(),v(n,{key:1,icon:"square",class:"mr-2 bg-white text-white h-5 w-5 px-0.5 py-0.5 rounded-sm"})),i("label",ke,y(t.giverDid?"This was provided by "+t.giverName+".":"No named individual gave."),1),!t.giverDid||t.providedByProject?(h(),v(n,{key:2,icon:"info-circle",class:"-mt-1 bg-white text-slate-500 h-5 w-5 px-0.5 py-0.5 rounded-sm",onClick:e[7]||(e[7]=o=>t.notifyUserOfGiver())})):b("",!0)]),i("div",Ue,[t.providerProjectId&&!t.providedByGiver?f((h(),m("input",{key:0,"onUpdate:modelValue":e[8]||(e[8]=o=>t.providedByProject=o),type:"checkbox",class:"h-6 w-6 mr-2"},null,512)),[[j,t.providedByProject]]):(h(),v(n,{key:1,icon:"square",class:"mr-2 bg-white text-white h-5 w-5 px-0.5 py-0.5 rounded-sm"})),i("label",xe,y(t.providerProjectId?"This was provided by "+t.providerProjectName+".":"This was not provided by a project."),1),!t.providerProjectId||t.providedByGiver?(h(),v(n,{key:2,icon:"info-circle",class:"-mt-1 bg-white text-slate-500 h-5 w-5 px-0.5 py-0.5 rounded-sm",onClick:e[9]||(e[9]=o=>t.notifyUserOfProvidingProject())})):b("",!0)])]),i("div",Ne,[g(n,{icon:"arrow-right",class:"fa-fw h-7"})]),i("div",Ee,[i("div",Ge,[t.recipientDid&&!t.givenToProject?f((h(),m("input",{key:0,"onUpdate:modelValue":e[10]||(e[10]=o=>t.givenToRecipient=o),type:"checkbox",class:"h-6 w-6 mr-2"},null,512)),[[j,t.givenToRecipient]]):(h(),v(n,{key:1,icon:"square",class:"mr-2 bg-white text-white h-5 w-5 px-0.5 py-0.5 rounded-sm"})),i("label",Ae,y(t.recipientDid?"This was given to "+t.recipientName+".":"No individual benefitted."),1),!t.recipientDid||t.givenToProject?(h(),v(n,{key:2,icon:"info-circle",class:"-mt-1 bg-white text-slate-500 h-5 w-5 px-0.5 py-0.5 rounded-sm",onClick:e[11]||(e[11]=o=>t.notifyUserOfRecipient())})):b("",!0)]),i("div",Be,[t.fulfillsProjectId&&!t.givenToRecipient?f((h(),m("input",{key:0,"onUpdate:modelValue":e[12]||(e[12]=o=>t.givenToProject=o),type:"checkbox",class:"h-6 w-6 mr-2"},null,512)),[[j,t.givenToProject]]):(h(),v(n,{key:1,icon:"square",class:"mr-2 bg-white text-white h-5 w-5 px-0.5 py-0.5 rounded-sm"})),i("label",Se,y(t.fulfillsProjectId?"This was given to "+t.fulfillsProjectName+". ":"No project benefitted."),1),!t.fulfillsProjectId||t.givenToRecipient?(h(),v(n,{key:2,icon:"info-circle",class:"-mt-1 bg-white text-slate-500 h-5 w-5 px-0.5 py-0.5 rounded-sm",onClick:e[13]||(e[13]=o=>t.notifyUserFulfillsProject())})):b("",!0)])])]),i("div",qe,[f(i("input",{"onUpdate:modelValue":e[14]||(e[14]=o=>t.isTrade=o),type:"checkbox",class:"h-6 w-6 mr-2"},null,512),[[j,t.isTrade]]),e[19]||(e[19]=i("label",{class:"text-sm mt-1"},"This was a trade (not a gift)",-1))]),t.showGeneralAdvanced?(h(),m("div",Re,[g(P,{to:{name:"claim-add-raw",query:{claim:t.constructGiveParam()}},class:"text-blue-500"},{default:ie(()=>e[20]||(e[20]=[W(" Edit Raw Data ")])),_:1},8,["to"])])):b("",!0),i("p",Me,[e[21]||(e[21]=W(" Sign & Send to publish to the world ")),g(n,{icon:"circle-info",class:"pl-2 text-blue-500 cursor-pointer",onClick:e[15]||(e[15]=o=>t.explainData())})]),i("div",Oe,[i("button",{class:"block w-full text-center text-lg font-bold uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md",onClick:e[16]||(e[16]=(...o)=>t.confirm&&t.confirm(...o))}," Sign & Send "),i("button",{class:"block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md",onClick:e[17]||(e[17]=(...o)=>t.cancel&&t.cancel(...o))}," Cancel ")])])],64)}const Ze=te(I,[["render",Ve]]);export{Ze as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/GiftedDialog-DmRkVexW.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/GiftedDialog-DmRkVexW.js deleted file mode 100644 index a70c76c..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/GiftedDialog-DmRkVexW.js +++ /dev/null @@ -1 +0,0 @@ -var D=Object.defineProperty;var x=(e,t,r)=>t in e?D(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var s=(e,t,r)=>x(e,typeof t!="symbol"?t+"":t,r);import{a1 as $,C as S,V as T,e as j,d as P,_ as U,z as b,h as k,m as E,B as G,k as l,o as y,t as I,s as C,j as h,w as M,n as w}from"./main.common-DD7dqhZp.js";import{l as O,h as V,i as N,a2 as A,ar as F,a4 as R}from"./index-ryzpKtgI.js";var H=Object.defineProperty,B=Object.getOwnPropertyDescriptor,g=(e,t,r,i)=>{for(var o=i>1?void 0:i?B(t,r):t,d=e.length-1,a;d>=0;d--)(a=e[d])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&H(t,r,o),o};let c=class extends T{constructor(){super(...arguments);s(this,"$notify");s(this,"fromProjectId","");s(this,"toProjectId","");s(this,"activeDid","");s(this,"allContacts",[]);s(this,"allMyDids",[]);s(this,"apiServer","");s(this,"amountInput","0");s(this,"callbackOnSuccess",()=>{});s(this,"customTitle");s(this,"description","");s(this,"giver");s(this,"isTrade",!1);s(this,"offerId","");s(this,"prompt","");s(this,"receiver");s(this,"unitCode","HUR");s(this,"visible",!1);s(this,"libsUtil",O)}async open(r,i,o,d,a,n=()=>{}){this.customTitle=d,this.giver=r,this.prompt=a||"",this.receiver=i,this.amountInput="0",this.callbackOnSuccess=n,this.offerId=o||"";try{const u=await j();this.apiServer=u.apiServer||"",this.activeDid=u.activeDid||"",this.allContacts=await P.contacts.toArray(),this.allMyDids=await V(),this.giver&&!this.giver.name&&(this.giver.name=N(this.giver.did,this.activeDid,this.allMyDids,this.allContacts))}catch(u){console.error("Error retrieving settings from database:",u),this.$notify({group:"alert",type:"danger",title:"Error",text:u.message||"There was an error retrieving your settings."},-1)}this.visible=!0}close(){this.visible=!1}changeUnitCode(){const r=Object.keys(this.libsUtil.UNIT_SHORT),i=r.indexOf(this.unitCode);this.unitCode=r[(i+1)%r.length]}increment(){this.amountInput=`${(parseFloat(this.amountInput)||0)+1}`}decrement(){this.amountInput=`${Math.max(0,(parseFloat(this.amountInput)||1)-1)}`}cancel(){this.close(),this.eraseValues()}eraseValues(){this.description="",this.giver=void 0,this.amountInput="0",this.prompt="",this.unitCode="HUR"}async confirm(){var r,i;if(!this.activeDid){this.$notify({group:"alert",type:"danger",title:"Error",text:"You must select an identifier before you can record a give."},3e3);return}if(parseFloat(this.amountInput)<0){this.$notify({group:"alert",type:"danger",text:"You may not send a negative number.",title:""},2e3);return}if(!this.description&&!parseFloat(this.amountInput)){this.$notify({group:"alert",type:"danger",title:"Error",text:`You must enter a description or some number of ${this.libsUtil.UNIT_LONG[this.unitCode]}.`},2e3);return}this.close(),this.$notify({group:"alert",type:"toast",text:"Recording the give...",title:""},1e3),await this.recordGive(((r=this.giver)==null?void 0:r.did)||null,((i=this.receiver)==null?void 0:i.did)||null,this.description,parseFloat(this.amountInput),this.unitCode).then(()=>{this.eraseValues()})}async recordGive(r,i,o,d,a="HUR"){try{const n=await A(this.axios,this.apiServer,this.activeDid,r,i,o,d,a,this.toProjectId,this.offerId,this.isTrade,void 0,this.fromProjectId);if(n.type==="error"||this.isGiveCreationError(n.response)){const u=this.getGiveCreationErrorMessage(n);console.error("Error with give creation result:",n),this.$notify({group:"alert",type:"danger",title:"Error",text:u||"There was an error creating the give."},-1)}else this.$notify({group:"alert",type:"success",title:"Success",text:`That ${this.isTrade?"trade":"gift"} was recorded.`},7e3),this.callbackOnSuccess&&this.callbackOnSuccess(d)}catch(n){console.error("Error with give recordation caught:",n);const u=n.userMessage||F(n)||"There was an error recording the give.";this.$notify({group:"alert",type:"danger",title:"Error",text:u},-1)}}isGiveCreationError(r){var i;return r.status!==201||((i=r.data)==null?void 0:i.error)}getGiveCreationErrorMessage(r){var i,o,d,a,n;return((i=r.error)==null?void 0:i.userMessage)||((o=r.error)==null?void 0:o.error)||((n=(a=(d=r.response)==null?void 0:d.data)==null?void 0:a.error)==null?void 0:n.message)}explainData(){this.$notify({group:"alert",type:"success",title:"Data Sharing",text:R},-1)}};g([$()],c.prototype,"fromProjectId",2);g([$()],c.prototype,"toProjectId",2);c=g([S],c);const Y={key:0,class:"dialog-overlay"},q={class:"dialog"},z={class:"text-xl font-bold text-center mb-4"},L=["placeholder"],W={class:"flex flex-row justify-center"},_={class:"mt-4 flex justify-center"},J={class:"text-center mb-2 mt-6 italic"},K={class:"grid grid-cols-1 sm:grid-cols-2 gap-2"};function Q(e,t,r,i,o,d){var u,m,v,f;const a=b("font-awesome"),n=b("router-link");return e.visible?(G(),k("div",Y,[l("div",q,[l("h1",z,I(e.customTitle),1),y(l("input",{"onUpdate:modelValue":t[0]||(t[0]=p=>e.description=p),type:"text",class:"block w-full rounded border border-slate-400 mb-2 px-3 py-2",placeholder:e.prompt||"What was given?"},null,8,L),[[C,e.description]]),l("div",W,[l("span",{class:"rounded-l border border-r-0 border-slate-400 bg-slate-200 text-center text-blue-500 px-2 py-2 w-20",onClick:t[1]||(t[1]=p=>e.changeUnitCode())},I(e.libsUtil.UNIT_SHORT[e.unitCode]||e.unitCode),1),l("div",{class:"border border-r-0 border-slate-400 bg-slate-200 px-4 py-2",onClick:t[2]||(t[2]=p=>e.amountInput==="0"?null:e.decrement())},[h(a,{icon:"chevron-left"})]),y(l("input",{id:"inputGivenAmount","onUpdate:modelValue":t[3]||(t[3]=p=>e.amountInput=p),type:"number",class:"border border-r-0 border-slate-400 px-2 py-2 text-center w-20"},null,512),[[C,e.amountInput]]),l("div",{class:"rounded-r border border-slate-400 bg-slate-200 px-4 py-2",onClick:t[4]||(t[4]=p=>e.increment())},[h(a,{icon:"chevron-right"})])]),l("div",_,[l("span",null,[h(n,{to:{name:"gifted-details",query:{amountInput:e.amountInput,description:e.description,giverDid:(u=e.giver)==null?void 0:u.did,giverName:(m=e.giver)==null?void 0:m.name,offerId:e.offerId,fulfillsProjectId:e.toProjectId,providerProjectId:e.fromProjectId,recipientDid:(v=e.receiver)==null?void 0:v.did,recipientName:(f=e.receiver)==null?void 0:f.name,unitCode:e.unitCode}},class:"text-blue-500"},{default:M(()=>t[8]||(t[8]=[w(" Photo & more options ... ")])),_:1},8,["to"])])]),l("p",J,[t[9]||(t[9]=w(" Sign & Send to publish to the world ")),h(a,{icon:"circle-info",class:"pl-2 text-blue-500 cursor-pointer",onClick:t[5]||(t[5]=p=>e.explainData())})]),l("div",K,[l("button",{class:"block w-full text-center text-lg font-bold uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md",onClick:t[6]||(t[6]=(...p)=>e.confirm&&e.confirm(...p))}," Sign & Send "),l("button",{class:"block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md",onClick:t[7]||(t[7]=(...p)=>e.cancel&&e.cancel(...p))}," Cancel ")])])])):E("",!0)}const re=U(c,[["render",Q]]);export{re as G}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/HelpNotificationTypesView-76lSXFAL.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/HelpNotificationTypesView-76lSXFAL.js deleted file mode 100644 index dfbbf9c..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/HelpNotificationTypesView-76lSXFAL.js +++ /dev/null @@ -1 +0,0 @@ -import{V as m,C as d,_ as v,h as w,j as l,k as e,n as r,w as g,F as x,z as p,B as b}from"./main.common-DD7dqhZp.js";import{Q as h}from"./QuickNav-C8jPGtUY.js";import"./index-BGoTPXII.js";var N=Object.getOwnPropertyDescriptor,k=(o,t,f,a)=>{for(var i=a>1?void 0:a?N(t,f):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(i=s(i)||i);return i};let u=class extends m{};u=k([d({components:{QuickNav:h}})],u);const T={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},V={class:"mb-8"},C={class:"text-lg text-center font-light relative px-7"};function $(o,t,f,a,i,n){const s=p("QuickNav"),c=p("font-awesome"),y=p("router-link");return b(),w(x,null,[l(s),e("section",T,[e("div",V,[e("div",C,[e("h1",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:t[0]||(t[0]=_=>o.$router.back())},[l(c,{icon:"chevron-left",class:"fa-fw"})])]),t[1]||(t[1]=e("h1",{id:"ViewHeading",class:"text-4xl text-center font-light pt-4 mb-8"}," Notification Types ",-1))]),e("div",null,[t[6]||(t[6]=e("p",null,"There are two types of notifications:",-1)),t[7]||(t[7]=e("h2",{class:"text-xl font-semibold mt-4"},"Reminder Notifications",-1)),t[8]||(t[8]=e("div",null,[e("p",null," The Reminder Notification will be sent to you daily with a specific message, at whatever time you choose. Use it to remind yourself to act, for example: pause and consider who has given you something, so you can record thanks in here. "),e("p",null," This is a reliable message, but it doesn't contain any details about activity that might be especially interesting to you. ")],-1)),t[9]||(t[9]=e("h2",{class:"text-xl font-semibold mt-4"},"New Activity Notifications",-1)),e("div",null,[t[5]||(t[5]=e("p",null," The New Activity Notification will be sent to you when there is new, relevant activity for you. It will only trigger if something involves you or a project of interest; it will not bug you for other, general activity. ",-1)),e("p",null,[t[3]||(t[3]=r(" This type is not as reliable as a Reminder Notification because mobile devices often suppress such notifications to save battery. (If you want to quickly check for relevant activity daily, use the Reminder Notification and open the app and look for a large green button that points out new activity that is personal to you. We are working on other ways to notify you more reliably -- ")),l(y,{class:"text-blue-500",to:"/help"},{default:g(()=>t[2]||(t[2]=[r("go here to follow us or contact us")])),_:1}),t[4]||(t[4]=r(".) "))])])])])],64)}const j=v(u,[["render",$]]);export{j as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/HelpNotificationsView-BOcgCbHz.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/HelpNotificationsView-BOcgCbHz.js deleted file mode 100644 index cb83d75..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/HelpNotificationsView-BOcgCbHz.js +++ /dev/null @@ -1 +0,0 @@ -var w=Object.defineProperty;var y=(o,t,s)=>t in o?w(o,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):o[t]=s;var h=(o,t,s)=>y(o,typeof t!="symbol"?t+"":t,s);import{V as v,d as x,M as k,C as S,_ as C,h as q,j as l,k as e,J as g,n as r,w as N,F as P,z as f,B as I}from"./main.common-DD7dqhZp.js";import{Q as T}from"./QuickNav-C8jPGtUY.js";import{a5 as A,a as O}from"./index-ryzpKtgI.js";import{P as $}from"./PushNotificationPermission-BPu7cCY7.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var M=Object.getOwnPropertyDescriptor,W=(o,t,s,i)=>{for(var n=i>1?void 0:i?M(t,s):t,u=o.length-1,d;u>=0;u--)(d=o[u])&&(n=d(n)||n);return n};let m=class extends v{constructor(){super(...arguments);h(this,"$notify");h(this,"$router");h(this,"subscriptionJSON")}async mounted(){var s;try{const i=await((s=navigator.serviceWorker)==null?void 0:s.ready),n=await(i==null?void 0:i.pushManager.getSubscription());this.subscriptionJSON=n==null?void 0:n.toJSON()}catch(i){console.error("Mount error:",i)}}alertWebPushSubscription(){alert(JSON.stringify(this.subscriptionJSON))}async sendTestWebPushMessage(s=!1){if(!this.subscriptionJSON){this.$notify({group:"alert",type:"danger",title:"Not Subscribed",text:"You must enable notifications before testing the web push."},5e3);return}try{await A(this.subscriptionJSON,s),this.$notify({group:"alert",type:"success",title:"Test Web Push Sent",text:"Check your device for the test web push message"+(s?".":" if there are new items in your feed.")},5e3)}catch(i){console.error("Got an error sending test notification:",i),this.$notify({group:"alert",type:"danger",title:"Error Sending Test",text:"Got an error sending the test web push notification."},5e3)}}showTestNotification(){var i;const s="It Worked";(i=navigator.serviceWorker)==null||i.ready.then(n=>n.showNotification(s,{body:"This is your test notification."})).then(()=>{this.$notify({group:"alert",type:"success",title:"Sent",text:`A notification was triggered, so one should show on your device entitled '${s}'.`},5e3)}).catch(n=>{console.error("Got a notification error:",n),this.$notify({group:"alert",type:"danger",title:"Failed",text:"Got an error sending a notification."},5e3)})}showNotificationChoice(){this.$refs.pushNotificationPermission.open(O,async(s,i,n)=>{s&&(await x.settings.update(k,{notifyingReminderMessage:n,notifyingReminderTime:i}),this.notifyingReminder=!0,this.notifyingReminderMessage=n||"",this.notifyingReminderTime=i)})}};m=W([S({components:{PushNotificationPermission:$,QuickNav:T}})],m);const D="/assets/chrome-install-pwa-DuUggvhZ.png",F="/assets/mac-installed-app-settings-B9fFiuKk.png",V="/assets/windows-system-enable-notifications-Dpjdl83C.png",R={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},B={class:"mb-8"},E={class:"text-lg text-center font-light relative px-7"},G={href:"https://developer.mozilla.org/en-US/docs/Web/API/Push_API#browser_compatibility",class:"text-blue-500",target:"_blank"},H={class:"px-2"},J={href:"https://developer.mozilla.org/en-US/docs/Web/API/Push_API#browser_compatibility",class:"text-blue-500",target:"_blank"};function Y(o,t,s,i,n,u){const d=f("QuickNav"),p=f("font-awesome"),b=f("PushNotificationPermission"),c=f("router-link");return I(),q(P,null,[l(d),e("section",R,[e("div",B,[e("div",E,[e("h1",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:t[0]||(t[0]=a=>o.$router.back())},[l(p,{icon:"chevron-left",class:"fa-fw"})])]),t[8]||(t[8]=e("h1",{id:"ViewHeading",class:"text-4xl text-center font-light pt-4 mb-8"}," Notification Help ",-1))]),e("div",null,[t[27]||(t[27]=e("p",null,"Here are ways to test notifications and get them working.",-1)),t[28]||(t[28]=e("h2",{class:"text-xl font-semibold mt-4"},"Full Test",-1)),e("div",null,[e("p",null,[t[9]||(t[9]=r(" If this works then you're all set. ")),e("button",{class:"block w-full text-center text-md bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md mb-2",onClick:t[1]||(t[1]=a=>o.sendTestWebPushMessage(!0))}," Send Yourself a Test Web Push Message (Through Push Server but Skipping Client Filter) ")])]),t[29]||(t[29]=e("h2",{class:"text-xl font-semibold mt-4"},"Android Users",-1)),t[30]||(t[30]=e("div",null,[e("p",null," Note that you may not receive notifications when the app is in the background. When you're done working, close the app, and then you'll get the reminder notifications. ")],-1)),t[31]||(t[31]=e("h2",{class:"text-xl font-semibold mt-4"}," If this app doesn't support notifications... ",-1)),t[32]||(t[32]=e("div",null,[e("p",null,[r(' To be notified of interesting updates, install this app on your device (as opposed to using it inside the browser app). In Chrome, it may prompt you, and you can also look for the "Install" command in the browser settings; on the the desktop, look for this icon in the address bar: '),e("img",{src:D,alt:"Chrome 'install' icon",class:"ml-4"})])],-1)),t[33]||(t[33]=e("h2",{class:"text-xl font-semibold mt-4"}," If you must enable notifications... ",-1)),e("div",null,[e("p",null,[e("button",{class:"text-blue-500",onClick:t[2]||(t[2]=a=>o.showNotificationChoice())}," Click here. "),l(b,{ref:"pushNotificationPermission"},null,512)])]),t[34]||(t[34]=g('

If you're waiting for system initialization...

... and it never stops, then there is a problem with the underlying service worker or push server mechanism in your browser. Your best bet is to follow the "Reinstall" steps below or use a different browser.

Check App Permissions

In Apple iOS, check "Settings" -> "Notifications", look for the Time Safari app (or the browser you're using), and make sure notifications are enabled.

In Android, hold on to the app icon, then select "App Info", then "Notifications" and make sure they're enabled. If it's still a problem then go further:

If you installed the app with Chrome, make sure there are no other tabs with it open. Here are some ways to clear caches that can mess things up (and note that this clears out data from the installed app -- which is good to do while the app is installed):

  • Go to Chrome "App Info", then "Storage & Cache" and "Clear Storage".
  • Go to Chrome "Settings", then "Privacy and Security" and "Clear "Clear browsing data", then "Cookies and site data". Make sure the "Time Range" at the top shows "All time".

On a Mac, go to "Settings" and check "Notifications". Mac app settings

Check Browser Permissions

',5)),e("div",null,[t[11]||(t[11]=e("p",null,"In Apple iOS, check Settings -> Notifications.",-1)),t[12]||(t[12]=e("p",null,"In Android, check Settings -> Notifications.",-1)),t[13]||(t[13]=r(" You can find more details about compatibility ")),e("a",G,[t[10]||(t[10]=r(" here ")),l(p,{icon:"arrow-up-right-from-square",class:"fa-fw"})])]),t[35]||(t[35]=e("h2",{class:"text-xl font-semibold mt-4"}," Check Operating System (OS) Permissions ",-1)),e("div",H,[t[16]||(t[16]=g('

Mobile Phone - Apple iOS

Notifications require iOS 16.4 or higher. To check your iOS version, go to Settings > General > About > Software Version.

Mobile Phone - Google Android

We recommend Chrome. It must be version 42 or higher. Check your version under Settings -> About Chrome.

Desktop - Mac

See "System Settings" -> "Notifications" and make sure it is enabled for the browser you're using. Note that these notifications require Mac OS 13; see your macOS version under Apple -> "About This Mac".

Desktop - Windows

In Windows, check "Settings" -> "Notifications". Windows system settings
',1)),e("div",null,[t[15]||(t[15]=r(" You can find more details about compatibility ")),e("a",J,[t[14]||(t[14]=r(" here ")),l(p,{icon:"arrow-up-right-from-square",class:"fa-fw"})])])]),t[36]||(t[36]=e("h2",{class:"text-xl font-semibold mt-4"},"Reinstall",-1)),e("div",null,[t[19]||(t[19]=e("p",null," If all else fails, it's best to start over. ",-1)),e("p",null,[t[17]||(t[17]=r(" Of course, you'll want to back up all your data first -- all seeds as well as the contacts & settings -- on the Profile ")),l(p,{icon:"circle-user"}),t[18]||(t[18]=r(" page. "))]),t[20]||(t[20]=e("p",null," Here are instructions to uninstall the app and clear out caches and storage. Note that you should first ensure check that the browser tabs with Time Safari are closed. (If any are open then that will interfere with your refresh.) ",-1)),t[21]||(t[21]=e("ul",{class:"ml-4 list-disc"},[e("li",null,[r(" Clear cache. "),e("ul",null,[e("li",null,' In mobile, look for the browser app settings. This is true even for an installed app: go to the browser which you used to initially visit timesafari.app, because those settings affect the app. Look for "Delete browsing data" in the "Settings", under "Privacy and Security". '),e("li",null,' In Chrome, go to `chrome://settings/cookies` and "all site data and permissions" for timesafari.app; in Firefox, go to `about:preferences` and search for "cache" then "Manage Data" for timesafari.app. Also manually remove the IndexedDB data if the DBs still show.) ')])]),e("li",null,' Clear notification permission. (In Chrome, go to `chrome://settings/content/notifications`; in Firefox, go to `about:preferences` and search for "notifications".) '),e("li",null," Unregister service worker. (In Chrome, go to `chrome://serviceworker-internals/`; in Firefox, go to `about:serviceworkers`.) "),e("li",null,' Clear "Cache Storage". (In Chrome, in dev tools under "Application"; in Firefox, in dev tools under "Storage".) ')],-1)),t[22]||(t[22]=e("p",null,"Then reinstall the app.",-1))]),t[37]||(t[37]=e("h2",{class:"text-xl font-semibold mt-4"},"Tests",-1)),e("button",{class:"block w-full text-center text-md bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md mt-4 mb-2",onClick:t[3]||(t[3]=a=>o.showTestNotification())}," Send Test Notification Directly to Device (Not Through Push Server) "),t[38]||(t[38]=e("p",null,` If that didn't show a notification on your device, the problem is that your browser or your operating system are not allowing notifications through. See "Check App Permissions" and "Check Browser Permissions" and "Check Operating System (OS) Permissions" above. `,-1)),e("button",{class:"block w-full text-center text-md bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md mt-4 mb-2",onClick:t[4]||(t[4]=a=>o.alertWebPushSubscription())}," Show Web Push Subscription Info "),e("p",null,[t[23]||(t[23]=r(' If that showed "null" then the notification is not active. ')),e("button",{class:"text-blue-500",onClick:t[5]||(t[5]=a=>o.showNotificationChoice())}," Click here. ")]),e("button",{class:"block w-full text-center text-md bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md mt-4 mb-2",onClick:t[6]||(t[6]=a=>o.sendTestWebPushMessage(!0))}," Send Yourself a Test Web Push Message (Through Push Server but Skipping Client Filter) "),t[39]||(t[39]=e("p",null," If that didn't show a notification on your device, there is a problem getting to the push server. Disable notifications and then enable them again. ",-1)),e("button",{class:"block w-full text-center text-md bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md mt-4 mb-2",onClick:t[7]||(t[7]=a=>o.sendTestWebPushMessage())}," Send Yourself a Test Web Push Message (Through Push Server and Client Filter) "),e("p",null,[t[25]||(t[25]=r(" If you don't see a message, it could be that there is nothing new for you to see. If the previous test worked, then things should work fine. If you notice a full 24 hours where you get no notification and you know that there are new items that should show, gather as many details as possible and go to the bottom of ")),l(c,{to:"help",class:"text-blue-500"},{default:N(()=>t[24]||(t[24]=[r(" this page ")])),_:1}),t[26]||(t[26]=r(" for ways to contact us. "))])])])],64)}const tt=C(m,[["render",Y]]);export{tt as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/HelpOnboardingView-CcWgFmX6.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/HelpOnboardingView-CcWgFmX6.js deleted file mode 100644 index 1a07471..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/HelpOnboardingView-CcWgFmX6.js +++ /dev/null @@ -1 +0,0 @@ -import{V as f,C as h,_ as g,h as x,k as e,n as o,j as i,w as y,z as u,B as v}from"./main.common-DD7dqhZp.js";import{Q as b}from"./QuickNav-C8jPGtUY.js";import"./index-BGoTPXII.js";var w=Object.getOwnPropertyDescriptor,k=(l,t,p,a)=>{for(var s=a>1?void 0:a?w(t,p):t,r=l.length-1,n;r>=0;r--)(n=l[r])&&(s=n(s)||s);return s};let d=class extends f{};d=k([h({components:{QuickNav:b}})],d);const T={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},C={class:"ml-4"},c={class:"ml-4"};function S(l,t,p,a,s,r){const n=u("font-awesome"),m=u("router-link");return v(),x("section",T,[t[21]||(t[21]=e("div",{class:"mb-8"},[e("h1",{id:"ViewHeading",class:"text-4xl text-center font-light pt-4 mb-8"}," Time Safari Onboarding Instructions ")],-1)),e("p",null,[t[0]||(t[0]=o(" To invite someone the easiest way, send them a link that you generate from this page: ")),i(m,{to:{name:"invite-one"},class:"bg-gradient-to-b from-green-400 to-green-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md"},{default:y(()=>[i(n,{icon:"envelope-open-text",class:"fa-fw text-xl"})]),_:1})]),t[22]||(t[22]=e("p",null,"Then watch that page to see when they accept their invite.",-1)),e("p",null,[t[1]||(t[1]=o(" (That page is also reachable from the Contacts ")),i(n,{icon:"users"}),t[2]||(t[2]=o(" page though the invitation ")),i(n,{icon:"envelope-open-text"}),t[3]||(t[3]=o(" icon.) "))]),t[23]||(t[23]=e("h1",{class:"mt-4 font-bold text-xl"},"Next Steps",-1)),t[24]||(t[24]=o(" Although not totally necessary, backups are important to understand. ")),e("div",C,[t[6]||(t[6]=e("h1",{class:"font-bold text-xl"},"Without a backup, you can lose data.",-1)),e("div",null,[e("p",null,[t[4]||(t[4]=o(" Exporting backups (from the Account ")),i(n,{icon:"circle-user"}),t[5]||(t[5]=o(" screen) is important for the case where they lose their device. This is especially true for the Identifier Seed: that is theirs and and theirs alone, and currently nobody else can recover it if they lose it. The good thing is that anyone can create a new account and simply inform their network of their new ID. "))])])]),t[25]||(t[25]=e("h1",{class:"mt-4 font-bold text-xl"},"Advanced",-1)),t[26]||(t[26]=o(" The following are optional steps for even more functionality. ")),e("div",c,[t[15]||(t[15]=e("h1",{class:"font-bold text-xl"},"Add Contact & Register",-1)),e("p",null,[t[7]||(t[7]=o(" You share even more information such as your picture and name when you share with your QR code at these links: ")),i(n,{icon:"qrcode"})]),t[16]||(t[16]=e("p",null," Scanning those with your cameras will automatically register people and add them to each other's contact lists. ",-1)),t[17]||(t[17]=e("p",null," The following are more detailed manual steps: ",-1)),e("div",null,[t[12]||(t[12]=e("p",null," 1) Have them follow their yellow prompts. ",-1)),e("p",null,[t[8]||(t[8]=o(" 2) Scan their QR, or have them tap on it to copy their info and send it to you. Then you can add them to your Contacts ")),i(n,{icon:"users"})]),e("p",null,[t[9]||(t[9]=o(" 3) You can register them at their info page ")),i(n,{icon:"circle-info"}),t[10]||(t[10]=o(" and click on the register button ")),i(n,{icon:"person-circle-question"})]),e("p",null,[t[11]||(t[11]=o(" 4) Add yourself to their Contacts ")),i(n,{icon:"users"})])]),t[18]||(t[18]=e("h1",{class:"font-bold text-xl"},"Install",-1)),t[19]||(t[19]=e("div",null,[e("p",null,' Have them visit TimeSafari.app in a browser, preferably Chrome or Safari, and then look for the "Install" selection which adds this app to their desktop. This enables other things, like the ability to "share" a photo from their device directly to Time Safari, and it makes notifications more reliable. ')],-1)),t[20]||(t[20]=e("h1",{class:"font-bold text-xl"},"Enable Notifications",-1)),e("div",null,[e("p",null,[t[13]||(t[13]=o(" Enable notifications from the Account page ")),i(n,{icon:"circle-user"}),t[14]||(t[14]=o(". Those notifications might show up on the device depending on your settings. For the most reliable habits, set an alarm or do some other ritual to record gratitude every day. "))])])])])}const H=g(d,[["render",S]]);export{H as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/HelpView-pr-0AKMM.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/HelpView-pr-0AKMM.js deleted file mode 100644 index eb49d9c..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/HelpView-pr-0AKMM.js +++ /dev/null @@ -1 +0,0 @@ -var P=Object.defineProperty;var V=(i,e,a)=>e in i?P(i,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):i[e]=a;var r=(i,e,a)=>V(i,typeof e!="symbol"?e+"":e,a);import{V as F,e as z,u as B,C as q,_ as N,h as p,j as s,k as t,J as $,n as o,m,w as u,o as b,v as x,t as k,F as E,z as g,B as c}from"./main.common-DD7dqhZp.js";import{u as M}from"./index-CZnn7ED5.js";import{Q as W}from"./QuickNav-C8jPGtUY.js";import"./index-BGoTPXII.js";const I="timesafari",T="0.4.4",C="TimeSafari Desktop Application",S={name:"TimeSafari Team"},j={dev:"vite --config vite.config.dev.mts",serve:"vite preview",build:"VITE_GIT_HASH=`git log -1 --pretty=format:%h` vite build",lint:"eslint --ext .js,.ts,.vue --ignore-path .gitignore src","lint-fix":"eslint --ext .js,.ts,.vue --ignore-path .gitignore --fix src",prebuild:"eslint --ext .js,.ts,.vue --ignore-path .gitignore src && node sw_combine.js","test-local":"npx playwright test -c playwright.config-local.ts --trace on","test-all":"npm run build && npx playwright test -c playwright.config-local.ts --trace on","clean:electron":"rimraf dist-electron","build:pywebview":"vite build --config vite.config.pywebview.mts","build:electron":"npm run clean:electron && vite build --config vite.config.electron.mts && node scripts/build-electron.js","build:capacitor":"vite build --config vite.config.capacitor.mts","build:web":"vite build --config vite.config.web.mts","electron:dev":"npm run build && electron dist-electron","electron:start":"electron dist-electron","electron:build-linux":"npm run build:electron && electron-builder --linux AppImage","electron:build-linux-deb":"npm run build:electron && electron-builder --linux deb","electron:build-linux-prod":"NODE_ENV=production npm run build:electron && electron-builder --linux AppImage","build:electron-prod":"NODE_ENV=production npm run build:electron","pywebview:dev":"vite build --config vite.config.pywebview.mts && .venv/bin/python src/pywebview/main.py","pywebview:build":"vite build --config vite.config.pywebview.mts && .venv/bin/python src/pywebview/main.py","pywebview:package-linux":"vite build --mode pywebview --config vite.config.pywebview.mts && .venv/bin/python -m PyInstaller --name TimeSafari --add-data 'dist:www' src/pywebview/main.py","pywebview:package-win":"vite build --mode pywebview --config vite.config.pywebview.mts && .venv/Scripts/python -m PyInstaller --name TimeSafari --add-data 'dist;www' src/pywebview/main.py","pywebview:package-mac":"vite build --mode pywebview --config vite.config.pywebview.mts && .venv/bin/python -m PyInstaller --name TimeSafari --add-data 'dist:www' src/pywebview/main.py","build:did-generator":"tsc -p test-scripts/tsconfig.json","generate-did":"node test-scripts/dist/did_generator.js"},D={"@capacitor/android":"^6.2.0","@capacitor/app":"^6.0.0","@capacitor/cli":"^6.2.0","@capacitor/core":"^6.2.0","@capacitor/ios":"^6.2.0","@dicebear/collection":"^5.4.1","@dicebear/core":"^5.4.1","@ethersproject/hdnode":"^5.7.0","@fortawesome/fontawesome-svg-core":"^6.5.1","@fortawesome/free-solid-svg-icons":"^6.5.1","@fortawesome/vue-fontawesome":"^3.0.6","@peculiar/asn1-ecc":"^2.3.8","@peculiar/asn1-schema":"^2.3.8","@pvermeer/dexie-encrypted-addon":"^3.0.0","@simplewebauthn/browser":"^10.0.0","@simplewebauthn/server":"^10.0.0","@tweenjs/tween.js":"^21.1.1","@types/qrcode":"^1.5.5","@veramo/core":"^5.6.0","@veramo/credential-w3c":"^5.6.0","@veramo/data-store":"^5.6.0","@veramo/did-manager":"^5.6.0","@veramo/did-provider-ethr":"^5.6.0","@veramo/did-provider-peer":"^6.0.0","@veramo/did-resolver":"^5.6.0","@veramo/key-manager":"^5.6.0","@vue-leaflet/vue-leaflet":"^0.10.1","@vueuse/core":"^12.3.0","@zxing/text-encoding":"^0.9.0","asn1-ber":"^1.2.2",axios:"^1.6.8","cbor-x":"^1.5.9","class-transformer":"^0.5.1",dexie:"^3.2.7","dexie-export-import":"^4.1.4","did-jwt":"^7.4.7","did-resolver":"^4.1.0","ethereum-cryptography":"^2.1.3","ethereumjs-util":"^7.1.5",jdenticon:"^3.2.0","js-generate-password":"^0.1.9","js-yaml":"^4.1.0",leaflet:"^1.9.4","localstorage-slim":"^2.7.0","lru-cache":"^10.2.0",luxon:"^3.4.4",merkletreejs:"^0.3.11","nostr-tools":"^2.10.4",notiwind:"^2.0.2",papaparse:"^5.4.1",pina:"^0.20.2204228","pinia-plugin-persistedstate":"^3.2.1","qr-code-generator-vue3":"^1.4.21",qrcode:"^1.5.4",ramda:"^0.29.1","readable-stream":"^4.5.2","reflect-metadata":"^0.1.14","register-service-worker":"^1.7.2","simple-vue-camera":"^1.1.3",sqlite3:"^5.1.7","stream-browserify":"^3.0.0",three:"^0.156.1","ua-parser-js":"^1.0.37",vue:"^3.5.13","vue-axios":"^3.5.2","vue-facing-decorator":"^3.0.4","vue-picture-cropper":"^0.7.0","vue-qrcode-reader":"^5.5.3","vue-router":"^4.5.0","web-did-resolver":"^2.0.27",zod:"^3.24.2",dotenv:"^16.0.3"},G={"@playwright/test":"^1.45.2","@types/dom-webcodecs":"^0.1.7","@types/js-yaml":"^4.0.9","@types/leaflet":"^1.9.8","@types/luxon":"^3.4.2","@types/node":"^20.14.11","@types/node-fetch":"^2.6.12","@types/ramda":"^0.29.11","@types/sqlite3":"^3.1.11","@types/three":"^0.155.1","@types/ua-parser-js":"^0.7.39","@typescript-eslint/eslint-plugin":"^6.21.0","@typescript-eslint/parser":"^6.21.0","@vitejs/plugin-vue":"^5.2.1","@vue/eslint-config-typescript":"^11.0.3",autoprefixer:"^10.4.19",concurrently:"^8.2.2",electron:"^33.2.1","electron-builder":"^25.1.8",eslint:"^8.57.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.2.1","eslint-plugin-vue":"^9.32.0","fs-extra":"^11.3.0",markdownlint:"^0.37.4","markdownlint-cli":"^0.44.0","npm-check-updates":"^17.1.13",postcss:"^8.4.38",prettier:"^3.2.5",rimraf:"^6.0.1",tailwindcss:"^3.4.1",typescript:"~5.2.2",vite:"^5.2.0","vite-plugin-pwa":"^0.19.8"},A="./dist-electron/main.js",H={appId:"org.timesafari.app",productName:"TimeSafari",directories:{output:"dist-electron-packages"},files:["dist-electron/**/*","src/electron/**/*","main.js"],extraResources:[{from:"dist-electron",to:"."}],linux:{target:["AppImage","deb"],category:"Office",icon:"build/icon.png"},asar:!0},O={name:I,version:T,description:C,author:S,scripts:j,dependencies:D,devDependencies:G,main:A,build:H},Y=Object.freeze(Object.defineProperty({__proto__:null,author:S,build:H,default:O,dependencies:D,description:C,devDependencies:G,main:A,name:I,scripts:j,version:T},Symbol.toStringTag,{value:"Module"}));var R=Object.getOwnPropertyDescriptor,L=(i,e,a,w)=>{for(var h=w>1?void 0:w?R(e,a):e,f=i.length-1,y;f>=0;f--)(y=i[f])&&(h=y(h)||h);return h};let v=class extends F{constructor(){super(...arguments);r(this,"$notify");r(this,"$router");r(this,"package",Y);r(this,"commitHash");r(this,"showAlpha",!1);r(this,"showBasics",!1);r(this,"showCommunity",!1);r(this,"showGovernance",!1);r(this,"showGroup",!1);r(this,"showDidCopy",!1);r(this,"showVerifiable",!1)}doCopyTwoSecRedo(e,a){a(),M().copy(e).then(()=>setTimeout(a,2e3))}async unsetFinishedOnboarding(){const e=await z();e.activeDid&&await B(e.activeDid,{finishedOnboarding:!1}),this.$router.push({name:"home"})}};v=L([q({components:{QuickNav:W}})],v);const Q="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2013.0.2,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%2014948)%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.0//EN'%20'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'%3e%3csvg%20version='1.0'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='64px'%20height='64px'%20viewBox='5.5%20-3.5%2064%2064'%20enable-background='new%205.5%20-3.5%2064%2064'%20xml:space='preserve'%3e%3cg%3e%3ccircle%20fill='%23FFFFFF'%20cx='37.785'%20cy='28.501'%20r='28.836'/%3e%3cpath%20d='M37.441-3.5c8.951,0,16.572,3.125,22.857,9.372c3.008,3.009,5.295,6.448,6.857,10.314%20c1.561,3.867,2.344,7.971,2.344,12.314c0,4.381-0.773,8.486-2.314,12.313c-1.543,3.828-3.82,7.21-6.828,10.143%20c-3.123,3.085-6.666,5.448-10.629,7.086c-3.961,1.638-8.057,2.457-12.285,2.457s-8.276-0.808-12.143-2.429%20c-3.866-1.618-7.333-3.961-10.4-7.027c-3.067-3.066-5.4-6.524-7-10.372S5.5,32.767,5.5,28.5c0-4.229,0.809-8.295,2.428-12.2%20c1.619-3.905,3.972-7.4,7.057-10.486C21.08-0.394,28.565-3.5,37.441-3.5z%20M37.557,2.272c-7.314,0-13.467,2.553-18.458,7.657%20c-2.515,2.553-4.448,5.419-5.8,8.6c-1.354,3.181-2.029,6.505-2.029,9.972c0,3.429,0.675,6.734,2.029,9.913%20c1.353,3.183,3.285,6.021,5.8,8.516c2.514,2.496,5.351,4.399,8.515,5.715c3.161,1.314,6.476,1.971,9.943,1.971%20c3.428,0,6.75-0.665,9.973-1.999c3.219-1.335,6.121-3.257,8.713-5.771c4.99-4.876,7.484-10.99,7.484-18.344%20c0-3.543-0.648-6.895-1.943-10.057c-1.293-3.162-3.18-5.98-5.654-8.458C50.984,4.844,44.795,2.272,37.557,2.272z%20M37.156,23.187%20l-4.287,2.229c-0.458-0.951-1.019-1.619-1.685-2c-0.667-0.38-1.286-0.571-1.858-0.571c-2.856,0-4.286,1.885-4.286,5.657%20c0,1.714,0.362,3.084,1.085,4.113c0.724,1.029,1.791,1.544,3.201,1.544c1.867,0,3.181-0.915,3.944-2.743l3.942,2%20c-0.838,1.563-2,2.791-3.486,3.686c-1.484,0.896-3.123,1.343-4.914,1.343c-2.857,0-5.163-0.875-6.915-2.629%20c-1.752-1.752-2.628-4.19-2.628-7.313c0-3.048,0.886-5.466,2.657-7.257c1.771-1.79,4.009-2.686,6.715-2.686%20C32.604,18.558,35.441,20.101,37.156,23.187z%20M55.613,23.187l-4.229,2.229c-0.457-0.951-1.02-1.619-1.686-2%20c-0.668-0.38-1.307-0.571-1.914-0.571c-2.857,0-4.287,1.885-4.287,5.657c0,1.714,0.363,3.084,1.086,4.113%20c0.723,1.029,1.789,1.544,3.201,1.544c1.865,0,3.18-0.915,3.941-2.743l4,2c-0.875,1.563-2.057,2.791-3.541,3.686%20c-1.486,0.896-3.105,1.343-4.857,1.343c-2.896,0-5.209-0.875-6.941-2.629c-1.736-1.752-2.602-4.19-2.602-7.313%20c0-3.048,0.885-5.466,2.658-7.257c1.77-1.79,4.008-2.686,6.713-2.686C51.117,18.558,53.938,20.101,55.613,23.187z'/%3e%3c/g%3e%3c/svg%3e",U="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2013.0.2,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%2014948)%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='64px'%20height='64px'%20viewBox='-0.5%200.5%2064%2064'%20enable-background='new%20-0.5%200.5%2064%2064'%20xml:space='preserve'%3e%3cg%3e%3ccircle%20fill='%23FFFFFF'%20cx='31.325'%20cy='32.873'%20r='30.096'/%3e%3cpath%20id='text2809_1_'%20d='M31.5,14.08c-10.565,0-13.222,9.969-13.222,18.42c0,8.452,2.656,18.42,13.222,18.42%20c10.564,0,13.221-9.968,13.221-18.42C44.721,24.049,42.064,14.08,31.5,14.08z%20M31.5,21.026c0.429,0,0.82,0.066,1.188,0.157%20c0.761,0.656,1.133,1.561,0.403,2.823l-7.036,12.93c-0.216-1.636-0.247-3.24-0.247-4.437C25.808,28.777,26.066,21.026,31.5,21.026z%20M36.766,26.987c0.373,1.984,0.426,4.056,0.426,5.513c0,3.723-0.258,11.475-5.69,11.475c-0.428,0-0.822-0.045-1.188-0.136%20c-0.07-0.021-0.134-0.043-0.202-0.067c-0.112-0.032-0.23-0.068-0.336-0.11c-1.21-0.515-1.972-1.446-0.874-3.093L36.766,26.987z'/%3e%3cpath%20id='path2815_1_'%20d='M31.433,0.5c-8.877,0-16.359,3.09-22.454,9.3c-3.087,3.087-5.443,6.607-7.082,10.532%20C0.297,24.219-0.5,28.271-0.5,32.5c0,4.268,0.797,8.32,2.397,12.168c1.6,3.85,3.921,7.312,6.969,10.396%20c3.085,3.049,6.549,5.399,10.398,7.037c3.886,1.602,7.939,2.398,12.169,2.398c4.229,0,8.34-0.826,12.303-2.465%20c3.962-1.639,7.496-3.994,10.621-7.081c3.011-2.933,5.289-6.297,6.812-10.106C62.73,41,63.5,36.883,63.5,32.5%20c0-4.343-0.77-8.454-2.33-12.303c-1.562-3.885-3.848-7.32-6.857-10.33C48.025,3.619,40.385,0.5,31.433,0.5z%20M31.567,6.259%20c7.238,0,13.412,2.566,18.554,7.709c2.477,2.477,4.375,5.31,5.67,8.471c1.296,3.162,1.949,6.518,1.949,10.061%20c0,7.354-2.516,13.454-7.506,18.33c-2.592,2.516-5.502,4.447-8.74,5.781c-3.2,1.334-6.498,1.994-9.927,1.994%20c-3.468,0-6.788-0.653-9.949-1.948c-3.163-1.334-6.001-3.238-8.516-5.716c-2.515-2.514-4.455-5.353-5.826-8.516%20c-1.333-3.199-2.017-6.498-2.017-9.927c0-3.467,0.684-6.787,2.017-9.949c1.371-3.2,3.312-6.074,5.826-8.628%20C18.092,8.818,24.252,6.259,31.567,6.259z'/%3e%3c/g%3e%3c/svg%3e",J={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},K={class:"mb-8"},Z={class:"text-lg text-center font-light relative px-7"},X={class:"ml-4"},_={class:"list-disc list-outside ml-4"},ee={class:"p-2"},te={key:0},oe={class:"p-2"},ie={key:0},se={class:"p-2"},ne={key:0},re={class:"p-2"},ae={key:0},le={class:"p-2"},de={key:0},ue={class:"p-2"},pe={key:0},ce={class:"px-4"},me={class:"list-disc list-outside ml-4"},he={class:"list-disc list-outside ml-4"},fe={class:"list-disc list-outside ml-4"},ye={class:"px-4"},we={class:"list-disc list-outside ml-4"},ge={class:"list-disc list-outside ml-4"},ve={class:"list-disc list-outside ml-4"},be={style:{display:"inline","align-items":"center"}},xe={class:"list-disc list-outside ml-4"};function ke(i,e,a,w,h,f){const y=g("QuickNav"),n=g("font-awesome"),l=g("router-link");return c(),p(E,null,[s(y),t("section",J,[t("div",K,[t("div",Z,[t("h1",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:e[0]||(e[0]=d=>i.$router.back())},[s(n,{icon:"chevron-left",class:"fa-fw"})])]),e[9]||(e[9]=t("h1",{id:"ViewHeading",class:"text-4xl text-center font-light pt-4 mb-8"}," Help ",-1))]),t("div",null,[e[83]||(e[83]=t("p",null," This app focuses on gifts & gratitude, using them to build cool things together with your network. ",-1)),t("p",X,[e[10]||(e[10]=o(" If you'd like to see the page-by-page help, ")),t("span",{class:"text-blue-500 cursor-pointer",onClick:e[1]||(e[1]=d=>i.unsetFinishedOnboarding())},"click here"),e[11]||(e[11]=o(". "))]),e[84]||(e[84]=t("h2",{class:"text-xl font-semibold"},"What is the idea here?",-1)),e[85]||(e[85]=t("p",null," We are building networks of people who want to grow good society from the ground up, using modern technology that connects people peer-to-peer. First of all, let's showcase gratitude: see what people have given, and recognize gifts you've seen. This is done in a way that leaves a permanent record -- one that came from you, and one that the recipient can prove it was for them. This can be personally gratifying, but it extends to broader work: volunteers get confirmation of activity, and they can selectively show off their contributions and network. ",-1)),e[86]||(e[86]=t("p",{class:"mt-2"}," With this, you highlight giving and you also offer help -- which could be conditional on others' contributions, too. You can record your own ideas and invite others to collaborate. It's a way to organize & build with the resource that everyone has in equal amounts: time. ",-1)),e[87]||(e[87]=t("p",{class:"mt-2"}," Note that your personal data is safe: your ID is only shared with those you allow. Neither your name nor your contacts' names are shared with anyone -- even our servers -- though you can explicitly share it with other individuals if you choose. ",-1)),e[88]||(e[88]=t("h2",{class:"text-xl font-semibold"},"I want to know more because...",-1)),t("ul",_,[t("li",ee,[t("div",{class:"text-blue-500",onClick:e[2]||(e[2]=d=>i.showAlpha=!i.showAlpha)},"... I'm a member of Alpha chat."),i.showAlpha?(c(),p("div",te,e[12]||(e[12]=[t("p",null," This is a project for public benefit. You are invited to add your gratitude and propose projects on a distributable ledger. ",-1),t("p",null," The underlying data is on a merkle tree with each verifiable claim, signature and all. The chain includes individual IDs for discovery & visibility, so not all data is distributed -- yet. The goal is to eventually distribute the data on people's devices with their chosen network, where anyone could host their own chain of provenance if they choose. The formats follow standard schemas (eg. schema.org) to encourage interoperability. We're currently at the beginning phase where we're trusting the server to keep IDs private. It's all open-source, and we expect to have a professional audit someday. ",-1),t("p",null," A person's network of contacts is similar: the server currently knows some of the links between people to allow discovery and visibility. However, even that will be manageable on personal devices someday. ",-1),t("p",null,` There are no tokens to maintain the chain: the purpose is to create software that communities and activists can easily join and use. We're betting that this is a case where network participants have the motivation to run the software. The protocol is meant to be lightweight enough that non-technical people can run it on inexpensive devices they already own. There may be cases for MPC or ZKP in the future when they are more widespread and standard, but our preference is to engineer as simply as possible with "white-magic" cryptography over those "black-magic" functions. `,-1),t("p",null," Let's make real distributed computing and shared data happen, starting with our own small networks. ",-1),t("p",null," ... and exemplify the fun along the way. ",-1)]))):m("",!0)]),t("li",oe,[t("div",{class:"text-blue-500",onClick:e[3]||(e[3]=d=>i.showGroup=!i.showGroup)},"... I want to find a group I'll enjoy working with."),i.showGroup?(c(),p("div",ie,e[13]||(e[13]=[t("p",null," This app encourages people to offer small bits of time to one another. It's a way to run experiments with other people... tests of working together, which can start small and easy but build into cooperation with people who are like-minded and who work well together. ",-1),t("p",null," Search the projects and place an offer on an interesting one -- or create your own project and see who offers to help. After your first experiment, you can give and get confirmation about the work, which you might choose to show to future contacts. ",-1)]))):m("",!0)]),t("li",se,[t("div",{class:"text-blue-500",onClick:e[4]||(e[4]=d=>i.showCommunity=!i.showCommunity)},"... I want to participate in community projects."),i.showCommunity?(c(),p("div",ne,e[14]||(e[14]=[t("p",null," These are mostly at the beginning stages, so any of them will appreciate your offers that show interest. In fact, your offers can include your preferences, which give the project owners indications of how to proceed. ",-1),t("p",null," Search through the projects for issues of interest, locally as well as globally. If you don't see any projects that interest you, create your own and see what kind of offers you get. ",-1)]))):m("",!0)]),t("li",re,[t("div",{class:"text-blue-500",onClick:e[5]||(e[5]=d=>i.showVerifiable=!i.showVerifiable)},"... I want to build with verifiable, private data."),i.showVerifiable?(c(),p("div",ae,e[15]||(e[15]=[t("p",null," Make your claims and get others to confirm them. Then you can use the API to pull your copy of all that data, both claims from you and claims from others about you. These are hard-and-fast credentials that can be shown to others, along with their verifiable time and signature. ",-1),t("p",null," Furthermore, you can use your network to verify claims by other people, even if they haven't given you visibility. First, on the claim screen you can see if the server detects anyone who is a direct link between you, so you can reach out to those in-between people for more info. If there isn't anyone who is directly in between then you can reach out with a message to your network. ",-1),t("p",null," This app generated an identifier, based on public & private keys located on your device. That ID is only shared with our server and with people you explicitly allow. The other information -- like gratitude and contributions and projects -- are published to a server that protects your ID. (Someday, your devices will share directly P2P and not need a server... you can choose your levels of discovery and privacy.) What this means is that you are in charge of your network, and we provide tools and reporting to help you connect with your network for references and reputation. ",-1)]))):m("",!0)]),t("li",le,[t("div",{class:"text-blue-500",onClick:e[6]||(e[6]=d=>i.showGovernance=!i.showGovernance)},"... I want to build governance organically."),i.showGovernance?(c(),p("div",de,e[16]||(e[16]=[t("p",null," This requires motivated, dedicated citizens. The good thing is that dedication the primary ingredient; add coordination and we can find ways to replace monopolistic systems. ",-1),t("p",null," Add projects for your main areas of interest, and offer commitments to projects to kick-start some initiatives. ",-1),t("p",null," One other feature worth emphasizing: you build a history of credentials, ones that are verifiably yours. But one other good thing is that you get support from those who confirm your activity. You can share this support in a way that others can validate the data for themselves from people in their own network. This kind of reputable project and history of performance is good evidence for your ability to take responsibility for important initiatives. ",-1)]))):m("",!0)]),t("li",ue,[t("div",{class:"text-blue-500",onClick:e[7]||(e[7]=d=>i.showBasics=!i.showBasics)},"... I want to supply life's basics freely."),i.showBasics?(c(),p("div",pe,[t("p",null,[e[20]||(e[20]=o(" This platform is not optimal for balancing needs and resources at this point, but we continuously seek out and list those kinds of projects. Watch our blog, and watch the project list for words like ")),s(l,{class:"text-blue-500",to:"/discover?searchText=sharing"},{default:u(()=>e[17]||(e[17]=[o('"sharing"')])),_:1}),e[21]||(e[21]=o(" or ")),s(l,{class:"text-blue-500",to:"/discover?searchText=basic"},{default:u(()=>e[18]||(e[18]=[o('"basic"')])),_:1}),e[22]||(e[22]=o(" or ")),s(l,{class:"text-blue-500",to:"/discover?searchText=free"},{default:u(()=>e[19]||(e[19]=[o('"free"')])),_:1}),e[23]||(e[23]=o(". "))])])):m("",!0)])]),e[89]||(e[89]=t("h2",{class:"text-xl font-semibold"},"How do I get started?",-1)),t("p",null,[e[24]||(e[24]=o(" Someone -- like the person who told you about this app -- needs to register you on the Contacts ")),s(n,{icon:"users",class:"fa-fw"}),e[25]||(e[25]=o(" page. If you heard about this from our outreach, feel free to contact us (below) for a chat. After someone registers you, you can register others. "))]),e[90]||(e[90]=t("p",null,' Then you can record your appreciation for... whatever: select any contact on the home page (or "Unnamed") and send it. The main goal is to record what people have given you, to grow giving economies. You can also record your own ideas for projects. Each claim is recorded on a custom ledger. ',-1)),e[91]||(e[91]=t("p",null," The day after being registered, you'll be able to able to register others, too. Note that there are limits to how many others you can register. Take your time to bring people on... make it an opportunity to get to know their projects, and to show off your own. ",-1)),e[92]||(e[92]=t("h2",{class:"text-xl font-semibold"},"How do I add someone else?",-1)),t("p",null,[e[27]||(e[27]=t("a",{href:"/help-onboarding",target:"_blank",class:"text-blue-500"}," Use these instructions. ",-1)),e[28]||(e[28]=o(" To start scanning, go to the ")),s(l,{class:"text-blue-500",to:"/contact-qr"},{default:u(()=>e[26]||(e[26]=[o("contact-scanning page.")])),_:1})]),t("p",null,[e[29]||(e[29]=o(" If they are not nearby to scan QR codes, you each can tap on the QR code and paste it into the text box on the Contacts ")),s(n,{icon:"users",class:"fa-fw"}),e[30]||(e[30]=o(" page. "))]),e[93]||(e[93]=t("h2",{class:"text-xl font-semibold"}," I had an identifier, but I reinstalled and I got a new one automatically. How do I restore my old one? ",-1)),t("p",null,[e[32]||(e[32]=o(" Go ")),s(l,{class:"text-blue-500",to:"/import-account"},{default:u(()=>e[31]||(e[31]=[o("import your identifier")])),_:1}),e[33]||(e[33]=o(". "))]),e[94]||(e[94]=t("h2",{class:"text-xl font-semibold"},"How do I backup all my data?",-1)),e[95]||(e[95]=t("p",null," There are four sets of data to backup: the identifier secrets; the private text data that isn't as sensitive such as settings and contacts; the private image for yourself; and the data that you have sent to the public. ",-1)),t("div",ce,[e[43]||(e[43]=t("h2",{class:"text-xl font-semibold"}," How do I backup my identifier (secret) data? ",-1)),t("ul",me,[t("li",null,[e[34]||(e[34]=o(" Go to Your Identity ")),s(n,{icon:"circle-user",class:"fa-fw"}),e[35]||(e[35]=o(" page. "))]),e[36]||(e[36]=t("li",null,' Click on "Backup Identifier Seed" and follow the instructions. ',-1)),e[37]||(e[37]=t("li",null," If you have other identifiers, switch to each one and repeat those steps. ",-1))]),e[44]||(e[44]=t("h2",{class:"text-xl font-semibold"}," How do I backup my other private text data like settings & contacts? ",-1)),t("ul",he,[t("li",null,[e[38]||(e[38]=o(" Go to Your Identity ")),s(n,{icon:"circle-user",class:"fa-fw"}),e[39]||(e[39]=o(" page. "))]),e[40]||(e[40]=t("li",null,` Click on "Download Settings...". That will save a file to your downloads folder. That is your backup, so put it someplace where you won't lose it. `,-1))]),e[45]||(e[45]=t("h2",{class:"text-xl font-semibold"}," How do I backup my profile image? ",-1)),t("ul",fe,[t("li",null,[e[41]||(e[41]=o(" Go to Your Identity ")),s(n,{icon:"circle-user",class:"fa-fw"}),e[42]||(e[42]=o(" page, tap on your image, and save it. "))])]),e[46]||(e[46]=t("h2",{class:"text-xl font-semibold"}," How do I backup other data I've posted? ",-1)),e[47]||(e[47]=t("ul",{class:"list-disc list-outside ml-4"},[t("li",null,[o(" This requires use of the API, so investigate the endpoints "),t("a",{href:"https://api.endorser.ch/",target:"_blank",class:"text-blue-500"},"here"),o(' (particularly the "claim" endpoints). ')])],-1))]),e[96]||(e[96]=t("h2",{class:"text-xl font-semibold"},"How do I restore my data?",-1)),e[97]||(e[97]=t("p",null," There are two steps to restore your data: the identity secrets, then the other data such as settings, contacts, etc. ",-1)),t("div",ye,[e[52]||(e[52]=t("h2",{class:"text-xl font-semibold"}," How do I restore my identifier (secret) data? ",-1)),t("ul",we,[t("li",null,[s(l,{class:"text-blue-500",to:"/import-account"},{default:u(()=>e[48]||(e[48]=[o(" Go to the import page ")])),_:1}),e[49]||(e[49]=o(" and enter the seed phrase you backed up. "))])]),e[53]||(e[53]=t("h2",{class:"text-xl font-semibold"}," How do I restore my other (non-identifier-secret) data? ",-1)),t("ul",ge,[t("li",null,[e[50]||(e[50]=o(" Go to Your Identity ")),s(n,{icon:"circle-user",class:"fa-fw"}),e[51]||(e[51]=o(' page, click Advanced, and follow the instructions for the Contacts & Settings Database "Import". Beware that this will erase your existing contact & settings. '))])])]),e[98]||(e[98]=t("h2",{class:"text-xl font-semibold"},"How do I create another identity?",-1)),t("p",null,[e[55]||(e[55]=o(' Before doing this, beware that it is an advanced feature that affects functionality (eg. the words "Alt ID" next to results, backup features). You can ')),s(l,{to:"start",class:"text-blue-500"},{default:u(()=>e[54]||(e[54]=[o(" create another identity here. ")])),_:1})]),e[99]||(e[99]=$('

How do I erase my data from my device?

Before doing this, you may want to back up your data with the instructions above.

  • Mobile
    • Home Screen: hold down on the icon, and choose to delete it
    • Chrome: Settings -> Privacy and Security -> Clear Browsing Data
    • DuckDuckGo: long hold -> Clear Data (takes effect immediately)
  • Desktop
    • Chrome: Clear at "chrome://settings/content/all" and also clear under dev tools Application
    • Firefox: Navigate to "about:preferences", Manage Data, find timesafari.app and select, hit Remove Selected, then Save Changes
    • Safari: Settings -> Privacy -> Manage Website Data, search for timesafari.app and select, hit Remove Selected, then Done.

To erase your data from our servers, contact us (below).

How do I get higher limits?

Let's talk. Contact us (below).

How do I access even more functionality?

',7)),t("p",null,[e[56]||(e[56]=o(' There is an "Advanced" section at the bottom of the Profile ')),s(n,{icon:"circle-user"}),e[57]||(e[57]=o(" page. "))]),e[100]||(e[100]=t("p",null,[o(" There is even more functionality in a mobile app (and more documentation) at "),t("a",{href:"https://endorser.ch",target:"_blank",class:"text-blue-500"}," EndorserSearch.com ")],-1)),e[101]||(e[101]=t("h2",{class:"text-xl font-semibold"}," I know there is a record from someone, so why can't I see that info? ",-1)),t("p",null,[e[58]||(e[58]=o(" If you don't see anything associated with a person, this is typically because they have not given you permission to see their information. Ask them to add you to their contact list, and ask specifically to make sure the eye next to your name is open like this ")),s(n,{icon:"eye",class:"fa-fw"}),e[59]||(e[59]=o(" and not closed like this ")),s(n,{icon:"eye-slash",class:"fa-fw"}),e[60]||(e[60]=o(". "))]),e[102]||(e[102]=t("p",null," Sometimes the reason you don't see something is because the search results are limited. Go to the bottom and make sure to load all the data on a list. If you still don't see it, try a search or view on a different page. ",-1)),e[103]||(e[103]=t("h2",{class:"text-xl font-semibold"}," Where do I get help with notifications? ",-1)),t("p",null,[s(l,{class:"text-blue-500",to:"/help-notifications"},{default:u(()=>e[61]||(e[61]=[o("Here.")])),_:1})]),e[104]||(e[104]=t("h2",{class:"text-xl font-semibold"}," This app is misbehaving, like showing me a blank screen or failing to show my personal data. What can I do? ",-1)),e[105]||(e[105]=t("p",null," First, note that clearing the cache will clear all your identity and contact info, so we recommend doing other things first -- and only clearing when have your backups ready. ",-1)),t("ul",ve,[e[64]||(e[64]=t("li",null," Drag down on the screen to refresh it; do that multiple times, because it sometimes takes multiple tries for the app to refresh to the latest version. You can see the version information at the bottom of this page; the best way to determine the latest version is to open this page in an incognito/private browser window and look at the version there. ",-1)),e[65]||(e[65]=t("li",null," Close all tabs that have Time Safari open; it can be difficult to find them all, and you may have to close all your tabs. In addition, it may be running as an installed app, so look for any Time Safari app that may be running outside a browser. ",-1)),t("li",null,[e[62]||(e[62]=o(" There may be a problem with your identity. Go to the Identity ")),s(n,{icon:"circle-user",class:"fa-fw"}),e[63]||(e[63]=o(' page, then "Advanced", and "Switch Identifier" and you may see helpful info there. If it shows a problem, try adding your identifier again. '))]),e[66]||(e[66]=t("li",null,[o(" It can help to reregister the service worker: "),t("ul",null,[t("li",null,' In Chrome, open a tab to "chrome://serviceworker-internals", find "timesafari.app", and click "Unregister".'),t("li",null,' In Firefox, open a tab to "about:serviceworkers", find "timesafari.app", and click "Unregister". '),t("li",null,[t("a",{href:"https://duckduckgo.com/?q=unregister+service+worker",target:"_blank",class:"text-blue-500"},"Search"),o(" for instructions for other browsers.")])]),o(" Then reload Time Safari. ")],-1)),e[67]||(e[67]=t("li",null," Restart your device. ",-1))]),e[106]||(e[106]=t("p",null,' If you still have problems, you can clear the cache (see "erase my data" above) and even uninstall and reinstall the app -- just be sure to have your backups ready or be prepared to restart with a new identity and recreate your network. Nobody else has access to your identity or contact information because this app is designed to give you full control over your data. ',-1)),e[107]||(e[107]=t("h2",{class:"text-xl font-semibold"},"What are the terms & conditions and the privacy policy?",-1)),t("p",be,[e[73]||(e[73]=o(" This work is public domain. (If you like rules, reference ")),e[74]||(e[74]=t("a",{href:"http://creativecommons.org/publicdomain/zero/1.0?ref=chooser-v1",target:"_blank",rel:"license noopener noreferrer"},[t("span",{class:"text-blue-500 mr-1"},"CC0 1.0"),t("img",{src:Q,alt:"CC circle",width:"20",class:"display: inline"}),t("img",{src:U,alt:"CC zero",width:"20",style:{display:"inline"}})],-1)),e[75]||(e[75]=o(" .) This is offered freely, with the hope that it helps but without any warranty or guarantee; if it helps you then enjoy using it, but if you may try to forcibly collect damages for things you think it should do (or not do) then don't use it. ")),e[76]||(e[76]=t("br",null,null,-1)),e[77]||(e[77]=o(" As for data & privacy: ")),t("ul",xe,[t("li",null,[e[68]||(e[68]=o(" If using notifications, a server stores push token data. That can be revoked at any time by disabling notifications on the Profile ")),s(n,{icon:"circle-user",class:"fa-fw"}),e[69]||(e[69]=o(" page. "))]),e[70]||(e[70]=t("li",null," If sending images, a server stores them, too. They can be removed by editing the claim and deleting them. ",-1)),e[71]||(e[71]=t("li",null," If sending other partner system data (eg. to Trustroots) a public key and message data are stored on a server. Those can be removed via direct personal request. ",-1)),e[72]||(e[72]=t("li",null,[o(" For all other claim data, "),t("a",{href:"https://endorser.ch/privacy-policy",target:"_blank",class:"text-blue-500"}," the Endorser Service has this Privacy Policy. ")],-1))])]),e[108]||(e[108]=t("h2",{class:"text-xl font-semibold"},"How can I contribute?",-1)),t("p",null,[e[79]||(e[79]=o(" If you have skills, contact us below. If you have Bitcoin, donate to ")),t("button",{class:"text-blue-500 ml-2",onClick:e[8]||(e[8]=d=>i.doCopyTwoSecRedo("bc1q90v4ted6cpt63tjfh2lvd5xzfc67sd4g9w8xma",()=>i.showDidCopy=!i.showDidCopy))},[e[78]||(e[78]=o(" bc1q90v4ted6cpt63tjfh2lvd5xzfc67sd4g9w8xma ")),b(s(n,{icon:"copy",class:"text-sm text-slate-400 fa-fw"},null,512),[[x,!i.showDidCopy]]),b(s(n,{icon:"circle-check",class:"text-sm text-green-500 fa-fw"},null,512),[[x,i.showDidCopy]])]),e[80]||(e[80]=o(" You can donate online via ")),e[81]||(e[81]=t("a",{href:"https://www.patreon.com/TimeSafari",target:"_blank",class:"text-blue-500"},"Patreon here",-1)),e[82]||(e[82]=o(". For other donations, contact us. "))]),e[109]||(e[109]=t("h2",{class:"text-xl font-semibold"},"Where can I read more?",-1)),e[110]||(e[110]=t("p",null,[o(" This is part of the "),t("a",{href:"https://livesofgiving.org",target:"_blank",class:"text-blue-500"}," Lives of Giving "),o(" initiative. ")],-1)),e[111]||(e[111]=t("h2",{class:"text-xl font-semibold"},"What app version is this?",-1)),t("p",null,k(i.package.version)+" ("+k(i.commitHash)+")",1),e[112]||(e[112]=t("h2",{class:"text-xl font-semibold"}," I have other questions or feedback, like getting a new profile or removing my data or requesting an improvement. ",-1)),e[113]||(e[113]=t("p",null,[o(" Contact us at "),t("a",{href:"mailto:info@TimeSafari.app",class:"text-blue-500"},"info@TimeSafari.app")],-1))])])],64)}const De=N(v,[["render",ke]]);export{De as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/HomeView-BUammUSs.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/HomeView-BUammUSs.js deleted file mode 100644 index c1cfbce..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/HomeView-BUammUSs.js +++ /dev/null @@ -1 +0,0 @@ -var tt=Object.defineProperty;var it=(t,e,i)=>e in t?tt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var u=(t,e,i)=>it(t,typeof e!="symbol"?e+"":e,i);import{a0 as ot,C as te,V as ie,A as Ke,d as j,_ as oe,z as D,h as y,m as N,B as g,k as n,n as U,j as C,t as T,e as Q,M as ee,o as Re,q as Ge,y as H,w as R,F as he,E as ke,a1 as Ne,p as st,T as at,a2 as nt,a3 as rt,l as He,a4 as ze,u as lt,x as dt}from"./main.common-DD7dqhZp.js";import{E as ct}from"./EntityIcon-DciUb57i.js";import{G as ut}from"./GiftedDialog-DmRkVexW.js";import{v as ht,u as pt,i as bt,m as mt}from"./vue-leaflet.es-DQekxOGR.js";import{I as ft}from"./InfiniteScroll-DZwFAI4R.js";import{O as wt}from"./OnboardingDialog-DKHXNqS_.js";import{Q as gt}from"./QuickNav-C8jPGtUY.js";import{T as vt}from"./TopMessage-ZWDDjman.js";import{U as yt}from"./UserNameDialog-BV49F4GW.js";import{h as xt,R as kt,f as Ct,a7 as _t,a8 as Ot,$ as It,a0 as We,a9 as At,Z as qe,n as Ye,g as Nt}from"./index-ryzpKtgI.js";import{_ as Dt}from"./blank-square-D9dGgMJw.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var Ce={exports:{}};(function(t,e){(function(i,r){var h="1.0.40",b="",p="?",O="function",I="undefined",_="object",S="string",F="major",o="model",l="name",s="type",a="vendor",d="version",$="architecture",G="console",c="mobile",m="tablet",E="smarttv",M="wearable",be="embedded",me=500,se="Amazon",Y="Apple",De="ASUS",Te="BlackBerry",ae="Browser",ne="Chrome",Xe="Edge",re="Firefox",K="Google",Se="Huawei",fe="LG",we="Microsoft",$e="Motorola",J="Opera",X="Samsung",Ee="Sharp",le="Sony",ge="Xiaomi",ve="Zebra",Fe="Facebook",Pe="Chromium OS",Ue="Mac OS",je=" Browser",Ze=function(v,x){var w={};for(var A in v)x[A]&&x[A].length%2===0?w[A]=x[A].concat(v[A]):w[A]=v[A];return w},de=function(v){for(var x={},w=0;w0?k.length===2?typeof k[1]==O?this[k[0]]=k[1].call(this,V):this[k[0]]=k[1]:k.length===3?typeof k[1]===O&&!(k[1].exec&&k[1].test)?this[k[0]]=V?k[1].call(this,V,k[2]):r:this[k[0]]=V?V.replace(k[1],k[2]):r:k.length===4&&(this[k[0]]=V?k[3].call(this,V.replace(k[1],k[2])):r):this[k]=V||r;w+=2}},ce=function(v,x){for(var w in x)if(typeof x[w]===_&&x[w].length>0){for(var A=0;A2&&(f[o]="iPad",f[s]=m),f},this.getEngine=function(){var f={};return f[l]=r,f[d]=r,Z.call(f,A,B.engine),f},this.getOS=function(){var f={};return f[l]=r,f[d]=r,Z.call(f,A,B.os),k&&!f[l]&&L&&L.platform&&L.platform!="Unknown"&&(f[l]=L.platform.replace(/chrome os/i,Pe).replace(/macos/i,Ue)),f},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return A},this.setUA=function(f){return A=typeof f===S&&f.length>me?ye(f,me):f,this},this.setUA(A),this};P.VERSION=h,P.BROWSER=de([l,d,F]),P.CPU=de([$]),P.DEVICE=de([o,a,s,G,c,E,m,M,be]),P.ENGINE=P.OS=de([l,d]),t.exports&&(e=t.exports=P),e.UAParser=P;var W=typeof i!==I&&(i.jQuery||i.Zepto);if(W&&!W.ua){var ue=new P;W.ua=ue.getResult(),W.ua.get=function(){return ue.getUA()},W.ua.set=function(v){ue.setUA(v);var x=ue.getResult();for(var w in x)W.ua[w]=x[w]}}})(typeof window=="object"?window:ot)})(Ce,Ce.exports);var Je=Ce.exports,Tt=Object.getOwnPropertyDescriptor,St=(t,e,i,r)=>{for(var h=r>1?void 0:r?Tt(e,i):e,b=t.length-1,p;b>=0;b--)(p=t[b])&&(h=p(h)||h);return h};let _e=class extends ie{constructor(){super(...arguments);u(this,"$notify");u(this,"$router");u(this,"CATEGORY_CONTACTS",1);u(this,"CATEGORY_IDEAS",0);u(this,"IDEAS",["What food did someone make? (How did it free up your time for something? Was something doable because it eased your stress?)","What did a family member do? (How did you take better action because it made you feel loved?)","What compliment did someone give you? (What task could you tackle because it boosted your confidence?)","Who is someone you can always rely on, and how did they demonstrate that? (What project tasks were enabled because you could depend on them?)","What did you see someone give to someone else? (What is the effect of the positivity you gained from seeing that?)","What is a way that someone helped you even though you have never met? (What different action did you take due to that newfound perspective or inspiration?)","How did a musician or author or artist inspire you? (What were you motivated to do more creatively because of that?)","What inspiration did you get from someone who handled tragedy well? (What could you accomplish with better grace or resilience after seeing their example?)","What is something worth respect that an organization gave you? (How did their contribution improve the situation or enable new activities?)","Who last gave you a good laugh? (What kind of bond or revitalization did that bring to a situation?)","What do you recall someone giving you while you were young? (How did it bring excitement or teach a skill or ignite a passion that resulted in improvements in your life?)","Who forgave you or overlooked a mistake? (How did that free you or build trust that enabled better relationships?)","What is a way an ancestor contributed to your life? (What in your life is now possible because of their efforts? What challenges are you undertaking knowing of their lives?)","What kind of help did someone at work give you? (How did that help with team progress? How did that lift your professional growth?)","How did a teacher or mentor or great example help you? (How did their guidance enhance your attitude or actions?)","What is a surprise gift you received? (What extra possibilities did it give you?)"]);u(this,"callbackOnFullGiftInfo");u(this,"currentCategory",this.CATEGORY_IDEAS);u(this,"currentContact");u(this,"currentIdeaIndex",0);u(this,"numContacts",0);u(this,"shownContactDbIndices",[]);u(this,"visible",!1);u(this,"AppString",Ke)}async open(e){this.visible=!0,this.callbackOnFullGiftInfo=e,await j.open(),this.numContacts=await j.contacts.count(),this.shownContactDbIndices=new Array(this.numContacts)}cancel(){this.currentCategory=this.CATEGORY_IDEAS,this.currentContact=void 0,this.currentIdeaIndex=0,this.numContacts=0,this.shownContactDbIndices=[],this.visible=!1}proceed(){var e;this.visible=!1,this.currentCategory===this.CATEGORY_IDEAS?this.$router.push({name:"contact-gift",query:{prompt:this.IDEAS[this.currentIdeaIndex]}}):(e=this.callbackOnFullGiftInfo)==null||e.call(this,this.currentContact)}async nextIdea(){this.currentCategory===this.CATEGORY_IDEAS?(this.currentIdeaIndex++,this.currentIdeaIndex===this.IDEAS.length&&this.findNextUnshownContact()):this.findNextUnshownContact()}async prevIdea(){this.currentCategory===this.CATEGORY_IDEAS?(this.currentIdeaIndex--,this.currentIdeaIndex<0&&this.findNextUnshownContact()):this.findNextUnshownContact()}nextIdeaPastContacts(){this.currentContact=void 0,this.shownContactDbIndices=new Array(this.numContacts),this.currentCategory=this.CATEGORY_IDEAS,this.currentIdeaIndex=this.currentIdeaIndex>=this.IDEAS.length?0:this.IDEAS.length-1}async findNextUnshownContact(){this.currentCategory===this.CATEGORY_IDEAS&&(this.shownContactDbIndices=new Array(this.numContacts)),this.currentCategory=this.CATEGORY_CONTACTS;let e=Math.floor(Math.random()*this.numContacts),i=0;for(;this.shownContactDbIndices[e]!=null&&i++=this.numContacts?this.nextIdeaPastContacts():(await j.open(),this.currentContact=await j.contacts.offset(e).first(),this.shownContactDbIndices[e]=!0)}};_e=St([te],_e);const $t={key:0,class:"dialog-overlay"},Et={class:"dialog"},Ft={class:"text-xl font-bold text-center relative"},Pt={class:"mt-2 flex justify-between"},Ut={class:"m-2"},jt={key:0},Bt={class:"text-center text-lg"},Vt={key:1},Mt={class:"text-center"},Lt={key:0,class:"text-orange-500 text-lg"},Rt={key:1},Gt={class:"text-lg"},Ht={class:"flex justify-between"};function zt(t,e,i,r,h,b){const p=D("font-awesome");return t.visible?(g(),y("div",$t,[n("div",Et,[n("h1",Ft,[e[5]||(e[5]=U(" Here's one: ")),n("div",{class:"text-lg text-center p-2 leading-none absolute right-0 -top-1",onClick:e[0]||(e[0]=(...O)=>t.cancel&&t.cancel(...O))},[C(p,{icon:"xmark",class:"w-[1em]"})])]),n("span",Pt,[t.currentCategory===t.CATEGORY_IDEAS?(g(),y("span",{key:0,class:"rounded-l border border-slate-400 bg-slate-200 px-4 py-2 flex",onClick:e[1]||(e[1]=O=>t.prevIdea())},[C(p,{icon:"chevron-left",class:"m-auto"})])):N("",!0),n("div",Ut,[t.currentCategory===t.CATEGORY_IDEAS?(g(),y("span",jt,[n("p",Bt,T(t.IDEAS[t.currentIdeaIndex]),1)])):N("",!0),t.currentCategory===t.CATEGORY_CONTACTS?(g(),y("div",Vt,[n("p",Mt,[t.currentContact==null?(g(),y("span",Lt," That's all your contacts. ")):(g(),y("span",Rt,[n("span",Gt,[U(" Did "+T(t.currentContact.name||t.AppString.NO_CONTACT_NAME)+" ",1),e[6]||(e[6]=n("br",null,null,-1)),e[7]||(e[7]=U(" or someone near them do anything – maybe a while ago? "))]),n("span",Ht,[e[9]||(e[9]=n("span",null,null,-1)),n("button",{class:"text-center bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md mt-4",onClick:e[2]||(e[2]=O=>t.nextIdeaPastContacts())},[e[8]||(e[8]=U(" Skip Contacts ")),C(p,{icon:"forward"})])])]))])])):N("",!0)]),n("span",{class:"rounded-r border border-slate-400 bg-slate-200 px-4 py-2 flex",onClick:e[3]||(e[3]=O=>t.nextIdea())},[C(p,{icon:"chevron-right",class:"m-auto"})])]),n("button",{class:"block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md mt-4",onClick:e[4]||(e[4]=(...O)=>t.proceed&&t.proceed(...O))}," That's it! ")])])):N("",!0)}const Wt=oe(_e,[["render",zt]]);var qt=Object.getOwnPropertyDescriptor,Yt=(t,e,i,r)=>{for(var h=r>1?void 0:r?qt(e,i):e,b=t.length-1,p;b>=0;b--)(p=t[b])&&(h=p(h)||h);return h};let Oe=class extends ie{constructor(){super(...arguments);u(this,"$router");u(this,"onCloseIfChanged",()=>{});u(this,"hasSearchBox",!1);u(this,"hasVisibleDid",!1);u(this,"isNearby",!1);u(this,"settingChanged",!1);u(this,"visible",!1)}async open(i){this.onCloseIfChanged=i;const r=await Q();this.hasVisibleDid=!!r.filterFeedByVisible,this.isNearby=!!r.filterFeedByNearby,r.searchBoxes&&r.searchBoxes.length>0&&(this.hasSearchBox=!0),this.settingChanged=!1,this.visible=!0}async toggleHasVisibleDid(){this.settingChanged=!0,this.hasVisibleDid=!this.hasVisibleDid,await j.settings.update(ee,{filterFeedByVisible:this.hasVisibleDid})}async toggleNearby(){this.settingChanged=!0,this.isNearby=!this.isNearby,await j.settings.update(ee,{filterFeedByNearby:this.isNearby})}async clearAll(){(this.hasVisibleDid||this.isNearby)&&(this.settingChanged=!0),await j.settings.update(ee,{filterFeedByNearby:!1,filterFeedByVisible:!1}),this.hasVisibleDid=!1,this.isNearby=!1}async setAll(){(!this.hasVisibleDid||!this.isNearby)&&(this.settingChanged=!0),await j.settings.update(ee,{filterFeedByNearby:!0,filterFeedByVisible:!0}),this.hasVisibleDid=!0,this.isNearby=!0}close(){this.settingChanged&&this.onCloseIfChanged(),this.visible=!1}done(){this.close()}};Oe=Yt([te({components:{LRectangle:mt,LMap:bt,LMarker:pt,LTileLayer:ht}})],Oe);const Kt={key:0,id:"dialogFeedFilters",class:"dialog-overlay"},Jt={class:"dialog"},Xt={class:"grid grid-cols-1 gap-2"},Zt={class:"relative ml-2"},Qt={key:0,class:"relative ml-2"},ei={key:1,class:"relative ml-2"},ti={class:"grid grid-cols-1 sm:grid-cols-3 gap-2 mt-4"};function ii(t,e,i,r,h,b){return t.visible?(g(),y("div",Kt,[n("div",Jt,[e[15]||(e[15]=n("h1",{class:"text-xl font-bold text-center mb-4"},"Feed Filters",-1)),e[16]||(e[16]=n("p",{class:"mb-4 font-bold"},"Show only activities that…",-1)),n("div",Xt,[n("div",{class:"flex items-center justify-between cursor-pointer",onClick:e[1]||(e[1]=p=>t.toggleHasVisibleDid())},[e[9]||(e[9]=n("div",null,"Include someone visible to me",-1)),n("div",Zt,[Re(n("input",{"onUpdate:modelValue":e[0]||(e[0]=p=>t.hasVisibleDid=p),type:"checkbox",name:"toggleFilterFromMyContacts",class:"sr-only"},null,512),[[Ge,t.hasVisibleDid]]),e[7]||(e[7]=n("div",{class:"block bg-slate-500 w-14 h-8 rounded-full"},null,-1)),e[8]||(e[8]=n("div",{class:"dot absolute left-1 top-1 bg-slate-400 w-6 h-6 rounded-full transition"},null,-1))])]),e[14]||(e[14]=n("em",null,"or",-1)),n("div",{class:"flex items-center justify-between cursor-pointer",onClick:e[3]||(e[3]=p=>t.hasSearchBox?t.toggleNearby():t.$router.push({name:"search-area"}))},[e[13]||(e[13]=n("div",null,"Are nearby",-1)),t.hasSearchBox?(g(),y("div",Qt,[Re(n("input",{"onUpdate:modelValue":e[2]||(e[2]=p=>t.isNearby=p),type:"checkbox",name:"toggleFilterNearby",class:"sr-only"},null,512),[[Ge,t.isNearby]]),e[10]||(e[10]=n("div",{class:"block bg-slate-500 w-14 h-8 rounded-full"},null,-1)),e[11]||(e[11]=n("div",{class:"dot absolute left-1 top-1 bg-slate-400 w-6 h-6 rounded-full transition"},null,-1))])):(g(),y("div",ei,e[12]||(e[12]=[n("button",{class:"ml-2 px-4 py-2 rounded-md bg-blue-200 text-blue-500"}," Select Location ",-1)])))])]),n("div",ti,[n("button",{class:"block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md",onClick:e[4]||(e[4]=p=>t.setAll())}," Set All "),n("button",{class:"block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md",onClick:e[5]||(e[5]=p=>t.clearAll())}," Clear All "),n("button",{class:"block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md",onClick:e[6]||(e[6]=p=>t.done())}," Done ")])])])):N("",!0)}const oi=oe(Oe,[["render",ii]]);var si=Object.getOwnPropertyDescriptor,ai=(t,e,i,r)=>{for(var h=r>1?void 0:r?si(e,i):e,b=t.length-1,p;b>=0;b--)(p=t[b])&&(h=p(h)||h);return h};let Ie=class extends ie{constructor(){super(...arguments);u(this,"$notify");u(this,"title","");u(this,"text","");u(this,"option1Text","");u(this,"option2Text","");u(this,"option3Text","");u(this,"onOption1");u(this,"onOption2");u(this,"onOption3");u(this,"onCancel")}open(e){this.title=e.title,this.text=e.text,this.option1Text=e.option1Text||"",this.option2Text=e.option2Text||"",this.option3Text=e.option3Text||"",this.onOption1=e.onOption1,this.onOption2=e.onOption2,this.onOption3=e.onOption3,this.onCancel=e.onCancel,this.$notify({group:"customModal",type:"confirm",title:this.title,text:this.text,option1Text:this.option1Text,option2Text:this.option2Text,option3Text:this.option3Text,onOption1:this.onOption1,onOption2:this.onOption2,onOption3:this.onOption3,onCancel:this.onCancel},-1)}handleOption1(e){this.onOption1&&this.onOption1(),e("string that does not matter")}handleOption2(e){this.onOption2&&this.onOption2(),e("string that does not matter")}handleOption3(e){this.onOption3&&this.onOption3(),e("string that does not matter")}handleCancel(e){this.onCancel&&this.onCancel(),e("string that does not matter")}};Ie=ai([te],Ie);const ni={class:"fixed z-[100] top-0 inset-x-0 w-full"},ri={class:"absolute inset-0 h-screen flex flex-col items-center justify-center bg-slate-900/50"},li={class:"flex w-11/12 max-w-sm mx-auto mb-3 overflow-hidden bg-white rounded-lg shadow-lg"},di={class:"w-full px-6 py-6 text-slate-900 text-center"},ci={class:"font-semibold text-lg"},ui={class:"text-sm mb-2"},hi=["onClick"],pi=["onClick"],bi=["onClick"],mi=["onClick"];function fi(t,e,i,r,h,b){const p=D("Notification"),O=D("NotificationGroup");return g(),H(O,{group:"customModal"},{default:R(()=>[n("div",ni,[C(p,{enter:"transform ease-out duration-300 transition","enter-from":"translate-y-2 opacity-0 sm:translate-y-4","enter-to":"translate-y-0 opacity-100 sm:translate-y-0",leave:"transition ease-in duration-500","leave-from":"opacity-100","leave-to":"opacity-0",move:"transition duration-500","move-delay":"delay-300"},{default:R(({notifications:I,close:_})=>[(g(!0),y(he,null,ke(I,S=>(g(),y("div",{key:S.id,class:"w-full",role:"alert"},[n("div",ri,[n("div",li,[n("div",di,[n("span",ci,T(t.title),1),n("p",ui,T(t.text),1),n("button",{class:"block w-full text-center text-md font-bold capitalize bg-blue-800 text-white px-2 py-2 rounded-md mb-2",onClick:F=>t.handleOption1(_)},T(t.option1Text),9,hi),n("button",{class:"block w-full text-center text-md font-bold capitalize bg-blue-700 text-white px-2 py-2 rounded-md mb-2",onClick:F=>t.handleOption2(_)},T(t.option2Text),9,pi),n("button",{class:"block w-full text-center text-md font-bold capitalize bg-blue-600 text-white px-2 py-2 rounded-md mb-2",onClick:F=>t.handleOption3(_)},T(t.option3Text),9,bi),n("button",{class:"block w-full text-center text-md font-bold capitalize bg-slate-600 text-white px-2 py-2 rounded-md",onClick:F=>t.handleCancel(_)}," Cancel ",8,mi)])])])]))),128))]),_:1})])]),_:1})}const wi=oe(Ie,[["render",fi]]);var gi=Object.defineProperty,vi=Object.getOwnPropertyDescriptor,pe=(t,e,i,r)=>{for(var h=r>1?void 0:r?vi(e,i):e,b=t.length-1,p;b>=0;b--)(p=t[b])&&(h=(r?p(e,i,h):p(h))||h);return r&&h&&gi(e,i,h),h};let q=class extends ie{constructor(){super(...arguments);u(this,"imageUrl");u(this,"imageData");u(this,"isOpen");u(this,"userAgent",new Je.UAParser)}get isMobile(){const i=this.userAgent.getOS().name;return i==="iOS"||i==="Android"}close(){this.$emit("update:isOpen",!1)}async handleShare(){const i=this.userAgent.getOS().name;try{(i==="iOS"||i==="Android")&&(navigator.share?await navigator.share({url:this.imageUrl}):window.open(this.imageUrl,"_blank"))}catch(r){console.warn("Share failed, opening in new tab:",r),window.open(this.imageUrl,"_blank")}}};pe([Ne()],q.prototype,"imageUrl",2);pe([Ne()],q.prototype,"imageData",2);pe([Ne()],q.prototype,"isOpen",2);q=pe([te({emits:["update:isOpen"]})],q);const yi={key:0,class:"fixed inset-0 z-50 flex flex-col bg-black/90"},xi={class:"h-16 flex justify-between items-center px-4 bg-black"},ki={class:"flex-1 flex items-center justify-center p-2"},Ci={class:"w-full h-full flex items-center justify-center"},_i=["src"];function Oi(t,e,i,r,h,b){const p=D("font-awesome");return g(),H(nt,{to:"body"},[C(at,{name:"fade"},{default:R(()=>[t.isOpen?(g(),y("div",yi,[n("div",xi,[n("button",{class:"text-white text-2xl p-2 rounded-full hover:bg-white/10",onClick:e[0]||(e[0]=(...O)=>t.close&&t.close(...O))},[C(p,{icon:"xmark"})]),t.isMobile?(g(),y("button",{key:0,class:"text-white text-xl p-2 rounded-full hover:bg-white/10",onClick:e[1]||(e[1]=(...O)=>t.handleShare&&t.handleShare(...O))},[C(p,{icon:"ellipsis"})])):N("",!0)]),n("div",ki,[n("div",Ci,[n("img",{src:t.imageUrl,class:"max-h-[calc(100vh-5rem)] w-full h-full object-contain",alt:"expanded shared content",onClick:e[2]||(e[2]=st(()=>{},["stop"]))},null,8,_i)])])])):N("",!0)]),_:1})])}const Ii=oe(q,[["render",Oi],["__scopeId","data-v-409cf6bd"]]);var Ai=Object.getOwnPropertyDescriptor,Ni=(t,e,i,r)=>{for(var h=r>1?void 0:r?Ai(e,i):e,b=t.length-1,p;b>=0;b--)(p=t[b])&&(h=p(h)||h);return h};let Ae=class extends ie{constructor(){super(...arguments);u(this,"$notify");u(this,"$router");u(this,"AppString",Ke);u(this,"PASSKEYS_ENABLED",rt);u(this,"activeDid","");u(this,"allContacts",[]);u(this,"allMyDids",[]);u(this,"apiServer","");u(this,"feedData",[]);u(this,"feedPreviousOldestId");u(this,"feedLastViewedClaimId");u(this,"givenName","");u(this,"isAnyFeedFilterOn",!1);u(this,"isCreatingIdentifier",!1);u(this,"isFeedFilteredByVisible",!1);u(this,"isFeedFilteredByNearby",!1);u(this,"isFeedLoading",!0);u(this,"isRegistered",!1);u(this,"lastAckedOfferToUserJwtId");u(this,"lastAckedOfferToUserProjectsJwtId");u(this,"newOffersToUserHitLimit",!1);u(this,"newOffersToUserProjectsHitLimit",!1);u(this,"numNewOffersToUser",0);u(this,"numNewOffersToUserProjects",0);u(this,"searchBoxes",[]);u(this,"showShortcutBvc",!1);u(this,"userAgentInfo",new Je.UAParser);u(this,"selectedImage","");u(this,"selectedImageData",null);u(this,"isImageViewerOpen",!1);u(this,"imageCache",new Map)}async mounted(){try{await this.initializeIdentity(),await this.loadSettings(),await this.loadContacts(),await this.checkRegistrationStatus(),await this.loadFeedData(),await this.loadNewOffers(),await this.checkOnboarding()}catch(i){this.handleError(i)}}async initializeIdentity(){try{if(this.allMyDids=await xt(),this.allMyDids.length===0){this.isCreatingIdentifier=!0;const i=await kt();this.isCreatingIdentifier=!1,this.allMyDids=[i]}}catch(i){He("Error retrieving all account DIDs on home page:"+i,!0)}}async loadSettings(){const i=await Q();this.apiServer=i.apiServer||"",this.activeDid=i.activeDid||"",this.feedLastViewedClaimId=i.lastViewedClaimId,this.givenName=i.firstName||"",this.isFeedFilteredByVisible=!!i.filterFeedByVisible,this.isFeedFilteredByNearby=!!i.filterFeedByNearby,this.isRegistered=!!i.isRegistered,this.lastAckedOfferToUserJwtId=i.lastAckedOfferToUserJwtId,this.lastAckedOfferToUserProjectsJwtId=i.lastAckedOfferToUserProjectsJwtId,this.searchBoxes=i.searchBoxes||[],this.showShortcutBvc=!!i.showShortcutBvc,this.isAnyFeedFilterOn=ze(i)}async loadContacts(){this.allContacts=await j.contacts.toArray()}async checkRegistrationStatus(){if(!this.isRegistered&&this.activeDid)try{(await Ct(this.apiServer,this.axios,this.activeDid)).status===200&&(await lt(this.activeDid,{apiServer:this.apiServer,isRegistered:!0,...await Q()}),this.isRegistered=!0)}catch{}}async loadFeedData(){await this.updateAllFeed()}async loadNewOffers(){if(this.activeDid){const i=await _t(this.axios,this.apiServer,this.activeDid,this.lastAckedOfferToUserJwtId);this.numNewOffersToUser=i.data.length,this.newOffersToUserHitLimit=i.hitLimit;const r=await Ot(this.axios,this.apiServer,this.activeDid,this.lastAckedOfferToUserProjectsJwtId);this.numNewOffersToUserProjects=r.data.length,this.newOffersToUserProjectsHitLimit=r.hitLimit}}async checkOnboarding(){(await Q()).finishedOnboarding||this.$refs.onboardingDialog.open(It.Home)}handleError(i){He("Error retrieving settings or feed: "+i,!0),this.$notify({group:"alert",type:"danger",title:"Error",text:i.userMessage||"There was an error retrieving your settings or the latest activity."},5e3)}resultsAreFiltered(){return this.isFeedFilteredByVisible||this.isFeedFilteredByNearby}notificationsSupported(){return"Notification"in window}async reloadFeedOnChange(){const i=await Q();this.isFeedFilteredByVisible=!!i.filterFeedByVisible,this.isFeedFilteredByNearby=!!i.filterFeedByNearby,this.isAnyFeedFilterOn=ze(i),this.feedData=[],this.feedPreviousOldestId=void 0,await this.updateAllFeed()}async loadMoreGives(i){i&&!this.isFeedLoading&&await this.updateAllFeed()}latLongInAnySearchBox(i,r){for(const h of this.searchBoxes)if(h.bbox.westLong<=r&&r<=h.bbox.eastLong&&h.bbox.minLat<=i&&i<=h.bbox.maxLat)return!0}async updateAllFeed(){this.isFeedLoading=!0;let i=!0;await this.retrieveGives(this.apiServer,this.feedPreviousOldestId).then(async r=>{var h,b,p,O;if(r.data.length>0){i=!1;for(const I of r.data){const _=I.fullClaim.claim||I.fullClaim,S=((h=_.agent)==null?void 0:h.identifier)||((b=_.agent)==null?void 0:b.did),F=((p=_.recipient)==null?void 0:p.identifier)||((O=_.recipient)==null?void 0:O.did),o=await We(I.fulfillsPlanHandleId,this.axios,this.apiServer,this.activeDid);let l=!1;if(this.isFeedFilteredByVisible&&At(I)&&(l=!0),!l&&this.isFeedFilteredByNearby&&I.fulfillsPlanHandleId&&o!=null&&o.locLat&&o!=null&&o.locLon&&this.latLongInAnySearchBox(o.locLat,o.locLon)&&(l=!0),this.isAnyFeedFilterOn&&!l)continue;const s=Array.isArray(_.provider)?_.provider[0]:_.provider,a=await We(s==null?void 0:s.identifier,this.axios,this.apiServer,this.activeDid),d={...I,jwtId:I.jwtId,giver:qe(S,this.activeDid,Ye(S,this.allContacts),this.allMyDids),image:_.image,providerPlanHandleId:s==null?void 0:s.identifier,providerPlanName:a==null?void 0:a.name,recipientProjectName:o==null?void 0:o.name,receiver:qe(F,this.activeDid,Ye(F,this.allContacts),this.allMyDids)};this.feedData.push(d)}this.feedPreviousOldestId=r.data[r.data.length-1].jwtId,(this.feedLastViewedClaimId==null||this.feedLastViewedClaimId{console.error("Error with feed load:",r),this.$notify({group:"alert",type:"danger",title:"Feed Error",text:r.userMessage||"There was an error retrieving feed data."},-1)}),this.feedData.length===0&&!i&&await this.updateAllFeed(),this.isFeedLoading=!1}async retrieveGives(i,r){const h=r==null?"":"&beforeId="+r,b=!!r,p=await Nt(this.activeDid,b?void 0:this.$notify),O=await fetch(i+"/api/v2/report/gives?giftNotTrade=true"+h,{method:"GET",headers:p});if(!O.ok)throw await O.text();const I=await O.json();if(I.data)return I;throw JSON.stringify(I)}giveDescription(i){var O;const r=i.fullClaim.claim||i.fullClaim;let h=(O=r.object)!=null&&O.amountOfThisGood?this.displayAmount(r.object.unitCode,r.object.amountOfThisGood):"";r.description&&(h&&(h=" (and "+h+")"),h=r.description+h),h||(h="something not described");const b=i.giver,p=i.receiver;if(b.known&&p.known)return`${b.displayName} gave to ${p.displayName}: ${h}`;if(b.known)return i.recipientProjectName?`${b.displayName} gave: ${h} (to the project "${i.recipientProjectName}")`:`${b.displayName} gave: ${h} (to ${p.displayName})`;if(p.known)return i.providerPlanName?`${p.displayName} received: ${h} (from the project "${i.providerPlanName}")`:`${p.displayName} received: ${h} (from ${b.displayName})`;{let I="";return i.providerPlanName||i.recipientProjectName?(i.providerPlanName?I=`from the project "${i.providerPlanName}"`:I=`from ${b.displayName}`,i.recipientProjectName?I+=` to the project "${i.recipientProjectName}"`:I+=` to ${p.displayName}`):b.displayName===p.displayName?I=`between two who are ${b.displayName}`:I=`from ${b.displayName} to ${p.displayName}`,h+" ("+I+")"}}goToActivityToUserPage(){this.$router.push({name:"new-activity"})}onClickLoadClaim(i){const r={path:"/claim/"+encodeURIComponent(i)};this.$router.push(r)}displayAmount(i,r){return""+r+" "+this.currencyShortWordForCode(i,r===1)}currencyShortWordForCode(i,r){return i==="HUR"?r?"hour":"hours":i}openDialog(i,r){this.$refs.customDialog.open(i,{did:this.activeDid,name:"you"},void 0,"Given by "+((i==null?void 0:i.name)||"someone not named"),r)}openGiftedPrompts(){this.$refs.giftedPrompts.open((i,r)=>this.openDialog(i,r))}openFeedFilters(){this.$refs.feedFilters.open(this.reloadFeedOnChange)}toastUser(i){this.$notify({group:"alert",type:"toast",title:"FYI",text:i},2e3)}computeKnownPersonIconStyleClassNames(i){return i?"text-slate-500":"text-slate-100"}showNameThenIdDialog(){this.givenName?this.promptForShareMethod():this.$refs.userNameDialog.open(()=>{this.promptForShareMethod()})}promptForShareMethod(){this.$refs.choiceButtonDialog.open({title:"How can you share your info?",text:"",option1Text:"We are in a meeting together",option2Text:"We are nearby with cameras",option3Text:"We will share some other way",onOption1:()=>{this.$router.push({name:"onboard-meeting-list"})},onOption2:()=>{this.$router.push({name:"contact-qr"})},onOption3:()=>{this.$router.push({name:"share-my-contact-info"})}})}async cacheImageData(i,r){try{this.imageCache.set(r,null)}catch(h){console.warn("Failed to cache image:",h)}}async openImageViewer(i){this.selectedImageData=this.imageCache.get(i)??null,this.selectedImage=i,this.isImageViewerOpen=!0}};Ae=Ni([te({components:{EntityIcon:ct,FeedFilters:oi,GiftedDialog:ut,GiftedPrompts:Wt,InfiniteScroll:ft,OnboardingDialog:wt,ChoiceButtonDialog:wi,QuickNav:gt,TopMessage:vt,UserNameDialog:yt,ImageViewer:Ii}})],Ae);const Di={id:"Content",class:"p-2 pb-24 max-w-3xl mx-auto"},Ti={id:"ViewHeading",class:"text-4xl text-center font-light mb-8"},Si={class:"mb-8 mt-8"},$i={key:0,class:"mb-4"},Ei={class:"mb-8"},Fi={key:0},Pi={class:"text-slate-500 text-center italic mt-4 mb-4"},Ui={key:1},ji={class:"mb-4"},Bi={key:0,id:"noticeSomeoneMustRegisterYou",class:"bg-amber-200 rounded-md overflow-hidden text-center px-4 py-3 mb-4"},Vi={class:"block text-center"},Mi={key:0,class:"flex justify-end w-full"},Li={key:1,id:"sectionRecordSomethingGiven"},Ri={class:"flex"},Gi={class:"grid grid-cols-4 sm:grid-cols-5 md:grid-cols-6 gap-x-3 gap-y-5 text-center mt-4"},Hi={key:0,class:"text-sm"},zi=["onClick"],Wi={class:"text-xs text-blue-500 font-medium text-ellipsis whitespace-nowrap overflow-hidden cursor-pointer"},qi={class:"relative"},Yi={class:"bg-slate-100 rounded-md px-4 py-3 mt-4 mb-4"},Ki={class:"flex items-center mb-4"},Ji={class:"text-xl font-bold"},Xi={class:"text-xs text-white"},Zi={class:"flex justify-center"},Qi={key:0,class:"bg-gradient-to-b from-green-400 to-green-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] m-1 px-4 py-4 rounded-md text-white"},eo={class:"block text-center text-6xl","data-testId":"newDirectOffersActivityNumber"},to={class:"text-center"},io={key:1,class:"bg-gradient-to-b from-green-400 to-green-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] m-1 px-4 py-4 rounded-md text-white"},oo={class:"block text-center text-6xl","data-testId":"newOffersToUserProjectsActivityNumber"},so={class:"text-center"},ao={id:"listLatestActivity",class:"border-t border-slate-300"},no={key:0,class:"border-b border-slate-300 text-orange-400 pb-2 mb-2 font-bold text-sm"},ro={class:"grid grid-cols-12"},lo={class:"pt-1 col-span-1 justify-self-start"},co={class:"col-span-10 justify-self-stretch overflow-hidden"},uo={class:"pl-2 block break-words"},ho=["onClick"],po={class:"col-span-1 justify-self-end"},bo={key:1,class:"w-full"},mo=["onClick"],fo=["src","onLoad"],wo={key:0},go={class:"text-slate-500 text-center italic mt-4 mb-4"},vo={key:1};function yo(t,e,i,r,h,b){const p=D("QuickNav"),O=D("TopMessage"),I=D("OnboardingDialog"),_=D("font-awesome"),S=D("router-link"),F=D("UserNameDialog"),o=D("EntityIcon"),l=D("GiftedDialog"),s=D("GiftedPrompts"),a=D("FeedFilters"),d=D("InfiniteScroll"),$=D("ChoiceButtonDialog"),G=D("ImageViewer");return g(),y(he,null,[C(p,{selected:"Home"}),C(O),n("section",Di,[n("h1",Ti,T(t.AppString.APP_NAME),1),C(I,{ref:"onboardingDialog"},null,512),n("div",Si,[N("",!0)]),t.showShortcutBvc?(g(),y("div",$i,[C(S,{to:{name:"quick-action-bvc"},class:"block text-center text-md font-bold bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white mt-2 px-2 py-3 rounded-md"},{default:R(()=>e[20]||(e[20]=[U(" Bountiful Voluntaryist Community Actions ")])),_:1})])):N("",!0),n("div",Ei,[t.isCreatingIdentifier?(g(),y("div",Fi,[n("p",Pi,[C(_,{icon:"spinner",class:"fa-spin-pulse"}),e[21]||(e[21]=U(" Loading… "))])])):(g(),y("div",Ui,[n("div",ji,[t.isRegistered?(g(),y("div",Li,[n("div",Ri,[e[24]||(e[24]=n("h2",{class:"text-xl font-bold"},"What have you seen someone do?",-1)),n("button",{class:"ml-2 block text-xs text-center bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1 rounded-md",onClick:e[1]||(e[1]=c=>t.openGiftedPrompts())},[C(_,{icon:"lightbulb",class:"fa-fw"})])]),n("ul",Gi,[n("li",{onClick:e[2]||(e[2]=c=>t.openDialog())},e[25]||(e[25]=[n("img",{src:Dt,class:"mx-auto border border-blue-500 rounded-md mb-1 cursor-pointer"},null,-1),n("h3",{class:"text-xs text-blue-500 italic font-medium text-ellipsis whitespace-nowrap overflow-hidden cursor-pointer"}," Unnamed/Unknown ",-1)])),t.allContacts.length===0?(g(),y("li",Hi," (Add friends to see more people worthy of recognition.) ")):N("",!0),(g(!0),y(he,null,ke(t.allContacts.slice(0,6),c=>(g(),y("li",{key:c.did,onClick:m=>t.openDialog(c)},[C(o,{contact:c,"icon-size":64,class:"mx-auto border border-blue-500 rounded-md mb-1 cursor-pointer"},null,8,["contact"]),n("h3",Wi,T(c.name||c.did),1)],8,zi))),128)),n("li",null,[t.allContacts.length>=6?(g(),H(S,{key:0,to:{name:"contact-gift"},class:"flex align-bottom text-xs text-blue-500 mt-12 cursor-pointer"},{default:R(()=>e[26]||(e[26]=[U(" ... or someone else... ")])),_:1})):N("",!0)])])])):(g(),y("div",Bi,[e[23]||(e[23]=U(" To share, someone must register you. ")),n("div",Vi,[n("button",{class:"text-md font-bold bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white mt-2 px-2 py-3 rounded-md",onClick:e[0]||(e[0]=c=>t.showNameThenIdDialog())}," Show them "+T(t.PASSKEYS_ENABLED?"default":"your")+" identifier info ",1)]),C(F,{ref:"userNameDialog"},null,512),t.PASSKEYS_ENABLED?(g(),y("div",Mi,[C(S,{to:{name:"start"},class:"block text-right text-md font-bold bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white mt-2 px-2 py-3 rounded-md"},{default:R(()=>e[22]||(e[22]=[U(" See all your options first ")])),_:1})])):N("",!0)]))])]))]),C(l,{ref:"customDialog"},null,512),C(s,{ref:"giftedPrompts"},null,512),C(a,{ref:"feedFilters"},null,512),n("div",qi,[t.isRegistered?(g(),y("button",{key:0,class:"absolute right-6 bottom-0 transform translate-y-1/2 text-center text-4xl leading-none bg-green-600 text-white w-14 py-2.5 rounded-full",onClick:e[3]||(e[3]=c=>t.openDialog())},[C(_,{icon:"plus",class:"fa-fw"})])):N("",!0)]),n("div",Yi,[n("div",Ki,[n("h2",Ji,[e[27]||(e[27]=U(" Latest Activity ")),n("button",{onClick:e[4]||(e[4]=c=>t.openFeedFilters())},[n("span",Xi,[t.resultsAreFiltered()?(g(),H(_,{key:0,icon:"filter",class:"bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] px-1 py-1.5 rounded-md"})):(g(),H(_,{key:1,icon:"filter",class:"bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] px-1 py-1.5 rounded-md"}))])])])]),n("div",{class:"border-t p-2 border-slate-300",onClick:e[5]||(e[5]=c=>t.goToActivityToUserPage())},[n("div",Zi,[t.numNewOffersToUser?(g(),y("div",Qi,[n("span",eo,T(t.numNewOffersToUser)+T(t.newOffersToUserHitLimit?"+":""),1),n("p",to," new offer"+T(t.numNewOffersToUser===1?"":"s")+" to you ",1)])):N("",!0),t.numNewOffersToUserProjects?(g(),y("div",io,[n("span",oo,T(t.numNewOffersToUserProjects)+T(t.newOffersToUserProjectsHitLimit?"+":""),1),n("p",so," new offer"+T(t.numNewOffersToUserProjects===1?"":"s")+" to your projects ",1)])):N("",!0)]),e[28]||(e[28]=n("div",{class:"flex justify-end mt-2"},[n("button",{class:"text-blue-500"},"View All New Activity For You")],-1))]),C(d,{onReachedBottom:t.loadMoreGives},{default:R(()=>[n("ul",ao,[(g(!0),y(he,null,ke(t.feedData,c=>(g(),y("li",{key:c.jwtId,class:"border-b border-slate-300 py-2"},[c.jwtId==t.feedLastViewedClaimId?(g(),y("div",no," You've already seen all the following ")):N("",!0),n("div",ro,[n("span",lo,[n("span",null,[C(_,{icon:"circle-user",class:dt(t.computeKnownPersonIconStyleClassNames(c.giver.known||c.receiver.known)),onClick:e[6]||(e[6]=m=>t.toastUser("This involves your contacts."))},null,8,["class"]),C(_,{icon:"gift",class:"pl-3 text-slate-500",onClick:e[7]||(e[7]=m=>t.toastUser("This is a gift."))})])]),n("span",co,[n("span",uo,T(t.giveDescription(c)),1),n("a",{onClick:m=>t.onClickLoadClaim(c.jwtId)},[C(_,{icon:"file-lines",class:"pl-2 text-slate-500 cursor-pointer"})],8,ho)]),n("span",po,[c.fulfillsPlanHandleId?(g(),H(S,{key:0,to:"/project/"+encodeURIComponent(c.fulfillsPlanHandleId)},{default:R(()=>[C(_,{icon:"hammer",class:"text-blue-500"})]),_:2},1032,["to"])):N("",!0),c.providerPlanHandleId?(g(),H(S,{key:1,to:"/project/"+encodeURIComponent(c.providerPlanHandleId)},{default:R(()=>[C(_,{icon:"hammer",class:"text-blue-500"})]),_:2},1032,["to"])):N("",!0)])]),c.image?(g(),y("div",bo,[n("div",{class:"cursor-pointer",onClick:m=>t.openImageViewer(c.image)},[n("img",{src:c.image,class:"w-full aspect-[3/2] object-cover rounded-xl mt-2",alt:"shared content",onLoad:m=>t.cacheImageData(m,c.image)},null,40,fo)],8,mo)])):N("",!0)]))),128))])]),_:1},8,["onReachedBottom"]),t.isFeedLoading?(g(),y("div",wo,[n("p",go,[C(_,{icon:"spinner",class:"fa-spin-pulse"}),e[29]||(e[29]=U(" Loading… "))])])):N("",!0),!t.isFeedLoading&&t.feedData.length===0?(g(),y("div",vo,e[30]||(e[30]=[n("p",{class:"text-slate-500 text-center italic mt-4 mb-4"}," No claims match your filters. ",-1)]))):N("",!0)])]),C($,{ref:"choiceButtonDialog"},null,512),C(G,{"is-open":t.isImageViewerOpen,"onUpdate:isOpen":e[8]||(e[8]=c=>t.isImageViewerOpen=c),"image-url":t.selectedImage,"image-data":t.selectedImageData},null,8,["is-open","image-url","image-data"])],64)}const Vo=oe(Ae,[["render",yo]]);export{Vo as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/HomeView-D3AT-qTA.css b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/HomeView-D3AT-qTA.css deleted file mode 100644 index a8799a3..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/HomeView-D3AT-qTA.css +++ /dev/null @@ -1 +0,0 @@ -.dialog-overlay{z-index:50;position:fixed;top:0;left:0;right:0;bottom:0;background-color:#00000080;display:flex;justify-content:center;align-items:center;padding:1.5rem}#dialogFeedFilters.dialog-overlay{z-index:100;overflow:scroll}.dialog{background-color:#fff;padding:1rem;border-radius:.5rem;width:100%;max-width:500px}.fade-enter-active[data-v-409cf6bd],.fade-leave-active[data-v-409cf6bd]{transition:opacity .2s ease}.fade-enter-from[data-v-409cf6bd],.fade-leave-to[data-v-409cf6bd]{opacity:0} diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/IdentitySwitcherView-BYk59nuq.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/IdentitySwitcherView-BYk59nuq.js deleted file mode 100644 index fc3e28c..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/IdentitySwitcherView-BYk59nuq.js +++ /dev/null @@ -1 +0,0 @@ -var D=Object.defineProperty;var I=(e,t,i)=>t in e?D(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var a=(e,t,i)=>I(e,typeof t!="symbol"?t+"":t,i);import{V as S,e as C,d as b,M as A,a5 as $,C as B,_ as V,h as m,j as u,k as s,m as N,n as f,w as g,t as k,F as _,E as T,z as y,B as r,y as h}from"./main.common-DD7dqhZp.js";import{Q as E}from"./QuickNav-C8jPGtUY.js";import{aa as Y}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var j=Object.getOwnPropertyDescriptor,P=(e,t,i,c)=>{for(var o=c>1?void 0:c?j(t,i):t,n=e.length-1,p;n>=0;n--)(p=e[n])&&(o=p(o)||o);return o};let v=class extends S{constructor(){super(...arguments);a(this,"$notify");a(this,"$router");a(this,"activeDid","");a(this,"activeDidInIdentities",!1);a(this,"apiServer","");a(this,"apiServerInput","");a(this,"otherIdentities",[])}async created(){try{const i=await C();this.activeDid=i.activeDid||"",this.apiServer=i.apiServer||"",this.apiServerInput=i.apiServer||"";const c=await Y();for(let o=0;o{await(await $).accounts.delete(i),this.otherIdentities=this.otherIdentities.filter(o=>o.id!==i)}},-1)}notifyCannotDelete(){this.$notify({group:"alert",type:"warning",title:"Cannot Delete",text:"You cannot delete the active identity. Set to another identity or 'no identity' first."},3e3)}};v=P([B({components:{QuickNav:E}})],v);const Q={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},F={id:"ViewBreadcrumb",class:"mb-8"},M={class:"text-lg text-center font-light relative px-7"},O={key:0,class:"block bg-slate-100 rounded-md flex items-center px-4 py-3 mb-4"},L={class:"text-sm text-slate-500"},q={class:"overflow-hidden truncate"},z={class:"mb-4"},G={class:"flex items-center justify-between mb-2"},K=["onClick"],R={class:"flex-grow overflow-hidden"},H={class:"text-sm text-slate-500 truncate"};function J(e,t,i,c,o,n){const p=y("QuickNav"),d=y("font-awesome"),x=y("router-link");return r(),m(_,null,[u(p,{selected:"Profile"}),s("section",Q,[s("div",F,[s("h1",M,[u(x,{to:{name:"account"},class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1"},{default:g(()=>[u(d,{icon:"chevron-left",class:"fa-fw"})]),_:1}),t[2]||(t[2]=f(" Switch Identity "))])]),e.activeDid&&!e.activeDidInIdentities?(r(),m("div",O,[u(d,{icon:"circle-check",class:"fa-fw text-red-600 text-xl mr-3"}),s("div",L,[s("div",q,[t[3]||(t[3]=s("b",null,"ID:",-1)),t[4]||(t[4]=f()),s("code",null,k(e.activeDid),1)]),t[5]||(t[5]=s("b",null,"There is a data corruption error: this identity is selected but it is not in storage. You cannot send any more claims with this identity until you import the seed again. This may require reinstalling the app; if you know how, you can also clear out the TimeSafariAccounts IndexedDB. Be sure to back up all your Settings & Contacts first.",-1))])])):N("",!0),s("ul",z,[(r(!0),m(_,null,T(e.otherIdentities,l=>(r(),m("li",{key:l.did},[s("div",G,[s("div",{class:"flex flex-grow items-center bg-slate-100 rounded-md px-4 py-3 mb-2 truncate cursor-pointer",onClick:w=>e.switchAccount(l.did)},[l.did===e.activeDid?(r(),h(d,{key:0,icon:"circle-check",class:"fa-fw text-blue-600 text-xl mr-3"})):(r(),h(d,{key:1,icon:"circle",class:"fa-fw text-slate-400 text-xl mr-3"})),s("span",R,[s("div",H,[t[6]||(t[6]=s("b",null,"ID:",-1)),t[7]||(t[7]=f()),s("code",null,k(l.did),1)])])],8,K),s("div",null,[l.did===e.activeDid?(r(),h(d,{key:0,icon:"trash-can",class:"text-slate-400 text-xl ml-2 mr-2 cursor-pointer",onClick:t[0]||(t[0]=w=>e.notifyCannotDelete())})):(r(),h(d,{key:1,icon:"trash-can",class:"text-red-600 text-xl ml-2 mr-2 cursor-pointer",onClick:w=>e.deleteAccount(l.id)},null,8,["onClick"]))])])]))),128))]),u(x,{id:"start-link",to:{name:"start"},class:"block text-center text-lg font-bold uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md mb-2"},{default:g(()=>t[8]||(t[8]=[f(" Add Another Identity… ")])),_:1}),s("a",{href:"#",class:"block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md mb-8",onClick:t[1]||(t[1]=l=>e.switchAccount("0"))}," No Identity ")])],64)}const ot=V(v,[["render",J]]);export{ot as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ImageMethodDialog-CTvzd81h.css b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ImageMethodDialog-CTvzd81h.css deleted file mode 100644 index d682377..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ImageMethodDialog-CTvzd81h.css +++ /dev/null @@ -1 +0,0 @@ -.dialog-overlay{z-index:50;position:fixed;top:0;left:0;right:0;bottom:0;background-color:#00000080;display:flex;justify-content:center;align-items:center;padding:1.5rem}.dialog{background-color:#fff;padding:1rem;border-radius:.5rem;width:100%;max-width:700px} diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ImageMethodDialog-zrU-VGNm.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ImageMethodDialog-zrU-VGNm.js deleted file mode 100644 index 4daecd8..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ImageMethodDialog-zrU-VGNm.js +++ /dev/null @@ -1 +0,0 @@ -var v=Object.defineProperty;var y=(t,e,o)=>e in t?v(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o;var r=(t,e,o)=>y(t,typeof e!="symbol"?e+"":e,o);import{f as w,C as _,V as k,a6 as x,_ as C,z as h,h as u,B as d,m as D,j as g,k as a,n as U,o as $,s as P,y as f,F as B}from"./main.common-DD7dqhZp.js";import{P as I}from"./PhotoDialog-DZbf20A6.js";var T=Object.getOwnPropertyDescriptor,V=(t,e,o,s)=>{for(var l=s>1?void 0:s?T(e,o):e,p=t.length-1,i;p>=0;p--)(i=t[p])&&(l=i(l)||l);return l};const b=w();let m=class extends k{constructor(){super(...arguments);r(this,"$notify");r(this,"claimType");r(this,"crop",!1);r(this,"imageCallback",()=>{});r(this,"imageUrl");r(this,"visible",!1)}open(o,s,l){this.claimType=s,this.crop=!!l,this.imageCallback=o,this.visible=!0}openPhotoDialog(o,s){this.visible=!1,this.$refs.photoDialog.open(this.imageCallback,this.claimType,this.crop,o,s)}async uploadImageFile(o){this.visible=!1,b.value=o.target.files[0];const s=b.value;if(s!=null){const l=new FileReader;l.onload=async p=>{var c;const i=(c=p.target)==null?void 0:c.result;if(i){const n=new Blob([new Uint8Array(i)],{type:s.type});this.openPhotoDialog(n,s.name)}},l.readAsArrayBuffer(s)}}async acceptUrl(){if(this.visible=!1,this.crop)try{const o=await x.get(this.imageUrl,{responseType:"blob"}),l=new URL(this.imageUrl).pathname.split("/").pop();this.$refs.photoDialog.open(this.imageCallback,this.claimType,this.crop,o.data,l)}catch{this.$notify({group:"alert",type:"danger",title:"Error",text:"There was an error retrieving that image."},5e3)}else this.imageCallback(this.imageUrl)}close(){this.visible=!1}};m=V([_({components:{PhotoDialog:I}})],m);const F={key:0,class:"dialog-overlay z-[60]"},N={class:"dialog relative"},R={class:"text-lg text-center font-light relative z-50"},A={class:"text-center mt-8"},M={class:"mt-4"},z={class:"mt-4"},O={class:"mt-2"},j={class:"ml-2"};function E(t,e,o,s,l,p){const i=h("font-awesome"),c=h("PhotoDialog");return d(),u(B,null,[t.visible?(d(),u("div",F,[a("div",N,[a("div",R,[e[4]||(e[4]=a("div",{id:"ViewHeading",class:"text-center font-bold absolute top-0 left-0 right-0 px-4 py-0.5 bg-black/50 text-white leading-none"}," Add Photo ",-1)),a("div",{class:"text-lg text-center px-2 py-0.5 leading-none absolute right-0 top-0 text-white",onClick:e[0]||(e[0]=n=>t.close())},[g(i,{icon:"xmark",class:"w-[1em]"})])]),a("div",null,[a("div",A,[a("div",null,[g(i,{icon:"camera",class:"bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-2 rounded-md",onClick:e[1]||(e[1]=n=>t.openPhotoDialog())})]),a("div",M,[a("input",{type:"file",onChange:e[2]||(e[2]=(...n)=>t.uploadImageFile&&t.uploadImageFile(...n))},null,32)]),a("div",z,[a("span",O,[e[5]||(e[5]=U(" ... or paste a URL: ")),$(a("input",{"onUpdate:modelValue":e[3]||(e[3]=n=>t.imageUrl=n),type:"text",class:"border-2"},null,512),[[P,t.imageUrl]])]),a("span",j,[t.imageUrl?(d(),f(i,{key:0,icon:"check",class:"bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-2 rounded-md cursor-pointer",onClick:t.acceptUrl},null,8,["onClick"])):(d(),f(i,{key:1,icon:"check",class:"text-white bg-white px-2 py-2"}))])])])])])])):D("",!0),g(c,{ref:"photoDialog"},null,512)],64)}const J=C(m,[["render",E]]);export{J as I}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ImportAccountView-Ceo5D7dW.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ImportAccountView-Ceo5D7dW.js deleted file mode 100644 index 4424215..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ImportAccountView-Ceo5D7dW.js +++ /dev/null @@ -1 +0,0 @@ -var w=Object.defineProperty;var y=(t,e,r)=>e in t?w(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var s=(t,e,r)=>y(t,typeof e!="symbol"?e+"":e,r);import{V as x,A as h,e as E,a5 as A,d as g,M as k,C,_ as P,h as u,k as o,o as m,m as c,n as v,j as S,s as f,q as I,z as T,B as p}from"./main.common-DD7dqhZp.js";import{ab as $,G as V,ac as N,ad as O}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var R=Object.getOwnPropertyDescriptor,_=(t,e,r,n)=>{for(var a=n>1?void 0:n?R(e,r):e,d=t.length-1,l;d>=0;d--)(l=t[d])&&(a=l(a)||a);return a};let b=class extends x{constructor(){super(...arguments);s(this,"TEST_USER_0_MNEMONIC","rigid shrug mobile smart veteran half all pond toilet brave review universe ship congress found yard skate elite apology jar uniform subway slender luggage");s(this,"UPORT_DERIVATION_PATH","m/7696500'/0'/0'/0'");s(this,"AppString",h);s(this,"$notify");s(this,"$router");s(this,"apiServer","");s(this,"address","");s(this,"derivationPath",$);s(this,"mnemonic","");s(this,"numAccounts",0);s(this,"privateHex","");s(this,"publicHex","");s(this,"showAdvanced",!1);s(this,"shouldErase",!1)}async created(){this.numAccounts=await V();const r=await E();this.apiServer=r.apiServer||""}onCancelClick(){this.$router.back()}isNotProdServer(){return this.apiServer!==h.PROD_ENDORSER_API_SERVER}async fromMnemonic(){const r=this.mnemonic.trim().toLowerCase();try{[this.address,this.privateHex,this.publicHex]=N(r,this.derivationPath);const n=O(this.address,this.publicHex,this.privateHex,this.derivationPath),a=await A;this.shouldErase&&await a.accounts.clear(),await a.accounts.add({dateCreated:new Date().toISOString(),derivationPath:this.derivationPath,did:n.did,identity:JSON.stringify(n),mnemonic:r,publicKeyHex:n.keys[0].publicKeyHex}),await g.open(),await g.settings.update(k,{activeDid:n.did}),this.$router.push({name:"account"})}catch(n){console.error("Error saving mnemonic & updating settings:",n),n=="Error: invalid mnemonic"?this.$notify({group:"alert",type:"danger",title:"Invalid Mnemonic",text:"Please check your mnemonic and try again."},5e3):this.$notify({group:"alert",type:"danger",title:"Error",text:"Got an error creating that identifier."},5e3)}}};b=_([C({components:{}})],b);const D={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},H={id:"ViewBreadcrumb",class:"mb-8"},M={class:"text-lg text-center font-light relative px-7"},U={key:0},B={class:"ml-4"},j={key:0,class:"mt-4"},F={key:1,class:"mt-4 text-blue-500"},G={class:"mt-8"},K={class:"grid grid-cols-1 sm:grid-cols-2 gap-2"};function L(t,e,r,n,a,d){const l=T("font-awesome");return p(),u("section",D,[o("div",H,[o("h1",M,[o("button",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:e[0]||(e[0]=i=>t.$router.go(-1))},[S(l,{icon:"chevron-left"})]),e[9]||(e[9]=v(" Import Existing Identifier "))])]),e[13]||(e[13]=o("p",{class:"text-center text-xl mb-4 font-light"}," Enter your seed phrase below to import your identifier on this device. ",-1)),m(o("textarea",{id:"seed-input","onUpdate:modelValue":e[1]||(e[1]=i=>t.mnemonic=i),type:"text",placeholder:"Seed Phrase",class:"block w-full rounded border border-slate-400 mb-4 px-3 py-2"},null,512),[[f,t.mnemonic]]),o("h3",{class:"text-sm uppercase font-semibold mb-3",onClick:e[2]||(e[2]=i=>t.showAdvanced=!t.showAdvanced)}," Advanced "),t.showAdvanced?(p(),u("div",U,[e[12]||(e[12]=v(" Enter a custom derivation path ")),m(o("input",{"onUpdate:modelValue":e[3]||(e[3]=i=>t.derivationPath=i),type:"text",class:"block w-full rounded border border-slate-400 mb-2 px-3 py-2"},null,512),[[f,t.derivationPath]]),o("span",B,[e[10]||(e[10]=v(" For previous uPort or Endorser users, ")),o("a",{class:"text-blue-500",onClick:e[4]||(e[4]=i=>t.derivationPath=t.UPORT_DERIVATION_PATH)}," click here to use that value. ")]),t.numAccounts==1?(p(),u("div",j,[m(o("input",{"onUpdate:modelValue":e[5]||(e[5]=i=>t.shouldErase=i),type:"checkbox",class:"mr-2"},null,512),[[I,t.shouldErase]]),e[11]||(e[11]=o("label",null,"Erase the previous identifier.",-1))])):c("",!0),t.isNotProdServer()?(p(),u("div",F,[o("button",{onClick:e[6]||(e[6]=i=>t.mnemonic=t.TEST_USER_0_MNEMONIC)}," Use mnemonic for Test User #0 ")])):c("",!0)])):c("",!0),o("div",G,[o("div",K,[o("button",{class:"block w-full text-center text-lg font-bold uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md",onClick:e[7]||(e[7]=i=>t.fromMnemonic())}," Import "),o("button",{type:"button",class:"block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md",onClick:e[8]||(e[8]=i=>t.onCancelClick())}," Cancel ")])])])}const Z=P(b,[["render",L]]);export{Z as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ImportDerivedAccountView-CtHBjHll.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ImportDerivedAccountView-CtHBjHll.js deleted file mode 100644 index 28a697e..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ImportDerivedAccountView-CtHBjHll.js +++ /dev/null @@ -1 +0,0 @@ -var b=Object.defineProperty;var g=(e,t,s)=>t in e?b(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var l=(e,t,s)=>g(e,typeof t!="symbol"?t+"":t,s);import{V as _,a5 as w,d as x,M as D,C as A,_ as k,h as u,k as n,n as C,j as P,m as $,F as I,E,z as O,B as m,y,t as V}from"./main.common-DD7dqhZp.js";import{ab as F,ae as B,af as T,ac as N,ad as S}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var H=Object.getOwnPropertyDescriptor,j=(e,t,s,i)=>{for(var o=i>1?void 0:i?H(t,s):t,c=e.length-1,r;c>=0;c--)(r=e[c])&&(o=r(o)||o);return o};let h=class extends _{constructor(){super(...arguments);l(this,"$route");l(this,"$router");l(this,"derivationPath",F);l(this,"didArrays",[]);l(this,"selectedArrayFirstDid","")}async mounted(){const t=await B(),s={};t.forEach(i=>{const o=s[i.mnemonic]||[];s[i.mnemonic]=o.concat([i.did])}),this.didArrays=Object.values(s),this.selectedArrayFirstDid=this.didArrays[0][0]}onCancelClick(){this.$router.back()}switchAccount(t){this.selectedArrayFirstDid=t}async incrementDerivation(){const t=this.didArrays.find(d=>d[0]===this.selectedArrayFirstDid)||[],s=await w,i=await s.accounts.where("did").anyOf(...t).toArray(),o=i[0];i.slice(1).forEach(d=>{d.derivationPath>o.derivationPath&&(o.derivationPath=d.derivationPath)});const c=T(o.derivationPath),r=o.mnemonic,[a,v,f]=N(r,c),p=S(a,f,v,c);try{await s.accounts.add({dateCreated:new Date().toISOString(),derivationPath:c,did:p.did,identity:JSON.stringify(p),mnemonic:r,publicKeyHex:p.keys[0].publicKeyHex}),await x.open(),await x.settings.update(D,{activeDid:p.did}),this.$router.push({name:"account"})}catch(d){console.error("Error saving mnemonic & updating settings:",d)}}};h=j([A({components:{}})],h);const M={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},K={id:"ViewBreadcrumb",class:"mb-8"},R={class:"text-lg text-center font-light relative px-7"},L={key:0},W={class:"mb-4"},z=["onClick"],G={class:"overflow-hidden"},J={class:"text-sm text-slate-500 truncate"},U={class:"mt-8"},Y={class:"grid grid-cols-1 sm:grid-cols-2 gap-2"};function q(e,t,s,i,o,c){const r=O("font-awesome");return m(),u("section",M,[n("div",K,[n("h1",R,[n("button",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:t[0]||(t[0]=a=>e.$router.go(-1))},[P(r,{icon:"chevron-left"})]),t[3]||(t[3]=C(" Derive from Existing Identity "))])]),n("div",null,[t[4]||(t[4]=n("p",{class:"text-center text-xl mb-4 font-light"}," Will increment the maximum known derivation path from the existing seed. ",-1)),e.didArrays.length>1?(m(),u("p",L," Choose existing DIDs from same seed phrase to compute derivation. ")):$("",!0),n("ul",W,[(m(!0),u(I,null,E(e.didArrays,a=>(m(),u("li",{key:a[0],class:"block bg-slate-100 rounded-md flex items-center px-4 py-3 mb-2",onClick:v=>e.switchAccount(a[0])},[a[0]==e.selectedArrayFirstDid?(m(),y(r,{key:0,icon:"circle",class:"fa-fw text-blue-500 text-xl mr-3"})):(m(),y(r,{key:1,icon:"circle",class:"fa-fw text-slate-400 text-xl mr-3"})),n("span",G,[n("div",J,[n("code",null,V(a.join(",")),1)])])],8,z))),128))])]),n("div",U,[n("div",Y,[n("button",{class:"block w-full text-center text-lg font-bold uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md",onClick:t[1]||(t[1]=a=>e.incrementDerivation())}," Increment and Import "),n("button",{type:"button",class:"block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md",onClick:t[2]||(t[2]=a=>e.onCancelClick())}," Cancel ")])])])}const nt=k(h,[["render",q]]);export{nt as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/InfiniteScroll-DZwFAI4R.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/InfiniteScroll-DZwFAI4R.js deleted file mode 100644 index a2feeec..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/InfiniteScroll-DZwFAI4R.js +++ /dev/null @@ -1 +0,0 @@ -var p=Object.defineProperty;var d=(r,e,t)=>e in r?p(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var a=(r,e,t)=>d(r,typeof e!="symbol"?e+"":e,t);import{a1 as f,aw as h,C as u,V as v,_,h as b,B as I,U as $,k as x}from"./main.common-DD7dqhZp.js";var m=Object.defineProperty,y=Object.getOwnPropertyDescriptor,l=(r,e,t,n)=>{for(var s=n>1?void 0:n?y(e,t):e,i=r.length-1,c;i>=0;i--)(c=r[i])&&(s=(n?c(e,t,s):c(s))||s);return n&&s&&m(e,t,s),s};let o=class extends v{constructor(){super(...arguments);a(this,"distance");a(this,"observer");a(this,"isInitialRender",!0)}updated(){if(!this.observer){const t={root:null,rootMargin:`0px 0px ${this.distance}px 0px`,threshold:1};this.observer=new IntersectionObserver(this.handleIntersection,t),this.observer.observe(this.$refs.sentinel)}}beforeUnmount(){this.observer&&this.observer.disconnect()}handleIntersection(t){return!!t[0].isIntersecting}};l([f({default:200})],o.prototype,"distance",2);l([h("reached-bottom")],o.prototype,"handleIntersection",1);o=l([u],o);const O={ref:"scrollContainer"},w={ref:"sentinel",style:{height:"1px"}};function B(r,e,t,n,s,i){return I(),b("div",O,[$(r.$slots,"default"),x("div",w,null,512)],512)}const g=_(o,[["render",B]]);export{g as I}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/InviteOneAcceptView-B4mm6cID.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/InviteOneAcceptView-B4mm6cID.js deleted file mode 100644 index e497a46..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/InviteOneAcceptView-B4mm6cID.js +++ /dev/null @@ -1 +0,0 @@ -var w=Object.defineProperty;var g=(i,t,e)=>t in i?w(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var a=(i,t,e)=>g(i,typeof t!="symbol"?t+"":t,e);import{V as y,d as I,e as k,l as x,H as v,C as $,_ as A,h as l,j as h,k as c,o as b,s as J,F as E,z as u,B as p}from"./main.common-DD7dqhZp.js";import{Q as D}from"./QuickNav-C8jPGtUY.js";import{R as V,K as C,e as S}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var F=Object.getOwnPropertyDescriptor,O=(i,t,e,s)=>{for(var n=s>1?void 0:s?F(t,e):t,r=i.length-1,o;r>=0;r--)(o=i[r])&&(n=o(n)||n);return n};let d=class extends y{constructor(){super(...arguments);a(this,"$notify");a(this,"$router");a(this,"$route");a(this,"activeDid","");a(this,"apiServer","");a(this,"checkingInvite",!0);a(this,"inputJwt","")}async mounted(){this.checkingInvite=!0,await I.open();const e=await k();this.activeDid=e.activeDid||"",this.apiServer=e.apiServer||"",this.activeDid||(this.activeDid=await V());const s=this.$route.params.jwt||"";await this.processInvite(s,!1),this.checkingInvite=!1}async processInvite(e,s){this.checkingInvite=!0;try{const n=this.extractJwtFromInput(e);if(!n){this.handleMissingJwt(s);return}await this.validateAndRedirect(n)}catch(n){this.handleError(n,s)}finally{this.checkingInvite=!1}}extractJwtFromInput(e){const s=e??"",n=s.match(/(https?:\/\/[^\s]+)/);if(n!=null&&n[1]){const o=n[1].match(/\/invite-one-accept\/([^?]+)/);if(o!=null&&o[1])return o[1]}const r=s.match(/(ey[\w.-]+)/);return r!=null&&r[1]?r[1]:""}async validateAndRedirect(e){C(e),this.$router.push({name:"contacts",query:{inviteJwt:e}})}handleMissingJwt(e){e&&this.$notify({group:"alert",type:"danger",title:"Missing Invite",text:"There was no invite. Paste the entire text that has the data."},5e3)}handleError(e,s){const n="Error accepting invite: "+S(e);x(n,!0),s&&this.$notify({group:"alert",type:"danger",title:"Error",text:"There was an error processing that invite."},3e3)}async checkInvite(e){(e.endsWith(v)||e.endsWith(v+"/")||e.endsWith("invite-one-accept")||e.endsWith("invite-one-accept/"))&&this.$notify({group:"alert",type:"danger",title:"Error",text:"That is only part of the invite data; it's missing some at the end. Try another way to get the full data."},5e3)}};d=O([$({components:{QuickNav:D}})],d);const P={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},T={key:0,class:"text-lg text-center font-light relative px-7"},N={key:1,class:"text-center mt-4"};function R(i,t,e,s,n,r){const o=u("QuickNav"),m=u("font-awesome");return p(),l(E,null,[h(o,{selected:"Invite"}),c("section",P,[i.checkingInvite?(p(),l("div",T,[h(m,{icon:"spinner",class:"fa-spin-pulse"})])):(p(),l("div",N,[t[3]||(t[3]=c("p",null,"That invitation did not work.",-1)),t[4]||(t[4]=c("p",{class:"mt-2"}," Go back to your invite message and copy the entire text, then paste it here. ",-1)),t[5]||(t[5]=c("p",{class:"mt-2"}," If the data looks correct, try Chrome. (For example, iOS may have cut off the invite data, or it may have shown a preview that stole your invite.) If it still complains, you may need the person who invited you to send a new one. ",-1)),b(c("textarea",{"onUpdate:modelValue":t[0]||(t[0]=f=>i.inputJwt=f),placeholder:"Paste invitation...",class:"mt-4 border-2 border-gray-300 p-2 rounded",cols:"30",onInput:t[1]||(t[1]=()=>i.checkInvite(i.inputJwt))},null,544),[[J,i.inputJwt]]),t[6]||(t[6]=c("br",null,null,-1)),c("button",{class:"ml-2 p-2 bg-blue-500 text-white rounded",onClick:t[2]||(t[2]=()=>i.processInvite(i.inputJwt,!0))}," Accept ")]))])],64)}const H=A(d,[["render",R]]);export{H as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/InviteOneView-BeYvBmK8.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/InviteOneView-BeYvBmK8.js deleted file mode 100644 index b0b74e1..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/InviteOneView-BeYvBmK8.js +++ /dev/null @@ -1 +0,0 @@ -var V=Object.defineProperty;var B=(s,t,e)=>t in s?V(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e;var d=(s,t,e)=>B(s,typeof t!="symbol"?t+"":t,e);import{C as T,V as _,_ as E,h as p,m as x,B as c,k as n,n as f,o as D,t as v,s as A,d as w,e as j,a6 as b,A as M,H as L,j as g,F as N,E as Y,z as m,y as F}from"./main.common-DD7dqhZp.js";import{u as S}from"./index-CZnn7ED5.js";import{C as P}from"./ContactNameDialog-B32CzJRA.js";import{Q as U}from"./QuickNav-C8jPGtUY.js";import{T as W}from"./TopMessage-ZWDDjman.js";import{g as k,ag as Q}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./_isString-B7bbuhPA.js";var G=Object.getOwnPropertyDescriptor,H=(s,t,e,a)=>{for(var r=a>1?void 0:a?G(t,e):t,i=s.length-1,l;i>=0;i--)(l=s[i])&&(r=l(r)||r);return r};let I=class extends _{constructor(){super(...arguments);d(this,"$notify");d(this,"callback",()=>{});d(this,"inviteIdentifier","");d(this,"text","");d(this,"visible",!1);d(this,"expiresAt",new Date(Date.now()+1e3*60*60*24*7).toISOString().substring(0,10))}async open(e,a){this.callback=a,this.inviteIdentifier=e,this.visible=!0}async onClickSaveChanges(){this.expiresAt?(this.callback(this.text,this.expiresAt),this.visible=!1):this.$notify({group:"alert",type:"warning",title:"Needs Expiration",text:"You must select an expiration date."},5e3)}onClickCancel(){this.visible=!1}};I=H([T],I);const J={key:0,class:"dialog-overlay"},z={class:"dialog"},q={class:"mt-8"},K={class:"grid grid-cols-1 sm:grid-cols-2 gap-2"};function X(s,t,e,a,r,i){return s.visible?(c(),p("div",J,[n("div",z,[t[4]||(t[4]=n("h1",{class:"text-xl font-bold text-center mb-4"},"Invitation & Notes",-1)),f(" These are optional notes for your use; they are comments to help you recall who it is when they accept it. These notes are sent to the server. If you want to store your own way, the invitation ID is: "+v(s.inviteIdentifier)+" ",1),D(n("input",{"onUpdate:modelValue":t[0]||(t[0]=l=>s.text=l),type:"text",placeholder:"Notes",class:"block w-full rounded border border-slate-400 mb-4 px-3 py-2"},null,512),[[A,s.text]]),t[5]||(t[5]=f(" Expiration ")),D(n("input",{"onUpdate:modelValue":t[1]||(t[1]=l=>s.expiresAt=l),type:"date",class:"block rounded border border-slate-400 mb-4 px-3 py-2"},null,512),[[A,s.expiresAt]]),n("div",q,[n("div",K,[n("button",{type:"button",class:"block w-full text-center text-lg font-bold uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md mb-2",onClick:t[2]||(t[2]=l=>s.onClickSaveChanges())}," Save "),n("button",{type:"button",class:"block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md mb-2",onClick:t[3]||(t[3]=l=>s.onClickCancel())}," Cancel ")])])])])):x("",!0)}const Z=E(I,[["render",X]]);var ee=Object.getOwnPropertyDescriptor,te=(s,t,e,a)=>{for(var r=a>1?void 0:a?ee(t,e):t,i=s.length-1,l;i>=0;i--)(l=s[i])&&(r=l(r)||r);return r};let $=class extends _{constructor(){super(...arguments);d(this,"$notify");d(this,"$router");d(this,"invites",[]);d(this,"activeDid","");d(this,"apiServer","");d(this,"contactsRedeemed",{});d(this,"isRegistered",!1);d(this,"showAppleWarning",!1)}async mounted(){try{await w.open();const e=await j();this.activeDid=e.activeDid||"",this.apiServer=e.apiServer||"",this.isRegistered=!!e.isRegistered;const a=await k(this.activeDid),r=await b.get(this.apiServer+"/api/userUtil/invite",{headers:a});this.invites=r.data.data;const i=await w.contacts.toArray();for(const l of this.invites){const h=i.find(u=>u.did===l.redeemedBy);h&&l.redeemedBy&&(this.contactsRedeemed[l.redeemedBy]=h)}}catch(e){console.error("Error fetching invites:",e),this.$notify({group:"alert",type:"danger",title:"Load Error",text:"Got an error loading your invites."},5e3)}}getTruncatedInviteId(e){return e.length<=9?e:`${e.slice(0,6)}...`}getTruncatedRedeemedBy(e){return e?this.contactsRedeemed[e]?this.contactsRedeemed[e].name||M.NO_CONTACT_NAME:e.length<=19?e:`${e.slice(0,13)}...${e.slice(-3)}`:""}inviteLink(e){return L+"/invite-one-accept/"+e}copyInviteAndNotify(e,a){S().copy(this.inviteLink(a)),this.$notify({group:"alert",type:"success",title:"Copied",text:"Your clipboard now contains the link for invite "+e},5e3)}showInvite(e,a,r){let i=`Your clipboard now contains the invite ID ${e}`;a?i+=" (This invite has been used.)":r&&(i+=" (This invite has expired.)"),S().copy(e),this.$notify({group:"alert",type:"success",title:"Copied",text:i},5e3)}lookForErrorAndNotify(e,a,r){console.error(a,"-",e);let i=r;e.response&&e.response.data&&e.response.data.error&&(e.response.data.error.message?i=e.response.data.error.message:i=e.response.data.error),this.$notify({group:"alert",type:"danger",title:a,text:i},5e3)}async createInvite(){const e=Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2);this.$refs.inviteDialog.open(e,async(a,r)=>{try{const i=await k(this.activeDid);if(!r)throw{response:{data:{error:"You must select an expiration date."}}};const l=(new Date(r).getTime()-Date.now())/1e3,h=await Q(this.activeDid,void 0,e,l);await b.post(this.apiServer+"/api/userUtil/invite",{inviteJwt:h,notes:a},{headers:i});const u={inviteIdentifier:e,expiresAt:r,jwt:h,notes:a,redeemedAt:null,redeemedBy:null};this.invites=[u,...this.invites]}catch(i){this.lookForErrorAndNotify(i,"Error Creating Invite","Got an error creating your invite.")}})}addNewContact(e,a){this.$refs.contactNameDialog.open("To Whom Did You Send The Invite?","Their name will be added to your contact list.",r=>{const i={did:e,name:r,registered:!0};w.contacts.add(i),this.contactsRedeemed[e]=i,this.$notify({group:"alert",type:"success",title:"Contact Added",text:`${r} has been added to your contacts.`},3e3)},()=>{},a)}deleteInvite(e,a){this.$notify({group:"modal",type:"confirm",title:"Delete Invite?",text:`Are you sure you want to erase the invite for "${a}"? (There is no undo.)`,onYes:async()=>{const r=await k(this.activeDid);try{const i=await b.delete(this.apiServer+"/api/userUtil/invite/"+e,{headers:r});if(i.status!==204)throw i.data;this.invites=this.invites.filter(l=>l.inviteIdentifier!==e),this.$notify({group:"alert",type:"success",title:"Deleted",text:"Invite deleted."},3e3)}catch(i){this.lookForErrorAndNotify(i,"Error Deleting Invite","Got an error deleting your invite.")}}},-1)}};$=te([T({components:{ContactNameDialog:P,QuickNav:U,TopMessage:W,InviteDialog:Z}})],$);const se={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},ie={class:"text-lg text-center font-light relative px-7"},ne={class:"ml-8 mt-4 list-outside list-disc w-5/6"},oe={key:1},re={key:1,class:"mt-6"},ae={class:"min-w-full bg-white"},le=["title","onClick"],de=["title","onClick"],ce=["data-testId"],pe={class:"text-center"},ue={class:"text-center"},he={key:2,class:"mt-6 text-center"};function ge(s,t,e,a,r,i){const l=m("QuickNav"),h=m("TopMessage"),u=m("font-awesome"),R=m("InviteDialog"),O=m("ContactNameDialog");return c(),p(N,null,[g(l,{selected:"Invite"}),g(h),n("section",se,[n("div",ie,[n("h1",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:t[0]||(t[0]=o=>s.$router.back())},[g(u,{icon:"chevron-left",class:"fa-fw"})])]),t[7]||(t[7]=n("h1",{class:"text-4xl text-center font-light"},"Invitations",-1)),n("ul",ne,[n("li",null,[t[3]||(t[3]=f(" Note when sending ")),s.showAppleWarning?(c(),p("span",oe," to Apple users: their links often fail because their device cuts off part of the link. You might need to send it to them some other way, like in an email. ")):(c(),p("span",{key:0,class:"text-blue-500 cursor-pointer",onClick:t[1]||(t[1]=o=>s.showAppleWarning=!s.showAppleWarning)}," to Apple users... "))])]),s.isRegistered?(c(),p("button",{key:0,class:"fixed right-6 top-12 text-center text-4xl leading-none bg-green-600 text-white w-14 py-2.5 rounded-full",onClick:t[2]||(t[2]=o=>s.createInvite())},[g(u,{icon:"plus",class:"fa-fw"})])):x("",!0),g(R,{ref:"inviteDialog"},null,512),s.invites.length?(c(),p("div",re,[n("table",ae,[t[6]||(t[6]=n("thead",null,[n("tr",null,[n("th",{class:"py-2"},[f(" ID "),n("br"),f(" (click for link) ")]),n("th",{class:"py-2"},"Notes"),n("th",{class:"py-2"},"Expires At"),n("th",{class:"py-2"},"Redeemed")])],-1)),n("tbody",null,[(c(!0),p(N,null,Y(s.invites,o=>{var C;return c(),p("tr",{key:o.inviteIdentifier,class:"border-t py-2"},[n("td",null,[!o.redeemedAt&&o.expiresAt>new Date().toISOString()?(c(),p("span",{key:0,class:"text-center text-blue-500 cursor-pointer",title:s.inviteLink(o.jwt),onClick:y=>s.copyInviteAndNotify(o.inviteIdentifier,o.jwt)},v(s.getTruncatedInviteId(o.inviteIdentifier)),9,le)):(c(),p("span",{key:1,class:"text-center text-slate-500 cursor-pointer",title:s.inviteLink(o.jwt),onClick:y=>s.showInvite(o.inviteIdentifier,!!o.redeemedAt,o.expiresAts.addNewContact(o.redeemedBy,o.notes)},null,8,["onClick"])):x("",!0)]),n("td",null,[g(u,{icon:"trash-can",class:"text-red-600 text-xl ml-2 mr-2 cursor-pointer",onClick:y=>s.deleteInvite(o.inviteIdentifier,o.notes)},null,8,["onClick"])])])}),128))])]),g(O,{ref:"contactNameDialog"},null,512)])):(c(),p("p",he,"No invites found."))])],64)}const De=E($,[["render",ge]]);export{De as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/MembersList-BOHRjd7y.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/MembersList-BOHRjd7y.js deleted file mode 100644 index 9f26761..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/MembersList-BOHRjd7y.js +++ /dev/null @@ -1 +0,0 @@ -var T=Object.defineProperty;var _=(t,s,e)=>s in t?T(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e;var d=(t,s,e)=>_(t,typeof s!="symbol"?s+"":s,e);import{a1 as $,C as O,V as S,e as j,l as p,d as b,_ as z,z as M,h as l,B as c,j as h,k as a,m as u,t as v,n as f,x as A,F as D,E as F}from"./main.common-DD7dqhZp.js";import{l as N,g as k,e as w,ar as x,ax as L,Q as R}from"./index-ryzpKtgI.js";var E=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=(t,s,e,r)=>{for(var o=r>1?void 0:r?I(s,e):s,m=t.length-1,i;m>=0;m--)(i=t[m])&&(o=(r?i(s,e,o):i(o))||o);return r&&o&&E(s,e,o),o};let g=class extends S{constructor(){super(...arguments);d(this,"$notify");d(this,"libsUtil",N);d(this,"password");d(this,"showOrganizerTools");d(this,"decryptedMembers",[]);d(this,"firstName","");d(this,"isLoading",!0);d(this,"isOrganizer",!1);d(this,"members",[]);d(this,"missingPassword",!1);d(this,"missingMyself",!1);d(this,"activeDid","");d(this,"apiServer","");d(this,"contacts",[])}async created(){const e=await j();this.activeDid=e.activeDid||"",this.apiServer=e.apiServer||"",this.firstName=e.firstName||"",await this.fetchMembers(),await this.loadContacts()}async fetchMembers(){try{this.isLoading=!0;const e=await k(this.activeDid),r=await this.axios.get(`${this.apiServer}/api/partner/groupOnboardMembers`,{headers:e});r.data&&r.data.data&&(this.members=r.data.data,await this.decryptMemberContents())}catch(e){p("Error fetching members: "+w(e),!0),this.$emit("error",x(e)||"Failed to fetch members.")}finally{this.isLoading=!1}}async decryptMemberContents(){if(this.decryptedMembers=[],!this.password){this.missingPassword=!0;return}let e=!0,r=!1;for(const o of this.members){try{const m=await L(o.content,this.password),i=JSON.parse(m);this.decryptedMembers.push({member:o,name:i.name,did:i.did,isRegistered:!!i.isRegistered}),e&&i.did===this.activeDid&&(this.isOrganizer=!0),i.did===this.activeDid&&(r=!0)}catch{}e=!1}this.missingMyself=!r}decryptionErrorMessage(){return this.isOrganizer?this.decryptedMembers.lengthe.member.admitted):this.decryptedMembers}informAboutAdmission(){this.$notify({group:"alert",type:"info",title:"Admission info",text:"This is to register people in Time Safari and to admit them to the meeting. A '+' symbol means they are not yet admitted and you can register and admit them. A '-' means you can remove them, but they will stay registered."},1e4)}informAboutAddingContact(e){e?this.$notify({group:"alert",type:"info",title:"Contact Exists",text:"They are in your contacts. If you want to remove them, you must do that from the contacts screen."},1e4):this.$notify({group:"alert",type:"info",title:"Contact Available",text:"This is to add them to your contacts. If you want to remove them later, you must do that from the contacts screen."},1e4)}async loadContacts(){this.contacts=await b.contacts.toArray()}getContactFor(e){return this.contacts.find(r=>r.did===e)}checkWhetherContactBeforeAdmitting(e){const r=this.getContactFor(e.did);!e.member.admitted&&!r?this.$notify({group:"modal",type:"confirm",title:"Add as Contact First?",text:"This person is not in your contacts. Would you like to add them as a contact first?",yesText:"Add as Contact",noText:"Skip Adding Contact",onYes:async()=>{await this.addAsContact(e),await this.toggleAdmission(e)},onNo:async()=>{this.$notify({group:"modal",type:"confirm",title:"Continue Without Adding?",text:"Are you sure you want to proceed with admission? If they are not a contact, you will not know their name after this meeting.",yesText:"Continue",onYes:async()=>{await this.toggleAdmission(e)},onCancel:async()=>{}},-1)}},-1):this.toggleAdmission(e)}async toggleAdmission(e){try{const r=await k(this.activeDid);await this.axios.put(`${this.apiServer}/api/partner/groupOnboardMember/${e.member.memberId}`,{admitted:!e.member.admitted},{headers:r}),e.member.admitted=!e.member.admitted;const o=this.getContactFor(e.did);if(e.member.admitted&&!e.isRegistered&&!(o!=null&&o.registered)){const m=o||{did:e.did,name:e.name};try{const i=await R(this.activeDid,this.apiServer,this.axios,m);if(i.success)e.isRegistered=!0,o&&(await b.contacts.update(e.did,{registered:!0}),o.registered=!0),this.$notify({group:"alert",type:"success",title:"Registered",text:"Besides being admitted, they were also registered."},3e3);else throw i}catch(i){const n=x(i)||(i==null?void 0:i.error)||"";this.$notify({group:"alert",type:"warning",title:"Registration failed",text:"They were admitted to the meeting. However, registration failed. You can register them from the contacts screen. "+n},12e3)}}}catch(r){p("Error toggling admission: "+w(r),!0),this.$emit("error",x(r)||"Failed to update member admission status.")}}async addAsContact(e){var r;try{const o={did:e.did,name:e.name};await b.contacts.add(o),this.contacts.push(o),this.$notify({group:"alert",type:"success",title:"Contact Added",text:"They were added to your contacts."},3e3)}catch(o){p("Error adding contact: "+w(o),!0);let m="An error prevented adding this contact.";o instanceof Error&&((r=o.message)==null?void 0:r.indexOf("already exists"))>-1&&(m="This person is already in your contact list."),this.$notify({group:"alert",type:"danger",title:"Contact Not Added",text:m},5e3)}}};C([$({required:!0})],g.prototype,"password",2);C([$({default:!1})],g.prototype,"showOrganizerTools",2);g=C([O],g);const B={class:"space-y-4"},P={key:0,class:"mt-16 text-center text-4xl bg-slate-400 text-white w-14 py-2.5 rounded-full mx-auto"},V={key:1},Y={class:"text-center text-red-600 py-4"},W={key:0,class:"py-4 text-red-600"},U={key:1,class:"py-4 text-red-600"},H={key:0,class:"inline-flex items-center flex-wrap"},q={class:"inline-flex items-center"},J={class:"mx-2 min-w-[24px] min-h-[24px] w-6 h-6 flex items-center justify-center rounded-full bg-blue-100 text-blue-600"},Q={class:"mx-2 min-w-[24px] min-h-[24px] w-6 h-6 flex items-center justify-center rounded-full bg-blue-100 text-blue-600"},G={key:0,class:"inline-flex items-center"},K={class:"mx-2 w-8 h-8 flex items-center justify-center rounded-full bg-green-100 text-green-600"},X={class:"flex justify-center"},Z={class:"flex items-center justify-between"},ee={class:"flex items-center"},te={class:"text-lg font-medium"},se={key:0,class:"flex justify-end"},ie=["onClick"],oe=["onClick"],re={class:"flex"},ne={key:0,class:"flex items-center"},ae=["title","onClick"],de={class:"text-sm text-gray-600 truncate"},le={key:2,class:"flex justify-center mt-4"},ce={key:3,class:"text-gray-500 py-4"};function me(t,s,e,r,o,m){const i=M("font-awesome");return c(),l("div",B,[t.isLoading?(c(),l("div",P,[h(i,{icon:"spinner",class:"fa-spin-pulse"})])):(c(),l("div",V,[a("div",Y,v(t.decryptionErrorMessage()),1),t.missingMyself?(c(),l("div",W," You are not currently admitted by the organizer. ")):u("",!0),t.firstName?u("",!0):(c(),l("div",U," Your name is not set, so others may not recognize you. Reload this page to set it. ")),a("div",null,[t.membersToShow().length>0&&t.showOrganizerTools&&t.isOrganizer?(c(),l("span",H,[a("span",q,[s[3]||(s[3]=f(" • Click ")),a("span",J,[h(i,{icon:"plus",class:"text-sm"})]),s[4]||(s[4]=f(" / ")),a("span",Q,[h(i,{icon:"minus",class:"text-sm"})]),s[5]||(s[5]=f(" to add/remove them to/from the meeting. "))])])):u("",!0)]),a("div",null,[t.membersToShow().length>0?(c(),l("span",G,[s[6]||(s[6]=f(" • Click ")),a("span",K,[h(i,{icon:"circle-user",class:"text-xl"})]),s[7]||(s[7]=f(" to add them to your contacts. "))])):u("",!0)]),a("div",X,[a("button",{class:"w-8 h-8 flex items-center justify-center rounded-full bg-blue-100 text-blue-600 hover:bg-blue-200 hover:text-blue-800 transition-colors",title:"Refresh members list",onClick:s[0]||(s[0]=(...n)=>t.fetchMembers&&t.fetchMembers(...n))},[h(i,{icon:"rotate",class:A({"fa-spin":t.isLoading})},null,8,["class"])])]),(c(!0),l(D,null,F(t.membersToShow(),n=>(c(),l("div",{key:n.member.memberId,class:"mt-2 p-4 bg-gray-50 rounded-lg"},[a("div",Z,[a("div",ee,[a("h3",te,v(n.name),1),!t.getContactFor(n.did)&&n.did!==t.activeDid?(c(),l("div",se,[a("button",{class:"ml-2 w-8 h-8 flex items-center justify-center rounded-full bg-green-100 text-green-600 hover:bg-green-200 hover:text-green-800 transition-colors",title:"Add as contact",onClick:y=>t.addAsContact(n)},[h(i,{icon:"circle-user",class:"text-xl"})],8,ie)])):u("",!0),n.did!==t.activeDid?(c(),l("button",{key:1,class:"ml-2 mb-2 w-6 h-6 flex items-center justify-center rounded-full bg-slate-100 text-slate-500 hover:bg-slate-200 hover:text-slate-800 transition-colors",title:"Contact info",onClick:y=>t.informAboutAddingContact(t.getContactFor(n.did)!==void 0)},[h(i,{icon:"circle-info",class:"text-base"})],8,oe)):u("",!0)]),a("div",re,[t.showOrganizerTools&&t.isOrganizer&&n.did!==t.activeDid?(c(),l("span",ne,[a("button",{class:"mr-2 w-6 h-6 flex items-center justify-center rounded-full bg-blue-100 text-blue-600 hover:bg-blue-200 hover:text-blue-800 transition-colors",title:n.member.admitted?"Remove member":"Admit member",onClick:y=>t.checkWhetherContactBeforeAdmitting(n)},[h(i,{icon:n.member.admitted?"minus":"plus",class:"text-sm"},null,8,["icon"])],8,ae),a("button",{class:"mr-2 mb-2 w-6 h-6 flex items-center justify-center rounded-full bg-slate-100 text-slate-500 hover:bg-slate-200 hover:text-slate-800 transition-colors",title:"Admission info",onClick:s[1]||(s[1]=y=>t.informAboutAdmission())},[h(i,{icon:"circle-info",class:"text-base"})])])):u("",!0)])]),a("p",de,v(n.did),1)]))),128)),t.membersToShow().length>0?(c(),l("div",le,[a("button",{class:"w-8 h-8 flex items-center justify-center rounded-full bg-blue-100 text-blue-600 hover:bg-blue-200 hover:text-blue-800 transition-colors",title:"Refresh members list",onClick:s[2]||(s[2]=(...n)=>t.fetchMembers&&t.fetchMembers(...n))},[h(i,{icon:"rotate",class:A({"fa-spin":t.isLoading})},null,8,["class"])])])):u("",!0),t.members.length===0?(c(),l("p",ce," No members have joined this meeting yet ")):u("",!0)]))])}const ye=z(g,[["render",me]]);export{ye as M}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/NewActivityView-DGm2GpQB.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/NewActivityView-DGm2GpQB.js deleted file mode 100644 index f31bf84..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/NewActivityView-DGm2GpQB.js +++ /dev/null @@ -1 +0,0 @@ -var A=Object.defineProperty;var I=(e,t,o)=>t in e?A(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var i=(e,t,o)=>I(e,typeof t!="symbol"?t+"":t,o);import{V as P,e as b,d as x,u as h,C,_ as $,h as f,j as w,k as r,m as u,n as c,y,t as a,w as v,F as T,E as g,z as U,B as l}from"./main.common-DD7dqhZp.js";import{G as J}from"./GiftedDialog-DmRkVexW.js";import{Q as N}from"./QuickNav-C8jPGtUY.js";import{E as S}from"./EntityIcon-DciUb57i.js";import{i as M,z as R,h as V,a7 as _,a8 as L}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var B=Object.getOwnPropertyDescriptor,H=(e,t,o,n)=>{for(var d=n>1?void 0:n?B(t,o):t,m=e.length-1,O;m>=0;m--)(O=e[m])&&(d=O(d)||d);return d};let j=class extends P{constructor(){super(...arguments);i(this,"$notify");i(this,"$router");i(this,"activeDid","");i(this,"allContacts",[]);i(this,"allMyDids",[]);i(this,"apiServer","");i(this,"lastAckedOfferToUserJwtId","");i(this,"lastAckedOfferToUserProjectsJwtId","");i(this,"newOffersToUser",[]);i(this,"newOffersToUserHitLimit",!1);i(this,"newOffersToUserProjects",[]);i(this,"newOffersToUserProjectsHitLimit",!1);i(this,"showOffersDetails",!1);i(this,"showOffersToUserProjectsDetails",!1);i(this,"didInfo",M);i(this,"displayAmount",R)}async created(){try{const o=await b();this.apiServer=o.apiServer||"",this.activeDid=o.activeDid||"",this.lastAckedOfferToUserJwtId=o.lastAckedOfferToUserJwtId||"",this.lastAckedOfferToUserProjectsJwtId=o.lastAckedOfferToUserProjectsJwtId||"",this.allContacts=await x.contacts.toArray(),this.allMyDids=await V();const n=await _(this.axios,this.apiServer,this.activeDid,this.lastAckedOfferToUserJwtId);this.newOffersToUser=n.data,this.newOffersToUserHitLimit=n.hitLimit;const d=await L(this.axios,this.apiServer,this.activeDid,this.lastAckedOfferToUserProjectsJwtId);this.newOffersToUserProjects=d.data,this.newOffersToUserProjectsHitLimit=d.hitLimit}catch(o){console.error("Error retrieving settings & contacts:",o),this.$notify({group:"alert",type:"danger",title:"Error",text:o.message||"There was an error retrieving your activity."},5e3)}}async expandOffersToUserAndMarkRead(){this.showOffersDetails=!this.showOffersDetails,this.showOffersDetails&&(await h(this.activeDid,{lastAckedOfferToUserJwtId:this.newOffersToUser[0].jwtId}),this.$notify({group:"alert",type:"info",title:"Marked as Read",text:"The offers are marked as viewed. Click in the list to keep them as new."},5e3))}async markOffersAsReadStartingWith(o){const n=this.newOffersToUser.findIndex(d=>d.jwtId===o);n!==-1&&nd.jwtId===o);n!==-1&&ne.$router.back())}),t[3]||(t[3]=c(" New Activity For You "))])]),r("div",W,[r("div",null,[r("span",Y,a(e.newOffersToUser.length)+a(e.newOffersToUserHitLimit?"+":""),1),r("span",z,"New Offer"+a(e.newOffersToUser.length===1?"":"s")+" To You",1),e.newOffersToUser.length>0?(l(),y(p,{key:0,icon:e.showOffersDetails?"chevron-down":"chevron-right",class:"cursor-pointer ml-4 mr-4 text-lg",onClick:t[1]||(t[1]=s=>e.expandOffersToUserAndMarkRead())},null,8,["icon"])):u("",!0)]),w(k,{to:"/recent-offers-to-user",class:"text-blue-500"},{default:v(()=>t[4]||(t[4]=[c(" See all ")])),_:1})]),e.showOffersDetails?(l(),f("div",G,[r("ul",q,[(l(!0),f(T,null,g(e.newOffersToUser,s=>(l(),f("li",{key:s.jwtId,class:"mt-4 relative group"},[r("span",null,a(e.didInfo(s.offeredByDid,e.activeDid,e.allMyDids,e.allContacts)),1),t[6]||(t[6]=c(" offered ")),s.objectDescription?(l(),f("span",K,a(s.objectDescription),1)):u("",!0),c(a(s.objectDescription&&s.amount?", and ":"")+" ",1),s.amount?(l(),f("span",X,a(e.displayAmount(s.unit,s.amount)),1)):u("",!0),w(k,{to:{path:"/claim/"+encodeURIComponent(s.jwtId)},class:"text-blue-500"},{default:v(()=>[w(p,{icon:"file-lines",class:"pl-2 text-blue-500 cursor-pointer"})]),_:2},1032,["to"]),r("div",{class:"absolute left-0 w-full text-left text-gray-500 text-sm hidden group-hover:flex cursor-pointer items-center",onClick:D=>e.markOffersAsReadStartingWith(s.jwtId)},t[5]||(t[5]=[r("span",{class:"inline-block w-8 h-px bg-gray-500 mr-2"},null,-1),c(" Click to keep all above as new offers ")]),8,Z)]))),128))])])):u("",!0),r("div",ee,[r("div",null,[r("span",te,a(e.newOffersToUserProjects.length)+a(e.newOffersToUserProjectsHitLimit?"+":""),1),r("span",se,"New Offer"+a(e.newOffersToUserProjects.length===1?"":"s")+" To Your Projects",1),e.newOffersToUserProjects.length>0?(l(),y(p,{key:0,icon:e.showOffersToUserProjectsDetails?"chevron-down":"chevron-right",class:"cursor-pointer ml-4 mr-4 text-lg",onClick:t[2]||(t[2]=s=>e.expandOffersToUserProjectsAndMarkRead())},null,8,["icon"])):u("",!0)]),w(k,{to:"/recent-offers-to-user-projects",class:"text-blue-500"},{default:v(()=>t[7]||(t[7]=[c(" See all ")])),_:1})]),e.showOffersToUserProjectsDetails?(l(),f("div",re,[r("ul",oe,[(l(!0),f(T,null,g(e.newOffersToUserProjects,s=>(l(),f("li",{key:s.jwtId,class:"mt-4 relative group"},[r("span",null,a(e.didInfo(s.offeredByDid,e.activeDid,e.allMyDids,e.allContacts)),1),t[9]||(t[9]=c(" offered ")),s.objectDescription?(l(),f("span",ie,a(s.objectDescription),1)):u("",!0),c(a(s.objectDescription&&s.amount?", and ":"")+" ",1),s.amount?(l(),f("span",ae,a(e.displayAmount(s.unit,s.amount)),1)):u("",!0),t[10]||(t[10]=c(" to ")),r("span",null,a(s.planName),1),w(k,{to:{path:"/claim/"+encodeURIComponent(s.jwtId)},class:"text-blue-500"},{default:v(()=>[w(p,{icon:"file-lines",class:"pl-2 text-blue-500 cursor-pointer"})]),_:2},1032,["to"]),r("div",{class:"absolute left-0 w-full text-left text-gray-500 text-sm hidden group-hover:flex cursor-pointer items-center",onClick:D=>e.markOffersToUserProjectsAsReadStartingWith(s.jwtId)},t[8]||(t[8]=[r("span",{class:"inline-block w-8 h-px bg-gray-500 mr-2"},null,-1),c(" Click to keep all above as new offers ")]),8,ne)]))),128))])])):u("",!0)])],64)}const ve=$(j,[["render",le]]);export{ve as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/NewEditAccountView-B1OhdTIn.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/NewEditAccountView-B1OhdTIn.js deleted file mode 100644 index 7e6bd93..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/NewEditAccountView-B1OhdTIn.js +++ /dev/null @@ -1 +0,0 @@ -var p=Object.defineProperty;var u=(t,e,s)=>e in t?p(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var c=(t,e,s)=>u(t,typeof e!="symbol"?e+"":e,s);import{V as m,e as b,d as g,M as v,C as w,_ as f,h as x,k as o,o as _,n as C,j as N,s as k,z as h,B as $}from"./main.common-DD7dqhZp.js";import"./index-BGoTPXII.js";var y=Object.getOwnPropertyDescriptor,V=(t,e,s,i)=>{for(var n=i>1?void 0:i?y(e,s):e,a=t.length-1,r;a>=0;a--)(r=t[a])&&(n=r(n)||n);return n};let d=class extends m{constructor(){super(...arguments);c(this,"$router");c(this,"givenName","")}async created(){const s=await b();this.givenName=(s.firstName||"")+(s.lastName?` ${s.lastName}`:"")}async onClickSaveChanges(){await g.settings.update(v,{firstName:this.givenName,lastName:""}),this.$router.back()}onClickCancel(){this.$router.back()}};d=V([w({components:{}})],d);const E={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},S={id:"ViewBreadcrumb",class:"mb-8"},A={class:"text-lg text-center font-light relative px-7"},B={class:"mt-8"},T={class:"grid grid-cols-1 sm:grid-cols-2 gap-2"};function D(t,e,s,i,n,a){const r=h("font-awesome");return $(),x("section",E,[o("div",S,[o("h1",A,[o("button",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:e[0]||(e[0]=l=>t.$router.back())},[N(r,{icon:"chevron-left",class:"fa-fw"})]),e[4]||(e[4]=C(" Edit Identity "))])]),_(o("input",{"onUpdate:modelValue":e[1]||(e[1]=l=>t.givenName=l),type:"text",placeholder:"Name",class:"block w-full rounded border border-slate-400 mb-4 px-3 py-2"},null,512),[[k,t.givenName]]),o("div",B,[o("div",T,[o("button",{type:"button",class:"block w-full text-center text-lg font-bold uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md mb-2",onClick:e[2]||(e[2]=l=>t.onClickSaveChanges())}," Save Changes "),o("button",{type:"button",class:"block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md mb-2",onClick:e[3]||(e[3]=l=>t.onClickCancel())}," Cancel ")])])])}const P=f(d,[["render",D]]);export{P as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/NewEditProjectView-DeSG79Yx.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/NewEditProjectView-DeSG79Yx.js deleted file mode 100644 index 8b59b6b..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/NewEditProjectView-DeSG79Yx.js +++ /dev/null @@ -1 +0,0 @@ -var Di=Object.defineProperty;var Ki=(t,e,n)=>e in t?Di(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var q=(t,e,n)=>Ki(t,typeof e!="symbol"?e+"":e,n);/* empty css */import{D as nn}from"./datetime-BDQ5ptpc.js";import{V as Pi,e as Ar,a as Sr,b as qi,C as Mi,_ as ji,h as ae,j as Nt,k as _,o as bt,m as $e,n as rn,t as on,s as Ht,q as Ir,w as Vi,p as zi,x as $r,F as Fi,z as ce,B as Gt,y as Zi}from"./main.common-DD7dqhZp.js";import{v as Gi,u as Wi,i as Yi}from"./vue-leaflet.es-DQekxOGR.js";import{I as Ji}from"./ImageMethodDialog-zrU-VGNm.js";import{Q as Xi}from"./QuickNav-C8jPGtUY.js";import{G as Qi,g as Te,I as ts,at as es}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./PhotoDialog-DZbf20A6.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";function Tr(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function to(t,...e){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function ns(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Tr(t.outputLen),Tr(t.blockLen)}function Oe(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function rs(t,e){to(t);const n=e.outputLen;if(t.lengtht instanceof Uint8Array,an=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),mt=(t,e)=>t<<32-e|t>>>e,os=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!os)throw new Error("Non little-endian hardware is not supported");function is(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function Pn(t){if(typeof t=="string"&&(t=is(t)),!eo(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}function ss(...t){const e=new Uint8Array(t.reduce((r,o)=>r+o.length,0));let n=0;return t.forEach(r=>{if(!eo(r))throw new Error("Uint8Array expected");e.set(r,n),n+=r.length}),e}let no=class{clone(){return this._cloneInto()}};function as(t){const e=r=>t().update(Pn(r)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}function ro(t=32){if(sn&&typeof sn.getRandomValues=="function")return sn.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}function cs(t,e,n,r){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,n,r);const o=BigInt(32),i=BigInt(4294967295),a=Number(n>>o&i),c=Number(n&i),s=r?4:0,l=r?0:4;t.setUint32(e+s,a,r),t.setUint32(e+l,c,r)}let ls=class extends no{constructor(e,n,r,o){super(),this.blockLen=e,this.outputLen=n,this.padOffset=r,this.isLE=o,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=an(this.buffer)}update(e){Oe(this);const{view:n,buffer:r,blockLen:o}=this;e=Pn(e);const i=e.length;for(let a=0;ao-a&&(this.process(r,0),a=0);for(let f=a;fu.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;ft&e^~t&n,ds=(t,e,n)=>t&e^t&n^e&n,us=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Rt=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Ot=new Uint32Array(64);let hs=class extends ls{constructor(){super(64,32,8,!1),this.A=Rt[0]|0,this.B=Rt[1]|0,this.C=Rt[2]|0,this.D=Rt[3]|0,this.E=Rt[4]|0,this.F=Rt[5]|0,this.G=Rt[6]|0,this.H=Rt[7]|0}get(){const{A:e,B:n,C:r,D:o,E:i,F:a,G:c,H:s}=this;return[e,n,r,o,i,a,c,s]}set(e,n,r,o,i,a,c,s){this.A=e|0,this.B=n|0,this.C=r|0,this.D=o|0,this.E=i|0,this.F=a|0,this.G=c|0,this.H=s|0}process(e,n){for(let f=0;f<16;f++,n+=4)Ot[f]=e.getUint32(n,!1);for(let f=16;f<64;f++){const g=Ot[f-15],p=Ot[f-2],y=mt(g,7)^mt(g,18)^g>>>3,d=mt(p,17)^mt(p,19)^p>>>10;Ot[f]=d+Ot[f-7]+y+Ot[f-16]|0}let{A:r,B:o,C:i,D:a,E:c,F:s,G:l,H:u}=this;for(let f=0;f<64;f++){const g=mt(c,6)^mt(c,11)^mt(c,25),p=u+g+fs(c,s,l)+us[f]+Ot[f]|0,d=(mt(r,2)^mt(r,13)^mt(r,22))+ds(r,o,i)|0;u=l,l=s,s=c,c=a+p|0,a=i,i=o,o=r,r=p+d|0}r=r+this.A|0,o=o+this.B|0,i=i+this.C|0,a=a+this.D|0,c=c+this.E|0,s=s+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(r,o,i,a,c,s,l,u)}roundClean(){Ot.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};const xn=as(()=>new hs);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const oo=BigInt(0),Me=BigInt(1),ps=BigInt(2),je=t=>t instanceof Uint8Array,gs=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function ue(t){if(!je(t))throw new Error("Uint8Array expected");let e="";for(let n=0;nr+o.length,0));let n=0;return t.forEach(r=>{if(!je(r))throw new Error("Uint8Array expected");e.set(r,n),n+=r.length}),e}function ws(t,e){if(t.length!==e.length)return!1;for(let n=0;noo;t>>=Me,e+=1);return e}function Es(t,e){return t>>BigInt(e)&Me}const xs=(t,e,n)=>t|(n?Me:oo)<(ps<new Uint8Array(t),Lr=t=>Uint8Array.from(t);function so(t,e,n){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");let r=cn(t),o=cn(t),i=0;const a=()=>{r.fill(1),o.fill(0),i=0},c=(...f)=>n(o,r,...f),s=(f=cn())=>{o=c(Lr([0]),f),r=c(),f.length!==0&&(o=c(Lr([1]),f),r=c())},l=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let f=0;const g=[];for(;f{a(),s(f);let p;for(;!(p=g(l()));)s();return a(),p}}const vs={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",stringOrUint8Array:t=>typeof t=="string"||t instanceof Uint8Array,isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function Se(t,e,n={}){const r=(o,i,a)=>{const c=vs[i];if(typeof c!="function")throw new Error(`Invalid validator "${i}", expected function`);const s=t[o];if(!(a&&s===void 0)&&!c(s,t))throw new Error(`Invalid param ${String(o)}=${s} (${typeof s}), expected ${i}`)};for(const[o,i]of Object.entries(e))r(o,i,!1);for(const[o,i]of Object.entries(n))r(o,i,!0);return t}const Bs=Object.freeze(Object.defineProperty({__proto__:null,bitGet:Es,bitLen:ms,bitMask:Vn,bitSet:xs,bytesToHex:ue,bytesToNumberBE:it,bytesToNumberLE:Mn,concatBytes:ne,createHmacDrbg:so,ensureBytes:tt,equalBytes:ws,hexToBytes:he,hexToNumber:qn,numberToBytesBE:Vt,numberToBytesLE:jn,numberToHexUnpadded:io,numberToVarBytesBE:ys,utf8ToBytes:bs,validateObject:Se},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const G=BigInt(0),z=BigInt(1),Wt=BigInt(2),As=BigInt(3),vn=BigInt(4),Ur=BigInt(5),Cr=BigInt(8);BigInt(9);BigInt(16);function X(t,e){const n=t%e;return n>=G?n:e+n}function Ss(t,e,n){if(n<=G||e 0");if(n===z)return G;let r=z;for(;e>G;)e&z&&(r=r*t%n),t=t*t%n,e>>=z;return r}function ft(t,e,n){let r=t;for(;e-- >G;)r*=r,r%=n;return r}function Bn(t,e){if(t===G||e<=G)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let n=X(t,e),r=e,o=G,i=z;for(;n!==G;){const c=r/n,s=r%n,l=o-i*c;r=n,n=s,o=i,i=l}if(r!==z)throw new Error("invert: does not exist");return X(o,e)}function Is(t){const e=(t-z)/Wt;let n,r,o;for(n=t-z,r=0;n%Wt===G;n/=Wt,r++);for(o=Wt;o(r[o]="function",r),e);return Se(t,n)}function Us(t,e,n){if(n 0");if(n===G)return t.ONE;if(n===z)return e;let r=t.ONE,o=e;for(;n>G;)n&z&&(r=t.mul(r,o)),o=t.sqr(o),n>>=z;return r}function Cs(t,e){const n=new Array(e.length),r=e.reduce((i,a,c)=>t.is0(a)?i:(n[c]=i,t.mul(i,a)),t.ONE),o=t.inv(r);return e.reduceRight((i,a,c)=>t.is0(a)?i:(n[c]=t.mul(i,n[c]),t.mul(i,a)),o),n}function ao(t,e){const n=e!==void 0?e:t.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function ks(t,e,n=!1,r={}){if(t<=G)throw new Error(`Expected Field ORDER > 0, got ${t}`);const{nBitLength:o,nByteLength:i}=ao(t,e);if(i>2048)throw new Error("Field lengths over 2048 bytes are not supported");const a=$s(t),c=Object.freeze({ORDER:t,BITS:o,BYTES:i,MASK:Vn(o),ZERO:G,ONE:z,create:s=>X(s,t),isValid:s=>{if(typeof s!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof s}`);return G<=s&&ss===G,isOdd:s=>(s&z)===z,neg:s=>X(-s,t),eql:(s,l)=>s===l,sqr:s=>X(s*s,t),add:(s,l)=>X(s+l,t),sub:(s,l)=>X(s-l,t),mul:(s,l)=>X(s*l,t),pow:(s,l)=>Us(c,s,l),div:(s,l)=>X(s*Bn(l,t),t),sqrN:s=>s*s,addN:(s,l)=>s+l,subN:(s,l)=>s-l,mulN:(s,l)=>s*l,inv:s=>Bn(s,t),sqrt:r.sqrt||(s=>a(c,s)),invertBatch:s=>Cs(c,s),cmov:(s,l,u)=>u?l:s,toBytes:s=>n?jn(s,i):Vt(s,i),fromBytes:s=>{if(s.length!==i)throw new Error(`Fp.fromBytes: expected ${i}, got ${s.length}`);return n?Mn(s):it(s)}});return Object.freeze(c)}function co(t){if(typeof t!="bigint")throw new Error("field order must be bigint");const e=t.toString(2).length;return Math.ceil(e/8)}function lo(t){const e=co(t);return e+Math.ceil(e/2)}function Ns(t,e,n=!1){const r=t.length,o=co(e),i=lo(e);if(r<16||r1024)throw new Error(`expected ${i}-1024 bytes of input, got ${r}`);const a=n?it(t):Mn(t),c=X(a,e-z)+z;return n?jn(c,o):Vt(c,o)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Hs=BigInt(0),ln=BigInt(1);function Rs(t,e){const n=(o,i)=>{const a=i.negate();return o?a:i},r=o=>{const i=Math.ceil(e/o)+1,a=2**(o-1);return{windows:i,windowSize:a}};return{constTimeNegate:n,unsafeLadder(o,i){let a=t.ZERO,c=o;for(;i>Hs;)i&ln&&(a=a.add(c)),c=c.double(),i>>=ln;return a},precomputeWindow(o,i){const{windows:a,windowSize:c}=r(i),s=[];let l=o,u=l;for(let f=0;f>=p,h>s&&(h-=g,a+=ln);const w=d,v=d+Math.abs(h)-1,x=y%2!==0,$=h<0;h===0?u=u.add(n(x,i[w])):l=l.add(n($,i[v]))}return{p:l,f:u}},wNAFCached(o,i,a,c){const s=o._WINDOW_SIZE||1;let l=i.get(o);return l||(l=this.precomputeWindow(o,s),s!==1&&i.set(o,c(l))),this.wNAF(s,l,a)}}}function fo(t){return Ls(t.Fp),Se(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...ao(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Os(t){const e=fo(t);Se(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:n,Fp:r,a:o}=e;if(n){if(!r.eql(o,r.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof n!="object"||typeof n.beta!="bigint"||typeof n.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}const{bytesToNumberBE:_s,hexToBytes:Ds}=Bs,Xt={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(t){const{Err:e}=Xt;if(t.length<2||t[0]!==2)throw new e("Invalid signature integer tag");const n=t[1],r=t.subarray(2,n+2);if(!n||r.length!==n)throw new e("Invalid signature integer: wrong length");if(r[0]&128)throw new e("Invalid signature integer: negative");if(r[0]===0&&!(r[1]&128))throw new e("Invalid signature integer: unnecessary leading zero");return{d:_s(r),l:t.subarray(n+2)}},toSig(t){const{Err:e}=Xt,n=typeof t=="string"?Ds(t):t;if(!(n instanceof Uint8Array))throw new Error("ui8a expected");let r=n.length;if(r<2||n[0]!=48)throw new e("Invalid signature tag");if(n[1]!==r-2)throw new e("Invalid signature: incorrect length");const{d:o,l:i}=Xt._parseInt(n.subarray(2)),{d:a,l:c}=Xt._parseInt(i);if(c.length)throw new e("Invalid signature: left bytes after parsing");return{r:o,s:a}},hexFromSig(t){const e=l=>Number.parseInt(l[0],16)&8?"00"+l:l,n=l=>{const u=l.toString(16);return u.length&1?`0${u}`:u},r=e(n(t.s)),o=e(n(t.r)),i=r.length/2,a=o.length/2,c=n(i),s=n(a);return`30${n(a+i+4)}02${s}${o}02${c}${r}`}},At=BigInt(0),ut=BigInt(1);BigInt(2);const kr=BigInt(3);BigInt(4);function Ks(t){const e=Os(t),{Fp:n}=e,r=e.toBytes||((y,d,h)=>{const w=d.toAffine();return ne(Uint8Array.from([4]),n.toBytes(w.x),n.toBytes(w.y))}),o=e.fromBytes||(y=>{const d=y.subarray(1),h=n.fromBytes(d.subarray(0,n.BYTES)),w=n.fromBytes(d.subarray(n.BYTES,2*n.BYTES));return{x:h,y:w}});function i(y){const{a:d,b:h}=e,w=n.sqr(y),v=n.mul(w,y);return n.add(n.add(v,n.mul(y,d)),h)}if(!n.eql(n.sqr(e.Gy),i(e.Gx)))throw new Error("bad generator point: equation left != right");function a(y){return typeof y=="bigint"&&Atn.eql(x,n.ZERO);return v(h)&&v(w)?f.ZERO:new f(h,w,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(d){const h=n.invertBatch(d.map(w=>w.pz));return d.map((w,v)=>w.toAffine(h[v])).map(f.fromAffine)}static fromHex(d){const h=f.fromAffine(o(tt("pointHex",d)));return h.assertValidity(),h}static fromPrivateKey(d){return f.BASE.multiply(s(d))}_setWindowSize(d){this._WINDOW_SIZE=d,l.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!n.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:d,y:h}=this.toAffine();if(!n.isValid(d)||!n.isValid(h))throw new Error("bad point: x or y not FE");const w=n.sqr(h),v=i(d);if(!n.eql(w,v))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:d}=this.toAffine();if(n.isOdd)return!n.isOdd(d);throw new Error("Field doesn't support isOdd")}equals(d){u(d);const{px:h,py:w,pz:v}=this,{px:x,py:$,pz:S}=d,E=n.eql(n.mul(h,S),n.mul(x,v)),B=n.eql(n.mul(w,S),n.mul($,v));return E&&B}negate(){return new f(this.px,n.neg(this.py),this.pz)}double(){const{a:d,b:h}=e,w=n.mul(h,kr),{px:v,py:x,pz:$}=this;let S=n.ZERO,E=n.ZERO,B=n.ZERO,A=n.mul(v,v),N=n.mul(x,x),U=n.mul($,$),T=n.mul(v,x);return T=n.add(T,T),B=n.mul(v,$),B=n.add(B,B),S=n.mul(d,B),E=n.mul(w,U),E=n.add(S,E),S=n.sub(N,E),E=n.add(N,E),E=n.mul(S,E),S=n.mul(T,S),B=n.mul(w,B),U=n.mul(d,U),T=n.sub(A,U),T=n.mul(d,T),T=n.add(T,B),B=n.add(A,A),A=n.add(B,A),A=n.add(A,U),A=n.mul(A,T),E=n.add(E,A),U=n.mul(x,$),U=n.add(U,U),A=n.mul(U,T),S=n.sub(S,A),B=n.mul(U,N),B=n.add(B,B),B=n.add(B,B),new f(S,E,B)}add(d){u(d);const{px:h,py:w,pz:v}=this,{px:x,py:$,pz:S}=d;let E=n.ZERO,B=n.ZERO,A=n.ZERO;const N=e.a,U=n.mul(e.b,kr);let T=n.mul(h,x),H=n.mul(w,$),R=n.mul(v,S),P=n.add(h,w),b=n.add(x,$);P=n.mul(P,b),b=n.add(T,H),P=n.sub(P,b),b=n.add(h,v);let m=n.add(x,S);return b=n.mul(b,m),m=n.add(T,R),b=n.sub(b,m),m=n.add(w,v),E=n.add($,S),m=n.mul(m,E),E=n.add(H,R),m=n.sub(m,E),A=n.mul(N,b),E=n.mul(U,R),A=n.add(E,A),E=n.sub(H,A),A=n.add(H,A),B=n.mul(E,A),H=n.add(T,T),H=n.add(H,T),R=n.mul(N,R),b=n.mul(U,b),H=n.add(H,R),R=n.sub(T,R),R=n.mul(N,R),b=n.add(b,R),T=n.mul(H,b),B=n.add(B,T),T=n.mul(m,b),E=n.mul(P,E),E=n.sub(E,T),T=n.mul(P,H),A=n.mul(m,A),A=n.add(A,T),new f(E,B,A)}subtract(d){return this.add(d.negate())}is0(){return this.equals(f.ZERO)}wNAF(d){return p.wNAFCached(this,l,d,h=>{const w=n.invertBatch(h.map(v=>v.pz));return h.map((v,x)=>v.toAffine(w[x])).map(f.fromAffine)})}multiplyUnsafe(d){const h=f.ZERO;if(d===At)return h;if(c(d),d===ut)return this;const{endo:w}=e;if(!w)return p.unsafeLadder(this,d);let{k1neg:v,k1:x,k2neg:$,k2:S}=w.splitScalar(d),E=h,B=h,A=this;for(;x>At||S>At;)x&ut&&(E=E.add(A)),S&ut&&(B=B.add(A)),A=A.double(),x>>=ut,S>>=ut;return v&&(E=E.negate()),$&&(B=B.negate()),B=new f(n.mul(B.px,w.beta),B.py,B.pz),E.add(B)}multiply(d){c(d);let h=d,w,v;const{endo:x}=e;if(x){const{k1neg:$,k1:S,k2neg:E,k2:B}=x.splitScalar(h);let{p:A,f:N}=this.wNAF(S),{p:U,f:T}=this.wNAF(B);A=p.constTimeNegate($,A),U=p.constTimeNegate(E,U),U=new f(n.mul(U.px,x.beta),U.py,U.pz),w=A.add(U),v=N.add(T)}else{const{p:$,f:S}=this.wNAF(h);w=$,v=S}return f.normalizeZ([w,v])[0]}multiplyAndAddUnsafe(d,h,w){const v=f.BASE,x=(S,E)=>E===At||E===ut||!S.equals(v)?S.multiplyUnsafe(E):S.multiply(E),$=x(this,h).add(x(d,w));return $.is0()?void 0:$}toAffine(d){const{px:h,py:w,pz:v}=this,x=this.is0();d==null&&(d=x?n.ONE:n.inv(v));const $=n.mul(h,d),S=n.mul(w,d),E=n.mul(v,d);if(x)return{x:n.ZERO,y:n.ZERO};if(!n.eql(E,n.ONE))throw new Error("invZ was invalid");return{x:$,y:S}}isTorsionFree(){const{h:d,isTorsionFree:h}=e;if(d===ut)return!0;if(h)return h(f,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:d,clearCofactor:h}=e;return d===ut?this:h?h(f,this):this.multiplyUnsafe(e.h)}toRawBytes(d=!0){return this.assertValidity(),r(f,this,d)}toHex(d=!0){return ue(this.toRawBytes(d))}}f.BASE=new f(e.Gx,e.Gy,n.ONE),f.ZERO=new f(n.ZERO,n.ONE,n.ZERO);const g=e.nBitLength,p=Rs(f,e.endo?Math.ceil(g/2):g);return{CURVE:e,ProjectivePoint:f,normPrivateKeyToScalar:s,weierstrassEquation:i,isWithinCurveOrder:a}}function Ps(t){const e=fo(t);return Se(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function qs(t){const e=Ps(t),{Fp:n,n:r}=e,o=n.BYTES+1,i=2*n.BYTES+1;function a(b){return Atue(Vt(b,e.nByteLength));function y(b){const m=r>>ut;return b>m}function d(b){return y(b)?c(-b):b}const h=(b,m,I)=>it(b.slice(m,I));class w{constructor(m,I,C){this.r=m,this.s=I,this.recovery=C,this.assertValidity()}static fromCompact(m){const I=e.nByteLength;return m=tt("compactSignature",m,I*2),new w(h(m,0,I),h(m,I,2*I))}static fromDER(m){const{r:I,s:C}=Xt.toSig(tt("DER",m));return new w(I,C)}assertValidity(){if(!g(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!g(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(m){return new w(this.r,this.s,m)}recoverPublicKey(m){const{r:I,s:C,recovery:L}=this,k=B(tt("msgHash",m));if(L==null||![0,1,2,3].includes(L))throw new Error("recovery id invalid");const D=L===2||L===3?I+e.n:I;if(D>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const O=L&1?"03":"02",Z=l.fromHex(O+p(D)),Y=s(D),st=c(-k*Y),gt=c(C*Y),J=l.BASE.multiplyAndAddUnsafe(Z,st,gt);if(!J)throw new Error("point at infinify");return J.assertValidity(),J}hasHighS(){return y(this.s)}normalizeS(){return this.hasHighS()?new w(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return he(this.toDERHex())}toDERHex(){return Xt.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return he(this.toCompactHex())}toCompactHex(){return p(this.r)+p(this.s)}}const v={isValidPrivateKey(b){try{return u(b),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const b=lo(e.n);return Ns(e.randomBytes(b),e.n)},precompute(b=8,m=l.BASE){return m._setWindowSize(b),m.multiply(BigInt(3)),m}};function x(b,m=!0){return l.fromPrivateKey(b).toRawBytes(m)}function $(b){const m=b instanceof Uint8Array,I=typeof b=="string",C=(m||I)&&b.length;return m?C===o||C===i:I?C===2*o||C===2*i:b instanceof l}function S(b,m,I=!0){if($(b))throw new Error("first arg must be private key");if(!$(m))throw new Error("second arg must be public key");return l.fromHex(m).multiply(u(b)).toRawBytes(I)}const E=e.bits2int||function(b){const m=it(b),I=b.length*8-e.nBitLength;return I>0?m>>BigInt(I):m},B=e.bits2int_modN||function(b){return c(E(b))},A=Vn(e.nBitLength);function N(b){if(typeof b!="bigint")throw new Error("bigint expected");if(!(At<=b&&bnt in I))throw new Error("sign() legacy options not supported");const{hash:C,randomBytes:L}=e;let{lowS:k,prehash:D,extraEntropy:O}=I;k==null&&(k=!0),b=tt("msgHash",b),D&&(b=tt("prehashed msgHash",C(b)));const Z=B(b),Y=u(m),st=[N(Y),N(Z)];if(O!=null){const nt=O===!0?L(n.BYTES):O;st.push(tt("extraEntropy",nt))}const gt=ne(...st),J=Z;function Zt(nt){const at=E(nt);if(!g(at))return;const be=s(at),ct=l.BASE.multiply(at).toAffine(),j=c(ct.x);if(j===At)return;const lt=c(be*c(J+j*Y));if(lt===At)return;let me=(ct.x===j?0:2)|Number(ct.y&ut),Ee=lt;return k&&y(lt)&&(Ee=d(lt),me^=1),new w(j,Ee,me)}return{seed:gt,k2sig:Zt}}const T={lowS:e.lowS,prehash:!1},H={lowS:e.lowS,prehash:!1};function R(b,m,I=T){const{seed:C,k2sig:L}=U(b,m,I),k=e;return so(k.hash.outputLen,k.nByteLength,k.hmac)(C,L)}l.BASE._setWindowSize(8);function P(b,m,I,C=H){var ct;const L=b;if(m=tt("msgHash",m),I=tt("publicKey",I),"strict"in C)throw new Error("options.strict was renamed to lowS");const{lowS:k,prehash:D}=C;let O,Z;try{if(typeof L=="string"||L instanceof Uint8Array)try{O=w.fromDER(L)}catch(j){if(!(j instanceof Xt.Err))throw j;O=w.fromCompact(L)}else if(typeof L=="object"&&typeof L.r=="bigint"&&typeof L.s=="bigint"){const{r:j,s:lt}=L;O=new w(j,lt)}else throw new Error("PARSE");Z=l.fromHex(I)}catch(j){if(j.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(k&&O.hasHighS())return!1;D&&(m=e.hash(m));const{r:Y,s:st}=O,gt=B(m),J=s(st),Zt=c(gt*J),nt=c(Y*J),at=(ct=l.BASE.multiplyAndAddUnsafe(Z,Zt,nt))==null?void 0:ct.toAffine();return at?c(at.x)===Y:!1}return{CURVE:e,getPublicKey:x,getSharedSecret:S,sign:R,verify:P,ProjectivePoint:l,Signature:w,utils:v}}let uo=class extends no{constructor(e,n){super(),this.finished=!1,this.destroyed=!1,ns(e);const r=Pn(n);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,i=new Uint8Array(o);i.set(r.length>o?e.create().update(r).digest():r);for(let a=0;anew uo(t,e).update(n).digest();ho.create=(t,e)=>new uo(t,e);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Ms(t){return{hash:t,hmac:(e,...n)=>ho(t,e,ss(...n)),randomBytes:ro}}function js(t,e){const n=r=>qs({...t,...Ms(r)});return Object.freeze({...n(e),create:n})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ve=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),_e=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),po=BigInt(1),De=BigInt(2),Nr=(t,e)=>(t+e/De)/e;function go(t){const e=Ve,n=BigInt(3),r=BigInt(6),o=BigInt(11),i=BigInt(22),a=BigInt(23),c=BigInt(44),s=BigInt(88),l=t*t*t%e,u=l*l*t%e,f=ft(u,n,e)*u%e,g=ft(f,n,e)*u%e,p=ft(g,De,e)*l%e,y=ft(p,o,e)*p%e,d=ft(y,i,e)*y%e,h=ft(d,c,e)*d%e,w=ft(h,s,e)*h%e,v=ft(w,c,e)*d%e,x=ft(v,n,e)*u%e,$=ft(x,a,e)*y%e,S=ft($,r,e)*l%e,E=ft(S,De,e);if(!An.eql(An.sqr(E),t))throw new Error("Cannot find square root");return E}const An=ks(Ve,void 0,void 0,{sqrt:go}),we=js({a:BigInt(0),b:BigInt(7),Fp:An,n:_e,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=_e,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-po*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=n,a=BigInt("0x100000000000000000000000000000000"),c=Nr(i*t,e),s=Nr(-r*t,e);let l=X(t-c*n-s*o,e),u=X(-c*r-s*i,e);const f=l>a,g=u>a;if(f&&(l=e-l),g&&(u=e-u),l>a||u>a)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:f,k1:l,k2neg:g,k2:u}}}},xn),ze=BigInt(0),yo=t=>typeof t=="bigint"&&zetypeof t=="bigint"&&zeo.charCodeAt(0)));n=ne(r,r),Hr[t]=n}return xn(ne(n,...e))}const zn=t=>t.toRawBytes(!0).slice(1),Sn=t=>Vt(t,32),fn=t=>X(t,Ve),Be=t=>X(t,_e),Fn=we.ProjectivePoint,zs=(t,e,n)=>Fn.BASE.multiplyAndAddUnsafe(t,e,n);function In(t){let e=we.utils.normPrivateKeyToScalar(t),n=Fn.fromPrivateKey(e);return{scalar:n.hasEvenY()?e:Be(-e),bytes:zn(n)}}function wo(t){if(!yo(t))throw new Error("bad x: need 0 < x < p");const e=fn(t*t),n=fn(e*t+BigInt(7));let r=go(n);r%De!==ze&&(r=fn(-r));const o=new Fn(t,r,po);return o.assertValidity(),o}function bo(...t){return Be(it(Ke("BIP0340/challenge",...t)))}function Fs(t){return In(t).bytes}function Zs(t,e,n=ro(32)){const r=tt("message",t),{bytes:o,scalar:i}=In(e),a=tt("auxRand",n,32),c=Sn(i^it(Ke("BIP0340/aux",a))),s=Ke("BIP0340/nonce",c,o,r),l=Be(it(s));if(l===ze)throw new Error("sign failed: k is zero");const{bytes:u,scalar:f}=In(l),g=bo(u,o,r),p=new Uint8Array(64);if(p.set(u,0),p.set(Sn(Be(f+g*i)),32),!mo(p,r,o))throw new Error("sign: Invalid signature produced");return p}function mo(t,e,n){const r=tt("signature",t,64),o=tt("message",e),i=tt("publicKey",n,32);try{const a=wo(it(i)),c=it(r.subarray(0,32));if(!yo(c))return!1;const s=it(r.subarray(32,64));if(!Vs(s))return!1;const l=bo(Sn(c),zn(a),o),u=zs(a,s,Be(-l));return!(!u||!u.hasEvenY()||u.toAffine().x!==c)}catch{return!1}}const xe={getPublicKey:Fs,sign:Zs,verify:mo,utils:{randomPrivateKey:we.utils.randomPrivateKey,lift_x:wo,pointToBytes:zn,numberToBytesBE:Vt,bytesToNumberBE:it,taggedHash:Ke,mod:X}},dn=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Zn=t=>t instanceof Uint8Array,te=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),Et=(t,e)=>t<<32-e|t>>>e,Gs=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!Gs)throw new Error("Non little-endian hardware is not supported");const Ws=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function Q(t){if(!Zn(t))throw new Error("Uint8Array expected");let e="";for(let n=0;nr+o.length,0));let n=0;return t.forEach(r=>{if(!Zn(r))throw new Error("Uint8Array expected");e.set(r,n),n+=r.length}),e}class xo{clone(){return this._cloneInto()}}const Ys=t=>Object.prototype.toString.call(t)==="[object Object]"&&t.constructor===Object;function Js(t,e){if(e!==void 0&&(typeof e!="object"||!Ys(e)))throw new Error("Options should be object or undefined");return Object.assign(t,e)}function ie(t){const e=r=>t().update(oe(r)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}function Gn(t=32){if(dn&&typeof dn.getRandomValues=="function")return dn.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}function $n(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function Xs(t){if(typeof t!="boolean")throw new Error(`Expected boolean, not ${t}`)}function Yt(t,...e){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function Qs(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");$n(t.outputLen),$n(t.blockLen)}function ta(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function ea(t,e){Yt(t);const n=e.outputLen;if(t.length>o&i),c=Number(n&i),s=r?4:0,l=r?0:4;t.setUint32(e+s,a,r),t.setUint32(e+l,c,r)}class Wn extends xo{constructor(e,n,r,o){super(),this.blockLen=e,this.outputLen=n,this.padOffset=r,this.isLE=o,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=te(this.buffer)}update(e){ot.exists(this);const{view:n,buffer:r,blockLen:o}=this;e=oe(e);const i=e.length;for(let a=0;ao-a&&(this.process(r,0),a=0);for(let f=a;fu.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;ft&e^~t&n,oa=(t,e,n)=>t&e^t&n^e&n,ia=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),_t=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Dt=new Uint32Array(64);class vo extends Wn{constructor(){super(64,32,8,!1),this.A=_t[0]|0,this.B=_t[1]|0,this.C=_t[2]|0,this.D=_t[3]|0,this.E=_t[4]|0,this.F=_t[5]|0,this.G=_t[6]|0,this.H=_t[7]|0}get(){const{A:e,B:n,C:r,D:o,E:i,F:a,G:c,H:s}=this;return[e,n,r,o,i,a,c,s]}set(e,n,r,o,i,a,c,s){this.A=e|0,this.B=n|0,this.C=r|0,this.D=o|0,this.E=i|0,this.F=a|0,this.G=c|0,this.H=s|0}process(e,n){for(let f=0;f<16;f++,n+=4)Dt[f]=e.getUint32(n,!1);for(let f=16;f<64;f++){const g=Dt[f-15],p=Dt[f-2],y=Et(g,7)^Et(g,18)^g>>>3,d=Et(p,17)^Et(p,19)^p>>>10;Dt[f]=d+Dt[f-7]+y+Dt[f-16]|0}let{A:r,B:o,C:i,D:a,E:c,F:s,G:l,H:u}=this;for(let f=0;f<64;f++){const g=Et(c,6)^Et(c,11)^Et(c,25),p=u+g+ra(c,s,l)+ia[f]+Dt[f]|0,d=(Et(r,2)^Et(r,13)^Et(r,22))+oa(r,o,i)|0;u=l,l=s,s=c,c=a+p|0,a=i,i=o,o=r,r=p+d|0}r=r+this.A|0,o=o+this.B|0,i=i+this.C|0,a=a+this.D|0,c=c+this.E|0,s=s+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(r,o,i,a,c,s,l,u)}roundClean(){Dt.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class sa extends vo{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}const Ut=ie(()=>new vo);ie(()=>new sa);/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */function se(t){if(!Number.isSafeInteger(t))throw new Error(`Wrong integer: ${t}`)}function Bt(...t){const e=(o,i)=>a=>o(i(a)),n=Array.from(t).reverse().reduce((o,i)=>o?e(o,i.encode):i.encode,void 0),r=t.reduce((o,i)=>o?e(o,i.decode):i.decode,void 0);return{encode:n,decode:r}}function Ct(t){return{encode:e=>{if(!Array.isArray(e)||e.length&&typeof e[0]!="number")throw new Error("alphabet.encode input should be an array of numbers");return e.map(n=>{if(se(n),n<0||n>=t.length)throw new Error(`Digit index outside alphabet: ${n} (alphabet: ${t.length})`);return t[n]})},decode:e=>{if(!Array.isArray(e)||e.length&&typeof e[0]!="string")throw new Error("alphabet.decode input should be array of strings");return e.map(n=>{if(typeof n!="string")throw new Error(`alphabet.decode: not string element=${n}`);const r=t.indexOf(n);if(r===-1)throw new Error(`Unknown letter: "${n}". Allowed: ${t}`);return r})}}}function kt(t=""){if(typeof t!="string")throw new Error("join separator should be string");return{encode:e=>{if(!Array.isArray(e)||e.length&&typeof e[0]!="string")throw new Error("join.encode input should be array of strings");for(let n of e)if(typeof n!="string")throw new Error(`join.encode: non-string input=${n}`);return e.join(t)},decode:e=>{if(typeof e!="string")throw new Error("join.decode input should be string");return e.split(t)}}}function Fe(t,e="="){if(se(t),typeof e!="string")throw new Error("padding chr should be string");return{encode(n){if(!Array.isArray(n)||n.length&&typeof n[0]!="string")throw new Error("padding.encode input should be array of strings");for(let r of n)if(typeof r!="string")throw new Error(`padding.encode: non-string input=${r}`);for(;n.length*t%8;)n.push(e);return n},decode(n){if(!Array.isArray(n)||n.length&&typeof n[0]!="string")throw new Error("padding.encode input should be array of strings");for(let o of n)if(typeof o!="string")throw new Error(`padding.decode: non-string input=${o}`);let r=n.length;if(r*t%8)throw new Error("Invalid padding: string should have whole number of bytes");for(;r>0&&n[r-1]===e;r--)if(!((r-1)*t%8))throw new Error("Invalid padding: string has too much padding");return n.slice(0,r)}}}function Bo(t){if(typeof t!="function")throw new Error("normalize fn should be function");return{encode:e=>e,decode:e=>t(e)}}function Rr(t,e,n){if(e<2)throw new Error(`convertRadix: wrong from=${e}, base cannot be less than 2`);if(n<2)throw new Error(`convertRadix: wrong to=${n}, base cannot be less than 2`);if(!Array.isArray(t))throw new Error("convertRadix: data should be array");if(!t.length)return[];let r=0;const o=[],i=Array.from(t);for(i.forEach(a=>{if(se(a),a<0||a>=e)throw new Error(`Wrong integer: ${a}`)});;){let a=0,c=!0;for(let s=r;se?Ao(e,t%e):t,Pe=(t,e)=>t+(e-Ao(t,e));function Tn(t,e,n,r){if(!Array.isArray(t))throw new Error("convertRadix2: data should be array");if(e<=0||e>32)throw new Error(`convertRadix2: wrong from=${e}`);if(n<=0||n>32)throw new Error(`convertRadix2: wrong to=${n}`);if(Pe(e,n)>32)throw new Error(`convertRadix2: carry overflow from=${e} to=${n} carryBits=${Pe(e,n)}`);let o=0,i=0;const a=2**n-1,c=[];for(const s of t){if(se(s),s>=2**e)throw new Error(`convertRadix2: invalid data word=${s} from=${e}`);if(o=o<32)throw new Error(`convertRadix2: carry overflow pos=${i} from=${e}`);for(i+=e;i>=n;i-=n)c.push((o>>i-n&a)>>>0);o&=2**i-1}if(o=o<=e)throw new Error("Excess padding");if(!r&&o)throw new Error(`Non-zero padding: ${o}`);return r&&i>0&&c.push(o>>>0),c}function aa(t){return se(t),{encode:e=>{if(!(e instanceof Uint8Array))throw new Error("radix.encode input should be Uint8Array");return Rr(Array.from(e),2**8,t)},decode:e=>{if(!Array.isArray(e)||e.length&&typeof e[0]!="number")throw new Error("radix.decode input should be array of strings");return Uint8Array.from(Rr(e,t,2**8))}}}function Ft(t,e=!1){if(se(t),t<=0||t>32)throw new Error("radix2: bits should be in (0..32]");if(Pe(8,t)>32||Pe(t,8)>32)throw new Error("radix2: carry overflow");return{encode:n=>{if(!(n instanceof Uint8Array))throw new Error("radix2.encode input should be Uint8Array");return Tn(Array.from(n),8,t,!e)},decode:n=>{if(!Array.isArray(n)||n.length&&typeof n[0]!="number")throw new Error("radix2.decode input should be array of strings");return Uint8Array.from(Tn(n,t,8,e))}}}function Or(t){if(typeof t!="function")throw new Error("unsafeWrapper fn should be function");return function(...e){try{return t.apply(null,e)}catch{}}}function ca(t,e){if(se(t),typeof e!="function")throw new Error("checksum fn should be function");return{encode(n){if(!(n instanceof Uint8Array))throw new Error("checksum.encode: input should be Uint8Array");const r=e(n).slice(0,t),o=new Uint8Array(n.length+t);return o.set(n),o.set(r,n.length),o},decode(n){if(!(n instanceof Uint8Array))throw new Error("checksum.decode: input should be Uint8Array");const r=n.slice(0,-t),o=e(r).slice(0,t),i=n.slice(-t);for(let a=0;at.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1")));const Lt=Bt(Ft(6),Ct("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),Fe(6),kt("")),da=Bt(Ft(6),Ct("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),Fe(6),kt("")),Yn=t=>Bt(aa(58),Ct(t),kt("")),qe=Yn("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");Yn("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ");Yn("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");const _r=[0,2,3,5,6,7,9,10,11],ua={encode(t){let e="";for(let n=0;nBt(ca(4,e=>t(t(e))),qe),Ln=Bt(Ct("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),kt("")),Dr=[996825010,642813549,513874426,1027748829,705979059];function ve(t){const e=t>>25;let n=(t&33554431)<<5;for(let r=0;r>r&1)===1&&(n^=Dr[r]);return n}function Kr(t,e,n=1){const r=t.length;let o=1;for(let i=0;i126)throw new Error(`Invalid prefix (${t})`);o=ve(o)^a>>5}o=ve(o);for(let i=0;ig)throw new TypeError(`Length ${p} exceeds limit ${g}`);return u=u.toLowerCase(),`${u}1${Ln.encode(f)}${Kr(u,f,e)}`}function c(u,f=90){if(typeof u!="string")throw new Error(`bech32.decode input should be string, not ${typeof u}`);if(u.length<8||f!==!1&&u.length>f)throw new TypeError(`Wrong string length: ${u.length} (${u}). Expected (8..${f})`);const g=u.toLowerCase();if(u!==g&&u!==u.toUpperCase())throw new Error("String must be lowercase or uppercase");u=g;const p=u.lastIndexOf("1");if(p===0||p===-1)throw new Error('Letter "1" must be present between prefix and data only');const y=u.slice(0,p),d=u.slice(p+1);if(d.length<6)throw new Error("Data must be at least 6 characters long");const h=Ln.decode(d).slice(0,-6),w=Kr(y,h,e);if(!d.endsWith(w))throw new Error(`Invalid checksum in ${u}: expected "${w}"`);return{prefix:y,words:h}}const s=Or(c);function l(u){const{prefix:f,words:g}=c(u,!1);return{prefix:f,words:g,bytes:r(g)}}return{encode:a,decode:c,decodeToBytes:l,decodeUnsafe:s,fromWords:r,fromWordsUnsafe:i,toWords:o}}const pe=So("bech32");So("bech32m");const pa={encode:t=>new TextDecoder().decode(t),decode:t=>new TextEncoder().encode(t)},ga=Bt(Ft(4),Ct("0123456789abcdef"),kt(""),Bo(t=>{if(typeof t!="string"||t.length%2)throw new TypeError(`hex.decode: expected string, got ${typeof t} with length ${t.length}`);return t.toLowerCase()})),ya={utf8:pa,hex:ga,base16:la,base32:fa,base64:Lt,base64url:da,base58:qe,base58xmr:ua};`${Object.keys(ya).join(", ")}`;function un(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`positive integer expected, not ${t}`)}function Pr(t){if(typeof t!="boolean")throw new Error(`boolean expected, not ${t}`)}function wa(t){return t instanceof Uint8Array||t!=null&&typeof t=="object"&&t.constructor.name==="Uint8Array"}function $t(t,...e){if(!wa(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error(`Uint8Array expected of length ${e}, not of length=${t.length}`)}/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */const et=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),ba=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!ba)throw new Error("Non little-endian hardware is not supported");function ma(t,e){if(e==null||typeof e!="object")throw new Error("options must be defined");return Object.assign(t,e)}function Ea(t,e){if(t.length!==e.length)return!1;let n=0;for(let r=0;r(Object.assign(e,t),e),jt=16,va=283;function Jn(t){return t<<1^va&-(t>>7)}function fe(t,e){let n=0;for(;e>0;e>>=1)n^=t&-(e&1),t=Jn(t);return n}const Un=(()=>{let t=new Uint8Array(256);for(let n=0,r=1;n<256;n++,r^=Jn(r))t[n]=r;const e=new Uint8Array(256);e[0]=99;for(let n=0;n<255;n++){let r=t[255-n];r|=r<<8,e[t[n]]=(r^r>>4^r>>5^r>>6^r>>7^99)&255}return e})(),Ba=Un.map((t,e)=>Un.indexOf(e)),Aa=t=>t<<24|t>>>8,hn=t=>t<<8|t>>>24;function Io(t,e){if(t.length!==256)throw new Error("Wrong sbox length");const n=new Uint32Array(256).map((l,u)=>e(t[u])),r=n.map(hn),o=r.map(hn),i=o.map(hn),a=new Uint32Array(256*256),c=new Uint32Array(256*256),s=new Uint16Array(256*256);for(let l=0;l<256;l++)for(let u=0;u<256;u++){const f=l*256+u;a[f]=n[l]^r[u],c[f]=o[l]^i[u],s[f]=t[l]<<8|t[u]}return{sbox:t,sbox2:s,T0:n,T1:r,T2:o,T3:i,T01:a,T23:c}}const Xn=Io(Un,t=>fe(t,3)<<24|t<<16|t<<8|fe(t,2)),$o=Io(Ba,t=>fe(t,11)<<24|fe(t,13)<<16|fe(t,9)<<8|fe(t,14)),Sa=(()=>{const t=new Uint8Array(16);for(let e=0,n=1;e<16;e++,n=Jn(n))t[e]=n;return t})();function To(t){$t(t);const e=t.length;if(![16,24,32].includes(e))throw new Error(`aes: wrong key size: should be 16, 24 or 32, got: ${e}`);const{sbox2:n}=Xn,r=et(t),o=r.length,i=c=>vt(n,c,c,c,c),a=new Uint32Array(e+28);a.set(r);for(let c=o;c6&&c%o===4&&(s=i(s)),a[c]=a[c-o]^s}return a}function Ia(t){const e=To(t),n=e.slice(),r=e.length,{sbox2:o}=Xn,{T0:i,T1:a,T2:c,T3:s}=$o;for(let l=0;l>>8&255]^c[f>>>16&255]^s[f>>>24]}return n}function Mt(t,e,n,r,o,i){return t[n<<8&65280|r>>>8&255]^e[o>>>8&65280|i>>>24&255]}function vt(t,e,n,r,o){return t[e&255|n&65280]|t[r>>>16&255|o>>>16&65280]<<16}function qr(t,e,n,r,o){const{sbox2:i,T01:a,T23:c}=Xn;let s=0;e^=t[s++],n^=t[s++],r^=t[s++],o^=t[s++];const l=t.length/4-2;for(let y=0;y16)throw new Error(`aes/pcks5: wrong padding byte: ${r}`);const o=t.subarray(0,-r);for(let i=0;i{const c=To(e),{b:s,o:l,out:u}=La(i,o,a),f=et(n);let g=f[0],p=f[1],y=f[2],d=f[3],h=0;for(;h+4<=s.length;)g^=s[h+0],p^=s[h+1],y^=s[h+2],d^=s[h+3],{s0:g,s1:p,s2:y,s3:d}=qr(c,g,p,y,d),l[h++]=g,l[h++]=p,l[h++]=y,l[h++]=d;if(o){const w=Ca(i.subarray(h*4));g^=w[0],p^=w[1],y^=w[2],d^=w[3],{s0:g,s1:p,s2:y,s3:d}=qr(c,g,p,y,d),l[h++]=g,l[h++]=p,l[h++]=y,l[h++]=d}return c.fill(0),u},decrypt:(i,a)=>{Ta(i);const c=Ia(e),s=et(n),l=Lo(i.length,a),u=et(i),f=et(l);let g=s[0],p=s[1],y=s[2],d=s[3];for(let h=0;h+4<=u.length;){const w=g,v=p,x=y,$=d;g=u[h+0],p=u[h+1],y=u[h+2],d=u[h+3];const{s0:S,s1:E,s2:B,s3:A}=$a(c,g,p,y,d);f[h++]=S^w,f[h++]=E^v,f[h++]=B^x,f[h++]=A^$}return c.fill(0),Ua(l,o)}}}),Co=t=>Uint8Array.from(t.split("").map(e=>e.charCodeAt(0))),ka=Co("expand 16-byte k"),Na=Co("expand 32-byte k"),Ha=et(ka),ko=et(Na);ko.slice();function M(t,e){return t<>>32-e}function Cn(t){return t.byteOffset%4===0}const Le=64,Ra=16,No=2**32-1,Mr=new Uint32Array;function Oa(t,e,n,r,o,i,a,c){const s=o.length,l=new Uint8Array(Le),u=et(l),f=Cn(o)&&Cn(i),g=f?et(o):Mr,p=f?et(i):Mr;for(let y=0;y=No)throw new Error("arx: counter overflow");const d=Math.min(Le,s-y);if(f&&d===Le){const h=y/4;if(y%4!==0)throw new Error("arx: invalid block position");for(let w=0,v;w{$t(c),$t(s),$t(l);const g=l.length;if(u||(u=new Uint8Array(g)),$t(u),un(f),f<0||f>=No)throw new Error("arx: counter overflow");if(u.length0;)p.pop().fill(0);return u}}function Da(t,e,n,r,o,i=20){let a=t[0],c=t[1],s=t[2],l=t[3],u=e[0],f=e[1],g=e[2],p=e[3],y=e[4],d=e[5],h=e[6],w=e[7],v=o,x=n[0],$=n[1],S=n[2],E=a,B=c,A=s,N=l,U=u,T=f,H=g,R=p,P=y,b=d,m=h,I=w,C=v,L=x,k=$,D=S;for(let Z=0;Zo?e.create().update(r).digest():r);for(let a=0;anew Ro(t,e).update(n).digest();zt.create=(t,e)=>new Ro(t,e);function Ka(t,e,n){return ot.hash(t),zt(t,oe(n),oe(e))}const pn=new Uint8Array([0]),jr=new Uint8Array;function Pa(t,e,n,r=32){if(ot.hash(t),ot.number(r),r>255*t.outputLen)throw new Error("Length should be <= 255*HashLen");const o=Math.ceil(r/t.outputLen);n===void 0&&(n=jr);const i=new Uint8Array(o*t.outputLen),a=zt.create(t,e),c=a._cloneInto(),s=new Uint8Array(a.outputLen);for(let l=0;l{for(var n in e)qa(t,n,{get:e[n],enumerable:!0})},le=Symbol("verified"),Ma=t=>t instanceof Object;function Qn(t){if(!Ma(t)||typeof t.kind!="number"||typeof t.content!="string"||typeof t.created_at!="number"||typeof t.pubkey!="string"||!t.pubkey.match(/^[a-f0-9]{64}$/)||!Array.isArray(t.tags))return!1;for(let e=0;eZa,QueueNode:()=>Oo,binarySearch:()=>tr,insertEventIntoAscendingList:()=>Fa,insertEventIntoDescendingList:()=>za,normalizeURL:()=>Va,utf8Decoder:()=>Tt,utf8Encoder:()=>yt});var Tt=new TextDecoder("utf-8"),yt=new TextEncoder;function Va(t){t.indexOf("://")===-1&&(t="wss://"+t);let e=new URL(t);return e.pathname=e.pathname.replace(/\/+/g,"/"),e.pathname.endsWith("/")&&(e.pathname=e.pathname.slice(0,-1)),(e.port==="80"&&e.protocol==="ws:"||e.port==="443"&&e.protocol==="wss:")&&(e.port=""),e.searchParams.sort(),e.hash="",e.toString()}function za(t,e){const[n,r]=tr(t,o=>e.id===o.id?0:e.created_at===o.created_at?-1:o.created_at-e.created_at);return r||t.splice(n,0,e),t}function Fa(t,e){const[n,r]=tr(t,o=>e.id===o.id?0:e.created_at===o.created_at?-1:e.created_at-o.created_at);return r||t.splice(n,0,e),t}function tr(t,e){let n=0,r=t.length-1;for(;n<=r;){const o=Math.floor((n+r)/2),i=e(t[o]);if(i===0)return[o,!0];i<0?r=o-1:n=o+1}return[n,!1]}var Oo=class{constructor(t){q(this,"value");q(this,"next",null);q(this,"prev",null);this.value=t}},Za=class{constructor(){q(this,"first");q(this,"last");this.first=null,this.last=null}enqueue(t){const e=new Oo(t);return this.last?this.last===this.first?(this.last=e,this.last.prev=this.first,this.first.next=e):(e.prev=this.last,this.last.next=e,this.last=e):(this.first=e,this.last=e),!0}dequeue(){if(!this.first)return null;if(this.first===this.last){const e=this.first;return this.first=null,this.last=null,e.value}const t=this.first;return this.first=t.next,t.value}},Ga=class{generateSecretKey(){return xe.utils.randomPrivateKey()}getPublicKey(t){return Q(xe.getPublicKey(t))}finalizeEvent(t,e){const n=t;return n.pubkey=Q(xe.getPublicKey(e)),n.id=Re(n),n.sig=Q(xe.sign(Re(n),e)),n[le]=!0,n}verifyEvent(t){if(typeof t[le]=="boolean")return t[le];const e=Re(t);if(e!==t.id)return t[le]=!1,!1;try{const n=xe.verify(t.sig,e,t.pubkey);return t[le]=n,n}catch{return t[le]=!1,!1}}};function _o(t){if(!Qn(t))throw new Error("can't serialize event with wrong or missing properties");return JSON.stringify([0,t.pubkey,t.created_at,t.kind,t.tags,t.content])}function Re(t){let e=Ut(yt.encode(_o(t)));return Q(e)}var Ze=new Ga,Wa=Ze.generateSecretKey,Do=Ze.getPublicKey,wt=Ze.finalizeEvent,er=Ze.verifyEvent,Ya={};V(Ya,{Application:()=>Xc,BadgeAward:()=>ic,BadgeDefinition:()=>zc,BlockedRelaysList:()=>Lc,BookmarkList:()=>Ic,Bookmarksets:()=>Mc,Calendar:()=>il,CalendarEventRSVP:()=>sl,ChannelCreation:()=>Vo,ChannelHideMessage:()=>Zo,ChannelMessage:()=>Fo,ChannelMetadata:()=>zo,ChannelMuteUser:()=>Go,ClassifiedListing:()=>el,ClientAuth:()=>Yo,CommunitiesList:()=>$c,CommunityDefinition:()=>ll,CommunityPostApproval:()=>gc,Contacts:()=>nc,CreateOrUpdateProduct:()=>Gc,CreateOrUpdateStall:()=>Zc,Curationsets:()=>jc,Date:()=>rl,DirectMessageRelaysList:()=>Nc,DraftClassifiedListing:()=>nl,DraftLong:()=>Yc,Emojisets:()=>Jc,EncryptedDirectMessage:()=>rc,EventDeletion:()=>oc,FileMetadata:()=>lc,FileServerPreference:()=>Hc,Followsets:()=>Kc,GenericRepost:()=>ac,Genericlists:()=>Pc,GiftWrap:()=>Wo,HTTPAuth:()=>or,Handlerinformation:()=>cl,Handlerrecommendation:()=>al,Highlights:()=>vc,InterestsList:()=>Cc,Interestsets:()=>Fc,JobFeedback:()=>bc,JobRequest:()=>yc,JobResult:()=>wc,Label:()=>pc,LightningPubRPC:()=>Oc,LiveChatMessage:()=>fc,LiveEvent:()=>Qc,LongFormArticle:()=>Wc,Metadata:()=>Qa,Mutelist:()=>Bc,NWCWalletInfo:()=>Rc,NWCWalletRequest:()=>Jo,NWCWalletResponse:()=>_c,NostrConnect:()=>Dc,OpenTimestamps:()=>cc,Pinlist:()=>Ac,PrivateDirectMessage:()=>sc,ProblemTracker:()=>dc,ProfileBadges:()=>Vc,PublicChatsList:()=>Tc,Reaction:()=>rr,RecommendRelay:()=>ec,RelayList:()=>Sc,Relaysets:()=>qc,Report:()=>uc,Reporting:()=>hc,Repost:()=>nr,Seal:()=>jo,SearchRelaysList:()=>Uc,ShortTextNote:()=>tc,Time:()=>ol,UserEmojiList:()=>kc,UserStatuses:()=>tl,Zap:()=>xc,ZapGoal:()=>mc,ZapRequest:()=>Ec,classifyKind:()=>Ja,isEphemeralKind:()=>qo,isKind:()=>Xa,isParameterizedReplaceableKind:()=>Mo,isRegularKind:()=>Ko,isReplaceableKind:()=>Po});function Ko(t){return 1e3<=t&&t<1e4||[1,2,4,5,6,7,8,16,40,41,42,43,44].includes(t)}function Po(t){return[0,3].includes(t)||1e4<=t&&t<2e4}function qo(t){return 2e4<=t&&t<3e4}function Mo(t){return 3e4<=t&&t<4e4}function Ja(t){return Ko(t)?"regular":Po(t)?"replaceable":qo(t)?"ephemeral":Mo(t)?"parameterized":"unknown"}function Xa(t,e){const n=e instanceof Array?e:[e];return Qn(t)&&n.includes(t.kind)||!1}var Qa=0,tc=1,ec=2,nc=3,rc=4,oc=5,nr=6,rr=7,ic=8,jo=13,sc=14,ac=16,Vo=40,zo=41,Fo=42,Zo=43,Go=44,cc=1040,Wo=1059,lc=1063,fc=1311,dc=1971,uc=1984,hc=1984,pc=1985,gc=4550,yc=5999,wc=6999,bc=7e3,mc=9041,Ec=9734,xc=9735,vc=9802,Bc=1e4,Ac=10001,Sc=10002,Ic=10003,$c=10004,Tc=10005,Lc=10006,Uc=10007,Cc=10015,kc=10030,Nc=10050,Hc=10096,Rc=13194,Oc=21e3,Yo=22242,Jo=23194,_c=23195,Dc=24133,or=27235,Kc=3e4,Pc=30001,qc=30002,Mc=30003,jc=30004,Vc=30008,zc=30009,Fc=30015,Zc=30017,Gc=30018,Wc=30023,Yc=30024,Jc=30030,Xc=30078,Qc=30311,tl=30315,el=30402,nl=30403,rl=31922,ol=31923,il=31924,sl=31925,al=31989,cl=31990,ll=34550,fl={};V(fl,{getHex64:()=>ir,getInt:()=>Xo,getSubscriptionId:()=>dl,matchEventId:()=>ul,matchEventKind:()=>pl,matchEventPubkey:()=>hl});function ir(t,e){let n=e.length+3,r=t.indexOf(`"${e}":`)+n,o=t.slice(r).indexOf('"')+r+1;return t.slice(o,o+64)}function Xo(t,e){let n=e.length,r=t.indexOf(`"${e}":`)+n+3,o=t.slice(r),i=Math.min(o.indexOf(","),o.indexOf("}"));return parseInt(o.slice(0,i),10)}function dl(t){let e=t.slice(0,22).indexOf('"EVENT"');if(e===-1)return null;let n=t.slice(e+7+1).indexOf('"');if(n===-1)return null;let r=e+7+1+n,o=t.slice(r+1,80).indexOf('"');if(o===-1)return null;let i=r+1+o;return t.slice(r+1,i)}function ul(t,e){return e===ir(t,"id")}function hl(t,e){return e===ir(t,"pubkey")}function pl(t,e){return e===Xo(t,"kind")}var gl={};V(gl,{makeAuthEvent:()=>yl});function yl(t,e){return{kind:Yo,created_at:Math.floor(Date.now()/1e3),tags:[["relay",t],["challenge",e]],content:""}}var wl;try{wl=WebSocket}catch{}var bl;try{bl=WebSocket}catch{}var ml={};V(ml,{BECH32_REGEX:()=>Qo,Bech32MaxSize:()=>sr,NostrTypeGuard:()=>El,decode:()=>Ge,encodeBytes:()=>Ye,naddrEncode:()=>$l,neventEncode:()=>Il,noteEncode:()=>Al,nprofileEncode:()=>Sl,npubEncode:()=>Bl,nsecEncode:()=>vl});var El={isNProfile:t=>/^nprofile1[a-z\d]+$/.test(t||""),isNEvent:t=>/^nevent1[a-z\d]+$/.test(t||""),isNAddr:t=>/^naddr1[a-z\d]+$/.test(t||""),isNSec:t=>/^nsec1[a-z\d]{58}$/.test(t||""),isNPub:t=>/^npub1[a-z\d]{58}$/.test(t||""),isNote:t=>/^note1[a-z\d]+$/.test(t||""),isNcryptsec:t=>/^ncryptsec1[a-z\d]+$/.test(t||"")},sr=5e3,Qo=/[\x21-\x7E]{1,83}1[023456789acdefghjklmnpqrstuvwxyz]{6,}/;function xl(t){const e=new Uint8Array(4);return e[0]=t>>24&255,e[1]=t>>16&255,e[2]=t>>8&255,e[3]=t&255,e}function Ge(t){var o,i,a,c,s,l,u;let{prefix:e,words:n}=pe.decode(t,sr),r=new Uint8Array(pe.fromWords(n));switch(e){case"nprofile":{let f=gn(r);if(!((o=f[0])!=null&&o[0]))throw new Error("missing TLV 0 for nprofile");if(f[0][0].length!==32)throw new Error("TLV 0 should be 32 bytes");return{type:"nprofile",data:{pubkey:Q(f[0][0]),relays:f[1]?f[1].map(g=>Tt.decode(g)):[]}}}case"nevent":{let f=gn(r);if(!((i=f[0])!=null&&i[0]))throw new Error("missing TLV 0 for nevent");if(f[0][0].length!==32)throw new Error("TLV 0 should be 32 bytes");if(f[2]&&f[2][0].length!==32)throw new Error("TLV 2 should be 32 bytes");if(f[3]&&f[3][0].length!==4)throw new Error("TLV 3 should be 4 bytes");return{type:"nevent",data:{id:Q(f[0][0]),relays:f[1]?f[1].map(g=>Tt.decode(g)):[],author:(a=f[2])!=null&&a[0]?Q(f[2][0]):void 0,kind:(c=f[3])!=null&&c[0]?parseInt(Q(f[3][0]),16):void 0}}}case"naddr":{let f=gn(r);if(!((s=f[0])!=null&&s[0]))throw new Error("missing TLV 0 for naddr");if(!((l=f[2])!=null&&l[0]))throw new Error("missing TLV 2 for naddr");if(f[2][0].length!==32)throw new Error("TLV 2 should be 32 bytes");if(!((u=f[3])!=null&&u[0]))throw new Error("missing TLV 3 for naddr");if(f[3][0].length!==4)throw new Error("TLV 3 should be 4 bytes");return{type:"naddr",data:{identifier:Tt.decode(f[0][0]),pubkey:Q(f[2][0]),kind:parseInt(Q(f[3][0]),16),relays:f[1]?f[1].map(g=>Tt.decode(g)):[]}}}case"nsec":return{type:e,data:r};case"npub":case"note":return{type:e,data:Q(r)};default:throw new Error(`unknown prefix ${e}`)}}function gn(t){let e={},n=t;for(;n.length>0;){let r=n[0],o=n[1],i=n.slice(2,2+o);if(n=n.slice(2+o),i.lengthyt.encode(n))});return We("nprofile",e)}function Il(t){let e;t.kind!==void 0&&(e=xl(t.kind));let n=ar({0:[re(t.id)],1:(t.relays||[]).map(r=>yt.encode(r)),2:t.author?[re(t.author)]:[],3:e?[new Uint8Array(e)]:[]});return We("nevent",n)}function $l(t){let e=new ArrayBuffer(4);new DataView(e).setUint32(0,t.kind,!1);let n=ar({0:[yt.encode(t.identifier)],1:(t.relays||[]).map(r=>yt.encode(r)),2:[re(t.pubkey)],3:[new Uint8Array(e)]});return We("naddr",n)}function ar(t){let e=[];return Object.entries(t).reverse().forEach(([n,r])=>{r.forEach(o=>{let i=new Uint8Array(o.length+2);i.set([parseInt(n)],0),i.set([o.length],1),i.set(o,2),e.push(i)})}),It(...e)}var Tl={};V(Tl,{decrypt:()=>Ll,encrypt:()=>ti});async function ti(t,e,n){const r=t instanceof Uint8Array?Q(t):t,o=we.getSharedSecret(r,"02"+e),i=ei(o);let a=Uint8Array.from(Gn(16)),c=yt.encode(n),s=Uo(i,a).encrypt(c),l=Lt.encode(new Uint8Array(s)),u=Lt.encode(new Uint8Array(a.buffer));return`${l}?iv=${u}`}async function Ll(t,e,n){const r=t instanceof Uint8Array?Q(t):t;let[o,i]=n.split("?iv="),a=we.getSharedSecret(r,"02"+e),c=ei(a),s=Lt.decode(i),l=Lt.decode(o),u=Uo(c,s).decrypt(l);return Tt.decode(u)}function ei(t){return t.slice(1,33)}var Ul={};V(Ul,{NIP05_REGEX:()=>cr,isNip05:()=>Cl,isValid:()=>Hl,queryProfile:()=>ni,searchDomain:()=>Nl,useFetchImplementation:()=>kl});var cr=/^(?:([\w.+-]+)@)?([\w_-]+(\.[\w_-]+)+)$/,Cl=t=>cr.test(t||""),Je;try{Je=fetch}catch{}function kl(t){Je=t}async function Nl(t,e=""){try{const n=`https://${t}/.well-known/nostr.json?name=${e}`,r=await Je(n,{redirect:"manual"});if(r.status!==200)throw Error("Wrong response code");return(await r.json()).names}catch{return{}}}async function ni(t){var o;const e=t.match(cr);if(!e)return null;const[,n="_",r]=e;try{const i=`https://${r}/.well-known/nostr.json?name=${n}`,a=await Je(i,{redirect:"manual"});if(a.status!==200)throw Error("Wrong response code");const c=await a.json(),s=c.names[n];return s?{pubkey:s,relays:(o=c.relays)==null?void 0:o[s]}:null}catch{return null}}async function Hl(t,e){const n=await ni(e);return n?n.pubkey===t:!1}var Rl={};V(Rl,{parse:()=>Ol});function Ol(t){const e={reply:void 0,root:void 0,mentions:[],profiles:[],quotes:[]};let n,r;for(let o=t.tags.length-1;o>=0;o--){const i=t.tags[o];if(i[0]==="e"&&i[1]){const[a,c,s,l,u]=i,f={id:c,relays:s?[s]:[],author:u};if(l==="root"){e.root=f;continue}if(l==="reply"){e.reply=f;continue}if(l==="mention"){e.mentions.push(f);continue}n?r=f:n=f,e.mentions.push(f);continue}if(i[0]==="q"&&i[1]){const[a,c,s]=i;e.quotes.push({id:c,relays:s?[s]:[]})}if(i[0]==="p"&&i[1]){e.profiles.push({pubkey:i[1],relays:i[2]?[i[2]]:[]});continue}}return e.root||(e.root=r||n||e.reply),e.reply||(e.reply=n||e.root),[e.reply,e.root].forEach(o=>{if(!o)return;let i=e.mentions.indexOf(o);if(i!==-1&&e.mentions.splice(i,1),o.author){let a=e.profiles.find(c=>c.pubkey===o.author);a&&a.relays&&(o.relays||(o.relays=[]),a.relays.forEach(c=>{var s;((s=o.relays)==null?void 0:s.indexOf(c))===-1&&o.relays.push(c)}),a.relays=o.relays)}}),e.mentions.forEach(o=>{if(o.author){let i=e.profiles.find(a=>a.pubkey===o.author);i&&i.relays&&(o.relays||(o.relays=[]),i.relays.forEach(a=>{o.relays.indexOf(a)===-1&&o.relays.push(a)}),i.relays=o.relays)}}),e}var _l={};V(_l,{fetchRelayInformation:()=>Kl,useFetchImplementation:()=>Dl});var ri;try{ri=fetch}catch{}function Dl(t){ri=t}async function Kl(t){return await(await fetch(t.replace("ws://","http://").replace("wss://","https://"),{headers:{Accept:"application/nostr+json"}})).json()}var Pl={};V(Pl,{fastEventHash:()=>ii,getPow:()=>oi,minePow:()=>ql});function oi(t){let e=0;for(let n=0;n<64;n+=8){const r=parseInt(t.substring(n,n+8),16);if(r===0)e+=32;else{e+=Math.clz32(r);break}}return e}function ql(t,e){let n=0;const r=t,o=["nonce",n.toString(),e.toString()];for(r.tags.push(o);;){const i=Math.floor(new Date().getTime()/1e3);if(i!==r.created_at&&(n=0,r.created_at=i),o[1]=(++n).toString(),r.id=ii(r),oi(r.id)>=e)break}return r}function ii(t){return Q(Ut(yt.encode(JSON.stringify([0,t.pubkey,t.created_at,t.kind,t.tags,t.content]))))}var Ml={};V(Ml,{finishRepostEvent:()=>jl,getRepostedEvent:()=>Vl,getRepostedEventPointer:()=>si});function jl(t,e,n,r){return wt({kind:nr,tags:[...t.tags??[],["e",e.id,n],["p",e.pubkey]],content:t.content===""?"":JSON.stringify(e),created_at:t.created_at},r)}function si(t){if(t.kind!==nr)return;let e,n;for(let r=t.tags.length-1;r>=0&&(e===void 0||n===void 0);r--){const o=t.tags[r];o.length>=2&&(o[0]==="e"&&e===void 0?e=o:o[0]==="p"&&n===void 0&&(n=o))}if(e!==void 0)return{id:e[1],relays:[e[2],n==null?void 0:n[2]].filter(r=>typeof r=="string"),author:n==null?void 0:n[1]}}function Vl(t,{skipVerification:e}={}){const n=si(t);if(n===void 0||t.content==="")return;let r;try{r=JSON.parse(t.content)}catch{return}if(r.id===n.id&&!(!e&&!er(r)))return r}var zl={};V(zl,{NOSTR_URI_REGEX:()=>Xe,parse:()=>Zl,test:()=>Fl});var Xe=new RegExp(`nostr:(${Qo.source})`);function Fl(t){return typeof t=="string"&&new RegExp(`^${Xe.source}$`).test(t)}function Zl(t){const e=t.match(new RegExp(`^${Xe.source}$`));if(!e)throw new Error(`Invalid Nostr URI: ${t}`);return{uri:e[0],value:e[1],decoded:Ge(e[1])}}var Gl={};V(Gl,{finishReactionEvent:()=>Wl,getReactedEventPointer:()=>Yl});function Wl(t,e,n){const r=e.tags.filter(o=>o.length>=2&&(o[0]==="e"||o[0]==="p"));return wt({...t,kind:rr,tags:[...t.tags??[],...r,["e",e.id],["p",e.pubkey]],content:t.content??"+"},n)}function Yl(t){if(t.kind!==rr)return;let e,n;for(let r=t.tags.length-1;r>=0&&(e===void 0||n===void 0);r--){const o=t.tags[r];o.length>=2&&(o[0]==="e"&&e===void 0?e=o:o[0]==="p"&&n===void 0&&(n=o))}if(!(e===void 0||n===void 0))return{id:e[1],relays:[e[2],n[2]].filter(r=>r!==void 0),author:n[1]}}var Jl={};V(Jl,{matchAll:()=>Xl,regex:()=>lr,replaceAll:()=>Ql});var lr=()=>new RegExp(`\\b${Xe.source}\\b`,"g");function*Xl(t){const e=t.matchAll(lr());for(const n of e)try{const[r,o]=n;yield{uri:r,value:o,decoded:Ge(o),start:n.index,end:n.index+r.length}}catch{}}function Ql(t,e){return t.replaceAll(lr(),(n,r)=>e({uri:n,value:r,decoded:Ge(r)}))}var tf={};V(tf,{channelCreateEvent:()=>ef,channelHideMessageEvent:()=>of,channelMessageEvent:()=>rf,channelMetadataEvent:()=>nf,channelMuteUserEvent:()=>sf});var ef=(t,e)=>{let n;if(typeof t.content=="object")n=JSON.stringify(t.content);else if(typeof t.content=="string")n=t.content;else return;return wt({kind:Vo,tags:[...t.tags??[]],content:n,created_at:t.created_at},e)},nf=(t,e)=>{let n;if(typeof t.content=="object")n=JSON.stringify(t.content);else if(typeof t.content=="string")n=t.content;else return;return wt({kind:zo,tags:[["e",t.channel_create_event_id],...t.tags??[]],content:n,created_at:t.created_at},e)},rf=(t,e)=>{const n=[["e",t.channel_create_event_id,t.relay_url,"root"]];return t.reply_to_channel_message_event_id&&n.push(["e",t.reply_to_channel_message_event_id,t.relay_url,"reply"]),wt({kind:Fo,tags:[...n,...t.tags??[]],content:t.content,created_at:t.created_at},e)},of=(t,e)=>{let n;if(typeof t.content=="object")n=JSON.stringify(t.content);else if(typeof t.content=="string")n=t.content;else return;return wt({kind:Zo,tags:[["e",t.channel_message_event_id],...t.tags??[]],content:n,created_at:t.created_at},e)},sf=(t,e)=>{let n;if(typeof t.content=="object")n=JSON.stringify(t.content);else if(typeof t.content=="string")n=t.content;else return;return wt({kind:Go,tags:[["p",t.pubkey_to_mute],...t.tags??[]],content:n,created_at:t.created_at},e)},af={};V(af,{EMOJI_SHORTCODE_REGEX:()=>ai,matchAll:()=>cf,regex:()=>fr,replaceAll:()=>lf});var ai=/:(\w+):/,fr=()=>new RegExp(`\\B${ai.source}\\B`,"g");function*cf(t){const e=t.matchAll(fr());for(const n of e)try{const[r,o]=n;yield{shortcode:r,name:o,start:n.index,end:n.index+r.length}}catch{}}function lf(t,e){return t.replaceAll(fr(),(n,r)=>e({shortcode:n,name:r}))}var ff={};V(ff,{useFetchImplementation:()=>df,validateGithub:()=>uf});var dr;try{dr=fetch}catch{}function df(t){dr=t}async function uf(t,e,n){try{return await(await dr(`https://gist.github.com/${e}/${n}/raw`)).text()===`Verifying that I control the following Nostr public key: ${t}`}catch{return!1}}var hf={};V(hf,{decrypt:()=>gr,encrypt:()=>pr,getConversationKey:()=>ur,v2:()=>bf});var ci=1,li=65535;function ur(t,e){const n=we.getSharedSecret(t,"02"+e).subarray(1,33);return Ka(Ut,n,"nip44-v2")}function fi(t,e){const n=Pa(Ut,t,e,76);return{chacha_key:n.subarray(0,32),chacha_nonce:n.subarray(32,44),hmac_key:n.subarray(44,76)}}function hr(t){if(!Number.isSafeInteger(t)||t<1)throw new Error("expected positive integer");if(t<=32)return 32;const e=1<li)throw new Error("invalid plaintext size: must be between 1 and 65535 bytes");const e=new Uint8Array(2);return new DataView(e.buffer).setUint16(0,t,!1),e}function gf(t){const e=yt.encode(t),n=e.length,r=pf(n),o=new Uint8Array(hr(n)-n);return It(r,e,o)}function yf(t){const e=new DataView(t.buffer).getUint16(0),n=t.subarray(2,2+e);if(eli||n.length!==e||t.length!==2+hr(e))throw new Error("invalid padding");return Tt.decode(n)}function di(t,e,n){if(n.length!==32)throw new Error("AAD associated data must be 32 bytes");const r=It(n,e);return zt(Ut,t,r)}function wf(t){if(typeof t!="string")throw new Error("payload must be a valid string");const e=t.length;if(e<132||e>87472)throw new Error("invalid payload length: "+e);if(t[0]==="#")throw new Error("unknown encryption version");let n;try{n=Lt.decode(t)}catch(i){throw new Error("invalid base64: "+i.message)}const r=n.length;if(r<99||r>65603)throw new Error("invalid data length: "+r);const o=n[0];if(o!==2)throw new Error("unknown encryption version "+o);return{nonce:n.subarray(1,33),ciphertext:n.subarray(33,-32),mac:n.subarray(-32)}}function pr(t,e,n=Gn(32)){const{chacha_key:r,chacha_nonce:o,hmac_key:i}=fi(e,n),a=gf(t),c=Ho(r,o,a),s=di(i,c,n);return Lt.encode(It(new Uint8Array([2]),n,c,s))}function gr(t,e){const{nonce:n,ciphertext:r,mac:o}=wf(t),{chacha_key:i,chacha_nonce:a,hmac_key:c}=fi(e,n),s=di(c,r,n);if(!Ea(s,o))throw new Error("invalid MAC");const l=Ho(i,a,r);return yf(l)}var bf={utils:{getConversationKey:ur,calcPaddedLen:hr},encrypt:pr,decrypt:gr},mf={};V(mf,{makeNwcRequestEvent:()=>xf,parseConnectionString:()=>Ef});function Ef(t){const{pathname:e,searchParams:n}=new URL(t),r=e,o=n.get("relay"),i=n.get("secret");if(!r||!o||!i)throw new Error("invalid connection string");return{pubkey:r,relay:o,secret:i}}async function xf(t,e,n){const o=await ti(e,t,JSON.stringify({method:"pay_invoice",params:{invoice:n}})),i={kind:Jo,created_at:Math.round(Date.now()/1e3),content:o,tags:[["p",t]]};return wt(i,e)}var vf={};V(vf,{getZapEndpoint:()=>Af,makeZapReceipt:()=>$f,makeZapRequest:()=>Sf,useFetchImplementation:()=>Bf,validateZapRequest:()=>If});var yr;try{yr=fetch}catch{}function Bf(t){yr=t}async function Af(t){try{let e="",{lud06:n,lud16:r}=JSON.parse(t.content);if(n){let{words:a}=pe.decode(n,1e3),c=pe.fromWords(a);e=Tt.decode(c)}else if(r){let[a,c]=r.split("@");e=new URL(`/.well-known/lnurlp/${a}`,`https://${c}`).toString()}else return null;let i=await(await yr(e)).json();if(i.allowsNostr&&i.nostrPubkey)return i.callback}catch{}return null}function Sf({profile:t,event:e,amount:n,relays:r,comment:o=""}){if(!n)throw new Error("amount not given");if(!t)throw new Error("profile not given");let i={kind:9734,created_at:Math.round(Date.now()/1e3),content:o,tags:[["p",t],["amount",n.toString()],["relays",...r]]};return e&&i.tags.push(["e",e]),i}function If(t){let e;try{e=JSON.parse(t)}catch{return"Invalid zap request JSON."}if(!Qn(e))return"Zap request is not a valid Nostr event.";if(!er(e))return"Invalid signature on zap request.";let n=e.tags.find(([i,a])=>i==="p"&&a);if(!n)return"Zap request doesn't have a 'p' tag.";if(!n[1].match(/^[a-f0-9]{64}$/))return"Zap request 'p' tag is not valid hex.";let r=e.tags.find(([i,a])=>i==="e"&&a);return r&&!r[1].match(/^[a-f0-9]{64}$/)?"Zap request 'e' tag is not valid hex.":e.tags.find(([i,a])=>i==="relays"&&a)?null:"Zap request doesn't have a 'relays' tag."}function $f({zapRequest:t,preimage:e,bolt11:n,paidAt:r}){let o=JSON.parse(t),i=o.tags.filter(([c])=>c==="e"||c==="p"||c==="a"),a={kind:9735,created_at:Math.round(r.getTime()/1e3),content:"",tags:[...i,["P",o.pubkey],["bolt11",n],["description",t]]};return e&&a.tags.push(["preimage",e]),a}var Tf={};V(Tf,{createRumor:()=>yi,createSeal:()=>wi,createWrap:()=>bi,unwrapEvent:()=>mi,unwrapManyEvents:()=>Cf,wrapEvent:()=>kn,wrapManyEvents:()=>Uf});var Lf=2*24*60*60,ui=()=>Math.round(Date.now()/1e3),hi=()=>Math.round(ui()-Math.random()*Lf),pi=(t,e)=>ur(t,e),gi=(t,e,n)=>pr(JSON.stringify(t),pi(e,n)),Vr=(t,e)=>JSON.parse(gr(t.content,pi(e,t.pubkey)));function yi(t,e){const n={created_at:ui(),content:"",tags:[],...t,pubkey:Do(e)};return n.id=Re(n),n}function wi(t,e,n){return wt({kind:jo,content:gi(t,e,n),created_at:hi(),tags:[]},e)}function bi(t,e){const n=Wa();return wt({kind:Wo,content:gi(t,n,e),created_at:hi(),tags:[["p",e]]},n)}function kn(t,e,n){const r=yi(t,e),o=wi(r,e,n);return bi(o,n)}function Uf(t,e,n){if(!n||n.length===0)throw new Error("At least one recipient is required.");const r=Do(e),o=[kn(t,e,r)];return n.forEach(i=>{o.push(kn(t,e,i))}),o}function mi(t,e){const n=Vr(t,e);return Vr(n,e)}function Cf(t,e){let n=[];return t.forEach(r=>{n.push(mi(r,e))}),n.sort((r,o)=>r.created_at-o.created_at),n}var kf={};V(kf,{getToken:()=>Nf,hashPayload:()=>wr,unpackEventFromToken:()=>xi,validateEvent:()=>$i,validateEventKind:()=>Bi,validateEventMethodTag:()=>Si,validateEventPayloadTag:()=>Ii,validateEventTimestamp:()=>vi,validateEventUrlTag:()=>Ai,validateToken:()=>Hf});var Ei="Nostr ";async function Nf(t,e,n,r=!1,o){const i={kind:or,tags:[["u",t],["method",e]],created_at:Math.round(new Date().getTime()/1e3),content:""};o&&i.tags.push(["payload",wr(o)]);const a=await n(i);return(r?Ei:"")+Lt.encode(yt.encode(JSON.stringify(a)))}async function Hf(t,e,n){const r=await xi(t).catch(i=>{throw i});return await $i(r,e,n).catch(i=>{throw i})}async function xi(t){if(!t)throw new Error("Missing token");t=t.replace(Ei,"");const e=Tt.decode(Lt.decode(t));if(!e||e.length===0||!e.startsWith("{"))throw new Error("Invalid token");return JSON.parse(e)}function vi(t){return t.created_at?Math.round(new Date().getTime()/1e3)-t.created_at<60:!1}function Bi(t){return t.kind===or}function Ai(t,e){const n=t.tags.find(r=>r[0]==="u");return n?n.length>0&&n[1]===e:!1}function Si(t,e){const n=t.tags.find(r=>r[0]==="method");return n?n.length>0&&n[1].toLowerCase()===e.toLowerCase():!1}function wr(t){const e=Ut(yt.encode(JSON.stringify(t)));return Q(e)}function Ii(t,e){const n=t.tags.find(o=>o[0]==="payload");if(!n)return!1;const r=wr(e);return n.length>0&&n[1]===r}async function $i(t,e,n,r){if(!er(t))throw new Error("Invalid nostr event, signature invalid");if(!Bi(t))throw new Error("Invalid nostr event, kind invalid");if(!vi(t))throw new Error("Invalid nostr event, created_at timestamp invalid");if(!Ai(t,e))throw new Error("Invalid nostr event, url tag invalid");if(!Si(t,n))throw new Error("Invalid nostr event, method tag invalid");if(r&&typeof r=="object"&&Object.keys(r).length>0&&!Ii(t,r))throw new Error("Invalid nostr event, payload tag does not match request body hash");return!0}function Rf(t,e,n,r){ot.hash(t);const o=Js({dkLen:32,asyncTick:10},r),{c:i,dkLen:a,asyncTick:c}=o;if(ot.number(i),ot.number(a),ot.number(c),i<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const s=oe(e),l=oe(n),u=new Uint8Array(a),f=zt.create(t,s),g=f._cloneInto().update(l);return{c:i,dkLen:a,asyncTick:c,DK:u,PRF:f,PRFSalt:g}}function Of(t,e,n,r,o){return t.destroy(),e.destroy(),r&&r.destroy(),o.fill(0),n}function _f(t,e,n,r){const{c:o,dkLen:i,DK:a,PRF:c,PRFSalt:s}=Rf(t,e,n,r);let l;const u=new Uint8Array(4),f=te(u),g=new Uint8Array(c.outputLen);for(let p=1,y=0;y>Nn&Ue)}:{h:Number(t>>Nn&Ue)|0,l:Number(t&Ue)|0}}function Df(t,e=!1){let n=new Uint32Array(t.length),r=new Uint32Array(t.length);for(let o=0;oBigInt(t>>>0)<>>0),Pf=(t,e,n)=>t>>>n,qf=(t,e,n)=>t<<32-n|e>>>n,Mf=(t,e,n)=>t>>>n|e<<32-n,jf=(t,e,n)=>t<<32-n|e>>>n,Vf=(t,e,n)=>t<<64-n|e>>>n-32,zf=(t,e,n)=>t>>>n-32|e<<64-n,Ff=(t,e)=>e,Zf=(t,e)=>t,Gf=(t,e,n)=>t<>>32-n,Wf=(t,e,n)=>e<>>32-n,Yf=(t,e,n)=>e<>>64-n,Jf=(t,e,n)=>t<>>64-n;function Xf(t,e,n,r){const o=(e>>>0)+(r>>>0);return{h:t+n+(o/2**32|0)|0,l:o|0}}const Qf=(t,e,n)=>(t>>>0)+(e>>>0)+(n>>>0),td=(t,e,n,r)=>e+n+r+(t/2**32|0)|0,ed=(t,e,n,r)=>(t>>>0)+(e>>>0)+(n>>>0)+(r>>>0),nd=(t,e,n,r,o)=>e+n+r+o+(t/2**32|0)|0,rd=(t,e,n,r,o)=>(t>>>0)+(e>>>0)+(n>>>0)+(r>>>0)+(o>>>0),od=(t,e,n,r,o,i)=>e+n+r+o+i+(t/2**32|0)|0,K={fromBig:Ti,split:Df,toBig:Kf,shrSH:Pf,shrSL:qf,rotrSH:Mf,rotrSL:jf,rotrBH:Vf,rotrBL:zf,rotr32H:Ff,rotr32L:Zf,rotlSH:Gf,rotlSL:Wf,rotlBH:Yf,rotlBL:Jf,add:Xf,add3L:Qf,add3H:td,add4L:ed,add4H:nd,add5H:od,add5L:rd},[id,sd]=K.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))),Kt=new Uint32Array(80),Pt=new Uint32Array(80);class Qe extends Wn{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:n,Bh:r,Bl:o,Ch:i,Cl:a,Dh:c,Dl:s,Eh:l,El:u,Fh:f,Fl:g,Gh:p,Gl:y,Hh:d,Hl:h}=this;return[e,n,r,o,i,a,c,s,l,u,f,g,p,y,d,h]}set(e,n,r,o,i,a,c,s,l,u,f,g,p,y,d,h){this.Ah=e|0,this.Al=n|0,this.Bh=r|0,this.Bl=o|0,this.Ch=i|0,this.Cl=a|0,this.Dh=c|0,this.Dl=s|0,this.Eh=l|0,this.El=u|0,this.Fh=f|0,this.Fl=g|0,this.Gh=p|0,this.Gl=y|0,this.Hh=d|0,this.Hl=h|0}process(e,n){for(let x=0;x<16;x++,n+=4)Kt[x]=e.getUint32(n),Pt[x]=e.getUint32(n+=4);for(let x=16;x<80;x++){const $=Kt[x-15]|0,S=Pt[x-15]|0,E=K.rotrSH($,S,1)^K.rotrSH($,S,8)^K.shrSH($,S,7),B=K.rotrSL($,S,1)^K.rotrSL($,S,8)^K.shrSL($,S,7),A=Kt[x-2]|0,N=Pt[x-2]|0,U=K.rotrSH(A,N,19)^K.rotrBH(A,N,61)^K.shrSH(A,N,6),T=K.rotrSL(A,N,19)^K.rotrBL(A,N,61)^K.shrSL(A,N,6),H=K.add4L(B,T,Pt[x-7],Pt[x-16]),R=K.add4H(H,E,U,Kt[x-7],Kt[x-16]);Kt[x]=R|0,Pt[x]=H|0}let{Ah:r,Al:o,Bh:i,Bl:a,Ch:c,Cl:s,Dh:l,Dl:u,Eh:f,El:g,Fh:p,Fl:y,Gh:d,Gl:h,Hh:w,Hl:v}=this;for(let x=0;x<80;x++){const $=K.rotrSH(f,g,14)^K.rotrSH(f,g,18)^K.rotrBH(f,g,41),S=K.rotrSL(f,g,14)^K.rotrSL(f,g,18)^K.rotrBL(f,g,41),E=f&p^~f&d,B=g&y^~g&h,A=K.add5L(v,S,B,sd[x],Pt[x]),N=K.add5H(A,w,$,E,id[x],Kt[x]),U=A|0,T=K.rotrSH(r,o,28)^K.rotrBH(r,o,34)^K.rotrBH(r,o,39),H=K.rotrSL(r,o,28)^K.rotrBL(r,o,34)^K.rotrBL(r,o,39),R=r&i^r&c^i&c,P=o&a^o&s^a&s;w=d|0,v=h|0,d=p|0,h=y|0,p=f|0,y=g|0,{h:f,l:g}=K.add(l|0,u|0,N|0,U|0),l=c|0,u=s|0,c=i|0,s=a|0,i=r|0,a=o|0;const b=K.add3L(U,H,P);r=K.add3H(b,N,T,R),o=b|0}({h:r,l:o}=K.add(this.Ah|0,this.Al|0,r|0,o|0)),{h:i,l:a}=K.add(this.Bh|0,this.Bl|0,i|0,a|0),{h:c,l:s}=K.add(this.Ch|0,this.Cl|0,c|0,s|0),{h:l,l:u}=K.add(this.Dh|0,this.Dl|0,l|0,u|0),{h:f,l:g}=K.add(this.Eh|0,this.El|0,f|0,g|0),{h:p,l:y}=K.add(this.Fh|0,this.Fl|0,p|0,y|0),{h:d,l:h}=K.add(this.Gh|0,this.Gl|0,d|0,h|0),{h:w,l:v}=K.add(this.Hh|0,this.Hl|0,w|0,v|0),this.set(r,o,i,a,c,s,l,u,f,g,p,y,d,h,w,v)}roundClean(){Kt.fill(0),Pt.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class ad extends Qe{constructor(){super(),this.Ah=-1942145080,this.Al=424955298,this.Bh=1944164710,this.Bl=-1982016298,this.Ch=502970286,this.Cl=855612546,this.Dh=1738396948,this.Dl=1479516111,this.Eh=258812777,this.El=2077511080,this.Fh=2011393907,this.Fl=79989058,this.Gh=1067287976,this.Gl=1780299464,this.Hh=286451373,this.Hl=-1848208735,this.outputLen=28}}class cd extends Qe{constructor(){super(),this.Ah=573645204,this.Al=-64227540,this.Bh=-1621794909,this.Bl=-934517566,this.Ch=596883563,this.Cl=1867755857,this.Dh=-1774684391,this.Dl=1497426621,this.Eh=-1775747358,this.El=-1467023389,this.Fh=-1101128155,this.Fl=1401305490,this.Gh=721525244,this.Gl=746961066,this.Hh=246885852,this.Hl=-2117784414,this.outputLen=32}}class ld extends Qe{constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}}const Hn=ie(()=>new Qe);ie(()=>new ad);ie(()=>new cd);ie(()=>new ld);function Li(t){if(typeof t!="string")throw new TypeError(`Invalid mnemonic type: ${typeof t}`);return t.normalize("NFKD")}function fd(t){const e=Li(t),n=e.split(" ");if(![12,15,18,21,24].includes(n.length))throw new Error("Invalid mnemonic");return{nfkd:e,words:n}}const dd=t=>Li(`mnemonic${t}`);function ud(t,e=""){return _f(Hn,fd(t).nfkd,dd(e),{c:2048,dkLen:64})}const hd=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),Ui=Uint8Array.from({length:16},(t,e)=>e),pd=Ui.map(t=>(9*t+5)%16);let br=[Ui],mr=[pd];for(let t=0;t<4;t++)for(let e of[br,mr])e.push(e[t].map(n=>hd[n]));const Ci=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(t=>new Uint8Array(t)),gd=br.map((t,e)=>t.map(n=>Ci[e][n])),yd=mr.map((t,e)=>t.map(n=>Ci[e][n])),wd=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),bd=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),Ce=(t,e)=>t<>>32-e;function zr(t,e,n,r){return t===0?e^n^r:t===1?e&n|~e&r:t===2?(e|~n)^r:t===3?e&r|n&~r:e^(n|~r)}const ke=new Uint32Array(16);class md extends Wn{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:n,h2:r,h3:o,h4:i}=this;return[e,n,r,o,i]}set(e,n,r,o,i){this.h0=e|0,this.h1=n|0,this.h2=r|0,this.h3=o|0,this.h4=i|0}process(e,n){for(let p=0;p<16;p++,n+=4)ke[p]=e.getUint32(n,!0);let r=this.h0|0,o=r,i=this.h1|0,a=i,c=this.h2|0,s=c,l=this.h3|0,u=l,f=this.h4|0,g=f;for(let p=0;p<5;p++){const y=4-p,d=wd[p],h=bd[p],w=br[p],v=mr[p],x=gd[p],$=yd[p];for(let S=0;S<16;S++){const E=Ce(r+zr(p,i,c,l)+ke[w[S]]+d,x[S])+f|0;r=f,f=l,l=Ce(c,10)|0,c=i,i=E}for(let S=0;S<16;S++){const E=Ce(o+zr(y,a,s,u)+ke[v[S]]+h,$[S])+g|0;o=g,g=u,u=Ce(s,10)|0,s=a,a=E}}this.set(this.h1+c+u|0,this.h2+l+g|0,this.h3+f+o|0,this.h4+r+a|0,this.h0+i+s|0)}roundClean(){ke.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}const Ed=ie(()=>new md);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const ki=BigInt(0),tn=BigInt(1),xd=BigInt(2),en=t=>t instanceof Uint8Array,vd=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function ge(t){if(!en(t))throw new Error("Uint8Array expected");let e="";for(let n=0;nr+o.length,0));let n=0;return t.forEach(r=>{if(!en(r))throw new Error("Uint8Array expected");e.set(r,n),n+=r.length}),e}function Ad(t,e){if(t.length!==e.length)return!1;for(let n=0;nki;t>>=tn,e+=1);return e}function $d(t,e){return t>>BigInt(e)&tn}const Td=(t,e,n)=>t|(n?tn:ki)<(xd<new Uint8Array(t),Fr=t=>Uint8Array.from(t);function Ri(t,e,n){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");let r=yn(t),o=yn(t),i=0;const a=()=>{r.fill(1),o.fill(0),i=0},c=(...f)=>n(o,r,...f),s=(f=yn())=>{o=c(Fr([0]),f),r=c(),f.length!==0&&(o=c(Fr([1]),f),r=c())},l=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let f=0;const g=[];for(;f{a(),s(f);let p;for(;!(p=g(l()));)s();return a(),p}}const Ld={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function Ie(t,e,n={}){const r=(o,i,a)=>{const c=Ld[i];if(typeof c!="function")throw new Error(`Invalid validator "${i}", expected function`);const s=t[o];if(!(a&&s===void 0)&&!c(s,t))throw new Error(`Invalid param ${String(o)}=${s} (${typeof s}), expected ${i}`)};for(const[o,i]of Object.entries(e))r(o,i,!1);for(const[o,i]of Object.entries(n))r(o,i,!0);return t}const Ud=Object.freeze(Object.defineProperty({__proto__:null,bitGet:$d,bitLen:Id,bitMask:vr,bitSet:Td,bytesToHex:ge,bytesToNumberBE:ee,bytesToNumberLE:xr,concatBytes:Ae,createHmacDrbg:Ri,ensureBytes:ht,equalBytes:Ad,hexToBytes:ye,hexToNumber:Er,numberToBytesBE:de,numberToBytesLE:Hi,numberToHexUnpadded:Ni,numberToVarBytesBE:Bd,utf8ToBytes:Sd,validateObject:Ie},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const W=BigInt(0),F=BigInt(1),Jt=BigInt(2),Cd=BigInt(3),Rn=BigInt(4),Zr=BigInt(5),Gr=BigInt(8);BigInt(9);BigInt(16);function rt(t,e){const n=t%e;return n>=W?n:e+n}function kd(t,e,n){if(n<=W||e 0");if(n===F)return W;let r=F;for(;e>W;)e&F&&(r=r*t%n),t=t*t%n,e>>=F;return r}function dt(t,e,n){let r=t;for(;e-- >W;)r*=r,r%=n;return r}function On(t,e){if(t===W||e<=W)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let n=rt(t,e),r=e,o=W,i=F;for(;n!==W;){const c=r/n,s=r%n,l=o-i*c;r=n,n=s,o=i,i=l}if(r!==F)throw new Error("invert: does not exist");return rt(o,e)}function Nd(t){const e=(t-F)/Jt;let n,r,o;for(n=t-F,r=0;n%Jt===W;n/=Jt,r++);for(o=Jt;o(r[o]="function",r),e);return Ie(t,n)}function _d(t,e,n){if(n 0");if(n===W)return t.ONE;if(n===F)return e;let r=t.ONE,o=e;for(;n>W;)n&F&&(r=t.mul(r,o)),o=t.sqr(o),n>>=F;return r}function Dd(t,e){const n=new Array(e.length),r=e.reduce((i,a,c)=>t.is0(a)?i:(n[c]=i,t.mul(i,a)),t.ONE),o=t.inv(r);return e.reduceRight((i,a,c)=>t.is0(a)?i:(n[c]=t.mul(i,n[c]),t.mul(i,a)),o),n}function Br(t,e){const n=e!==void 0?e:t.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function Kd(t,e,n=!1,r={}){if(t<=W)throw new Error(`Expected Fp ORDER > 0, got ${t}`);const{nBitLength:o,nByteLength:i}=Br(t,e);if(i>2048)throw new Error("Field lengths over 2048 bytes are not supported");const a=Hd(t),c=Object.freeze({ORDER:t,BITS:o,BYTES:i,MASK:vr(o),ZERO:W,ONE:F,create:s=>rt(s,t),isValid:s=>{if(typeof s!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof s}`);return W<=s&&ss===W,isOdd:s=>(s&F)===F,neg:s=>rt(-s,t),eql:(s,l)=>s===l,sqr:s=>rt(s*s,t),add:(s,l)=>rt(s+l,t),sub:(s,l)=>rt(s-l,t),mul:(s,l)=>rt(s*l,t),pow:(s,l)=>_d(c,s,l),div:(s,l)=>rt(s*On(l,t),t),sqrN:s=>s*s,addN:(s,l)=>s+l,subN:(s,l)=>s-l,mulN:(s,l)=>s*l,inv:s=>On(s,t),sqrt:r.sqrt||(s=>a(c,s)),invertBatch:s=>Dd(c,s),cmov:(s,l,u)=>u?l:s,toBytes:s=>n?Hi(s,i):de(s,i),fromBytes:s=>{if(s.length!==i)throw new Error(`Fp.fromBytes: expected ${i}, got ${s.length}`);return n?xr(s):ee(s)}});return Object.freeze(c)}function Pd(t,e,n=!1){t=ht("privateHash",t);const r=t.length,o=Br(e).nByteLength+8;if(o<24||r1024)throw new Error(`hashToPrivateScalar: expected ${o}-1024 bytes of input, got ${r}`);const i=n?xr(t):ee(t);return rt(i,e-F)+F}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const qd=BigInt(0),wn=BigInt(1);function Md(t,e){const n=(o,i)=>{const a=i.negate();return o?a:i},r=o=>{const i=Math.ceil(e/o)+1,a=2**(o-1);return{windows:i,windowSize:a}};return{constTimeNegate:n,unsafeLadder(o,i){let a=t.ZERO,c=o;for(;i>qd;)i&wn&&(a=a.add(c)),c=c.double(),i>>=wn;return a},precomputeWindow(o,i){const{windows:a,windowSize:c}=r(i),s=[];let l=o,u=l;for(let f=0;f>=p,h>s&&(h-=g,a+=wn);const w=d,v=d+Math.abs(h)-1,x=y%2!==0,$=h<0;h===0?u=u.add(n(x,i[w])):l=l.add(n($,i[v]))}return{p:l,f:u}},wNAFCached(o,i,a,c){const s=o._WINDOW_SIZE||1;let l=i.get(o);return l||(l=this.precomputeWindow(o,s),s!==1&&i.set(o,c(l))),this.wNAF(s,l,a)}}}function Oi(t){return Od(t.Fp),Ie(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Br(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function jd(t){const e=Oi(t);Ie(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:n,Fp:r,a:o}=e;if(n){if(!r.eql(o,r.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof n!="object"||typeof n.beta!="bigint"||typeof n.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}const{bytesToNumberBE:Vd,hexToBytes:zd}=Ud,Qt={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(t){const{Err:e}=Qt;if(t.length<2||t[0]!==2)throw new e("Invalid signature integer tag");const n=t[1],r=t.subarray(2,n+2);if(!n||r.length!==n)throw new e("Invalid signature integer: wrong length");if(r[0]&128)throw new e("Invalid signature integer: negative");if(r[0]===0&&!(r[1]&128))throw new e("Invalid signature integer: unnecessary leading zero");return{d:Vd(r),l:t.subarray(n+2)}},toSig(t){const{Err:e}=Qt,n=typeof t=="string"?zd(t):t;if(!(n instanceof Uint8Array))throw new Error("ui8a expected");let r=n.length;if(r<2||n[0]!=48)throw new e("Invalid signature tag");if(n[1]!==r-2)throw new e("Invalid signature: incorrect length");const{d:o,l:i}=Qt._parseInt(n.subarray(2)),{d:a,l:c}=Qt._parseInt(i);if(c.length)throw new e("Invalid signature: left bytes after parsing");return{r:o,s:a}},hexFromSig(t){const e=l=>Number.parseInt(l[0],16)&8?"00"+l:l,n=l=>{const u=l.toString(16);return u.length&1?`0${u}`:u},r=e(n(t.s)),o=e(n(t.r)),i=r.length/2,a=o.length/2,c=n(i),s=n(a);return`30${n(a+i+4)}02${s}${o}02${c}${r}`}},St=BigInt(0),pt=BigInt(1);BigInt(2);const Wr=BigInt(3);BigInt(4);function Fd(t){const e=jd(t),{Fp:n}=e,r=e.toBytes||((y,d,h)=>{const w=d.toAffine();return Ae(Uint8Array.from([4]),n.toBytes(w.x),n.toBytes(w.y))}),o=e.fromBytes||(y=>{const d=y.subarray(1),h=n.fromBytes(d.subarray(0,n.BYTES)),w=n.fromBytes(d.subarray(n.BYTES,2*n.BYTES));return{x:h,y:w}});function i(y){const{a:d,b:h}=e,w=n.sqr(y),v=n.mul(w,y);return n.add(n.add(v,n.mul(y,d)),h)}if(!n.eql(n.sqr(e.Gy),i(e.Gx)))throw new Error("bad generator point: equation left != right");function a(y){return typeof y=="bigint"&&Stn.eql(x,n.ZERO);return v(h)&&v(w)?f.ZERO:new f(h,w,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(d){const h=n.invertBatch(d.map(w=>w.pz));return d.map((w,v)=>w.toAffine(h[v])).map(f.fromAffine)}static fromHex(d){const h=f.fromAffine(o(ht("pointHex",d)));return h.assertValidity(),h}static fromPrivateKey(d){return f.BASE.multiply(s(d))}_setWindowSize(d){this._WINDOW_SIZE=d,l.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint)return;throw new Error("bad point: ZERO")}const{x:d,y:h}=this.toAffine();if(!n.isValid(d)||!n.isValid(h))throw new Error("bad point: x or y not FE");const w=n.sqr(h),v=i(d);if(!n.eql(w,v))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:d}=this.toAffine();if(n.isOdd)return!n.isOdd(d);throw new Error("Field doesn't support isOdd")}equals(d){u(d);const{px:h,py:w,pz:v}=this,{px:x,py:$,pz:S}=d,E=n.eql(n.mul(h,S),n.mul(x,v)),B=n.eql(n.mul(w,S),n.mul($,v));return E&&B}negate(){return new f(this.px,n.neg(this.py),this.pz)}double(){const{a:d,b:h}=e,w=n.mul(h,Wr),{px:v,py:x,pz:$}=this;let S=n.ZERO,E=n.ZERO,B=n.ZERO,A=n.mul(v,v),N=n.mul(x,x),U=n.mul($,$),T=n.mul(v,x);return T=n.add(T,T),B=n.mul(v,$),B=n.add(B,B),S=n.mul(d,B),E=n.mul(w,U),E=n.add(S,E),S=n.sub(N,E),E=n.add(N,E),E=n.mul(S,E),S=n.mul(T,S),B=n.mul(w,B),U=n.mul(d,U),T=n.sub(A,U),T=n.mul(d,T),T=n.add(T,B),B=n.add(A,A),A=n.add(B,A),A=n.add(A,U),A=n.mul(A,T),E=n.add(E,A),U=n.mul(x,$),U=n.add(U,U),A=n.mul(U,T),S=n.sub(S,A),B=n.mul(U,N),B=n.add(B,B),B=n.add(B,B),new f(S,E,B)}add(d){u(d);const{px:h,py:w,pz:v}=this,{px:x,py:$,pz:S}=d;let E=n.ZERO,B=n.ZERO,A=n.ZERO;const N=e.a,U=n.mul(e.b,Wr);let T=n.mul(h,x),H=n.mul(w,$),R=n.mul(v,S),P=n.add(h,w),b=n.add(x,$);P=n.mul(P,b),b=n.add(T,H),P=n.sub(P,b),b=n.add(h,v);let m=n.add(x,S);return b=n.mul(b,m),m=n.add(T,R),b=n.sub(b,m),m=n.add(w,v),E=n.add($,S),m=n.mul(m,E),E=n.add(H,R),m=n.sub(m,E),A=n.mul(N,b),E=n.mul(U,R),A=n.add(E,A),E=n.sub(H,A),A=n.add(H,A),B=n.mul(E,A),H=n.add(T,T),H=n.add(H,T),R=n.mul(N,R),b=n.mul(U,b),H=n.add(H,R),R=n.sub(T,R),R=n.mul(N,R),b=n.add(b,R),T=n.mul(H,b),B=n.add(B,T),T=n.mul(m,b),E=n.mul(P,E),E=n.sub(E,T),T=n.mul(P,H),A=n.mul(m,A),A=n.add(A,T),new f(E,B,A)}subtract(d){return this.add(d.negate())}is0(){return this.equals(f.ZERO)}wNAF(d){return p.wNAFCached(this,l,d,h=>{const w=n.invertBatch(h.map(v=>v.pz));return h.map((v,x)=>v.toAffine(w[x])).map(f.fromAffine)})}multiplyUnsafe(d){const h=f.ZERO;if(d===St)return h;if(c(d),d===pt)return this;const{endo:w}=e;if(!w)return p.unsafeLadder(this,d);let{k1neg:v,k1:x,k2neg:$,k2:S}=w.splitScalar(d),E=h,B=h,A=this;for(;x>St||S>St;)x&pt&&(E=E.add(A)),S&pt&&(B=B.add(A)),A=A.double(),x>>=pt,S>>=pt;return v&&(E=E.negate()),$&&(B=B.negate()),B=new f(n.mul(B.px,w.beta),B.py,B.pz),E.add(B)}multiply(d){c(d);let h=d,w,v;const{endo:x}=e;if(x){const{k1neg:$,k1:S,k2neg:E,k2:B}=x.splitScalar(h);let{p:A,f:N}=this.wNAF(S),{p:U,f:T}=this.wNAF(B);A=p.constTimeNegate($,A),U=p.constTimeNegate(E,U),U=new f(n.mul(U.px,x.beta),U.py,U.pz),w=A.add(U),v=N.add(T)}else{const{p:$,f:S}=this.wNAF(h);w=$,v=S}return f.normalizeZ([w,v])[0]}multiplyAndAddUnsafe(d,h,w){const v=f.BASE,x=(S,E)=>E===St||E===pt||!S.equals(v)?S.multiplyUnsafe(E):S.multiply(E),$=x(this,h).add(x(d,w));return $.is0()?void 0:$}toAffine(d){const{px:h,py:w,pz:v}=this,x=this.is0();d==null&&(d=x?n.ONE:n.inv(v));const $=n.mul(h,d),S=n.mul(w,d),E=n.mul(v,d);if(x)return{x:n.ZERO,y:n.ZERO};if(!n.eql(E,n.ONE))throw new Error("invZ was invalid");return{x:$,y:S}}isTorsionFree(){const{h:d,isTorsionFree:h}=e;if(d===pt)return!0;if(h)return h(f,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:d,clearCofactor:h}=e;return d===pt?this:h?h(f,this):this.multiplyUnsafe(e.h)}toRawBytes(d=!0){return this.assertValidity(),r(f,this,d)}toHex(d=!0){return ge(this.toRawBytes(d))}}f.BASE=new f(e.Gx,e.Gy,n.ONE),f.ZERO=new f(n.ZERO,n.ONE,n.ZERO);const g=e.nBitLength,p=Md(f,e.endo?Math.ceil(g/2):g);return{CURVE:e,ProjectivePoint:f,normPrivateKeyToScalar:s,weierstrassEquation:i,isWithinCurveOrder:a}}function Zd(t){const e=Oi(t);return Ie(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function Gd(t){const e=Zd(t),{Fp:n,n:r}=e,o=n.BYTES+1,i=2*n.BYTES+1;function a(b){return Stge(de(b,e.nByteLength));function y(b){const m=r>>pt;return b>m}function d(b){return y(b)?c(-b):b}const h=(b,m,I)=>ee(b.slice(m,I));class w{constructor(m,I,C){this.r=m,this.s=I,this.recovery=C,this.assertValidity()}static fromCompact(m){const I=e.nByteLength;return m=ht("compactSignature",m,I*2),new w(h(m,0,I),h(m,I,2*I))}static fromDER(m){const{r:I,s:C}=Qt.toSig(ht("DER",m));return new w(I,C)}assertValidity(){if(!g(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!g(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(m){return new w(this.r,this.s,m)}recoverPublicKey(m){const{r:I,s:C,recovery:L}=this,k=B(ht("msgHash",m));if(L==null||![0,1,2,3].includes(L))throw new Error("recovery id invalid");const D=L===2||L===3?I+e.n:I;if(D>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const O=L&1?"03":"02",Z=l.fromHex(O+p(D)),Y=s(D),st=c(-k*Y),gt=c(C*Y),J=l.BASE.multiplyAndAddUnsafe(Z,st,gt);if(!J)throw new Error("point at infinify");return J.assertValidity(),J}hasHighS(){return y(this.s)}normalizeS(){return this.hasHighS()?new w(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return ye(this.toDERHex())}toDERHex(){return Qt.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return ye(this.toCompactHex())}toCompactHex(){return p(this.r)+p(this.s)}}const v={isValidPrivateKey(b){try{return u(b),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const b=e.randomBytes(n.BYTES+8),m=Pd(b,r);return de(m,e.nByteLength)},precompute(b=8,m=l.BASE){return m._setWindowSize(b),m.multiply(BigInt(3)),m}};function x(b,m=!0){return l.fromPrivateKey(b).toRawBytes(m)}function $(b){const m=b instanceof Uint8Array,I=typeof b=="string",C=(m||I)&&b.length;return m?C===o||C===i:I?C===2*o||C===2*i:b instanceof l}function S(b,m,I=!0){if($(b))throw new Error("first arg must be private key");if(!$(m))throw new Error("second arg must be public key");return l.fromHex(m).multiply(u(b)).toRawBytes(I)}const E=e.bits2int||function(b){const m=ee(b),I=b.length*8-e.nBitLength;return I>0?m>>BigInt(I):m},B=e.bits2int_modN||function(b){return c(E(b))},A=vr(e.nBitLength);function N(b){if(typeof b!="bigint")throw new Error("bigint expected");if(!(St<=b&&bnt in I))throw new Error("sign() legacy options not supported");const{hash:C,randomBytes:L}=e;let{lowS:k,prehash:D,extraEntropy:O}=I;k==null&&(k=!0),b=ht("msgHash",b),D&&(b=ht("prehashed msgHash",C(b)));const Z=B(b),Y=u(m),st=[N(Y),N(Z)];if(O!=null){const nt=O===!0?L(n.BYTES):O;st.push(ht("extraEntropy",nt,n.BYTES))}const gt=Ae(...st),J=Z;function Zt(nt){const at=E(nt);if(!g(at))return;const be=s(at),ct=l.BASE.multiply(at).toAffine(),j=c(ct.x);if(j===St)return;const lt=c(be*c(J+j*Y));if(lt===St)return;let me=(ct.x===j?0:2)|Number(ct.y&pt),Ee=lt;return k&&y(lt)&&(Ee=d(lt),me^=1),new w(j,Ee,me)}return{seed:gt,k2sig:Zt}}const T={lowS:e.lowS,prehash:!1},H={lowS:e.lowS,prehash:!1};function R(b,m,I=T){const{seed:C,k2sig:L}=U(b,m,I),k=e;return Ri(k.hash.outputLen,k.nByteLength,k.hmac)(C,L)}l.BASE._setWindowSize(8);function P(b,m,I,C=H){var ct;const L=b;if(m=ht("msgHash",m),I=ht("publicKey",I),"strict"in C)throw new Error("options.strict was renamed to lowS");const{lowS:k,prehash:D}=C;let O,Z;try{if(typeof L=="string"||L instanceof Uint8Array)try{O=w.fromDER(L)}catch(j){if(!(j instanceof Qt.Err))throw j;O=w.fromCompact(L)}else if(typeof L=="object"&&typeof L.r=="bigint"&&typeof L.s=="bigint"){const{r:j,s:lt}=L;O=new w(j,lt)}else throw new Error("PARSE");Z=l.fromHex(I)}catch(j){if(j.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(k&&O.hasHighS())return!1;D&&(m=e.hash(m));const{r:Y,s:st}=O,gt=B(m),J=s(st),Zt=c(gt*J),nt=c(Y*J),at=(ct=l.BASE.multiplyAndAddUnsafe(Z,Zt,nt))==null?void 0:ct.toAffine();return at?c(at.x)===Y:!1}return{CURVE:e,getPublicKey:x,getSharedSecret:S,sign:R,verify:P,ProjectivePoint:l,Signature:w,utils:v}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Wd(t){return{hash:t,hmac:(e,...n)=>zt(t,e,It(...n)),randomBytes:Gn}}function Yd(t,e){const n=r=>Gd({...t,...Wd(r)});return Object.freeze({...n(e),create:n})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const _i=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Yr=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Jd=BigInt(1),_n=BigInt(2),Jr=(t,e)=>(t+e/_n)/e;function Xd(t){const e=_i,n=BigInt(3),r=BigInt(6),o=BigInt(11),i=BigInt(22),a=BigInt(23),c=BigInt(44),s=BigInt(88),l=t*t*t%e,u=l*l*t%e,f=dt(u,n,e)*u%e,g=dt(f,n,e)*u%e,p=dt(g,_n,e)*l%e,y=dt(p,o,e)*p%e,d=dt(y,i,e)*y%e,h=dt(d,c,e)*d%e,w=dt(h,s,e)*h%e,v=dt(w,c,e)*d%e,x=dt(v,n,e)*u%e,$=dt(x,a,e)*y%e,S=dt($,r,e)*l%e,E=dt(S,_n,e);if(!Dn.eql(Dn.sqr(E),t))throw new Error("Cannot find square root");return E}const Dn=Kd(_i,void 0,void 0,{sqrt:Xd}),xt=Yd({a:BigInt(0),b:BigInt(7),Fp:Dn,n:Yr,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=Yr,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-Jd*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=n,a=BigInt("0x100000000000000000000000000000000"),c=Jr(i*t,e),s=Jr(-r*t,e);let l=rt(t-c*n-s*o,e),u=rt(-c*r-s*i,e);const f=l>a,g=u>a;if(f&&(l=e-l),g&&(u=e-u),l>a||u>a)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:f,k1:l,k2neg:g,k2:u}}}},Ut);BigInt(0);xt.ProjectivePoint;const Ne=xt.ProjectivePoint,bn=ha(Ut);function Xr(t){return BigInt(`0x${Q(t)}`)}function Qd(t){return re(t.toString(16).padStart(64,"0"))}const tu=Eo("Bitcoin seed"),mn={private:76066276,public:76067358},En=2147483648,eu=t=>Ed(Ut(t)),nu=t=>te(t).getUint32(0,!1),He=t=>{if(!Number.isSafeInteger(t)||t<0||t>2**32-1)throw new Error(`Invalid number=${t}. Should be from 0 to 2 ** 32 - 1`);const e=new Uint8Array(4);return te(e).setUint32(0,t,!1),e};class qt{get fingerprint(){if(!this.pubHash)throw new Error("No publicKey set!");return nu(this.pubHash)}get identifier(){return this.pubHash}get pubKeyHash(){return this.pubHash}get privateKey(){return this.privKeyBytes||null}get publicKey(){return this.pubKey||null}get privateExtendedKey(){const e=this.privateKey;if(!e)throw new Error("No private key");return bn.encode(this.serialize(this.versions.private,It(new Uint8Array([0]),e)))}get publicExtendedKey(){if(!this.pubKey)throw new Error("No public key");return bn.encode(this.serialize(this.versions.public,this.pubKey))}static fromMasterSeed(e,n=mn){if(Yt(e),8*e.length<128||8*e.length>512)throw new Error(`HDKey: wrong seed length=${e.length}. Should be between 128 and 512 bits; 256 bits is advised)`);const r=zt(Hn,tu,e);return new qt({versions:n,chainCode:r.slice(32),privateKey:r.slice(0,32)})}static fromExtendedKey(e,n=mn){const r=bn.decode(e),o=te(r),i=o.getUint32(0,!1),a={versions:n,depth:r[4],parentFingerprint:o.getUint32(5,!1),index:o.getUint32(9,!1),chainCode:r.slice(13,45)},c=r.slice(45),s=c[0]===0;if(i!==n[s?"private":"public"])throw new Error("Version mismatch");return s?new qt({...a,privateKey:c.slice(1)}):new qt({...a,publicKey:c})}static fromJSON(e){return qt.fromExtendedKey(e.xpriv)}constructor(e){if(this.depth=0,this.index=0,this.chainCode=null,this.parentFingerprint=0,!e||typeof e!="object")throw new Error("HDKey.constructor must not be called directly");if(this.versions=e.versions||mn,this.depth=e.depth||0,this.chainCode=e.chainCode,this.index=e.index||0,this.parentFingerprint=e.parentFingerprint||0,!this.depth&&(this.parentFingerprint||this.index))throw new Error("HDKey: zero depth with non-zero index/parent fingerprint");if(e.publicKey&&e.privateKey)throw new Error("HDKey: publicKey and privateKey at same time.");if(e.privateKey){if(!xt.utils.isValidPrivateKey(e.privateKey))throw new Error("Invalid private key");this.privKey=typeof e.privateKey=="bigint"?e.privateKey:Xr(e.privateKey),this.privKeyBytes=Qd(this.privKey),this.pubKey=xt.getPublicKey(e.privateKey,!0)}else if(e.publicKey)this.pubKey=Ne.fromHex(e.publicKey).toRawBytes(!0);else throw new Error("HDKey: no public or private key provided");this.pubHash=eu(this.pubKey)}derive(e){if(!/^[mM]'?/.test(e))throw new Error('Path must start with "m" or "M"');if(/^[mM]'?$/.test(e))return this;const n=e.replace(/^[mM]'?\//,"").split("/");let r=this;for(const o of n){const i=/^(\d+)('?)$/.exec(o);if(!i||i.length!==3)throw new Error(`Invalid child index: ${o}`);let a=+i[1];if(!Number.isSafeInteger(a)||a>=En)throw new Error("Invalid index");i[2]==="'"&&(a+=En),r=r.deriveChild(a)}return r}deriveChild(e){if(!this.pubKey||!this.chainCode)throw new Error("No publicKey or chainCode set");let n=He(e);if(e>=En){const c=this.privateKey;if(!c)throw new Error("Could not derive hardened child key");n=It(new Uint8Array([0]),c,n)}else n=It(this.pubKey,n);const r=zt(Hn,this.chainCode,n),o=Xr(r.slice(0,32)),i=r.slice(32);if(!xt.utils.isValidPrivateKey(o))throw new Error("Tweak bigger than curve order");const a={versions:this.versions,chainCode:i,depth:this.depth+1,parentFingerprint:this.fingerprint,index:e};try{if(this.privateKey){const c=rt(this.privKey+o,xt.CURVE.n);if(!xt.utils.isValidPrivateKey(c))throw new Error("The tweak was out of range or the resulted private key is invalid");a.privateKey=c}else{const c=Ne.fromHex(this.pubKey).add(Ne.fromPrivateKey(o));if(c.equals(Ne.ZERO))throw new Error("The tweak was equal to negative P, which made the result key invalid");a.publicKey=c.toRawBytes(!0)}return new qt(a)}catch{return this.deriveChild(e+1)}}sign(e){if(!this.privateKey)throw new Error("No privateKey set!");return Yt(e,32),xt.sign(e,this.privKey).toCompactRawBytes()}verify(e,n){if(Yt(e,32),Yt(n,64),!this.publicKey)throw new Error("No publicKey set!");let r;try{r=xt.Signature.fromCompact(n)}catch{return!1}return xt.verify(r,e,this.publicKey)}wipePrivateData(){return this.privKey=void 0,this.privKeyBytes&&(this.privKeyBytes.fill(0),this.privKeyBytes=void 0),this}toJSON(){return{xpriv:this.privateExtendedKey,xpub:this.publicExtendedKey}}serialize(e,n){if(!this.chainCode)throw new Error("No chainCode set");return Yt(n,33),It(He(e),new Uint8Array([this.depth]),He(this.parentFingerprint),He(this.index),this.chainCode,n)}}var ru="m/44'/1237'";function ou(t,e,n=0){let o=qt.fromMasterSeed(ud(t,e)).derive(`${ru}/${n}'`),i=o.privateExtendedKey,a=o.publicExtendedKey;if(!i&&!a)throw new Error("could not derive extended key pair");return{privateExtendedKey:i,publicExtendedKey:a}}function Qr(t,e=0){let n=qt.fromExtendedKey(t),r=t.slice(0,4),o=n.deriveChild(0).deriveChild(e),i=Q(o.publicKey.slice(1));if(!i)throw new Error("could not derive public key");if(r==="xprv"){let a=o.privateKey;if(!a)throw new Error("could not derive private key");return{privateKey:a,publicKey:i}}return{publicKey:i}}var iu=Object.getOwnPropertyDescriptor,su=(t,e,n,r)=>{for(var o=r>1?void 0:r?iu(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(o=a(o)||o);return o};let Kn=class extends Pi{constructor(){super(...arguments);q(this,"$notify");q(this,"$route");q(this,"$router");q(this,"activeDid","");q(this,"agentDid","");q(this,"apiServer","");q(this,"endDateInput");q(this,"endTimeInput");q(this,"errorMessage","");q(this,"fullClaim",{"@context":"https://schema.org","@type":"PlanAction",name:"",description:""});q(this,"imageUrl","");q(this,"includeLocation",!1);q(this,"isHiddenSave",!1);q(this,"isHiddenSpinner",!0);q(this,"lastClaimJwtId","");q(this,"latitude",0);q(this,"longitude",0);q(this,"numAccounts",0);q(this,"projectId","");q(this,"projectIssuerDid","");q(this,"sendToTrustroots",!1);q(this,"sendToTripHopping",!1);q(this,"showGeneralAdvanced",!1);q(this,"startDateInput");q(this,"startTimeInput");q(this,"zoneName",nn.local().zoneName);q(this,"zoom",2)}errNote(n){this.$notify({group:"alert",type:"danger",title:"Error",text:n},5e3)}async mounted(){this.numAccounts=await Qi();const n=await Ar();this.activeDid=n.activeDid||"",this.apiServer=n.apiServer||"",this.showGeneralAdvanced=!!n.showGeneralAdvanced,this.projectId=this.$route.query.projectId||"",this.projectId&&(this.numAccounts===0?this.errNote("There was a problem loading your account info."):this.loadProject(this.activeDid))}async loadProject(n){var i,a,c;const r=this.apiServer+"/api/claim/byHandle/"+encodeURIComponent(this.projectId),o=await Te(n);try{const s=await this.axios.get(r,{headers:o});if(s.status===200){if(this.projectIssuerDid=s.data.issuer,this.fullClaim=s.data.claim,this.imageUrl=s.data.claim.image||"",this.lastClaimJwtId=s.data.id,(i=this.fullClaim)!=null&&i.location&&(this.includeLocation=!0,this.latitude=this.fullClaim.location.geo.latitude,this.longitude=this.fullClaim.location.geo.longitude),(c=(a=this.fullClaim)==null?void 0:a.agent)!=null&&c.identifier&&(this.agentDid=this.fullClaim.agent.identifier),this.fullClaim.startTime){const l=nn.fromISO(this.fullClaim.startTime).toLocal();this.startDateInput=l.toFormat("yyyy-MM-dd"),this.startTimeInput=l.toFormat("HH:mm")}if(this.fullClaim.endTime){const l=nn.fromISO(this.fullClaim.endTime).toLocal();this.endDateInput=l.toFormat("yyyy-MM-dd"),this.endTimeInput=l.toFormat("HH:mm")}}}catch(s){console.error("Got error retrieving that project",s),this.errNote("There was an error retrieving that project.")}}openImageDialog(){this.$refs.imageDialog.open(n=>{this.imageUrl=n},"PlanAction")}confirmDeleteImage(){this.$notify({group:"modal",type:"confirm",title:"Are you sure you want to delete the image?",text:"",onYes:this.deleteImage},-1)}async deleteImage(){if(this.imageUrl)try{const n=await Te(this.activeDid);window.location.hostname==="localhost"&&!Sr.includes("localhost")&&console.log("Using shared image API server, so only users on that server can play with images.");const r=await this.axios.delete(Sr+"/image/"+encodeURIComponent(this.imageUrl),{headers:n});if(r.status!==204){console.error("Problem deleting image:",r),this.$notify({group:"alert",type:"danger",title:"Error",text:"There was a problem deleting the image."},5e3);return}this.imageUrl=""}catch(n){console.error("Error deleting image:",n),n.response.status===404?(console.log("The image was already deleted:",n),this.imageUrl=""):this.$notify({group:"alert",type:"danger",title:"Error",text:"There was an error deleting the image."},5e3)}}async saveProject(){var c,s,l,u,f;const n=this.fullClaim;if(this.projectId&&(n.lastClaimId=this.lastClaimJwtId),this.agentDid?n.agent={identifier:this.agentDid}:delete n.agent,this.imageUrl?n.image=this.imageUrl:delete n.image,this.includeLocation?!this.latitude||!this.longitude?(this.$notify({group:"alert",type:"danger",title:"Location Error",text:"The location was invalid so it was not set."},5e3),delete n.location):n.location={geo:{"@type":"GeoCoordinates",latitude:this.latitude,longitude:this.longitude}}:delete n.location,this.startDateInput)try{const g=this.startTimeInput||"00:00:00",p=this.startDateInput+" "+g;n.startTime=new Date(p).toISOString()}catch{delete n.startTime,this.$notify({group:"alert",type:"danger",title:"Date Error",text:"The start date was invalid so it was not set."},5e3)}else delete n.startTime;if(this.endDateInput)try{const g=this.endTimeInput||"23:59:59",p=this.endDateInput+" "+g;n.endTime=new Date(p).toISOString()}catch{delete n.endTime,this.$notify({group:"alert",type:"danger",title:"Date Error",text:"The end date was invalid so it was not set."},5e3)}else delete n.endTime;const r=await ts(this.activeDid,n),o=JSON.stringify({jwtEncoded:r}),i=this.apiServer+"/api/v2/claim",a=await Te(this.activeDid);try{const g=await this.axios.post(i,o,{headers:a});if((s=(c=g.data)==null?void 0:c.success)!=null&&s.handleId){this.$notify({group:"alert",type:"success",title:"Saved",text:"The project was saved successfully."},3e3),this.errorMessage="";const p=encodeURIComponent(g.data.success.handleId);if(this.sendToTrustroots||this.sendToTripHopping)if(this.latitude&&this.longitude){let y;this.sendToTrustroots&&(y=await this.signSomePayload(),this.sendToNostrPartner("NOSTR-EVENT-TRUSTROOTS","Trustroots",g.data.success.claimId,y.signedEvent,y.publicExtendedKey)),this.sendToTripHopping&&(y||(y=await this.signSomePayload()),this.sendToNostrPartner("NOSTR-EVENT-TRIPHOPPING","TripHopping",g.data.success.claimId,y.signedEvent,y.publicExtendedKey))}else this.$notify({group:"alert",type:"danger",title:"Partner Error",text:"A partner was selected but the location was not set, so it was not sent to any partner."},5e3);this.$router.push({path:"/project/"+p})}else console.error("Got unexpected 'data' inside response from server",g),this.$notify({group:"alert",type:"danger",title:"Error Saving Idea",text:"Server did not save the idea. Try again."},5e3)}catch(g){let p="There was an error saving the project.";const y=g;y?(console.error("Got error from server",y),Object.prototype.hasOwnProperty.call(y,"message")?(p=((f=(u=(l=y.response)==null?void 0:l.data)==null?void 0:u.error)==null?void 0:f.message)||p,this.$notify({group:"alert",type:"danger",title:"User Message",text:p},5e3)):this.$notify({group:"alert",type:"danger",title:"Server Message",text:JSON.stringify(y.toJSON())},5e3)):(console.error("Here's the full error trying to save the claim:",g),this.$notify({group:"alert",type:"danger",title:"Claim Error",text:g},5e3)),this.errorMessage=p}}async signSomePayload(){var g,p,y;const n=await es(this.activeDid),r=(y=(p=(g=n==null?void 0:n.derivationPath)==null?void 0:g.split)==null?void 0:p.call(g,"/"))==null?void 0:y.reverse()[0],o=r==null?void 0:r.replace(/'/g,""),i=Number(o||0),a=ou(n==null?void 0:n.mnemonic,"",i),c=a==null?void 0:a.publicExtendedKey,s=a==null?void 0:a.privateExtendedKey,l=Qr(s).privateKey;return{signedEvent:wt({kind:30402,tags:[[]],content:"",created_at:0},l),publicExtendedKey:c}}async sendToNostrPartner(n,r,o,i,a){var c,s,l;try{let u=qi;const f=await Ar();f.partnerApiServer&&(u=f.partnerApiServer);const g=u+"/api/partner/link",p=window.location.origin+"/claim/"+o,y=this.fullClaim.name+" - see "+p,d=Qr(a).publicKey,h={kind:i.kind,tags:i.tags,content:i.content,created_at:i.created_at,pubkey:d},w=_o(h),v={jwtId:o,linkCode:n,inputJson:JSON.stringify(y),pubKeyHex:d,pubKeyImage:w,pubKeySigHex:i.sig},x=await Te(this.activeDid),$=await this.axios.post(g,v,{headers:x});$.status===201?this.$notify({group:"alert",type:"success",title:`Sent to ${r}`,text:`The project info was sent to ${r}.`},5e3):this.$notify({group:"alert",type:"danger",title:`Failed Sending to ${r}`,text:JSON.stringify($.data)},5e3)}catch(u){console.error(`Error sending to ${r}`,u);let f=`There was an error sending to ${r}.`;(l=(s=(c=u.response)==null?void 0:c.data)==null?void 0:s.error)!=null&&l.message&&(f=u.response.data.error.message),this.$notify({group:"alert",type:"danger",title:`Error Sending to ${r}`,text:f},7e3)}}async onSaveProjectClick(){this.isHiddenSave=!0,this.isHiddenSpinner=!1,this.numAccounts===0?console.error("Error: there is no account."):this.saveProject()}confirmEraseLatLong(){this.$notify({group:"modal",type:"confirm",title:"Erase Marker",text:"Are you sure you don't want to mark a location? This will erase the current location.",onYes:async()=>{this.eraseLatLong()}},-1)}eraseLatLong(){this.latitude=0,this.longitude=0,this.includeLocation=!1}onCancelClick(){this.$router.back()}showNostrPartnerInfo(){this.$notify({group:"alert",type:"info",title:"About Nostr Events",text:"This will submit this project to a partner on the nostr network. It will contain your public key data which may allow correlation, so don't allow this if you're not comfortable with that."},7e3)}};Kn=su([Mi({components:{ImageMethodDialog:Ji,LMap:Yi,LMarker:Wi,LTileLayer:Gi,QuickNav:Xi}})],Kn);const au={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},cu={id:"ViewBreadcrumb",class:"mb-8"},lu={class:"text-lg text-center font-light relative px-7"},fu={class:"flex justify-center mt-4"},du={key:0,class:"flex justify-between"},uu=["href"],hu=["src"],pu={key:1},gu={class:"mb-4"},yu={key:0},wu={class:"text-xs text-slate-500 italic"},bu={class:"flex items-center mt-4"},mu=["disabled"],Eu={class:"flex w-full justify-end items-center"},xu={class:"w-full flex justify-end items-center"},vu={class:"flex items-center"},Bu=["disabled"],Au={key:0,class:"mb-4 aspect-video"},Su={key:1,class:"items-center mb-4"},Iu={class:"mt-8"},$u={class:"grid grid-cols-1 sm:grid-cols-2 gap-2"},Tu=["disabled"];function Lu(t,e,n,r,o,i){var g;const a=ce("QuickNav"),c=ce("font-awesome"),s=ce("ImageMethodDialog"),l=ce("l-tile-layer"),u=ce("l-marker"),f=ce("l-map");return Gt(),ae(Fi,null,[Nt(a,{selected:"Projects"}),_("section",au,[_("div",cu,[_("h1",lu,[_("button",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:e[0]||(e[0]=p=>t.$router.back())},[Nt(c,{icon:"chevron-left",class:"fa-fw"})]),e[19]||(e[19]=rn(" Edit Project Idea "))])]),_("div",null,on(t.errorMessage),1),bt(_("input",{"onUpdate:modelValue":e[1]||(e[1]=p=>t.fullClaim.name=p),type:"text",placeholder:"Idea Name",class:"block w-full rounded border border-slate-400 mb-4 px-3 py-2"},null,512),[[Ht,t.fullClaim.name]]),_("div",fu,[t.imageUrl?(Gt(),ae("span",du,[_("a",{href:t.imageUrl,target:"_blank",class:"text-blue-500 ml-4"},[_("img",{src:t.imageUrl,class:"h-24 rounded-xl"},null,8,hu)],8,uu),Nt(c,{icon:"trash-can",class:"text-red-500 fa-fw ml-8 mt-10",onClick:t.confirmDeleteImage},null,8,["onClick"])])):(Gt(),ae("span",pu,[Nt(c,{icon:"camera",class:"bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-2 rounded-md",onClick:t.openImageDialog},null,8,["onClick"])]))]),Nt(s,{ref:"imageDialog"},null,512),bt(_("input",{"onUpdate:modelValue":e[2]||(e[2]=p=>t.agentDid=p),type:"text",placeholder:"Other Authorized Representative",class:"mt-4 block w-full rounded border border-slate-400 px-3 py-2"},null,512),[[Ht,t.agentDid]]),_("div",gu,[t.activeDid!=t.projectIssuerDid&&t.agentDid!=t.projectIssuerDid?(Gt(),ae("p",yu,[e[20]||(e[20]=_("span",{class:"text-red-500"},"Beware!",-1)),e[21]||(e[21]=rn(" If you save this, the original project owner will no longer be able to edit it. ")),_("button",{class:"text-blue-500",onClick:e[3]||(e[3]=p=>t.agentDid=t.projectIssuerDid)}," Click here to make the original owner an authorized representative. ")])):$e("",!0)]),bt(_("textarea",{"onUpdate:modelValue":e[4]||(e[4]=p=>t.fullClaim.description=p),placeholder:"Description",class:"block w-full rounded border border-slate-400 px-3 py-2",rows:"5",maxlength:"5000"},null,512),[[Ht,t.fullClaim.description]]),e[28]||(e[28]=_("div",{class:"text-xs text-slate-500 italic"}," If you want to be contacted, be sure to include your contact information -- just remember that this information is public and saved in a public history. ",-1)),_("div",wu,on((g=t.fullClaim.description)==null?void 0:g.length)+"/5000 max. characters ",1),bt(_("input",{"onUpdate:modelValue":e[5]||(e[5]=p=>t.fullClaim.url=p),placeholder:"Website",autocapitalize:"none",class:"block w-full rounded border border-slate-400 mt-4 px-3 py-2"},null,512),[[Ht,t.fullClaim.url]]),_("div",null,[_("div",bu,[e[22]||(e[22]=_("span",{class:"mr-2"},"Starts At",-1)),bt(_("input",{"onUpdate:modelValue":e[6]||(e[6]=p=>t.startDateInput=p),placeholder:"Start Date",type:"date",class:"rounded border border-slate-400 px-3 py-2"},null,512),[[Ht,t.startDateInput]]),bt(_("input",{"onUpdate:modelValue":e[7]||(e[7]=p=>t.startTimeInput=p),disabled:!t.startDateInput,placeholder:"Start Time",type:"time",class:"rounded border border-slate-400 ml-2 px-3 py-2"},null,8,mu),[[Ht,t.startTimeInput]])]),_("div",Eu,[_("span",xu,on(t.zoneName)+" time zone ",1)]),_("div",vu,[e[23]||(e[23]=_("div",{class:"mr-2"},[_("span",null,"Ends at")],-1)),bt(_("input",{"onUpdate:modelValue":e[8]||(e[8]=p=>t.endDateInput=p),placeholder:"End Date",type:"date",class:"ml-2 rounded border border-slate-400 px-3 py-2"},null,512),[[Ht,t.endDateInput]]),bt(_("input",{"onUpdate:modelValue":e[9]||(e[9]=p=>t.endTimeInput=p),disabled:!t.endDateInput,placeholder:"End Time",type:"time",class:"rounded border border-slate-400 ml-2 px-3 py-2"},null,8,Bu),[[Ht,t.endTimeInput]])])]),_("div",{class:"flex items-center mt-4",onClick:e[11]||(e[11]=p=>t.includeLocation=!t.includeLocation)},[bt(_("input",{"onUpdate:modelValue":e[10]||(e[10]=p=>t.includeLocation=p),type:"checkbox",class:"mr-2"},null,512),[[Ir,t.includeLocation]]),e[24]||(e[24]=_("label",{for:"includeLocation"},"Include Location",-1))]),t.includeLocation?(Gt(),ae("div",Au,[e[25]||(e[25]=_("p",{class:"text-sm mb-2 text-slate-500"}," For your security, choose a location nearby but not exactly at the place. ",-1)),Nt(f,{ref:"map",zoom:t.zoom,"onUpdate:zoom":e[13]||(e[13]=p=>t.zoom=p),center:[0,0],class:"!z-40 rounded-md",onClick:e[14]||(e[14]=p=>{t.latitude=p.latlng.lat,t.longitude=p.latlng.lng})},{default:Vi(()=>[Nt(l,{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png","layer-type":"base",name:"OpenStreetMap"}),t.latitude&&t.longitude?(Gt(),Zi(u,{key:0,"lat-lng":[t.latitude,t.longitude],onClick:e[12]||(e[12]=p=>t.confirmEraseLatLong())},null,8,["lat-lng"])):$e("",!0)]),_:1},8,["zoom"])])):$e("",!0),t.showGeneralAdvanced&&t.includeLocation?(Gt(),ae("div",Su,[_("div",{class:"flex",onClick:e[16]||(e[16]=p=>t.sendToTrustroots=!t.sendToTrustroots)},[bt(_("input",{"onUpdate:modelValue":e[15]||(e[15]=p=>t.sendToTrustroots=p),type:"checkbox",class:"mr-2"},null,512),[[Ir,t.sendToTrustroots]]),e[26]||(e[26]=_("label",null,"Send to Trustroots",-1)),Nt(c,{icon:"circle-info",class:"text-blue-500 ml-2 cursor-pointer",onClick:zi(t.showNostrPartnerInfo,["stop"])},null,8,["onClick"])])])):$e("",!0),_("div",Iu,[_("div",$u,[_("button",{disabled:t.isHiddenSave,class:"block w-full text-center text-lg font-bold uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md mb-2",onClick:e[17]||(e[17]=p=>t.onSaveProjectClick())},[_("span",{class:$r({hidden:t.isHiddenSave})},"Save Project",2),_("span",{class:$r({hidden:t.isHiddenSpinner})},e[27]||(e[27]=[_("i",{class:"fa-solid fa-spinner fa-spin-pulse"},null,-1),rn(" Saving...")]),2)],8,Tu),_("button",{type:"button",class:"block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md",onClick:e[18]||(e[18]=p=>t.onCancelClick())}," Cancel ")])])])],64)}const Wu=ji(Kn,[["render",Lu]]);export{Wu as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/NewIdentifierView-BYGrWVRA.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/NewIdentifierView-BYGrWVRA.js deleted file mode 100644 index e70178f..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/NewIdentifierView-BYGrWVRA.js +++ /dev/null @@ -1 +0,0 @@ -var v=Object.defineProperty;var x=(t,e,s)=>e in t?v(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var d=(t,e,s)=>x(t,typeof e!="symbol"?e+"":e,s);import"./dexie-export-import-aIN45iyB.js";import{V as g,C as w,_,h as c,j as r,k as n,F as y,z as u,B as f}from"./main.common-DD7dqhZp.js";import{R as b}from"./index-ryzpKtgI.js";import{Q as k}from"./QuickNav-C8jPGtUY.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var $=Object.getOwnPropertyDescriptor,C=(t,e,s,l)=>{for(var o=l>1?void 0:l?$(e,s):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(o=a(o)||o);return o};let m=class extends g{constructor(){super(...arguments);d(this,"loading",!0);d(this,"$router")}async mounted(){await b(),this.loading=!1,setTimeout(()=>{this.$router.push({name:"home"})},1e3)}};m=C([w({components:{QuickNav:k}})],m);const N={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},V={class:"mb-8"},h={class:"text-lg text-center font-light relative px-7"},I={class:"flex justify-center py-12"},B={key:0},Q={key:1};function j(t,e,s,l,o,i){const a=u("QuickNav"),p=u("font-awesome");return f(),c(y,null,[r(a),n("section",N,[n("div",V,[n("div",h,[n("h1",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:e[0]||(e[0]=A=>t.$router.back())},[r(p,{icon:"chevron-left",class:"fa-fw"})])]),e[1]||(e[1]=n("h1",{id:"ViewHeading",class:"text-4xl text-center font-light pt-4 mb-8"}," Your Identity ",-1))]),n("div",I,[e[4]||(e[4]=n("div",null,null,-1)),t.loading?(f(),c("div",B,[e[2]||(e[2]=n("span",{class:"text-xl"},"Creating... ",-1)),r(p,{icon:"spinner",class:"fa-spin fa-spin-pulse",color:"green",size:"128"})])):(f(),c("div",Q,[e[3]||(e[3]=n("span",{class:"text-xl"},"Created!",-1)),r(p,{icon:"burst",class:"fa-beat px-12",color:"green",style:{"--fa-animation-duration":"1s","--fa-animation-direction":"reverse","--fa-animation-iteration-count":"1","--fa-beat-scale":"6"}})])),e[5]||(e[5]=n("div",null,null,-1))])])],64)}const T=_(m,[["render",j]]);export{T as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/OfferDetailsView-DojQCzul.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/OfferDetailsView-DojQCzul.js deleted file mode 100644 index cd83732..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/OfferDetailsView-DojQCzul.js +++ /dev/null @@ -1 +0,0 @@ -var F=Object.defineProperty;var G=(e,t,i)=>t in e?F(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var s=(e,t,i)=>G(e,typeof t!="symbol"?t+"":t,i);import{V as Y,e as Q,d as z,C as H,_ as J,h as m,j as u,k as n,m as V,o as f,t as g,s as v,y as q,q as B,w as W,n as M,F as L,z as b,B as h}from"./main.common-DD7dqhZp.js";import{Q as K}from"./QuickNav-C8jPGtUY.js";import{T as X}from"./TopMessage-ZWDDjman.js";import{l as Z,h as _,i as ee,a0 as te,au as ie,as as re,av as oe,a4 as se}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var ne=Object.getOwnPropertyDescriptor,ae=(e,t,i,r)=>{for(var p=r>1?void 0:r?ne(t,i):t,a=e.length-1,d;a>=0;a--)(d=e[a])&&(p=d(p)||p);return p};let C=class extends Y{constructor(){super(...arguments);s(this,"$notify");s(this,"$route");s(this,"$router");s(this,"activeDid","");s(this,"apiServer","");s(this,"amountInput","0");s(this,"descriptionOfCondition","");s(this,"descriptionOfItem","");s(this,"destinationPathAfter","");s(this,"hideBackButton",!1);s(this,"message","");s(this,"offeredToProject",!1);s(this,"offeredToRecipient",!1);s(this,"offererDid");s(this,"offerId","");s(this,"prevCredToEdit");s(this,"projectId","");s(this,"projectName","a project");s(this,"recipientDid","");s(this,"recipientName","");s(this,"showGeneralAdvanced",!1);s(this,"unitCode","HUR");s(this,"validThroughDateInput","");s(this,"libsUtil",Z)}async mounted(){try{await this.loadPreviousOffer(),await this.initializeFormValues(),await this.loadAccountSettings(),await this.loadRecipientInfo(),await this.loadProjectInfo()}catch(i){console.error("Error in mounted:",i),this.$notify({group:"alert",type:"danger",title:"Error",text:i.message||"There was an error loading the offer details."},5e3)}}async loadPreviousOffer(){try{this.prevCredToEdit=this.$route.query.prevCredToEdit?JSON.parse(this.$route.query.prevCredToEdit):void 0}catch{this.$notify({group:"alert",type:"danger",title:"Retrieval Error",text:"The previous record isn't available for editing. If you submit, you'll create a new record."},5e3)}}async initializeFormValues(){var p,a,d,l,c,y,o,T,I,w,O,x,$,j,D,k,E,P,N,S,A,U,R;const i=(d=(a=(p=this.prevCredToEdit)==null?void 0:p.claim)==null?void 0:a.includesObject)==null?void 0:d.amountOfThisGood;this.amountInput=this.$route.query.amountInput||(i?String(i):"")||this.amountInput,this.unitCode=this.$route.query.unitCode||((y=(c=(l=this.prevCredToEdit)==null?void 0:l.claim)==null?void 0:c.includesObject)==null?void 0:y.unitCode)||this.unitCode,this.descriptionOfCondition=((T=(o=this.prevCredToEdit)==null?void 0:o.claim)==null?void 0:T.description)||this.descriptionOfCondition,this.descriptionOfItem=this.$route.query.description||((O=(w=(I=this.prevCredToEdit)==null?void 0:I.claim)==null?void 0:w.itemOffered)==null?void 0:O.description)||this.descriptionOfItem,this.destinationPathAfter=this.$route.query.destinationPathAfter||"",this.hideBackButton=this.$route.query.hideBackButton==="true",this.message=this.$route.query.message||"";let r;((D=(j=($=(x=this.prevCredToEdit)==null?void 0:x.claim)==null?void 0:$.itemOffered)==null?void 0:j.isPartOf)==null?void 0:D["@type"])==="PlanAction"&&(r=(P=(E=(k=this.prevCredToEdit)==null?void 0:k.claim)==null?void 0:E.itemOffered)==null?void 0:P.isPartOf),this.projectId=this.$route.query.projectId||(r==null?void 0:r.identifier)||this.projectId,this.projectName=this.$route.query.projectName||(r==null?void 0:r.name)||this.projectName,this.recipientDid=this.$route.query.recipientDid||((A=(S=(N=this.prevCredToEdit)==null?void 0:N.claim)==null?void 0:S.recipient)==null?void 0:A.identifier),this.recipientName=this.$route.query.recipientName||"",this.validThroughDateInput=((R=(U=this.prevCredToEdit)==null?void 0:U.claim)==null?void 0:R.validThrough)||this.validThroughDateInput}async loadAccountSettings(){const i=await Q();this.apiServer=i.apiServer??"",this.activeDid=i.activeDid??"",this.showGeneralAdvanced=i.showGeneralAdvanced??!1}async loadRecipientInfo(){if(this.recipientDid&&!this.recipientName){const i=await z.contacts.toArray(),r=await _();this.recipientName=ee(this.recipientDid,this.activeDid,r,i)}this.offeredToProject=!!this.projectId,this.offeredToRecipient=!this.offeredToProject&&!!this.recipientDid}async loadProjectInfo(){if(this.projectId&&!this.projectName){const i=await te(this.projectId,this.axios,this.apiServer,this.activeDid);this.projectName=i!=null&&i.name?"the project: "+i.name:"a project"}}changeUnitCode(){const i=Object.keys(this.libsUtil.UNIT_SHORT),r=i.indexOf(this.unitCode);this.unitCode=i[(r+1)%i.length]}increment(){this.amountInput=`${(parseFloat(this.amountInput)||0)+1}`}decrement(){this.amountInput=`${Math.max(0,(parseFloat(this.amountInput)||1)-1)}`}cancel(){this.destinationPathAfter?this.$router.push({path:this.destinationPathAfter}):this.$router.back()}cancelBack(){this.$router.back()}async confirm(){if(!this.activeDid){this.$notify({group:"alert",type:"danger",title:"Error",text:"You must select an identifier before you can record a offer."},2e3);return}if(parseFloat(this.amountInput)<0){this.$notify({group:"alert",type:"danger",text:"You may not send a negative number.",title:""},2e3);return}if(!this.descriptionOfItem&&!parseFloat(this.amountInput)){this.$notify({group:"alert",type:"danger",title:"Error",text:`You must enter a description or some number of ${this.libsUtil.UNIT_LONG[this.unitCode]}.`},2e3);return}this.$notify({group:"alert",type:"toast",text:"Recording the offer...",title:""},1e3),await this.recordOffer()}notifyUserOfProject(){this.projectId?this.$notify({group:"alert",type:"warning",title:"Error",text:"You cannot assign both to a project and to a recipient."},3e3):this.$notify({group:"alert",type:"warning",title:"Error",text:"To assign to a project, you must open this page through a project."},3e3)}notifyUserOfRecipient(){this.recipientDid?this.$notify({group:"alert",type:"warning",title:"Error",text:"You cannot assign both to a recipient and to a project."},3e3):this.$notify({group:"alert",type:"warning",title:"Error",text:"To assign to a recipient, you must open this page from a contact."},3e3)}async recordOffer(){var i,r,p;try{const a=this.offeredToRecipient?this.recipientDid:void 0,d=this.offeredToProject?this.projectId:void 0;let l;if(this.prevCredToEdit?l=await ie(this.axios,this.apiServer,this.prevCredToEdit,this.activeDid,this.descriptionOfItem,parseFloat(this.amountInput),this.unitCode,this.descriptionOfCondition,this.validThroughDateInput,a,d):l=await re(this.axios,this.apiServer,this.activeDid,this.descriptionOfItem,parseFloat(this.amountInput),this.unitCode,this.descriptionOfCondition,this.validThroughDateInput,a,d),l.type==="error"||this.isCreationError(l.response)){const c=this.getCreationErrorMessage(l);console.error("Error with offer creation result:",l),this.$notify({group:"alert",type:"danger",title:"Error",text:c||"There was an error creating the offer."},5e3)}else this.$notify({group:"alert",type:"success",title:"Success",text:"That offer was recorded."},5e3),localStorage.removeItem("imageUrl"),this.destinationPathAfter?this.$router.push({path:this.destinationPathAfter}):this.$router.back()}catch(a){console.error("Error with offer recordation caught:",a);const d=a.userMessage||((p=(r=(i=a.response)==null?void 0:i.data)==null?void 0:r.error)==null?void 0:p.message)||"There was an error recording the offer.";this.$notify({group:"alert",type:"danger",title:"Error",text:d},5e3)}}constructOfferParam(){var d,l;const i=this.offeredToRecipient?this.recipientDid:void 0,r=this.offeredToProject?this.projectId:void 0,p=oe((d=this.prevCredToEdit)==null?void 0:d.claim,this.activeDid,i,this.descriptionOfItem,parseFloat(this.amountInput),this.unitCode,this.descriptionOfCondition,r,this.validThroughDateInput,(l=this.prevCredToEdit)==null?void 0:l.id);return JSON.stringify(p)}isCreationError(i){var r;return i.status!==201||((r=i.data)==null?void 0:r.error)}getCreationErrorMessage(i){var r,p,a,d,l;return((r=i.error)==null?void 0:r.userMessage)||((p=i.error)==null?void 0:p.error)||((l=(d=(a=i.response)==null?void 0:a.data)==null?void 0:d.error)==null?void 0:l.message)}explainData(){this.$notify({group:"alert",type:"success",title:"Data Sharing",text:se},7e3)}};C=ae([H({components:{QuickNav:K,TopMessage:X}})],C);const de={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},le={key:0,class:"text-lg text-center font-light relative px-7"},pe={class:"text-xl font-bold text-center mb-4"},ce={class:"flex flex-row justify-center"},ue={class:"flex flex-row mt-2"},he={class:"flex flex-row mt-2"},fe={class:"rounded-l border border-r-0 border-slate-400 bg-slate-200 text-center px-2 py-2"},me={class:"h-7 mt-4 flex"},ge={class:"text-sm mt-1"},ye={class:"h-7 mt-4 flex"},ve={class:"text-sm mt-1"},be={key:1,class:"mt-4 flex"},Ce={class:"text-center mb-2 mt-6 italic"},Te={class:"grid grid-cols-1 sm:grid-cols-2 gap-2"};function Ie(e,t,i,r,p,a){const d=b("QuickNav"),l=b("TopMessage"),c=b("font-awesome"),y=b("router-link");return h(),m(L,null,[u(d),u(l),n("section",de,[e.hideBackButton?V("",!0):(h(),m("div",le,[n("h1",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:t[0]||(t[0]=o=>e.cancelBack())},[u(c,{icon:"chevron-left",class:"fa-fw"})])])),t[18]||(t[18]=n("h1",{class:"text-4xl text-center font-light px-4 mb-4"},"What Is Offered",-1)),n("h1",pe,[n("span",null," Offer to "+g(e.offeredToProject?e.projectName:e.offeredToRecipient?e.recipientName:"someone not named"),1)]),f(n("textarea",{"onUpdate:modelValue":t[1]||(t[1]=o=>e.descriptionOfItem=o),class:"block w-full rounded border border-slate-400 mb-2 px-3 py-2",placeholder:"What is offered","data-testId":"itemDescription"},null,512),[[v,e.descriptionOfItem]]),n("div",ce,[n("span",{class:"rounded-l border border-r-0 border-slate-400 bg-slate-200 text-center text-blue-500 px-2 py-2 w-20",onClick:t[2]||(t[2]=o=>e.changeUnitCode())},g(e.libsUtil.UNIT_SHORT[e.unitCode]||e.unitCode),1),n("div",{class:"border border-r-0 border-slate-400 bg-slate-200 px-4 py-2",onClick:t[3]||(t[3]=o=>e.amountInput==="0"?null:e.decrement())},[u(c,{icon:"chevron-left"})]),f(n("input",{"onUpdate:modelValue":t[4]||(t[4]=o=>e.amountInput=o),type:"number",class:"border border-r-0 border-slate-400 px-2 py-2 text-center w-20","data-testId":"inputOfferAmount"},null,512),[[v,e.amountInput]]),n("div",{class:"rounded-r border border-slate-400 bg-slate-200 px-4 py-2",onClick:t[5]||(t[5]=o=>e.increment())},[u(c,{icon:"chevron-right"})])]),n("div",ue,[t[15]||(t[15]=n("span",{class:"rounded-l border border-r-0 border-slate-400 bg-slate-200 text-center px-2 py-2"}," Conditions ",-1)),f(n("textarea",{"onUpdate:modelValue":t[6]||(t[6]=o=>e.descriptionOfCondition=o),class:"w-full border border-slate-400 px-3 py-2 rounded-r",placeholder:"Prerequisites, other people to include, etc."},null,512),[[v,e.descriptionOfCondition]])]),n("div",he,[n("span",fe,g(e.validThroughDateInput?"":"No")+" Expiration ",1),f(n("input",{"onUpdate:modelValue":t[7]||(t[7]=o=>e.validThroughDateInput=o),type:"date",class:"w-full rounded border border-slate-400 px-3 py-2 rounded-r"},null,512),[[v,e.validThroughDateInput]])]),n("div",me,[e.projectId&&!e.offeredToRecipient?f((h(),m("input",{key:0,"onUpdate:modelValue":t[8]||(t[8]=o=>e.offeredToProject=o),type:"checkbox",class:"h-6 w-6 mr-2"},null,512)),[[B,e.offeredToProject]]):(h(),q(c,{key:1,icon:"square",class:"bg-slate-500 text-slate-500 h-5 w-5 px-0.5 py-0.5 mr-2 rounded",onClick:t[9]||(t[9]=o=>e.notifyUserOfProject())})),n("label",ge,g(e.projectId?"This is offered to "+e.projectName:"No project was chosen"),1)]),n("div",ye,[e.recipientDid&&!e.offeredToProject?f((h(),m("input",{key:0,"onUpdate:modelValue":t[10]||(t[10]=o=>e.offeredToRecipient=o),type:"checkbox",class:"h-6 w-6 mr-2"},null,512)),[[B,e.offeredToRecipient]]):(h(),q(c,{key:1,icon:"square",class:"bg-slate-500 text-slate-500 h-5 w-5 px-0.5 py-0.5 mr-2 rounded",onClick:t[11]||(t[11]=o=>e.notifyUserOfRecipient())})),n("label",ve,g(e.recipientDid?"This is offered to "+e.recipientName:"No recipient was chosen."),1)]),e.showGeneralAdvanced?(h(),m("div",be,[u(y,{to:{name:"claim-add-raw",query:{claim:e.constructOfferParam()}},class:"text-blue-500"},{default:W(()=>t[16]||(t[16]=[M(" Edit & Submit Raw ")])),_:1},8,["to"])])):V("",!0),n("p",Ce,[t[17]||(t[17]=M(" Sign & Send to publish to the world ")),u(c,{icon:"circle-info",class:"pl-2 text-blue-500 cursor-pointer",onClick:t[12]||(t[12]=o=>e.explainData())})]),n("div",Te,[n("button",{class:"block w-full text-center text-lg font-bold uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md",onClick:t[13]||(t[13]=(...o)=>e.confirm&&e.confirm(...o))}," Sign & Send "),n("button",{class:"block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md",onClick:t[14]||(t[14]=(...o)=>e.cancel&&e.cancel(...o))}," Cancel ")])])],64)}const Ne=J(C,[["render",Ie]]);export{Ne as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/OfferDialog-DDi7ax_Z.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/OfferDialog-DDi7ax_Z.js deleted file mode 100644 index 9fc64de..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/OfferDialog-DDi7ax_Z.js +++ /dev/null @@ -1 +0,0 @@ -var x=Object.defineProperty;var D=(t,e,r)=>e in t?x(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var i=(t,e,r)=>D(t,typeof e!="symbol"?e+"":e,r);import{a1 as I,C as U,V as O,e as $,_ as N,z as g,h as b,m as y,B as v,k as a,o as w,s as C,t as j,j as m,w as S,n as E}from"./main.common-DD7dqhZp.js";import{l as k,as as T,ar as V}from"./index-ryzpKtgI.js";var M=Object.defineProperty,H=Object.getOwnPropertyDescriptor,h=(t,e,r,s)=>{for(var o=s>1?void 0:s?H(e,r):e,p=t.length-1,l;p>=0;p--)(l=t[p])&&(o=(s?l(e,r,o):l(o))||o);return s&&o&&M(e,r,o),o};let u=class extends O{constructor(){super(...arguments);i(this,"$notify");i(this,"projectId");i(this,"projectName");i(this,"activeDid","");i(this,"apiServer","");i(this,"amountInput","0");i(this,"amountUnitCode","HUR");i(this,"description","");i(this,"expirationDateInput","");i(this,"recipientDid","");i(this,"recipientName","");i(this,"visible",!1);i(this,"libsUtil",k)}async open(r,s){try{this.recipientDid=r,this.recipientName=s;const o=await $();this.apiServer=o.apiServer||"",this.activeDid=o.activeDid||""}catch(o){console.error("Error retrieving settings from database:",o),this.$notify({group:"alert",type:"danger",title:"Error",text:o.message||"There was an error retrieving your settings."},-1)}this.visible=!0}close(){this.visible=!1}changeUnitCode(){const r=Object.keys(this.libsUtil.UNIT_SHORT),s=r.indexOf(this.amountUnitCode);this.amountUnitCode=r[(s+1)%r.length]}increment(){this.amountInput=`${(parseFloat(this.amountInput)||0)+1}`}decrement(){this.amountInput=`${Math.max(0,(parseFloat(this.amountInput)||1)-1)}`}cancel(){this.close(),this.eraseValues()}eraseValues(){this.description="",this.amountInput="0",this.amountUnitCode="HUR"}async confirm(){this.close(),this.$notify({group:"alert",type:"toast",text:"Recording the offer...",title:""},1e3),this.recordOffer(this.description,parseFloat(this.amountInput),this.amountUnitCode,this.expirationDateInput).then(()=>{this.description="",this.amountInput="0"})}async recordOffer(r,s,o="HUR",p){var l,c,n;if(!this.activeDid){this.$notify({group:"alert",type:"danger",title:"Error",text:"You must select an identity before you can record an offer."},7e3);return}if(!r&&!s){this.$notify({group:"alert",type:"danger",title:"Error",text:`You must enter a description or some number of ${this.libsUtil.UNIT_LONG[o]}.`},-1);return}try{const d=await T(this.axios,this.apiServer,this.activeDid,r,s,o,"",p,this.recipientDid,this.projectId);if(d.type==="error"||this.isOfferCreationError(d.response)){const f=this.getOfferCreationErrorMessage(d);console.error("Error with offer creation result:",d),this.$notify({group:"alert",type:"danger",title:"Error",text:f||"There was an error creating the offer."},-1)}else this.$notify({group:"alert",type:"success",title:"Success",text:"That offer was recorded."},5e3)}catch(d){console.error("Error with offer recordation caught:",d);const f=d.userMessage||((n=(c=(l=d.response)==null?void 0:l.data)==null?void 0:c.error)==null?void 0:n.message)||"There was an error recording the offer.";this.$notify({group:"alert",type:"danger",title:"Error",text:f},-1)}}isOfferCreationError(r){var s;return r.status!==201||((s=r.data)==null?void 0:s.error)}getOfferCreationErrorMessage(r){var s,o;return V(r)||((s=r.error)==null?void 0:s.userMessage)||((o=r.error)==null?void 0:o.error)}};h([I],u.prototype,"projectId",2);h([I],u.prototype,"projectName",2);u=h([U],u);const R={key:0,class:"dialog-overlay"},F={class:"dialog"},A={class:"flex flex-row mt-2"},B={class:"mt-4 flex justify-center"},P={class:"grid grid-cols-1 sm:grid-cols-2 gap-2"};function Y(t,e,r,s,o,p){const l=g("font-awesome"),c=g("router-link");return t.visible?(v(),b("div",R,[a("div",F,[e[8]||(e[8]=a("h1",{class:"text-xl font-bold text-center mb-4"},"Offer Help",-1)),w(a("input",{"onUpdate:modelValue":e[0]||(e[0]=n=>t.description=n),type:"text","data-testId":"inputDescription",class:"block w-full rounded border border-slate-400 mb-2 px-3 py-2",placeholder:"Description of what is offered"},null,512),[[C,t.description]]),a("div",A,[a("span",{class:"rounded-l border border-r-0 border-slate-400 bg-slate-200 w-1/3 text-center text-blue-500 px-2 py-2",onClick:e[1]||(e[1]=n=>t.changeUnitCode())},j(t.libsUtil.UNIT_SHORT[t.amountUnitCode]),1),t.amountInput!=="0"?(v(),b("div",{key:0,class:"border border-r-0 border-slate-400 bg-slate-200 px-4 py-2",onClick:e[2]||(e[2]=n=>t.decrement())},[m(l,{icon:"chevron-left"})])):y("",!0),w(a("input",{"onUpdate:modelValue":e[3]||(e[3]=n=>t.amountInput=n),"data-testId":"inputOfferAmount",type:"number",class:"w-full border border-r-0 border-slate-400 px-2 py-2 text-center"},null,512),[[C,t.amountInput]]),a("div",{class:"rounded-r border border-slate-400 bg-slate-200 px-4 py-2",onClick:e[4]||(e[4]=n=>t.increment())},[m(l,{icon:"chevron-right"})])]),a("div",B,[a("span",null,[m(c,{to:{name:"offer-details",query:{amountInput:t.amountInput,description:t.description,offererDid:t.activeDid,projectId:t.projectId,projectName:t.projectName,recipientDid:t.recipientDid,recipientName:t.recipientName,unitCode:t.amountUnitCode}},class:"text-blue-500"},{default:S(()=>e[7]||(e[7]=[E(" Conditions & more options... ")])),_:1},8,["to"])])]),e[9]||(e[9]=a("p",{class:"text-center mt-6 mb-2 italic"}," Sign & Send to publish to the world ",-1)),a("div",P,[a("button",{class:"block w-full text-center text-lg font-bold uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md",onClick:e[5]||(e[5]=(...n)=>t.confirm&&t.confirm(...n))}," Sign & Send "),a("button",{class:"block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md",onClick:e[6]||(e[6]=(...n)=>t.cancel&&t.cancel(...n))}," Cancel ")])])])):y("",!0)}const J=N(u,[["render",Y]]);export{J as O}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/OnboardMeetingListView-d6saebIJ.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/OnboardMeetingListView-d6saebIJ.js deleted file mode 100644 index cf54f44..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/OnboardMeetingListView-d6saebIJ.js +++ /dev/null @@ -1 +0,0 @@ -var S=Object.defineProperty;var $=(t,e,s)=>e in t?S(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var r=(t,e,s)=>$(t,typeof e!="symbol"?e+"":e,s);import{V as C,e as N,l as c,G as O,C as E,_ as I,h as g,j as m,k as a,m as x,t as k,p as L,F as P,E as V,o as j,s as F,Y as R,z as f,B as p}from"./main.common-DD7dqhZp.js";import{Q as T}from"./QuickNav-C8jPGtUY.js";import{T as Y}from"./TopMessage-ZWDDjman.js";import{g as u,e as v,ar as y,aw as _}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var A=Object.getOwnPropertyDescriptor,B=(t,e,s,n)=>{for(var l=n>1?void 0:n?A(e,s):e,d=t.length-1,o;d>=0;d--)(o=t[d])&&(l=o(l)||l);return l};let b=class extends C{constructor(){super(...arguments);r(this,"$notify");r(this,"$router");r(this,"activeDid","");r(this,"apiServer","");r(this,"attendingMeeting",null);r(this,"firstName","");r(this,"isLoading",!1);r(this,"isRegistered",!1);r(this,"meetings",[]);r(this,"password","");r(this,"selectedMeeting",null);r(this,"showPasswordDialog",!1)}async created(){const s=await N();this.activeDid=s.activeDid||"",this.apiServer=s.apiServer||"",this.firstName=s.firstName||"",this.isRegistered=!!s.isRegistered,await this.fetchMeetings()}async fetchMeetings(){var s,n,l;this.isLoading=!0;try{const d=await u(this.activeDid),o=await this.axios.get(this.apiServer+"/api/partner/groupOnboardMember",{headers:d});if((s=o.data)!=null&&s.data){const i=o.data.data.groupId,M=await u(this.activeDid),D=await this.axios.get(this.apiServer+"/api/partner/groupOnboard/"+i,{headers:M});if((n=D.data)!=null&&n.data){this.attendingMeeting=D.data.data;return}else c("Error fetching meeting for user after saying they are in one.",!0)}const w=await u(this.activeDid),h=await this.axios.get(this.apiServer+"/api/partner/groupsOnboarding",{headers:w});(l=h.data)!=null&&l.data&&(this.meetings=h.data.data)}catch(d){c("Error fetching meetings: "+v(d),!0),this.$notify({group:"alert",type:"danger",title:"Error",text:y(d)||"Failed to fetch meetings."},5e3)}finally{this.isLoading=!1}}promptPassword(s){this.password="",this.selectedMeeting=s,this.showPasswordDialog=!0,O(()=>{const n=this.$refs.passwordInput;n&&n.focus()})}cancelPasswordDialog(){this.password="",this.selectedMeeting=null,this.showPasswordDialog=!1}async submitPassword(){if(!this.selectedMeeting){c("No meeting selected when prompting for password, which should never happen.",!0);return}try{const s={name:this.firstName,did:this.activeDid,isRegistered:this.isRegistered},n=JSON.stringify(s),l=await _(n,this.password),d=await u(this.activeDid),o=await this.axios.post(this.apiServer+"/api/partner/groupOnboardMember",{groupId:this.selectedMeeting.groupId,content:l},{headers:d});if(o.data&&o.data.success)this.$router.push({name:"onboard-meeting-members",params:{groupId:this.selectedMeeting.groupId.toString()},query:{password:this.password,memberId:o.data.memberId}}),this.cancelPasswordDialog();else throw{response:o}}catch(s){c("Error joining meeting: "+v(s),!0),this.$notify({group:"alert",type:"danger",title:"Error",text:y(s)||"You failed to join the meeting."},5e3)}}async leaveMeeting(){this.$notify({group:"modal",type:"confirm",title:"Leave Meeting",text:"Are you sure you want to leave this meeting?",onYes:async()=>{try{const s=await u(this.activeDid);await this.axios.delete(this.apiServer+"/api/partner/groupOnboardMember",{headers:s}),this.attendingMeeting=null,await this.fetchMeetings(),this.$notify({group:"alert",type:"success",title:"Success",text:"You left the meeting."},5e3)}catch(s){c("Error leaving meeting: "+v(s),!0),this.$notify({group:"alert",type:"danger",title:"Error",text:y(s)||"You failed to leave the meeting."},5e3)}}},-1)}};b=B([E({components:{QuickNav:T,TopMessage:Y}})],b);const Q={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},H={key:0,class:"flex justify-center items-center py-8"},K={key:1},U={class:"flex justify-between items-center"},q={class:"text-xl font-medium"},z={key:2,class:"space-y-4"},G=["onClick"],J={class:"text-xl font-medium"},W={key:0,class:"text-center text-gray-500 py-8"},X={key:3,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4"},Z={class:"bg-white rounded-lg p-6 max-w-sm w-full"},ee={class:"flex justify-end space-x-4"};function te(t,e,s,n,l,d){const o=f("QuickNav"),w=f("TopMessage"),h=f("font-awesome");return p(),g(P,null,[m(o,{selected:"Contacts"}),m(w),a("section",Q,[e[8]||(e[8]=a("h1",{id:"ViewHeading",class:"text-4xl text-center font-light mb-8"}," Onboarding Meetings ",-1)),t.isLoading?(p(),g("div",H,[m(h,{icon:"spinner",class:"fa-spin-pulse"})])):t.attendingMeeting?(p(),g("div",K,[e[6]||(e[6]=a("p",null,"You are in this meeting.",-1)),a("div",{class:"p-4 bg-white rounded-lg shadow hover:shadow-md transition-shadow cursor-pointer",onClick:e[1]||(e[1]=i=>t.promptPassword(t.attendingMeeting))},[a("div",U,[a("h2",q,k(t.attendingMeeting.name),1),a("button",{class:"text-red-600 hover:text-red-700 p-2",title:"Leave Meeting",onClick:e[0]||(e[0]=L((...i)=>t.leaveMeeting&&t.leaveMeeting(...i),["stop"]))},[m(h,{icon:"right-from-bracket"})])])])])):(p(),g("div",z,[(p(!0),g(P,null,V(t.meetings,i=>(p(),g("div",{key:i.groupId,class:"p-4 bg-white rounded-lg shadow hover:shadow-md transition-shadow cursor-pointer",onClick:M=>t.promptPassword(i)},[a("h2",J,k(i.name),1)],8,G))),128)),t.meetings.length===0?(p(),g("p",W," No onboarding meetings available ")):x("",!0)])),t.showPasswordDialog?(p(),g("div",X,[a("div",Z,[e[7]||(e[7]=a("h3",{class:"text-lg font-medium mb-4"},"Enter Meeting Password",-1)),j(a("input",{ref:"passwordInput","onUpdate:modelValue":e[2]||(e[2]=i=>t.password=i),type:"text",class:"w-full px-3 py-2 border rounded-md mb-4",placeholder:"Enter password",onKeyup:e[3]||(e[3]=R((...i)=>t.submitPassword&&t.submitPassword(...i),["enter"]))},null,544),[[F,t.password]]),a("div",ee,[a("button",{class:"px-4 py-2 bg-gray-200 rounded hover:bg-gray-300",onClick:e[4]||(e[4]=(...i)=>t.cancelPasswordDialog&&t.cancelPasswordDialog(...i))}," Cancel "),a("button",{class:"px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700",onClick:e[5]||(e[5]=(...i)=>t.submitPassword&&t.submitPassword(...i))}," Submit ")])])])):x("",!0)])],64)}const pe=I(b,[["render",te]]);export{pe as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/OnboardMeetingMembersView-BWzSX9QC.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/OnboardMeetingMembersView-BWzSX9QC.js deleted file mode 100644 index ef1f71d..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/OnboardMeetingMembersView-BWzSX9QC.js +++ /dev/null @@ -1 +0,0 @@ -var N=Object.defineProperty;var _=(r,t,e)=>t in r?N(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var o=(r,t,e)=>_(r,typeof t!="symbol"?t+"":t,e);import{V as k,e as x,l as h,C as S,_ as $,h as l,j as m,k as c,y as R,t as T,F as I,z as g,B as p}from"./main.common-DD7dqhZp.js";import{Q as O}from"./QuickNav-C8jPGtUY.js";import{T as L}from"./TopMessage-ZWDDjman.js";import{M as E}from"./MembersList-BOHRjd7y.js";import{U as V}from"./UserNameDialog-BV49F4GW.js";import{R as C,g as u,ar as f,e as b,aw as w}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var F=Object.getOwnPropertyDescriptor,A=(r,t,e,i)=>{for(var s=i>1?void 0:i?F(t,e):t,n=r.length-1,a;n>=0;n--)(a=r[n])&&(s=a(s)||s);return s};let M=class extends k{constructor(){super(...arguments);o(this,"activeDid","");o(this,"apiServer","");o(this,"errorMessage","");o(this,"firstName","");o(this,"isRegistered",!1);o(this,"isLoading",!0);o(this,"$route");o(this,"$router");o(this,"userNameDialog")}get groupId(){return this.$route.params.groupId||""}get password(){return this.$route.query.password||""}async created(){var i;if(!this.groupId){this.errorMessage="The group info is missing. Go back and try again.";return}if(!this.password){this.errorMessage="The password is missing. Go back and try again.";return}const e=await x();this.activeDid=e.activeDid||"",this.apiServer=e.apiServer||"",this.firstName=e.firstName||"",this.isRegistered=e.isRegistered||!1;try{this.activeDid||(this.activeDid=await C(),this.isRegistered=!1);const s=await u(this.activeDid),a=(i=(await this.axios.get(`${this.apiServer}/api/partner/groupOnboardMember`,{headers:s})).data)==null?void 0:i.data;a?String(a.groupId)!==this.groupId?(this.errorMessage="You are already in a different meeting. Reload or go back and try again.",this.isLoading=!1):this.firstName?await this.updateMemberInMeeting(this.firstName):this.$refs.userNameDialog.open(this.updateMemberInMeeting):this.firstName?await this.addMemberToMeeting(this.firstName):this.$refs.userNameDialog.open(this.addMemberToMeeting)}catch(s){this.errorMessage=f(s)||"There was an error checking for that meeting. Reload or go back and try again.",h("Error checking meeting: "+b(s),!0),this.isLoading=!1}}async addMemberToMeeting(e){e!=null&&(this.firstName=e);const i={name:this.firstName,did:this.activeDid,isRegistered:this.isRegistered},s=JSON.stringify(i),n=await w(s,this.password),a=await u(this.activeDid);try{await this.axios.post(`${this.apiServer}/api/partner/groupOnboardMember`,{groupId:this.groupId,content:n},{headers:a})}catch(d){h("Error adding member to meeting: "+b(d),!0),this.errorMessage=f(d)||"You're not in a meeting and couldn't be added to this one. Reload or go back and try again."}this.isLoading=!1}async updateMemberInMeeting(e){e!=null&&(this.firstName=e);const i={name:this.firstName,did:this.activeDid,isRegistered:this.isRegistered},s=JSON.stringify(i),n=await w(s,this.password),a=await u(this.activeDid);try{await this.axios.put(`${this.apiServer}/api/partner/groupOnboardMember`,{content:n},{headers:a})}catch(d){h("Error updating member in meeting: "+b(d),!0),this.errorMessage=f(d)||"There was an error updating your name. Reload or go back and try again."}this.isLoading=!1}handleError(e){this.errorMessage=e}};M=A([S({components:{QuickNav:O,TopMessage:L,MembersList:E,UserNameDialog:V}})],M);const B={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},U={key:0,class:"mt-16 text-center text-4xl bg-slate-400 text-white w-14 py-2.5 rounded-full mx-auto"},Q={key:1},z={class:"text-center text-red-600 py-8"};function j(r,t,e,i,s,n){const a=g("QuickNav"),d=g("TopMessage"),v=g("font-awesome"),y=g("MembersList"),D=g("UserNameDialog");return p(),l(I,null,[m(a,{selected:"Contacts"}),m(d),c("section",B,[t[1]||(t[1]=c("h1",{id:"ViewHeading",class:"text-4xl text-center font-light mb-8"}," Meeting Members ",-1)),r.isLoading?(p(),l("div",U,[m(v,{icon:"spinner",class:"fa-spin-pulse"})])):r.errorMessage?(p(),l("div",Q,[c("div",z,T(r.errorMessage),1),t[0]||(t[0]=c("div",{class:"text-center"}," For authorization, wait for your meeting organizer to approve you. ",-1))])):(p(),R(y,{key:2,password:r.password,onError:r.handleError},null,8,["password","onError"]))]),m(D,{ref:"userNameDialog","callback-on-cancel":!0,"sharing-explanation":"This is encrypted and shared only with people in this meeting."},null,512)],64)}const te=$(M,[["render",j]]);export{te as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/OnboardMeetingSetupView-BbhzMP8b.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/OnboardMeetingSetupView-BbhzMP8b.js deleted file mode 100644 index 3809b5d..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/OnboardMeetingSetupView-BbhzMP8b.js +++ /dev/null @@ -1 +0,0 @@ -var N=Object.defineProperty;var S=(t,e,r)=>e in t?N(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var d=(t,e,r)=>S(t,typeof e!="symbol"?e+"":e,r);import{V as I,e as $,l as D,C as T,_ as F,h as g,j as p,k as n,m,t as w,x as L,n as v,p as A,o as M,s as b,y as V,w as P,F as H,z as c,B as u}from"./main.common-DD7dqhZp.js";import{Q as R}from"./QuickNav-C8jPGtUY.js";import{T as j}from"./TopMessage-ZWDDjman.js";import{M as B}from"./MembersList-BOHRjd7y.js";import{g as y,aw as U,e as C,ar as x}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var q=Object.getOwnPropertyDescriptor,Q=(t,e,r,o)=>{for(var i=o>1?void 0:o?q(e,r):e,l=t.length-1,a;l>=0;l--)(a=t[l])&&(i=a(i)||i);return i};let O=class extends I{constructor(){super(...arguments);d(this,"$notify");d(this,"currentMeeting",null);d(this,"newOrUpdatedMeeting",null);d(this,"activeDid","");d(this,"apiServer","");d(this,"isDeleting",!1);d(this,"isLoading",!0);d(this,"isRegistered",!1);d(this,"showDeleteConfirm",!1);d(this,"fullName","")}get minDateTime(){const e=new Date;return e.setMinutes(e.getMinutes()+5),this.formatDateForInput(e)}async created(){const e=await $();this.activeDid=e.activeDid||"",this.apiServer=e.apiServer||"",this.fullName=e.firstName||"",this.isRegistered=!!e.isRegistered,await this.fetchCurrentMeeting(),this.isLoading=!1}isInCreateMode(){return this.newOrUpdatedMeeting!=null&&this.currentMeeting==null}isInEditOrCreateMode(){return this.newOrUpdatedMeeting!=null}getDefaultExpirationTime(){const e=new Date;return e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),e.setHours(e.getHours()+1),e.setHours(e.getHours()+2),this.formatDateForInput(e)}formatDateForInput(e){const r=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),i=String(e.getDate()).padStart(2,"0"),l=String(e.getHours()).padStart(2,"0"),a=String(e.getMinutes()).padStart(2,"0");return`${r}-${o}-${i}T${l}:${a}`}blankMeeting(){var e;return{name:"",expiresAt:this.getDefaultExpirationTime(),userFullName:this.fullName,password:((e=this.currentMeeting)==null?void 0:e.password)||""}}async fetchCurrentMeeting(){var e,r;try{const o=await y(this.activeDid),i=await this.axios.get(this.apiServer+"/api/partner/groupOnboard",{headers:o});(e=i==null?void 0:i.data)!=null&&e.data?this.currentMeeting={...i.data.data,userFullName:this.fullName,password:((r=this.currentMeeting)==null?void 0:r.password)||""}:this.newOrUpdatedMeeting=this.blankMeeting()}catch{this.newOrUpdatedMeeting=this.blankMeeting()}}async createMeeting(){this.isLoading=!0;try{if(!this.newOrUpdatedMeeting)throw Error("There was no meeting data to create. We should never get here.");const e=new Date(this.newOrUpdatedMeeting.expiresAt);if(e<=new Date){this.$notify({group:"alert",type:"warning",title:"Invalid Time",text:"Select a future time for the meeting expiration."},5e3);return}if(!this.newOrUpdatedMeeting.userFullName){this.$notify({group:"alert",type:"warning",title:"Invalid Name",text:"Please enter your name."},5e3);return}if(!this.newOrUpdatedMeeting.password){this.$notify({group:"alert",type:"warning",title:"Invalid Password",text:"Please enter a password."},5e3);return}const o={name:this.newOrUpdatedMeeting.userFullName,did:this.activeDid,isRegistered:this.isRegistered},i=await U(JSON.stringify(o),this.newOrUpdatedMeeting.password),l=await y(this.activeDid),a=await this.axios.post(this.apiServer+"/api/partner/groupOnboard",{name:this.newOrUpdatedMeeting.name,expiresAt:e.toISOString(),content:i},{headers:l});if(a.data&&a.data.success)this.currentMeeting={...this.newOrUpdatedMeeting,groupId:a.data.success.groupId},this.newOrUpdatedMeeting=null,this.$notify({group:"alert",type:"success",title:"Success",text:"Meeting created."},3e3);else throw{response:a}}catch(e){D("Error creating meeting: "+C(e),!0);const r=x(e);this.$notify({group:"alert",type:"danger",title:"Error",text:r||"Failed to create meeting. Try reloading or submitting again."},5e3)}finally{this.isLoading=!1}}formatExpirationTime(e){const r=new Date(e),o=new Date,i=Math.round((r.getTime()-o.getTime())/(1e3*60*60));return i<0?"Expired":i<1?"Less than an hour":i===1?"1 hour":`${i} hours`}confirmDelete(){this.showDeleteConfirm=!0}async deleteMeeting(){this.isDeleting=!0;try{const e=await y(this.activeDid);await this.axios.delete(this.apiServer+"/api/partner/groupOnboard",{headers:e}),this.currentMeeting=null,this.newOrUpdatedMeeting=this.blankMeeting(),this.showDeleteConfirm=!1,this.$notify({group:"alert",type:"success",title:"Success",text:"Meeting deleted successfully."},3e3)}catch(e){console.error("Error deleting meeting:",e),this.$notify({group:"alert",type:"danger",title:"Error",text:x(e)||"Failed to delete meeting."},5e3)}finally{this.isDeleting=!1}}startEditing(){if(this.currentMeeting){const e=new Date(this.currentMeeting.expiresAt);this.newOrUpdatedMeeting={name:this.currentMeeting.name,expiresAt:this.formatDateForInput(e),userFullName:this.currentMeeting.userFullName||"",password:this.currentMeeting.password||""}}else console.error("There is no current meeting to edit. We should never get here.")}cancelEditing(){this.newOrUpdatedMeeting=null}async updateMeeting(){var e;if(this.isLoading=!0,!this.newOrUpdatedMeeting)throw Error("There was no meeting data to update.");try{const r=new Date(this.newOrUpdatedMeeting.expiresAt);if(r<=new Date){this.$notify({group:"alert",type:"warning",title:"Invalid Time",text:"Select a future time for the meeting expiration."},5e3);return}if(!this.newOrUpdatedMeeting.userFullName){this.$notify({group:"alert",type:"warning",title:"Invalid Name",text:"Please enter your name."},5e3);return}if(!this.newOrUpdatedMeeting.password){this.$notify({group:"alert",type:"warning",title:"Invalid Password",text:"Please enter a password."},5e3);return}const i={name:this.newOrUpdatedMeeting.userFullName,did:this.activeDid,isRegistered:this.isRegistered},l=await U(JSON.stringify(i),this.newOrUpdatedMeeting.password),a=await y(this.activeDid),h=await this.axios.put(this.apiServer+"/api/partner/groupOnboard",{name:this.newOrUpdatedMeeting.name,expiresAt:r.toISOString(),content:l},{headers:a});if(h.data&&h.data.success)this.currentMeeting={...this.newOrUpdatedMeeting,groupId:((e=this.currentMeeting)==null?void 0:e.groupId)||-1},this.newOrUpdatedMeeting=null;else throw{response:h}}catch(r){D("Error updating meeting: "+C(r),!0);const o=x(r);this.$notify({group:"alert",type:"danger",title:"Error",text:o||"Failed to update meeting. Try reloading or submitting again."},5e3)}finally{this.isLoading=!1}}onboardMeetingMembersLink(){var e,r;return this.currentMeeting?`/onboard-meeting-members/${(e=this.currentMeeting)==null?void 0:e.groupId}?password=${encodeURIComponent(((r=this.currentMeeting)==null?void 0:r.password)||"")}`:""}handleMembersError(e){this.$notify({group:"alert",type:"danger",title:"Error",text:e},5e3)}};O=Q([T({components:{QuickNav:R,TopMessage:j,MembersList:B}})],O);const Y={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},z={key:0,class:"mt-8 p-4 border rounded-lg bg-white shadow"},J={class:"flex items-center justify-between mb-4"},W={class:"flex items-center"},G={class:"sr-only"},K=["disabled"],X={class:"sr-only"},Z={class:"space-y-2"},_={key:0,class:"mt-4"},ee={key:1,class:"text-red-600"},te={key:1,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4"},ne={class:"bg-white rounded-lg p-6 max-w-sm w-full"},re={class:"flex justify-between space-x-4"},ie={key:2,class:"mt-8"},se={class:"text-2xl mb-4"},oe=["min"],ae=["disabled"],de={key:3,class:"mt-8 p-4 border rounded-lg bg-white shadow"},le={key:4},ue={class:"flex justify-center items-center h-full"};function ge(t,e,r,o,i,l){const a=c("QuickNav"),h=c("TopMessage"),f=c("font-awesome"),k=c("router-link"),E=c("MembersList");return u(),g(H,null,[p(a,{selected:"Contacts"}),p(h),n("section",Y,[e[22]||(e[22]=n("h1",{id:"ViewHeading",class:"text-4xl text-center font-light"}," Onboarding Meeting ",-1)),!t.isLoading&&t.currentMeeting!=null&&!t.isInEditOrCreateMode()?(u(),g("div",z,[n("div",J,[n("div",W,[e[10]||(e[10]=n("h2",{class:"text-2xl"},"Current Meeting",-1)),n("button",{class:"mb-4 text-blue-600 hover:text-blue-800 transition-colors duration-200 ml-2",title:"Edit Meeting",onClick:e[0]||(e[0]=(...s)=>t.startEditing&&t.startEditing(...s))},[p(f,{icon:"pen",class:"fa-fw"}),n("span",G,w(t.isInCreateMode()?"Create Meeting":"Edit Meeting"),1)])]),n("button",{class:L(["text-red-600 hover:text-red-800 transition-colors duration-200",{"opacity-50 cursor-not-allowed":t.isDeleting}]),disabled:t.isDeleting,title:"Delete Meeting",onClick:e[1]||(e[1]=(...s)=>t.confirmDelete&&t.confirmDelete(...s))},[p(f,{icon:"trash-can",class:"fa-fw"}),n("span",X,w(t.isDeleting?"Deleting...":"Delete Meeting"),1)],10,K)]),n("div",Z,[n("p",null,[e[11]||(e[11]=n("strong",null,"Name:",-1)),v(" "+w(t.currentMeeting.name),1)]),n("p",null,[e[12]||(e[12]=n("strong",null,"Expires:",-1)),v(" "+w(t.formatExpirationTime(t.currentMeeting.expiresAt)),1)]),t.currentMeeting.password?(u(),g("div",_,e[13]||(e[13]=[n("p",{class:"text-gray-600"}," Share the password with the people you want to onboard. ",-1)]))):(u(),g("div",ee," Your copy of the password is not saved. Edit the meeting, or delete it and create a new meeting. "))])])):m("",!0),t.showDeleteConfirm?(u(),g("div",te,[n("div",ne,[e[14]||(e[14]=n("h3",{class:"text-lg font-medium mb-4"},"Delete Meeting?",-1)),e[15]||(e[15]=n("p",{class:"text-gray-600 mb-6"}," This action cannot be undone. Are you sure you want to delete this meeting? ",-1)),n("div",re,[n("button",{class:"px-4 py-2 bg-slate-500 text-white rounded hover:bg-slate-700",onClick:e[2]||(e[2]=s=>t.showDeleteConfirm=!1)}," Cancel "),n("button",{class:"px-4 py-2 bg-red-600 text-white rounded hover:bg-red-700",onClick:e[3]||(e[3]=(...s)=>t.deleteMeeting&&t.deleteMeeting(...s))}," Delete ")])])])):m("",!0),!t.isLoading&&t.isInEditOrCreateMode()&&t.newOrUpdatedMeeting!=null?(u(),g("div",ie,[n("h2",se,w(t.isInCreateMode()?"Create New Meeting":"Edit Meeting"),1),n("form",{class:"space-y-4",onSubmit:e[9]||(e[9]=A(s=>t.isInCreateMode()?t.createMeeting():t.updateMeeting(),["prevent"]))},[n("div",null,[e[16]||(e[16]=n("label",{for:"meetingName",class:"block text-sm font-medium text-gray-700"},"Meeting Name",-1)),M(n("input",{id:"meetingName","onUpdate:modelValue":e[4]||(e[4]=s=>t.newOrUpdatedMeeting.name=s),type:"text",required:"",class:"mt-1 block w-full rounded-md border border-gray-300 px-3 py-2 shadow-sm focus:border-blue-500 focus:outline-none",placeholder:"Enter meeting name"},null,512),[[b,t.newOrUpdatedMeeting.name]])]),n("div",null,[e[17]||(e[17]=n("label",{for:"expirationTime",class:"block text-sm font-medium text-gray-700"},"Meeting Expiration Time",-1)),M(n("input",{id:"expirationTime","onUpdate:modelValue":e[5]||(e[5]=s=>t.newOrUpdatedMeeting.expiresAt=s),type:"datetime-local",required:"",min:t.minDateTime,class:"mt-1 block w-full rounded-md border border-gray-300 px-3 py-2 shadow-sm focus:border-blue-500 focus:outline-none"},null,8,oe),[[b,t.newOrUpdatedMeeting.expiresAt]])]),n("div",null,[e[18]||(e[18]=n("label",{for:"password",class:"block text-sm font-medium text-gray-700"},"Meeting Password",-1)),M(n("input",{id:"password","onUpdate:modelValue":e[6]||(e[6]=s=>t.newOrUpdatedMeeting.password=s),type:"text",required:"",class:"mt-1 block w-full rounded-md border border-gray-300 px-3 py-2 shadow-sm focus:border-blue-500 focus:outline-none",placeholder:"Enter meeting password"},null,512),[[b,t.newOrUpdatedMeeting.password]])]),n("div",null,[e[19]||(e[19]=n("label",{for:"userName",class:"block text-sm font-medium text-gray-700"},"Your Name",-1)),M(n("input",{id:"userName","onUpdate:modelValue":e[7]||(e[7]=s=>t.newOrUpdatedMeeting.userFullName=s),type:"text",required:"",class:"mt-1 block w-full rounded-md border border-gray-300 px-3 py-2 shadow-sm focus:border-blue-500 focus:outline-none",placeholder:"Your name"},null,512),[[b,t.newOrUpdatedMeeting.userFullName]])]),n("button",{type:"submit",class:"w-full bg-gradient-to-b from-green-400 to-green-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-4 py-2 rounded-md hover:from-green-500 hover:to-green-800",disabled:t.isLoading},w(t.isLoading?t.isInCreateMode()?"Creating...":"Updating...":t.isInCreateMode()?"Create Meeting":"Update Meeting"),9,ae),t.isInEditOrCreateMode()?(u(),g("button",{key:0,type:"button",class:"w-full bg-slate-500 text-white px-4 py-2 rounded-md hover:bg-slate-600",onClick:e[8]||(e[8]=(...s)=>t.cancelEditing&&t.cancelEditing(...s))}," Cancel ")):m("",!0)],32)])):m("",!0),!t.isLoading&&t.currentMeeting!=null&&t.currentMeeting.password?(u(),g("div",de,[e[21]||(e[21]=n("div",{class:"flex items-center justify-between mb-4"},[n("h2",{class:"text-2xl"},"Meeting Members")],-1)),t.currentMeeting.password?(u(),V(k,{key:0,to:t.onboardMeetingMembersLink(),class:"inline-block text-blue-600",target:"_blank"},{default:P(()=>[e[20]||(e[20]=v(" • Open shortcut page for members ")),p(f,{icon:"external-link"})]),_:1},8,["to"])):m("",!0),p(E,{password:t.currentMeeting.password||"","show-organizer-tools":!0,class:"mt-4",onError:t.handleMembersError},null,8,["password","onError"])])):t.isLoading?(u(),g("div",le,[n("div",ue,[p(f,{icon:"spinner",class:"fa-spin-pulse"})])])):m("",!0)])],64)}const ve=F(O,[["render",ge]]);export{ve as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/OnboardingDialog-DBDPRnmU.css b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/OnboardingDialog-DBDPRnmU.css deleted file mode 100644 index fff4c2b..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/OnboardingDialog-DBDPRnmU.css +++ /dev/null @@ -1 +0,0 @@ -.dialog-overlay{z-index:40;position:fixed;top:0;left:0;right:0;bottom:0;background-color:#00000080;display:flex;justify-content:center;align-items:center;padding:1.5rem}.dialog{background-color:#fff;padding:1rem;border-radius:.5rem;width:100%;max-width:500px} diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/OnboardingDialog-DKHXNqS_.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/OnboardingDialog-DKHXNqS_.js deleted file mode 100644 index 35384ac..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/OnboardingDialog-DKHXNqS_.js +++ /dev/null @@ -1 +0,0 @@ -var w=Object.defineProperty;var c=(o,t,i)=>t in o?w(o,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):o[t]=i;var r=(o,t,i)=>c(o,typeof t!="symbol"?t+"":t,i);import{C as v,V as x,e as k,d as C,u as y,_ as O,z as $,h as g,m,B as p,k as e,n as s,j as l,t as D}from"./main.common-DD7dqhZp.js";import{$ as h}from"./index-ryzpKtgI.js";var N=Object.getOwnPropertyDescriptor,T=(o,t,i,a)=>{for(var d=a>1?void 0:a?N(t,i):t,b=o.length-1,n;b>=0;b--)(n=o[b])&&(d=n(d)||d);return d};let f=class extends x{constructor(){super(...arguments);r(this,"$notify");r(this,"$router");r(this,"activeDid","");r(this,"firstContactName",null);r(this,"givenName","");r(this,"isRegistered",!1);r(this,"numContacts",0);r(this,"page",h.Home);r(this,"visible",!1)}async open(i){this.page=i;const a=await k();this.activeDid=a.activeDid||"",this.isRegistered=!!a.isRegistered;const d=await C.contacts.toArray();this.numContacts=d.length,this.numContacts>0&&(this.firstContactName=d[0].name),this.visible=!0,this.page===h.Create&&await y(this.activeDid,{finishedOnboarding:!0})}async onClickClose(i,a){this.visible=!1,i&&(await y(this.activeDid,{finishedOnboarding:!0}),a&&this.$router.push({name:"home"}))}};f=T([v({computed:{OnboardPage(){return h}},components:{OnboardPage:h}})],f);const P={key:0,class:"dialog-overlay"},S={key:0,class:"dialog"},A={class:"text-xl font-bold text-center mb-4 relative"},I={key:0,class:"mt-4"},j={key:0},V={class:"bg-green-600 text-white rounded-full"},_={key:1,class:"mt-4"},B={class:"mt-4 flex items-center"},F={class:"mt-8"},H={class:"grid grid-cols-1 sm:grid-cols-2 gap-2"},R={key:1,class:"dialog"},Y={class:"text-xl font-bold text-center mb-4 relative"},z={class:"mt-4 flex items-center"},E={class:"mt-8"},W={class:"grid grid-cols-1 sm:grid-cols-2 gap-2"},G={key:2,class:"dialog"},L={class:"text-xl font-bold text-center mb-4 relative"},M={class:"relative"},q={class:"bg-green-600 text-white rounded-full"},J={class:"mt-4 flex items-center"},K={class:"mt-4"},Q={class:"mt-8"},U={class:"grid grid-cols-1 sm:grid-cols-2 gap-2"};function X(o,t,i,a,d,b){const n=$("font-awesome");return o.visible?(p(),g("div",P,[o.page===o.OnboardPage.Home?(p(),g("div",S,[e("h1",A,[t[9]||(t[9]=s(" Welcome to Time Safari ")),t[10]||(t[10]=e("br",null,null,-1)),t[11]||(t[11]=s(" - Showcasing Gratitude & Magnifying Time ")),e("div",{class:"text-lg text-center leading-none absolute right-0 -top-1",onClick:t[0]||(t[0]=u=>o.onClickClose(!0))},[l(n,{icon:"xmark",class:"w-[1em]"})])]),o.isRegistered?(p(),g("p",I,[t[12]||(t[12]=s(" You can now log things that you've seen: ")),o.numContacts>0?(p(),g("span",j," click on any name (like "+D(o.firstContactName)+") or ",1)):m("",!0),t[13]||(t[13]=s(" click on the ")),e("span",V,[l(n,{icon:"plus",class:"fa-fw"})]),t[14]||(t[14]=s(" button to express your appreciation for... whatever -- maybe thanks for showing you all these fascinating stories of ")),t[15]||(t[15]=e("em",null,"gratitude",-1)),t[16]||(t[16]=s(". "))])):(p(),g("p",_," The feed underneath this pop-up shows the latest gifts that others have recognized. Once someone registers you, you can log your appreciation, too. ")),t[19]||(t[19]=e("p",{class:"mt-4"}," The more you illuminate cool things people are doing, the more you attract people to work with you. ",-1)),e("p",B,[t[17]||(t[17]=s(" The ")),l(n,{icon:"house-chimney",class:"ml-1 mr-1 text-lg text-white bg-slate-400 px-2 py-2 rounded"}),t[18]||(t[18]=s(" button below brings you back to this feed screen. "))]),e("div",F,[e("div",H,[e("button",{type:"button","data-testId":"closeOnboardingAndFinish",class:"block w-full text-center text-md bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md mb-2",onClick:t[1]||(t[1]=u=>o.onClickClose(!0))}," That's enough help, thanks. "),e("button",{type:"button",class:"block w-full text-center text-md bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md mb-2",onClick:t[2]||(t[2]=u=>o.$router.push({name:"discover"}))}," Show me more! ")])]),t[20]||(t[20]=e("p",{class:"mt-4 flex items-center"},[s(" To see these instructions and more, click above on "),e("span",{class:"ml-1 mr-1 text-xs uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-1 rounded-md"}," Help ")],-1))])):m("",!0),o.page===o.OnboardPage.Discover?(p(),g("div",R,[e("h1",Y,[t[21]||(t[21]=s(" Offer to Interesting Events & People ")),e("div",{class:"text-lg text-center leading-none absolute right-0 -top-1",onClick:t[3]||(t[3]=u=>o.onClickClose(!0))},[l(n,{icon:"xmark",class:"w-[1em]"})])]),t[24]||(t[24]=e("p",null," Once you've seen things that others have given or done, you may find ways you want to contribute, too. It turns out others have proposed activities together, and this page is where you find projects. ",-1)),t[25]||(t[25]=e("p",{class:"mt-4"},' Search for a topic, or search around your neighborhod under "Nearby". ',-1)),t[26]||(t[26]=e("p",{class:"mt-4"}," When you find some that seem interesting, you can offer your help. You are welcome to make your offer conditional, for example if they get 2 other people to help besides you. ",-1)),e("p",z,[t[22]||(t[22]=s(" The ")),l(n,{icon:"magnifying-glass",class:"ml-1 mr-1 text-lg text-white bg-slate-400 px-2 py-2 rounded"}),t[23]||(t[23]=s(" button below brings you to this discovery screen. "))]),e("div",E,[e("div",W,[e("button",{type:"button","data-testId":"closeOnboardingAndFinish",class:"block w-full text-center text-md bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md mb-2",onClick:t[4]||(t[4]=u=>o.onClickClose(!0))}," No more help, thanks. "),e("button",{type:"button",class:"block w-full text-center text-md bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md mb-2",onClick:t[5]||(t[5]=u=>o.$router.push({name:"projects"}))}," Show me even more. ")])])])):m("",!0),o.page===o.OnboardPage.Create?(p(),g("div",G,[e("h1",L,[t[27]||(t[27]=s(" Fish for Others with Your Projects ")),e("div",{class:"text-lg text-center leading-none absolute right-0 -top-1",onClick:t[6]||(t[6]=u=>o.onClickClose(!0))},[l(n,{icon:"xmark",class:"w-[1em]"})])]),e("p",M,[t[28]||(t[28]=s(" Now you can take a turn: click on the ")),e("span",q,[l(n,{icon:"plus",class:"fa-fw"})]),t[29]||(t[29]=s(" button to throw out projects of your own... anything you'd like to see happen. If your first idea doesn't catch anyone, try, try again... and let others know that this is a good place to find help. "))]),e("p",J,[t[30]||(t[30]=s(" The ")),l(n,{icon:"hand",class:"ml-1 mr-1 text-lg text-white bg-slate-400 px-2 py-2 rounded"}),t[31]||(t[31]=s(" button below brings you here to see your ideas. "))]),e("p",K,[t[32]||(t[32]=s(" By the way, one good way to get to know your neighbors and their interests is to offer time directly to them. You can do this on the contacts screen ")),l(n,{icon:"users",class:"text-slate-500"}),t[33]||(t[33]=s(" which is a great way to get to know a neighbor's interests. "))]),e("div",Q,[e("div",U,[e("button",{type:"button","data-testId":"closeOnboardingAndFinish",class:"block w-full text-center text-md bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md mb-2",onClick:t[7]||(t[7]=u=>o.onClickClose(!0,!0))},t[34]||(t[34]=[s(" Let's go! "),e("br",null,null,-1),s(" See & record gratitude. ")])),e("button",{type:"button",class:"block w-full text-center text-md bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md mb-2",onClick:t[8]||(t[8]=u=>o.$router.push({name:"help"}))}," I want to read more Help. ")])])])):m("",!0)])):m("",!0)}const st=O(f,[["render",X]]);export{st as O}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/PhotoDialog-DZbf20A6.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/PhotoDialog-DZbf20A6.js deleted file mode 100644 index 6443d0e..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/PhotoDialog-DZbf20A6.js +++ /dev/null @@ -1,20 +0,0 @@ -var Li=Object.defineProperty;var Ri=(t,a,i)=>a in t?Li(t,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[a]=i;var A=(t,a,i)=>Ri(t,typeof a!="symbol"?a+"":a,i);import{N as qi,f as $t,j as P,O as Wi,an as Hi,G as Si,C as _i,ar as Ii,V as Pi,e as Xi,a as Vt,a6 as Yi,_ as Ui,z as yt,h as R,m as kt,B as q,k as B,w as $i}from"./main.common-DD7dqhZp.js";import{ah as Vi}from"./index-ryzpKtgI.js";/*! - * Cropper.js v1.6.1 - * https://fengyuanchen.github.io/cropperjs - * - * Copyright 2015-present Chen Fengyuan - * Released under the MIT license - * - * Date: 2023-09-17T03:44:19.860Z - */function Ft(t,a){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);a&&(e=e.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),i.push.apply(i,e)}return i}function hi(t){for(var a=1;at.length)&&(a=t.length);for(var i=0,e=new Array(a);i
',da=Number.isNaN||_.isNaN;function v(t){return typeof t=="number"&&!da(t)}var si=function(t){return t>0&&t<1/0};function jt(t){return typeof t>"u"}function tt(t){return Mt(t)==="object"&&t!==null}var ma=Object.prototype.hasOwnProperty;function at(t){if(!tt(t))return!1;try{var a=t.constructor,i=a.prototype;return a&&i&&ma.call(i,"isPrototypeOf")}catch{return!1}}function T(t){return typeof t=="function"}var ha=Array.prototype.slice;function ji(t){return Array.from?Array.from(t):ha.call(t)}function z(t,a){return t&&T(a)&&(Array.isArray(t)||v(t.length)?ji(t).forEach(function(i,e){a.call(t,i,e,t)}):tt(t)&&Object.keys(t).forEach(function(i){a.call(t,t[i],i,t)})),t}var w=Object.assign||function(t){for(var a=arguments.length,i=new Array(a>1?a-1:0),e=1;e0&&i.forEach(function(n){tt(n)&&Object.keys(n).forEach(function(o){t[o]=n[o]})}),t},ua=/\.\d*(?:0|9){12}\d*$/;function nt(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return ua.test(t)?Math.round(t*a)/a:t}var va=/^width|height|left|top|marginLeft|marginTop$/;function V(t,a){var i=t.style;z(a,function(e,n){va.test(n)&&v(e)&&(e="".concat(e,"px")),i[n]=e})}function ga(t,a){return t.classList?t.classList.contains(a):t.className.indexOf(a)>-1}function M(t,a){if(a){if(v(t.length)){z(t,function(e){M(e,a)});return}if(t.classList){t.classList.add(a);return}var i=t.className.trim();i?i.indexOf(a)<0&&(t.className="".concat(i," ").concat(a)):t.className=a}}function S(t,a){if(a){if(v(t.length)){z(t,function(i){S(i,a)});return}if(t.classList){t.classList.remove(a);return}t.className.indexOf(a)>=0&&(t.className=t.className.replace(a,""))}}function et(t,a,i){if(a){if(v(t.length)){z(t,function(e){et(e,a,i)});return}i?M(t,a):S(t,a)}}var fa=/([a-z\d])([A-Z])/g;function _t(t){return t.replace(fa,"$1-$2").toLowerCase()}function Lt(t,a){return tt(t[a])?t[a]:t.dataset?t.dataset[a]:t.getAttribute("data-".concat(_t(a)))}function mt(t,a,i){tt(i)?t[a]=i:t.dataset?t.dataset[a]=i:t.setAttribute("data-".concat(_t(a)),i)}function xa(t,a){if(tt(t[a]))try{delete t[a]}catch{t[a]=void 0}else if(t.dataset)try{delete t.dataset[a]}catch{t.dataset[a]=void 0}else t.removeAttribute("data-".concat(_t(a)))}var zi=/\s\s*/,Mi=function(){var t=!1;if(ft){var a=!1,i=function(){},e=Object.defineProperty({},"once",{get:function(){return t=!0,a},set:function(n){a=n}});_.addEventListener("test",i,e),_.removeEventListener("test",i,e)}return t}();function W(t,a,i){var e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=i;a.trim().split(zi).forEach(function(o){if(!Mi){var p=t.listeners;p&&p[o]&&p[o][i]&&(n=p[o][i],delete p[o][i],Object.keys(p[o]).length===0&&delete p[o],Object.keys(p).length===0&&delete t.listeners)}t.removeEventListener(o,n,e)})}function L(t,a,i){var e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=i;a.trim().split(zi).forEach(function(o){if(e.once&&!Mi){var p=t.listeners,l=p===void 0?{}:p;n=function(){delete l[o][i],t.removeEventListener(o,n,e);for(var c=arguments.length,s=new Array(c),r=0;rMath.abs(i)&&(i=u)})}),i}function vt(t,a){var i=t.pageX,e=t.pageY,n={endX:i,endY:e};return a?n:hi({startX:i,startY:e},n)}function ya(t){var a=0,i=0,e=0;return z(t,function(n){var o=n.startX,p=n.startY;a+=o,i+=p,e+=1}),a/=e,i/=e,{pageX:a,pageY:i}}function F(t){var a=t.aspectRatio,i=t.height,e=t.width,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",o=si(e),p=si(i);if(o&&p){var l=i*a;n==="contain"&&l>e||n==="cover"&&l90?{width:c,height:l}:{width:l,height:c}}function ja(t,a,i,e){var n=a.aspectRatio,o=a.naturalWidth,p=a.naturalHeight,l=a.rotate,c=l===void 0?0:l,s=a.scaleX,r=s===void 0?1:s,d=a.scaleY,u=d===void 0?1:d,h=i.aspectRatio,x=i.naturalWidth,f=i.naturalHeight,k=e.fillColor,C=k===void 0?"transparent":k,y=e.imageSmoothingEnabled,X=y===void 0?!0:y,O=e.imageSmoothingQuality,m=O===void 0?"low":O,g=e.maxWidth,j=g===void 0?1/0:g,H=e.maxHeight,I=H===void 0?1/0:H,Q=e.minWidth,G=Q===void 0?0:Q,Y=e.minHeight,U=Y===void 0?0:Y,Z=document.createElement("canvas"),D=Z.getContext("2d"),ht=F({aspectRatio:h,width:j,height:I}),It=F({aspectRatio:h,width:G,height:U},"cover"),bt=Math.min(ht.width,Math.max(It.width,x)),wt=Math.min(ht.height,Math.max(It.height,f)),Pt=F({aspectRatio:n,width:j,height:I}),Xt=F({aspectRatio:n,width:G,height:U},"cover"),Yt=Math.min(Pt.width,Math.max(Xt.width,o)),Ut=Math.min(Pt.height,Math.max(Xt.height,p)),Ti=[-Yt/2,-Ut/2,Yt,Ut];return Z.width=nt(bt),Z.height=nt(wt),D.fillStyle=C,D.fillRect(0,0,bt,wt),D.save(),D.translate(bt/2,wt/2),D.rotate(c*Math.PI/180),D.scale(r,u),D.imageSmoothingEnabled=X,D.imageSmoothingQuality=m,D.drawImage.apply(D,[t].concat(ui(Ti.map(function(Ni){return Math.floor(nt(Ni))})))),D.restore(),Z}var Di=String.fromCharCode;function za(t,a,i){var e="";i+=a;for(var n=a;n0;)i.push(Di.apply(null,ji(n.subarray(0,e)))),n=n.subarray(e);return"data:".concat(a,";base64,").concat(btoa(i.join("")))}function Ba(t){var a=new DataView(t),i;try{var e,n,o;if(a.getUint8(0)===255&&a.getUint8(1)===216)for(var p=a.byteLength,l=2;l+1=8&&(o=s+d)}}}if(o){var u=a.getUint16(o,e),h,x;for(x=0;x=0?n:yi),height:Math.max(i.offsetHeight,o>=0?o:ki)};this.containerData=p,V(e,{width:p.width,height:p.height}),M(t,N),S(e,N)},initCanvas:function(){var t=this.containerData,a=this.imageData,i=this.options.viewMode,e=Math.abs(a.rotate)%180===90,n=e?a.naturalHeight:a.naturalWidth,o=e?a.naturalWidth:a.naturalHeight,p=n/o,l=t.width,c=t.height;t.height*p>t.width?i===3?l=t.height*p:c=t.width/p:i===3?c=t.width/p:l=t.height*p;var s={aspectRatio:p,naturalWidth:n,naturalHeight:o,width:l,height:c};this.canvasData=s,this.limited=i===1||i===2,this.limitCanvas(!0,!0),s.width=Math.min(Math.max(s.width,s.minWidth),s.maxWidth),s.height=Math.min(Math.max(s.height,s.minHeight),s.maxHeight),s.left=(t.width-s.width)/2,s.top=(t.height-s.height)/2,s.oldLeft=s.left,s.oldTop=s.top,this.initialCanvasData=w({},s)},limitCanvas:function(t,a){var i=this.options,e=this.containerData,n=this.canvasData,o=this.cropBoxData,p=i.viewMode,l=n.aspectRatio,c=this.cropped&&o;if(t){var s=Number(i.minCanvasWidth)||0,r=Number(i.minCanvasHeight)||0;p>1?(s=Math.max(s,e.width),r=Math.max(r,e.height),p===3&&(r*l>s?s=r*l:r=s/l)):p>0&&(s?s=Math.max(s,c?o.width:0):r?r=Math.max(r,c?o.height:0):c&&(s=o.width,r=o.height,r*l>s?s=r*l:r=s/l));var d=F({aspectRatio:l,width:s,height:r});s=d.width,r=d.height,n.minWidth=s,n.minHeight=r,n.maxWidth=1/0,n.maxHeight=1/0}if(a)if(p>(c?0:1)){var u=e.width-n.width,h=e.height-n.height;n.minLeft=Math.min(0,u),n.minTop=Math.min(0,h),n.maxLeft=Math.max(0,u),n.maxTop=Math.max(0,h),c&&this.limited&&(n.minLeft=Math.min(o.left,o.left+(o.width-n.width)),n.minTop=Math.min(o.top,o.top+(o.height-n.height)),n.maxLeft=o.left,n.maxTop=o.top,p===2&&(n.width>=e.width&&(n.minLeft=Math.min(0,u),n.maxLeft=Math.max(0,u)),n.height>=e.height&&(n.minTop=Math.min(0,h),n.maxTop=Math.max(0,h))))}else n.minLeft=-n.width,n.minTop=-n.height,n.maxLeft=e.width,n.maxTop=e.height},renderCanvas:function(t,a){var i=this.canvasData,e=this.imageData;if(a){var n=ka({width:e.naturalWidth*Math.abs(e.scaleX||1),height:e.naturalHeight*Math.abs(e.scaleY||1),degree:e.rotate||0}),o=n.width,p=n.height,l=i.width*(o/i.naturalWidth),c=i.height*(p/i.naturalHeight);i.left-=(l-i.width)/2,i.top-=(c-i.height)/2,i.width=l,i.height=c,i.aspectRatio=o/p,i.naturalWidth=o,i.naturalHeight=p,this.limitCanvas(!0,!1)}(i.width>i.maxWidth||i.widthi.maxHeight||i.heighta.width?n.height=n.width/i:n.width=n.height*i),this.cropBoxData=n,this.limitCropBox(!0,!0),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),n.width=Math.max(n.minWidth,n.width*e),n.height=Math.max(n.minHeight,n.height*e),n.left=a.left+(a.width-n.width)/2,n.top=a.top+(a.height-n.height)/2,n.oldLeft=n.left,n.oldTop=n.top,this.initialCropBoxData=w({},n)},limitCropBox:function(t,a){var i=this.options,e=this.containerData,n=this.canvasData,o=this.cropBoxData,p=this.limited,l=i.aspectRatio;if(t){var c=Number(i.minCropBoxWidth)||0,s=Number(i.minCropBoxHeight)||0,r=p?Math.min(e.width,n.width,n.width+n.left,e.width-n.left):e.width,d=p?Math.min(e.height,n.height,n.height+n.top,e.height-n.top):e.height;c=Math.min(c,e.width),s=Math.min(s,e.height),l&&(c&&s?s*l>c?s=c/l:c=s*l:c?s=c/l:s&&(c=s*l),d*l>r?d=r/l:r=d*l),o.minWidth=Math.min(c,r),o.minHeight=Math.min(s,d),o.maxWidth=r,o.maxHeight=d}a&&(p?(o.minLeft=Math.max(0,n.left),o.minTop=Math.max(0,n.top),o.maxLeft=Math.min(e.width,n.left+n.width)-o.width,o.maxTop=Math.min(e.height,n.top+n.height)-o.height):(o.minLeft=0,o.minTop=0,o.maxLeft=e.width-o.width,o.maxTop=e.height-o.height))},renderCropBox:function(){var t=this.options,a=this.containerData,i=this.cropBoxData;(i.width>i.maxWidth||i.widthi.maxHeight||i.height=a.width&&i.height>=a.height?fi:Ht),V(this.cropBox,w({width:i.width,height:i.height},ct({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),ot(this.element,At,this.getData())}},Oa={initPreview:function(){var t=this.element,a=this.crossOrigin,i=this.options.preview,e=a?this.crossOriginUrl:this.url,n=t.alt||"The image to preview",o=document.createElement("img");if(a&&(o.crossOrigin=a),o.src=e,o.alt=n,this.viewBox.appendChild(o),this.viewBoxImage=o,!!i){var p=i;typeof i=="string"?p=t.ownerDocument.querySelectorAll(i):i.querySelector&&(p=[i]),this.previews=p,z(p,function(l){var c=document.createElement("img");mt(l,ut,{width:l.offsetWidth,height:l.offsetHeight,html:l.innerHTML}),a&&(c.crossOrigin=a),c.src=e,c.alt=n,c.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',l.innerHTML="",l.appendChild(c)})}},resetPreview:function(){z(this.previews,function(t){var a=Lt(t,ut);V(t,{width:a.width,height:a.height}),t.innerHTML=a.html,xa(t,ut)})},preview:function(){var t=this.imageData,a=this.canvasData,i=this.cropBoxData,e=i.width,n=i.height,o=t.width,p=t.height,l=i.left-a.left-t.left,c=i.top-a.top-t.top;!this.cropped||this.disabled||(V(this.viewBoxImage,w({width:o,height:p},ct(w({translateX:-l,translateY:-c},t)))),z(this.previews,function(s){var r=Lt(s,ut),d=r.width,u=r.height,h=d,x=u,f=1;e&&(f=d/e,x=n*f),n&&x>u&&(f=u/n,h=e*f,x=u),V(s,{width:h,height:x}),V(s.getElementsByTagName("img")[0],w({width:o*f,height:p*f},ct(w({translateX:-l*f,translateY:-c*f},t))))}))}},Ta={bind:function(){var t=this.element,a=this.options,i=this.cropper;T(a.cropstart)&&L(t,Tt,a.cropstart),T(a.cropmove)&&L(t,Ot,a.cropmove),T(a.cropend)&&L(t,Et,a.cropend),T(a.crop)&&L(t,At,a.crop),T(a.zoom)&&L(t,Nt,a.zoom),L(i,Jt,this.onCropStart=this.cropStart.bind(this)),a.zoomable&&a.zoomOnWheel&&L(i,ni,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),a.toggleDragModeOnDblclick&&L(i,Kt,this.onDblclick=this.dblclick.bind(this)),L(t.ownerDocument,ti,this.onCropMove=this.cropMove.bind(this)),L(t.ownerDocument,ii,this.onCropEnd=this.cropEnd.bind(this)),a.responsive&&L(window,ei,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,a=this.options,i=this.cropper;T(a.cropstart)&&W(t,Tt,a.cropstart),T(a.cropmove)&&W(t,Ot,a.cropmove),T(a.cropend)&&W(t,Et,a.cropend),T(a.crop)&&W(t,At,a.crop),T(a.zoom)&&W(t,Nt,a.zoom),W(i,Jt,this.onCropStart),a.zoomable&&a.zoomOnWheel&&W(i,ni,this.onWheel,{passive:!1,capture:!0}),a.toggleDragModeOnDblclick&&W(i,Kt,this.onDblclick),W(t.ownerDocument,ti,this.onCropMove),W(t.ownerDocument,ii,this.onCropEnd),a.responsive&&W(window,ei,this.onResize)}},Na={resize:function(){if(!this.disabled){var t=this.options,a=this.container,i=this.containerData,e=a.offsetWidth/i.width,n=a.offsetHeight/i.height,o=Math.abs(e-1)>Math.abs(n-1)?e:n;if(o!==1){var p,l;t.restore&&(p=this.getCanvasData(),l=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(z(p,function(c,s){p[s]=c*o})),this.setCropBoxData(z(l,function(c,s){l[s]=c*o})))}}},dblclick:function(){this.disabled||this.options.dragMode===wi||this.setDragMode(ga(this.dragBox,Dt)?bi:St)},wheel:function(t){var a=this,i=Number(this.options.wheelZoomRatio)||.1,e=1;this.disabled||(t.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){a.wheeling=!1},50),t.deltaY?e=t.deltaY>0?1:-1:t.wheelDelta?e=-t.wheelDelta/120:t.detail&&(e=t.detail>0?1:-1),this.zoom(-e*i,t)))},cropStart:function(t){var a=t.buttons,i=t.button;if(!(this.disabled||(t.type==="mousedown"||t.type==="pointerdown"&&t.pointerType==="mouse")&&(v(a)&&a!==1||v(i)&&i!==0||t.ctrlKey))){var e=this.options,n=this.pointers,o;t.changedTouches?z(t.changedTouches,function(p){n[p.identifier]=vt(p)}):n[t.pointerId||0]=vt(t),Object.keys(n).length>1&&e.zoomable&&e.zoomOnTouch?o=xi:o=Lt(t.target,dt),pa.test(o)&&ot(this.element,Tt,{originalEvent:t,action:o})!==!1&&(t.preventDefault(),this.action=o,this.cropping=!1,o===gi&&(this.cropping=!0,M(this.dragBox,gt)))}},cropMove:function(t){var a=this.action;if(!(this.disabled||!a)){var i=this.pointers;t.preventDefault(),ot(this.element,Ot,{originalEvent:t,action:a})!==!1&&(t.changedTouches?z(t.changedTouches,function(e){w(i[e.identifier]||{},vt(e,!0))}):w(i[t.pointerId||0]||{},vt(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var a=this.action,i=this.pointers;t.changedTouches?z(t.changedTouches,function(e){delete i[e.identifier]}):delete i[t.pointerId||0],a&&(t.preventDefault(),Object.keys(i).length||(this.action=""),this.cropping&&(this.cropping=!1,et(this.dragBox,gt,this.cropped&&this.options.modal)),ot(this.element,Et,{originalEvent:t,action:a}))}}},La={change:function(t){var a=this.options,i=this.canvasData,e=this.containerData,n=this.cropBoxData,o=this.pointers,p=this.action,l=a.aspectRatio,c=n.left,s=n.top,r=n.width,d=n.height,u=c+r,h=s+d,x=0,f=0,k=e.width,C=e.height,y=!0,X;!l&&t.shiftKey&&(l=r&&d?r/d:1),this.limited&&(x=n.minLeft,f=n.minTop,k=x+Math.min(e.width,i.width,i.left+i.width),C=f+Math.min(e.height,i.height,i.top+i.height));var O=o[Object.keys(o)[0]],m={x:O.endX-O.startX,y:O.endY-O.startY},g=function(j){switch(j){case K:u+m.x>k&&(m.x=k-u);break;case J:c+m.xC&&(m.y=C-h);break}};switch(p){case Ht:c+=m.x,s+=m.y;break;case K:if(m.x>=0&&(u>=k||l&&(s<=f||h>=C))){y=!1;break}g(K),r+=m.x,r<0&&(p=J,r=-r,c-=r),l&&(d=r/l,s+=(n.height-d)/2);break;case $:if(m.y<=0&&(s<=f||l&&(c<=x||u>=k))){y=!1;break}g($),d-=m.y,s+=m.y,d<0&&(p=it,d=-d,s-=d),l&&(r=d*l,c+=(n.width-r)/2);break;case J:if(m.x<=0&&(c<=x||l&&(s<=f||h>=C))){y=!1;break}g(J),r-=m.x,c+=m.x,r<0&&(p=K,r=-r,c-=r),l&&(d=r/l,s+=(n.height-d)/2);break;case it:if(m.y>=0&&(h>=C||l&&(c<=x||u>=k))){y=!1;break}g(it),d+=m.y,d<0&&(p=$,d=-d,s-=d),l&&(r=d*l,c+=(n.width-r)/2);break;case pt:if(l){if(m.y<=0&&(s<=f||u>=k)){y=!1;break}g($),d-=m.y,s+=m.y,r=d*l}else g($),g(K),m.x>=0?uf&&(d-=m.y,s+=m.y):(d-=m.y,s+=m.y);r<0&&d<0?(p=lt,d=-d,r=-r,s-=d,c-=r):r<0?(p=st,r=-r,c-=r):d<0&&(p=rt,d=-d,s-=d);break;case st:if(l){if(m.y<=0&&(s<=f||c<=x)){y=!1;break}g($),d-=m.y,s+=m.y,r=d*l,c+=n.width-r}else g($),g(J),m.x<=0?c>x?(r-=m.x,c+=m.x):m.y<=0&&s<=f&&(y=!1):(r-=m.x,c+=m.x),m.y<=0?s>f&&(d-=m.y,s+=m.y):(d-=m.y,s+=m.y);r<0&&d<0?(p=rt,d=-d,r=-r,s-=d,c-=r):r<0?(p=pt,r=-r,c-=r):d<0&&(p=lt,d=-d,s-=d);break;case lt:if(l){if(m.x<=0&&(c<=x||h>=C)){y=!1;break}g(J),r-=m.x,c+=m.x,d=r/l}else g(it),g(J),m.x<=0?c>x?(r-=m.x,c+=m.x):m.y>=0&&h>=C&&(y=!1):(r-=m.x,c+=m.x),m.y>=0?h=0&&(u>=k||h>=C)){y=!1;break}g(K),r+=m.x,d=r/l}else g(it),g(K),m.x>=0?u=0&&h>=C&&(y=!1):r+=m.x,m.y>=0?h0?p=m.y>0?rt:pt:m.x<0&&(c-=r,p=m.y>0?lt:st),m.y<0&&(s-=d),this.cropped||(S(this.cropBox,N),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}y&&(n.width=r,n.height=d,n.left=c,n.top=s,this.action=p,this.renderCropBox()),z(o,function(j){j.startX=j.endX,j.startY=j.endY})}},Ra={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&M(this.dragBox,gt),S(this.cropBox,N),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=w({},this.initialImageData),this.canvasData=w({},this.initialCanvasData),this.cropBoxData=w({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(w(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),S(this.dragBox,gt),M(this.cropBox,N)),this},replace:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&t&&(this.isImg&&(this.element.src=t),a?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,z(this.previews,function(i){i.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,S(this.cropper,Gt)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,M(this.cropper,Gt)),this},destroy:function(){var t=this.element;return t[b]?(t[b]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.canvasData,e=i.left,n=i.top;return this.moveTo(jt(t)?t:e+Number(t),jt(a)?a:n+Number(a))},moveTo:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.canvasData,e=!1;return t=Number(t),a=Number(a),this.ready&&!this.disabled&&this.options.movable&&(v(t)&&(i.left=t,e=!0),v(a)&&(i.top=a,e=!0),e&&this.renderCanvas(!0)),this},zoom:function(t,a){var i=this.canvasData;return t=Number(t),t<0?t=1/(1-t):t=1+t,this.zoomTo(i.width*t/i.naturalWidth,null,a)},zoomTo:function(t,a,i){var e=this.options,n=this.canvasData,o=n.width,p=n.height,l=n.naturalWidth,c=n.naturalHeight;if(t=Number(t),t>=0&&this.ready&&!this.disabled&&e.zoomable){var s=l*t,r=c*t;if(ot(this.element,Nt,{ratio:t,oldRatio:o/l,originalEvent:i})===!1)return this;if(i){var d=this.pointers,u=Ci(this.cropper),h=d&&Object.keys(d).length?ya(d):{pageX:i.pageX,pageY:i.pageY};n.left-=(s-o)*((h.pageX-u.left-n.left)/o),n.top-=(r-p)*((h.pageY-u.top-n.top)/p)}else at(a)&&v(a.x)&&v(a.y)?(n.left-=(s-o)*((a.x-n.left)/o),n.top-=(r-p)*((a.y-n.top)/p)):(n.left-=(s-o)/2,n.top-=(r-p)/2);n.width=s,n.height=r,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return t=Number(t),v(t)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var a=this.imageData.scaleY;return this.scale(t,v(a)?a:1)},scaleY:function(t){var a=this.imageData.scaleX;return this.scale(v(a)?a:1,t)},scale:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.imageData,e=!1;return t=Number(t),a=Number(a),this.ready&&!this.disabled&&this.options.scalable&&(v(t)&&(i.scaleX=t,e=!0),v(a)&&(i.scaleY=a,e=!0),e&&this.renderCanvas(!0,!0)),this},getData:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,a=this.options,i=this.imageData,e=this.canvasData,n=this.cropBoxData,o;if(this.ready&&this.cropped){o={x:n.left-e.left,y:n.top-e.top,width:n.width,height:n.height};var p=i.width/i.naturalWidth;if(z(o,function(s,r){o[r]=s/p}),t){var l=Math.round(o.y+o.height),c=Math.round(o.x+o.width);o.x=Math.round(o.x),o.y=Math.round(o.y),o.width=c-o.x,o.height=l-o.y}}else o={x:0,y:0,width:0,height:0};return a.rotatable&&(o.rotate=i.rotate||0),a.scalable&&(o.scaleX=i.scaleX||1,o.scaleY=i.scaleY||1),o},setData:function(t){var a=this.options,i=this.imageData,e=this.canvasData,n={};if(this.ready&&!this.disabled&&at(t)){var o=!1;a.rotatable&&v(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,o=!0),a.scalable&&(v(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,o=!0),v(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var p=i.width/i.naturalWidth;v(t.x)&&(n.left=t.x*p+e.left),v(t.y)&&(n.top=t.y*p+e.top),v(t.width)&&(n.width=t.width*p),v(t.height)&&(n.height=t.height*p),this.setCropBoxData(n)}return this},getContainerData:function(){return this.ready?w({},this.containerData):{}},getImageData:function(){return this.sized?w({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,a={};return this.ready&&z(["left","top","width","height","naturalWidth","naturalHeight"],function(i){a[i]=t[i]}),a},setCanvasData:function(t){var a=this.canvasData,i=a.aspectRatio;return this.ready&&!this.disabled&&at(t)&&(v(t.left)&&(a.left=t.left),v(t.top)&&(a.top=t.top),v(t.width)?(a.width=t.width,a.height=t.width/i):v(t.height)&&(a.height=t.height,a.width=t.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var t=this.cropBoxData,a;return this.ready&&this.cropped&&(a={left:t.left,top:t.top,width:t.width,height:t.height}),a||{}},setCropBoxData:function(t){var a=this.cropBoxData,i=this.options.aspectRatio,e,n;return this.ready&&this.cropped&&!this.disabled&&at(t)&&(v(t.left)&&(a.left=t.left),v(t.top)&&(a.top=t.top),v(t.width)&&t.width!==a.width&&(e=!0,a.width=t.width),v(t.height)&&t.height!==a.height&&(n=!0,a.height=t.height),i&&(e?a.height=a.width/i:n&&(a.width=a.height*i)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var a=this.canvasData,i=ja(this.image,this.imageData,a,t);if(!this.cropped)return i;var e=this.getData(t.rounded),n=e.x,o=e.y,p=e.width,l=e.height,c=i.width/Math.floor(a.naturalWidth);c!==1&&(n*=c,o*=c,p*=c,l*=c);var s=p/l,r=F({aspectRatio:s,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),d=F({aspectRatio:s,width:t.minWidth||0,height:t.minHeight||0},"cover"),u=F({aspectRatio:s,width:t.width||(c!==1?i.width:p),height:t.height||(c!==1?i.height:l)}),h=u.width,x=u.height;h=Math.min(r.width,Math.max(d.width,h)),x=Math.min(r.height,Math.max(d.height,x));var f=document.createElement("canvas"),k=f.getContext("2d");f.width=nt(h),f.height=nt(x),k.fillStyle=t.fillColor||"transparent",k.fillRect(0,0,h,x);var C=t.imageSmoothingEnabled,y=C===void 0?!0:C,X=t.imageSmoothingQuality;k.imageSmoothingEnabled=y,X&&(k.imageSmoothingQuality=X);var O=i.width,m=i.height,g=n,j=o,H,I,Q,G,Y,U;g<=-p||g>O?(g=0,H=0,Q=0,Y=0):g<=0?(Q=-g,g=0,H=Math.min(O,p+g),Y=H):g<=O&&(Q=0,H=Math.min(p,O-g),Y=H),H<=0||j<=-l||j>m?(j=0,I=0,G=0,U=0):j<=0?(G=-j,j=0,I=Math.min(m,l+j),U=I):j<=m&&(G=0,I=Math.min(l,m-j),U=I);var Z=[g,j,H,I];if(Y>0&&U>0){var D=h/p;Z.push(Q*D,G*D,Y*D,U*D)}return k.drawImage.apply(k,[i].concat(ui(Z.map(function(ht){return Math.floor(nt(ht))})))),f},setAspectRatio:function(t){var a=this.options;return!this.disabled&&!jt(t)&&(a.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var a=this.options,i=this.dragBox,e=this.face;if(this.ready&&!this.disabled){var n=t===St,o=a.movable&&t===bi;t=n||o?t:wi,a.dragMode=t,mt(i,dt,t),et(i,Dt,n),et(i,Bt,o),a.cropBoxMovable||(mt(e,dt,t),et(e,Dt,n),et(e,Bt,o))}return this}},qa=_.Cropper,Bi=function(){function t(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Fi(this,t),!a||!la.test(a.tagName))throw new Error("The first argument is required and must be an or element.");this.element=a,this.options=w({},pi,at(i)&&i),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return Qi(t,[{key:"init",value:function(){var a=this.element,i=a.tagName.toLowerCase(),e;if(!a[b]){if(a[b]=this,i==="img"){if(this.isImg=!0,e=a.getAttribute("src")||"",this.originalUrl=e,!e)return;e=a.src}else i==="canvas"&&window.HTMLCanvasElement&&(e=a.toDataURL());this.load(e)}}},{key:"load",value:function(a){var i=this;if(a){this.url=a,this.imageData={};var e=this.element,n=this.options;if(!n.rotatable&&!n.scalable&&(n.checkOrientation=!1),!n.checkOrientation||!window.ArrayBuffer){this.clone();return}if(sa.test(a)){ra.test(a)?this.read(Ca(a)):this.clone();return}var o=new XMLHttpRequest,p=this.clone.bind(this);this.reloading=!0,this.xhr=o,o.onabort=p,o.onerror=p,o.ontimeout=p,o.onprogress=function(){o.getResponseHeader("content-type")!==oi&&o.abort()},o.onload=function(){i.read(o.response)},o.onloadend=function(){i.reloading=!1,i.xhr=null},n.checkCrossOrigin&&ri(a)&&e.crossOrigin&&(a=li(a)),o.open("GET",a,!0),o.responseType="arraybuffer",o.withCredentials=e.crossOrigin==="use-credentials",o.send()}}},{key:"read",value:function(a){var i=this.options,e=this.imageData,n=Ba(a),o=0,p=1,l=1;if(n>1){this.url=Da(a,oi);var c=Aa(n);o=c.rotate,p=c.scaleX,l=c.scaleY}i.rotatable&&(e.rotate=o),i.scalable&&(e.scaleX=p,e.scaleY=l),this.clone()}},{key:"clone",value:function(){var a=this.element,i=this.url,e=a.crossOrigin,n=i;this.options.checkCrossOrigin&&ri(i)&&(e||(e="anonymous"),n=li(i)),this.crossOrigin=e,this.crossOriginUrl=n;var o=document.createElement("img");e&&(o.crossOrigin=e),o.src=n||i,o.alt=a.alt||"The image to crop",this.image=o,o.onload=this.start.bind(this),o.onerror=this.stop.bind(this),M(o,Zt),a.parentNode.insertBefore(o,a.nextSibling)}},{key:"start",value:function(){var a=this,i=this.image;i.onload=null,i.onerror=null,this.sizing=!0;var e=_.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(_.navigator.userAgent),n=function(l,c){w(a.imageData,{naturalWidth:l,naturalHeight:c,aspectRatio:l/c}),a.initialImageData=w({},a.imageData),a.sizing=!1,a.sized=!0,a.build()};if(i.naturalWidth&&!e){n(i.naturalWidth,i.naturalHeight);return}var o=document.createElement("img"),p=document.body||document.documentElement;this.sizingImage=o,o.onload=function(){n(o.width,o.height),e||p.removeChild(o)},o.src=i.src,e||(o.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",p.appendChild(o))}},{key:"stop",value:function(){var a=this.image;a.onload=null,a.onerror=null,a.parentNode.removeChild(a),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var a=this.element,i=this.options,e=this.image,n=a.parentNode,o=document.createElement("div");o.innerHTML=ca;var p=o.querySelector(".".concat(b,"-container")),l=p.querySelector(".".concat(b,"-canvas")),c=p.querySelector(".".concat(b,"-drag-box")),s=p.querySelector(".".concat(b,"-crop-box")),r=s.querySelector(".".concat(b,"-face"));this.container=n,this.cropper=p,this.canvas=l,this.dragBox=c,this.cropBox=s,this.viewBox=p.querySelector(".".concat(b,"-view-box")),this.face=r,l.appendChild(e),M(a,N),n.insertBefore(p,a.nextSibling),S(e,Zt),this.initPreview(),this.bind(),i.initialAspectRatio=Math.max(0,i.initialAspectRatio)||NaN,i.aspectRatio=Math.max(0,i.aspectRatio)||NaN,i.viewMode=Math.max(0,Math.min(3,Math.round(i.viewMode)))||0,M(s,N),i.guides||M(s.getElementsByClassName("".concat(b,"-dashed")),N),i.center||M(s.getElementsByClassName("".concat(b,"-center")),N),i.background&&M(p,"".concat(b,"-bg")),i.highlight||M(r,aa),i.cropBoxMovable&&(M(r,Bt),mt(r,dt,Ht)),i.cropBoxResizable||(M(s.getElementsByClassName("".concat(b,"-line")),N),M(s.getElementsByClassName("".concat(b,"-point")),N)),this.render(),this.ready=!0,this.setDragMode(i.dragMode),i.autoCrop&&this.crop(),this.setData(i.data),T(i.ready)&&L(a,ai,i.ready,{once:!0}),ot(a,ai)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var a=this.cropper.parentNode;a&&a.removeChild(this.cropper),S(this.element,N)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=qa,t}},{key:"setDefaults",value:function(a){w(pi,at(a)&&a)}}]),t}();w(Bi.prototype,Ea,Oa,Ta,Na,La,Ra);function Wa(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function xt(){this._types=Object.create(null),this._extensions=Object.create(null);for(let t=0;t{if(!Ei||document.querySelector(a)){n();return}function o(p){p.addEventListener("load",e),p.addEventListener("error",n),p.addEventListener("abort",n)}switch(t){case"js":{const p=document.createElement("script");p.async=!0,p.src=i,o(p),document.head.appendChild(p);break}case"css":{const p=document.createElement("link");p.id=a,p.rel="stylesheet",p.href=i,o(p),document.head.appendChild(p);break}case"style":{const p=document.createElement("style");p.id=a,o(p),document.head.appendChild(p),p.appendChild(document.createTextNode(i));break}}})}function ci({mode:t,dataURI:a}){return t==="round"?"image/png":Ua(a)}function di(t){const a=document.createElement("canvas"),i=a.getContext("2d");if(!i)return a;const{width:e,height:n}=t;return a.width=e,a.height=n,i.imageSmoothingEnabled=!0,i.drawImage(t,0,0,e,n),i.globalCompositeOperation="destination-in",i.beginPath(),i.arc(e/2,n/2,Math.min(e,n)/2,0,2*Math.PI,!0),i.fill(),a}function mi(t,a={}){if(!Ai(t))return a;const{mode:i,width:e,height:n}=t;switch(i){case"fixedSize":case"round":{a.width=e,a.height=n;break}}return a}const $a={img:{type:String,required:!0,default:""},boxStyle:{type:Object,required:!1,default:()=>({})},options:{type:Object,required:!1,default:()=>({})},presetMode:{type:Object,required:!1,default:()=>({})}},Va=`/*! - * Cropper.js v1.6.1 - * https://fengyuanchen.github.io/cropperjs - * - * Copyright 2015-present Chen Fengyuan - * Released under the MIT license - * - * Date: 2023-09-17T03:44:17.565Z - */.cropper-container{direction:ltr;font-size:0;line-height:0;position:relative;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.cropper-container img{backface-visibility:hidden;display:block;height:100%;image-orientation:0deg;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.cropper-wrap-box,.cropper-canvas,.cropper-drag-box,.cropper-crop-box,.cropper-modal{bottom:0;left:0;position:absolute;right:0;top:0}.cropper-wrap-box,.cropper-canvas{overflow:hidden}.cropper-drag-box{background-color:#fff;opacity:0}.cropper-modal{background-color:#000;opacity:.5}.cropper-view-box{display:block;height:100%;outline:1px solid #39f;outline-color:#3399ffbf;overflow:hidden;width:100%}.cropper-dashed{border:0 dashed #eee;display:block;opacity:.5;position:absolute}.cropper-dashed.dashed-h{border-bottom-width:1px;border-top-width:1px;height:calc(100% / 3);left:0;top:calc(100% / 3);width:100%}.cropper-dashed.dashed-v{border-left-width:1px;border-right-width:1px;height:100%;left:calc(100% / 3);top:0;width:calc(100% / 3)}.cropper-center{display:block;height:0;left:50%;opacity:.75;position:absolute;top:50%;width:0}.cropper-center:before,.cropper-center:after{background-color:#eee;content:" ";display:block;position:absolute}.cropper-center:before{height:1px;left:-3px;top:0;width:7px}.cropper-center:after{height:7px;left:0;top:-3px;width:1px}.cropper-face,.cropper-line,.cropper-point{display:block;height:100%;opacity:.1;position:absolute;width:100%}.cropper-face{background-color:#fff;left:0;top:0}.cropper-line{background-color:#39f}.cropper-line.line-e{cursor:ew-resize;right:-3px;top:0;width:5px}.cropper-line.line-n{cursor:ns-resize;height:5px;left:0;top:-3px}.cropper-line.line-w{cursor:ew-resize;left:-3px;top:0;width:5px}.cropper-line.line-s{bottom:-3px;cursor:ns-resize;height:5px;left:0}.cropper-point{background-color:#39f;height:5px;opacity:.75;width:5px}.cropper-point.point-e{cursor:ew-resize;margin-top:-3px;right:-3px;top:50%}.cropper-point.point-n{cursor:ns-resize;left:50%;margin-left:-3px;top:-3px}.cropper-point.point-w{cursor:ew-resize;left:-3px;margin-top:-3px;top:50%}.cropper-point.point-s{bottom:-3px;cursor:s-resize;left:50%;margin-left:-3px}.cropper-point.point-ne{cursor:nesw-resize;right:-3px;top:-3px}.cropper-point.point-nw{cursor:nwse-resize;left:-3px;top:-3px}.cropper-point.point-sw{bottom:-3px;cursor:nesw-resize;left:-3px}.cropper-point.point-se{bottom:-3px;cursor:nwse-resize;height:20px;opacity:1;right:-3px;width:20px}@media (min-width: 768px){.cropper-point.point-se{height:15px;width:15px}}@media (min-width: 992px){.cropper-point.point-se{height:10px;width:10px}}@media (min-width: 1200px){.cropper-point.point-se{height:5px;opacity:.75;width:5px}}.cropper-point.point-se:before{background-color:#39f;bottom:-50%;content:" ";display:block;height:200%;opacity:0;position:absolute;right:-50%;width:200%}.cropper-invisible{opacity:0}.cropper-bg{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC)}.cropper-hide{display:block;height:0;position:absolute;width:0}.cropper-hidden{display:none!important}.cropper-move{cursor:move}.cropper-crop{cursor:crosshair}.cropper-disabled .cropper-drag-box,.cropper-disabled .cropper-face,.cropper-disabled .cropper-line,.cropper-disabled .cropper-point{cursor:not-allowed} -`,Fa=`.vue--picture-cropper__wrap{width:100%;height:100%;margin:0}.vue--picture-cropper__img{display:block;width:auto;height:auto;max-width:100%;max-height:100%}.vue--picture-cropper__wrap-round .cropper-view-box,.vue--picture-cropper__wrap-round .cropper-face{border-radius:50%} -`;Oi({type:"style",id:"cropperjs",resource:Va}).catch(t=>{console.log(t)});Oi({type:"style",id:"vue-picture-cropper",resource:Fa}).catch(t=>{console.log(t)});let E;const Qa=qi({name:"VuePictureCropper",props:$a,setup(t){const a=$t(),i=$t("");async function e(){await Si();const s=window.setInterval(()=>{if(a.value)try{E=new Bi(a.value,t.options),window.clearInterval(s),o(),i.value=ci({mode:t.presetMode.mode,dataURI:t.img}),a.value.addEventListener("ready",()=>{n()})}catch(r){console.log(r)}},10)}function n(){if(!Ai(t.presetMode))return;const{mode:s,width:r,height:d}=t.presetMode;switch(s){case"fixedSize":case"round":{E.setCropBoxData({width:r,height:d});break}}}function o(){E.getDataURL=p,E.getBlob=l,E.getFile=c}function p(s={}){s=mi(t.presetMode,s);try{let r=E.getCroppedCanvas(s);return t.presetMode.mode==="round"&&(r=di(r)),r.toDataURL(i.value)}catch{return""}}async function l(s={}){return s=mi(t.presetMode,s),new Promise(r=>{try{let d=E.getCroppedCanvas(s);t.presetMode.mode==="round"&&(d=di(d)),d.toBlob(u=>{r(u)},i.value)}catch{r(null)}})}async function c(s={}){const{fileName:r}=s,d=i.value.replace(/image\//,""),u=r?`${r}.${d}`:`cropped-${Date.now()}.${d}`,h=await l(s);return h?new File([h],u,{type:i.value}):null}return Wi(()=>t.img,async()=>{if(!E){await e();return}try{E.replace(t.img),i.value=ci({mode:t.presetMode.mode,dataURI:t.img}),o()}catch(s){console.log(s)}},{immediate:!0}),Hi(()=>{E&&(E.destroy(),E=null)}),()=>P("div",{class:`vue--picture-cropper__wrap ${t.presetMode.mode==="round"?"vue--picture-cropper__wrap-round":""}`,style:t.boxStyle},[P("img",{ref:a,class:"vue--picture-cropper__img",src:t.img},null)])}});var Ga=Object.getOwnPropertyDescriptor,Za=(t,a,i,e)=>{for(var n=e>1?void 0:e?Ga(a,i):a,o=t.length-1,p;o>=0;o--)(p=t[o])&&(n=p(n)||n);return n};let Rt=class extends Pi{constructor(){super(...arguments);A(this,"$notify");A(this,"activeDeviceNumber",0);A(this,"activeDid","");A(this,"blob");A(this,"claimType","");A(this,"crop",!1);A(this,"fileName");A(this,"mirror",!1);A(this,"numDevices",0);A(this,"setImageCallback",()=>{});A(this,"showRetry",!0);A(this,"uploading",!1);A(this,"visible",!1);A(this,"URL",window.URL||window.webkitURL)}async mounted(){try{const i=await Xi();this.activeDid=i.activeDid||""}catch(i){console.error("Error retrieving settings from database:",i),this.$notify({group:"alert",type:"danger",title:"Error",text:i.message||"There was an error retrieving your settings."},-1)}}open(i,e,n,o,p){this.visible=!0,this.claimType=e,this.crop=!!n;const l=document.querySelector("#QuickNav");l&&(l.style.display="none"),this.setImageCallback=i,o?(this.blob=o,this.fileName=p,this.showRetry=!1):(this.blob=void 0,this.fileName=void 0,this.showRetry=!0)}close(){this.visible=!1;const i=document.querySelector("#QuickNav");i&&(i.style.display=""),this.blob=void 0}async cameraStarted(){const i=this.$refs.camera;if(i){this.numDevices=(await i.devices(["videoinput"])).length,this.mirror=i.facingMode==="user";const e=i.currentDeviceID(),n=await i.devices(["videoinput"]);this.activeDeviceNumber=n.findIndex(o=>o.deviceId===e)}}async switchCamera(){const i=this.$refs.camera;this.activeDeviceNumber=(this.activeDeviceNumber+1)%this.numDevices;const e=await(i==null?void 0:i.devices(["videoinput"]));await(i==null?void 0:i.changeCamera(e[this.activeDeviceNumber].deviceId))}async takeImage(){var c,s,r,d,u,h;const i=this.$refs.camera;let e=(c=i==null?void 0:i.resolution)==null?void 0:c.height,n=(s=i==null?void 0:i.resolution)==null?void 0:s.width;const o=n/e,p=window.innerWidth/window.innerHeight;o>1&&p<1?(e=(r=i==null?void 0:i.resolution)==null?void 0:r.width,n=(d=i==null?void 0:i.resolution)==null?void 0:d.height):o<1&&p>1&&(e=(u=i==null?void 0:i.resolution)==null?void 0:u.width,n=(h=i==null?void 0:i.resolution)==null?void 0:h.height);const l=n/e;if(lt.close())},[P(p,{icon:"xmark",class:"w-[1em]"})])]),t.uploading?(q(),R("div",oe,[P(p,{icon:"spinner",class:"fa-spin fa-3x text-center block px-12 py-12"})])):t.blob?(q(),R("div",pe,[t.crop?(q(),R("div",se,[P(l,{"box-style":{backgroundColor:"#f8f8f8",margin:"auto"},img:t.createBlobURL(t.blob),options:{viewMode:1,dragMode:"crop",aspectRatio:9/9},class:"max-h-[90vh] max-w-[90vw] object-contain"},null,8,["img"])])):(q(),R("div",re,[B("div",le,[B("img",{src:t.createBlobURL(t.blob),class:"mt-2 rounded max-h-[90vh] max-w-[90vw] object-contain"},null,8,ce)])])),B("div",de,[B("button",{class:"bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white py-1 px-2 rounded-md",onClick:a[1]||(a[1]=(...s)=>t.uploadImage&&t.uploadImage(...s))},a[7]||(a[7]=[B("span",null,"Upload",-1)]))]),t.showRetry?(q(),R("div",me,[B("button",{class:"bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white py-1 px-2 rounded-md",onClick:a[2]||(a[2]=(...s)=>t.retryImage&&t.retryImage(...s))},a[8]||(a[8]=[B("span",null,"Retry",-1)]))])):kt("",!0)])):(q(),R("div",he,[P(c,{ref:"camera","facing-mode":"environment",autoplay:"",onStarted:a[6]||(a[6]=s=>t.cameraStarted())},{default:$i(()=>[B("div",ue,[B("button",{class:"bg-blue-500 hover:bg-blue-700 text-white font-bold p-3 rounded-full text-2xl leading-none",onClick:a[3]||(a[3]=s=>t.takeImage())},[P(p,{icon:"camera",class:"w-[1em]"})])]),B("div",ve,[B("button",{class:"bg-blue-500 hover:bg-blue-700 text-white font-bold p-3 rounded-full text-2xl leading-none",onClick:a[4]||(a[4]=s=>t.swapMirrorClass())},[P(p,{icon:"left-right",class:"w-[1em]"})])]),t.numDevices>1?(q(),R("div",ge,[B("button",{class:"bg-blue-500 hover:bg-blue-700 text-white font-bold p-3 rounded-full text-2xl leading-none",onClick:a[5]||(a[5]=s=>t.switchCamera())},[P(p,{icon:"rotate",class:"w-[1em]"})])])):kt("",!0)]),_:1},512)],512))])])):kt("",!0)}const ke=Ui(Rt,[["render",fe]]);export{ke as P}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/PhotoDialog-VFFukDsZ.css b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/PhotoDialog-VFFukDsZ.css deleted file mode 100644 index 05b157b..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/PhotoDialog-VFFukDsZ.css +++ /dev/null @@ -1 +0,0 @@ -.dialog-overlay{z-index:60;position:fixed;top:0;left:0;right:0;bottom:0;background-color:#00000080;display:flex;justify-content:center;align-items:center;padding:1.5rem}.dialog{background-color:#fff;padding:1rem;border-radius:.5rem;width:100%;max-width:700px}.mirror-video{transform:scaleX(-1);-webkit-transform:scaleX(-1);-moz-transform:scaleX(-1);-ms-transform:scaleX(-1);-o-transform:scaleX(-1)} diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ProjectIcon-ChPLhl-Y.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ProjectIcon-ChPLhl-Y.js deleted file mode 100644 index 5ac4918..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ProjectIcon-ChPLhl-Y.js +++ /dev/null @@ -1 +0,0 @@ -var K=Object.defineProperty;var N=(o,n,t)=>n in o?K(o,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[n]=t;var O=(o,n,t)=>N(o,typeof n!="symbol"?n+"":n,t);import{a1 as v,C as $,V as U,_ as V,h as F,B as L,k as W}from"./main.common-DD7dqhZp.js";function H(o,n,t){return parseInt(o.substr(n,t),16)}function E(o){return o|=0,o<0?"00":o<16?"0"+o.toString(16):o<256?o.toString(16):"ff"}function A(o,n,t){return t=t<0?t+6:t>6?t-6:t,E(255*(t<1?o+(n-o)*t:t<3?n:t<4?o+(n-o)*(4-t):o))}function Z(o){if(/^#[0-9a-f]{3,8}$/i.test(o)){let n;const t=o.length;if(t<6){const r=o[1],s=o[2],i=o[3],e=o[4]||"";n="#"+r+r+s+s+i+i+e+e}return(t==7||t>8)&&(n=o),n}}function q(o,n,t){let r;if(n==0){const s=E(t*255);r=s+s+s}else{const s=t<=.5?t*(n+1):t+n-t*n,i=t*2-s;r=A(i,s,o*6+2)+A(i,s,o*6)+A(i,s,o*6-2)}return"#"+r}function y(o,n,t){const r=[.55,.5,.5,.46,.6,.55,.55],s=r[o*6+.5|0];return t=t<.5?t*s*2:s+(t-.5)*(1-s)*2,q(o,n,t)}const Y=typeof window<"u"?window:typeof self<"u"?self:typeof global<"u"?global:{},R={V:"jdenticon_config",n:"config"};var J={};function X(o,n){const t=typeof o=="object"&&o||J[R.n]||Y[R.V]||{},r=t.lightness||{},s=t.saturation||{},i="color"in s?s.color:s,e=s.grayscale,u=t.backColor,a=t.padding;function f(d,c){let p=r[d];return p&&p.length>1||(p=c),function(h){return h=p[0]+h*(p[1]-p[0]),h<0?0:h>1?1:h}}function g(d){const c=t.hues;let p;return c&&c.length>0&&(p=c[0|.999*d*c.length]),typeof p=="number"?(p/360%1+1)%1:d}return{W:g,o:typeof i=="number"?i:.5,D:typeof e=="number"?e:0,p:f("color",[.4,.8]),F:f("grayscale",[.3,.9]),G:Z(u),X:typeof o=="number"?o:typeof a=="number"?a:n}}class T{constructor(n,t){this.x=n,this.y=t}}class D{constructor(n,t,r,s){this.q=n,this.t=t,this.H=r,this.Y=s}I(n,t,r,s){const i=this.q+this.H,e=this.t+this.H,u=this.Y;return u===1?new T(i-t-(s||0),this.t+n):u===2?new T(i-n-(r||0),e-t-(s||0)):u===3?new T(this.q+t,e-n-(r||0)):new T(this.q+n,this.t+t)}}const Q=new D(0,0,0,0);class z{constructor(n){this.J=n,this.u=Q}g(n,t){const r=t?-2:2,s=[];for(let i=t?n.length-2:0;i=0;i+=r)s.push(this.u.I(n[i],n[i+1]));this.J.g(s)}h(n,t,r,s){const i=this.u.I(n,t,r,r);this.J.h(i,r,s)}i(n,t,r,s,i){this.g([n,t,n+r,t,n+r,t+s,n,t+s],i)}j(n,t,r,s,i,e){const u=[n+r,t,n+r,t+s,n,t+s,n,t];u.splice((i||0)%4*2,2),this.g(u,e)}K(n,t,r,s,i){this.g([n+r/2,t,n+r,t+s/2,n+r/2,t+s,n,t+s/2],i)}}function x(o,n,t,r){o=o%14;let s,i,e,u,a,f;o?o==1?(e=0|t*.5,u=0|t*.8,n.j(t-e,0,e,u,2)):o==2?(e=0|t/3,n.i(e,e,t-e,t-e)):o==3?(a=t*.1,f=t<6?1:t<8?2:0|t*.25,a=a>1?0|a:a>.5?1:a,n.i(f,f,t-a-f,t-a-f)):o==4?(i=0|t*.15,e=0|t*.5,n.h(t-e-i,t-e-i,e)):o==5?(a=t*.1,f=a*4,f>3&&(f=0|f),n.i(0,0,t,t),n.g([f,f,t-a,f,f+(t-f-a)/2,t-a],!0)):o==6?n.g([0,0,t,0,t,t*.7,t*.4,t*.4,t*.7,t,0,t]):o==7?n.j(t/2,t/2,t/2,t/2,3):o==8?(n.i(0,0,t,t/2),n.i(0,t/2,t/2,t/2),n.j(t/2,t/2,t/2,t/2,1)):o==9?(a=t*.14,f=t<4?1:t<6?2:0|t*.35,a=t<8?a:0|a,n.i(0,0,t,t),n.i(f,f,t-f-a,t-f-a,!0)):o==10?(a=t*.12,f=a*3,n.i(0,0,t,t),n.h(f,f,t-a-f,!0)):o==11?n.j(t/2,t/2,t/2,t/2,3):o==12?(i=t*.25,n.i(0,0,t,t),n.K(i,i,t-i,t-i,!0)):!r&&(i=t*.4,e=t*1.2,n.h(i,i,e)):(s=t*.42,n.g([0,0,t,0,t,t-s*2,t-s,t,0,t]))}function k(o,n,t){o=o%4;let r;o?o==1?n.j(0,t/2,t,t/2,0):o==2?n.K(0,0,t,t):(r=t/6,n.h(r,r,t-2*r)):n.j(0,0,t,t,0)}function l(o,n){return o=n.W(o),[y(o,n.D,n.F(0)),y(o,n.o,n.p(.5)),y(o,n.D,n.F(1)),y(o,n.o,n.p(1)),y(o,n.o,n.p(0))]}function tt(o,n,t){const r=X(t,.08);r.G&&o.m(r.G);let s=o.k;const i=.5+s*r.X|0;s-=i*2;const e=new z(o),u=0|s/4,a=0|i+s/2-u*2,f=0|i+s/2-u*2;function g(S,_,B,w,P){const M=H(n,B,1);let G=w?H(n,w,1):0;o.L(c[p[S]]);for(let C=0;C=0){for(let _=0;_=0)return!0}}for(let S=0;S<3;S++)h=H(n,8+S,1)%c.length,(m([0,4])||m([2,3]))&&(h=1),p.push(h);g(0,k,2,3,[[1,0],[2,0],[2,3],[1,3],[0,1],[3,1],[3,2],[0,2]]),g(1,k,4,5,[[0,0],[3,0],[3,3],[0,3]]),g(2,x,1,null,[[1,1],[2,1],[2,2],[1,2]]),o.finish()}function nt(o){var r=0,s=0,i=encodeURI(o)+"%80",e=[],u,a=[],f=1732584193,g=4023233417,d=~f,c=~g,p=3285377520,h=[f,g,d,c,p],m=0,S="";function _(B,w){return B<>>32-w}for(;r>2]=e[s>>2]|(i[r]=="%"?parseInt(i.substring(r+1,r+=3),16):i.charCodeAt(r++))<<(3-(s&3))*8;for(u=((s+7>>6)+1)*16,e[u-1]=s*8-8;m>3]>>>(7-(r&7))*4&15).toString(16);return S}function ot(o){return/^[0-9a-f]{11,}$/i.test(o)&&o}function rt(o){return nt(o==null?"":""+o)}typeof document<"u"&&document.querySelectorAll.bind(document);function I(o){return(o*10+.5|0)/10}class st{constructor(){this.v=""}g(n){let t="";for(let r=0;r'}m(n,t){t&&(this.C+='')}P(n,t){this.C+=''}toString(){return this.C+""}}function at(o,n,t){const r=new ft(n);return tt(new it(r),ot(o)||rt(o),t),r.toString()}var ut=Object.defineProperty,ht=Object.getOwnPropertyDescriptor,j=(o,n,t,r)=>{for(var s=r>1?void 0:r?ht(n,t):n,i=o.length-1,e;i>=0;i--)(e=o[i])&&(s=(r?e(n,t,s):e(s))||s);return r&&s&&ut(n,t,s),s};const ct={lightness:{color:[1,1],grayscale:[1,1]},saturation:{color:0,grayscale:0},backColor:"#0000"};let b=class extends U{constructor(){super(...arguments);O(this,"entityId","");O(this,"iconSize",0);O(this,"imageUrl","");O(this,"linkToFull",!1)}generateIdenticon(){if(this.imageUrl)return``;{const t=this.entityId?void 0:ct;return at(this.entityId,this.iconSize,t)}}};j([v],b.prototype,"entityId",2);j([v],b.prototype,"iconSize",2);j([v],b.prototype,"imageUrl",2);j([v],b.prototype,"linkToFull",2);b=j([$],b);const pt=["href"],gt=["innerHTML"],dt=["innerHTML"];function St(o,n,t,r,s,i){return o.linkToFull&&o.imageUrl?(L(),F("a",{key:0,href:o.imageUrl,target:"_blank",class:"h-full w-full object-contain"},[W("div",{class:"h-full w-full object-contain",innerHTML:o.generateIdenticon()},null,8,gt)],8,pt)):(L(),F("div",{key:1,class:"h-full w-full object-contain",innerHTML:o.generateIdenticon()},null,8,dt))}const It=V(b,[["render",St]]);export{It as P}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ProjectViewView-BqC9uWSO.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ProjectViewView-BqC9uWSO.js deleted file mode 100644 index 21dd785..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ProjectViewView-BqC9uWSO.js +++ /dev/null @@ -1 +0,0 @@ -var W=Object.defineProperty;var q=(e,t,s)=>t in e?W(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var a=(e,t,s)=>q(e,typeof t!="symbol"?t+"":t,s);import{C as N,V as M,_ as V,z as w,h as n,m as u,B as r,k as i,t as m,j as c,F as C,E as D,n as y,e as z,d as Q,l as Y}from"./main.common-DD7dqhZp.js";import{G as K}from"./GiftedDialog-DmRkVexW.js";import{O as X}from"./OfferDialog-DDi7ax_Z.js";import{T as Z}from"./TopMessage-ZWDDjman.js";import{Q as ee}from"./QuickNav-C8jPGtUY.js";import{E as te}from"./EntityIcon-DciUb57i.js";import{P as ie}from"./ProjectIcon-ChPLhl-Y.js";import{s as J,i as se,l as oe,h as ne,g as T,ay as re,B as L,az as le,w as ae,j as de,aA as ce,C as A,m as he,p as fe,q as ue,u as pe,v as me}from"./index-ryzpKtgI.js";import{R as ge}from"./index-BtEdi1q-.js";import{u as ye}from"./index-CZnn7ED5.js";import{_ as ve}from"./blank-square-D9dGgMJw.js";import"./index-BGoTPXII.js";import"./_isString-B7bbuhPA.js";import"./concat-Ro2w9qwP.js";import"./set-BrilI7kO.js";import"./sort-DzTCGCnH.js";var be=Object.getOwnPropertyDescriptor,we=(e,t,s,l)=>{for(var h=l>1?void 0:l?be(t,s):t,p=e.length-1,d;p>=0;p--)(d=e[p])&&(h=d(h)||h);return h};let S=class extends M{constructor(){super(...arguments);a(this,"$notify");a(this,"isOpen",!1);a(this,"roleName","");a(this,"visibleToDids",[]);a(this,"allContacts",[]);a(this,"activeDid","");a(this,"allMyDids",[]);a(this,"canShare",!1);a(this,"windowLocation",window.location.href);a(this,"R",ge);a(this,"serverUtil",J)}created(){this.canShare=!!navigator.share}open(s,l,h,p,d){this.roleName=s,this.visibleToDids=l,this.allContacts=h,this.activeDid=p,this.allMyDids=d,this.isOpen=!0}close(){this.isOpen=!1}didInfo(s){return se(s,this.activeDid,this.allMyDids,this.allContacts)}copyToClipboard(s,l){ye().copy(l).then(()=>{this.$notify({group:"alert",type:"toast",title:"Copied",text:(s||"That")+" was copied to the clipboard."},2e3)})}onClickShareClaim(){this.copyToClipboard("A link to this page",this.windowLocation),window.navigator.share({title:"Help Connect Me",text:"I'm trying to find the people who recorded this. Can you help me?",url:this.windowLocation})}};S=we([N],S);const ke={key:0,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},Ce={class:"bg-white rounded-lg p-6 max-w-2xl w-full mx-4"},Te={class:"flex justify-between items-center mb-4"},De={class:"text-xl font-bold capitalize"},je={class:"mb-4"},Ie={class:"mb-4"},$e={key:0},xe={key:1},_e={key:0},Pe={key:1},Ue={class:"ml-4"},Le={class:"text-sm"},Se={key:0},Be=["href"],Ee={class:"mt-4"},Oe={key:0},Fe={key:1},Re={class:"flex justify-end"};function Ge(e,t,s,l,h,p){const d=w("font-awesome");return e.isOpen?(r(),n("div",ke,[i("div",Ce,[i("div",Te,[i("h2",De,m(e.roleName)+" Details",1),i("button",{class:"text-gray-500 hover:text-gray-700",onClick:t[0]||(t[0]=(...g)=>e.close&&e.close(...g))},[c(d,{icon:"times"})])]),i("div",je,[i("p",Ie,[e.R.isEmpty(e.visibleToDids)?(r(),n("span",$e," The "+m(e.roleName)+" is not visible to you or any of your contacts. ",1)):(r(),n("span",xe," The "+m(e.roleName)+" is not visible to you. ",1))]),e.R.isEmpty(e.visibleToDids)?(r(),n("div",_e,t[4]||(t[4]=[i("p",{class:"mt-2"}," You can ask one of your contacts to take a look and see if their contacts can see more details. Someone is connected to people closer to them; if you don't know who to ask, try the person who registered you. ",-1)]))):(r(),n("div",Pe,[t[5]||(t[5]=i("p",{class:"mb-2"}," They are visible to some of your contacts. If you'd like an introduction, ask them if they'll tell you more. ",-1)),i("div",Ue,[i("ul",null,[(r(!0),n(C,null,D(e.visibleToDids,(g,f)=>(r(),n("li",{key:f,class:"list-disc ml-4 mb-2"},[i("div",Le,[i("span",null,[y(m(e.didInfo(g))+" ",1),e.serverUtil.isEmptyOrHiddenDid(g)?u("",!0):(r(),n("span",Se,[i("a",{href:`/did/${g}`,target:"_blank",class:"text-blue-500"},[c(d,{icon:"arrow-up-right-from-square",class:"fa-fw"})],8,Be)]))])])]))),128))])])])),i("div",Ee,[e.canShare?(r(),n("span",Oe,[t[6]||(t[6]=y(" If you'd like an introduction, ")),i("a",{class:"text-blue-500",onClick:t[1]||(t[1]=g=>e.onClickShareClaim())},"click here to share the information with them and ask if they'll tell you more about the "+m(e.roleName)+".",1)])):(r(),n("span",Fe,[t[7]||(t[7]=y(" If you'd like an introduction, ")),i("a",{class:"text-blue-500",onClick:t[2]||(t[2]=g=>e.copyToClipboard("A link to this page",e.windowLocation))},"click here to copy this page, paste it into a message, and ask if they'll tell you more about the "+m(e.roleName)+".",1)]))])]),i("div",Re,[i("button",{class:"bg-blue-500 text-white px-4 py-2 rounded hover:bg-blue-600",onClick:t[3]||(t[3]=(...g)=>e.close&&e.close(...g))}," Close ")])])])):u("",!0)}const He=V(S,[["render",Ge]]);var Ae=Object.getOwnPropertyDescriptor,Ne=(e,t,s,l)=>{for(var h=l>1?void 0:l?Ae(t,s):t,p=e.length-1,d;p>=0;p--)(d=e[p])&&(h=d(h)||h);return h};let B=class extends M{constructor(){super(...arguments);a(this,"$notify");a(this,"$router");a(this,"activeDid","");a(this,"agentDid","");a(this,"agentDidVisibleToDids",[]);a(this,"allMyDids",[]);a(this,"allContacts",[]);a(this,"apiServer","");a(this,"isRegistered",!1);a(this,"description","");a(this,"endTime","");a(this,"expanded",!1);a(this,"fulfilledByThis",null);a(this,"fulfillersToThis",[]);a(this,"fulfillersToHitLimit",!1);a(this,"imageUrl","");a(this,"issuer","");a(this,"issuerInfoObject",null);a(this,"issuerVisibleToDids",[]);a(this,"latitude",0);a(this,"longitude",0);a(this,"name","");a(this,"projectId","");a(this,"startTime","");a(this,"url","");a(this,"givesToThis",[]);a(this,"givesHitLimit",!1);a(this,"givesProvidedByThis",[]);a(this,"givesProvidedByHitLimit",!1);a(this,"offersToThis",[]);a(this,"offersHitLimit",!1);a(this,"checkingConfirmationForJwtId","");a(this,"recentlyCheckedAndUnconfirmableJwts",[]);a(this,"truncatedDesc","");a(this,"truncateLength",40);a(this,"libsUtil",oe);a(this,"serverUtil",J)}async created(){const s=await z();this.activeDid=s.activeDid||"",this.apiServer=s.apiServer||"",this.allContacts=await Q.contacts.toArray(),this.isRegistered=!!s.isRegistered;try{this.allMyDids=await ne()}catch(h){Y("Error retrieving all account DIDs on home page:"+h,!0),this.$notify({group:"alert",type:"danger",title:"Error Loading Profile",text:"See the Help page to fix problems with your personal data."},5e3)}const l=window.location.pathname.substring(9);l&&(this.projectId=decodeURIComponent(l)),this.loadProject(this.projectId,this.activeDid)}async loadProject(s,l){var d,g,f,x,_,j,P,U,I,o,b,k,E,O,F,R;this.projectId=s;const h=this.apiServer+"/api/claim/byHandle/"+encodeURIComponent(s),p=await T(l);try{const v=await this.axios.get(h,{headers:p});if(v.status===200){const G=(d=v.data.claim)==null?void 0:d.startTime;if(G!=null){const $=new Date(G);this.startTime=$.toLocaleDateString()+" "+$.toLocaleTimeString()}const H=(g=v.data.claim)==null?void 0:g.endTime;if(H!=null){const $=new Date(H);this.endTime=$.toLocaleDateString()+" "+$.toLocaleTimeString()}this.agentDid=(x=(f=v.data.claim)==null?void 0:f.agent)==null?void 0:x.identifier,this.agentDidVisibleToDids=((j=(_=v.data.claim)==null?void 0:_.agent)==null?void 0:j.identifierVisibleToDids)||[],this.imageUrl=(P=v.data.claim)==null?void 0:P.image,this.issuer=v.data.issuer,this.issuerInfoObject=re(this.issuer,this.activeDid,this.allMyDids,this.allContacts),this.issuerVisibleToDids=v.data.issuerVisibleToDids||[],this.name=((U=v.data.claim)==null?void 0:U.name)||"(no name)",this.description=((I=v.data.claim)==null?void 0:I.description)||"(no description)",this.truncatedDesc=this.description.slice(0,this.truncateLength),this.latitude=((k=(b=(o=v.data.claim)==null?void 0:o.location)==null?void 0:b.geo)==null?void 0:k.latitude)||0,this.longitude=((F=(O=(E=v.data.claim)==null?void 0:E.location)==null?void 0:O.geo)==null?void 0:F.longitude)||0,this.url=((R=v.data.claim)==null?void 0:R.url)||""}else console.error("Error getting project:",v),this.$notify({group:"alert",type:"danger",title:"Error",text:"There was a problem getting that project."},5e3)}catch(v){console.error("Error retrieving project:",v),this.$notify({group:"alert",type:"danger",title:"Error",text:"Something went wrong retrieving that project."},5e3)}this.givesToThis=[],this.loadGives(),this.givesProvidedByThis=[],this.loadGivesProvidedBy(),this.offersToThis=[],this.loadOffers(),this.fulfillersToThis=[],this.loadPlanFulfillersTo(),this.fulfilledByThis=null,this.loadPlanFulfilledBy()}async loadGives(){const s=this.apiServer+"/api/v2/report/givesToPlans?planIds="+encodeURIComponent(JSON.stringify([this.projectId]));let l="";this.givesToThis.length>0&&(l="&beforeId="+this.givesToThis[this.givesToThis.length-1].jwtId);const h=s+l,p=await T(this.activeDid);try{const d=await this.axios.get(h,{headers:p});d.status===200&&d.data.data?(this.givesToThis=this.givesToThis.concat(d.data.data),this.givesHitLimit=d.data.hitLimit):this.$notify({group:"alert",type:"danger",title:"Error",text:"Failed to retrieve more gives to this project."},5e3)}catch(d){const g=d;this.$notify({group:"alert",type:"danger",title:"Error",text:"Something went wrong retrieving more gives to this project."},5e3),console.error("Something went wrong retrieving more gives to this project:",g.message)}}async loadGivesProvidedBy(){const s=this.apiServer+"/api/v2/report/givesProvidedBy?providerId="+encodeURIComponent(this.projectId);let l="";this.givesProvidedByThis.length>0&&(l="&beforeId="+this.givesProvidedByThis[this.givesProvidedByThis.length-1].jwtId);const h=s+l,p=await T(this.activeDid);try{const d=await this.axios.get(h,{headers:p});d.status===200?(this.givesProvidedByThis=this.givesProvidedByThis.concat(d.data.data),this.givesProvidedByHitLimit=d.data.hitLimit):this.$notify({group:"alert",type:"danger",title:"Error",text:"Failed to retrieve gives that were provided by this project."},5e3)}catch(d){const g=d;this.$notify({group:"alert",type:"danger",title:"Error",text:"Something went wrong retrieving gives that were provided by this project."},5e3),console.error("Something went wrong retrieving gives that were provided by this project:",g.message)}}async loadOffers(){const s=this.apiServer+"/api/v2/report/offersToPlans?planIds="+encodeURIComponent(JSON.stringify([this.projectId]));let l="";this.offersToThis.length>0&&(l="&beforeId="+this.offersToThis[this.offersToThis.length-1].jwtId);const h=s+l,p=await T(this.activeDid);try{const d=await this.axios.get(h,{headers:p});d.status===200&&d.data.data?(this.offersToThis=this.offersToThis.concat(d.data.data),this.offersHitLimit=d.data.hitLimit):this.$notify({group:"alert",type:"danger",title:"Error",text:"Failed to retrieve more offers to this project."},5e3)}catch(d){const g=d;this.$notify({group:"alert",type:"danger",title:"Error",text:"Something went wrong retrieving more offers to this project."},5e3),console.error("Something went wrong retrieving more offers to this project:",g.message)}}async loadPlanFulfillersTo(){const s=this.apiServer+"/api/v2/report/planFulfillersToPlan?planHandleId="+encodeURIComponent(this.projectId);let l="";this.fulfillersToThis.length>0&&(l="&beforeId="+this.fulfillersToThis[this.fulfillersToThis.length-1].jwtId);const h=s+l,p=await T(this.activeDid);try{const d=await this.axios.get(h,{headers:p});d.status===200?(this.fulfillersToThis=this.fulfillersToThis.concat(d.data.data),this.fulfillersToHitLimit=d.data.hitLimit):this.$notify({group:"alert",type:"danger",title:"Error",text:"Failed to retrieve more plans that fullfill this project."},5e3)}catch(d){const g=d;this.$notify({group:"alert",type:"danger",title:"Error",text:"Something went wrong retrieving more plans that fulfull this project."},5e3),console.error("Something went wrong retrieving more plans that fulfill this project:",g.message)}}async loadPlanFulfilledBy(){const s=this.apiServer+"/api/v2/report/planFulfilledByPlan?planHandleId="+encodeURIComponent(this.projectId),l=await T(this.activeDid);try{const h=await this.axios.get(s,{headers:l});h.status===200?this.fulfilledByThis=h.data.data:this.$notify({group:"alert",type:"danger",title:"Error",text:"Failed to retrieve plans fulfilled by this project."},5e3)}catch(h){const p=h;this.$notify({group:"alert",type:"danger",title:"Error",text:"Something went wrong retrieving plans fulfilled by this project."},5e3),console.error("Error retrieving plans fulfilled by this project:",p.message)}}onEditClick(){const s={name:"new-edit-project",query:{projectId:this.projectId}};this.$router.push(s)}expandText(){this.expanded=!0}collapseText(){this.expanded=!1}async onClickLoadProject(s){const l={path:"/project/"+encodeURIComponent(s)};this.$router.push(l),this.loadProject(s,this.activeDid)}getOpenStreetMapUrl(){return"https://www.openstreetmap.org/?mlat="+this.latitude+"&mlon="+this.longitude+"#map=15/"+this.latitude+"/"+this.longitude}openGiftDialogToProject(s){this.$refs.giveDialogToThis.open(s,void 0,void 0,((s==null?void 0:s.name)||"Someone not named")+" gave to this project")}openGiftDialogFromProject(){this.$refs.giveDialogFromThis.open(void 0,{did:this.activeDid,name:"You"},void 0,"This project gave to you")}openOfferDialog(){this.$refs.customOfferDialog.open()}onClickAllContactsGifting(){const s={name:"contact-gift",query:{projectId:this.projectId}};this.$router.push(s)}onClickLoadClaim(s){const l={path:"/claim/"+encodeURIComponent(s)};this.$router.push(l)}checkIsFulfillable(s){const l={...L,claim:s.fullClaim,claimType:"Offer",issuer:s.offeredByDid};return le(l)}onClickFulfillGiveToOffer(s){const l={...L,claim:s.fullClaim,issuer:s.offeredByDid},h={did:ae(l)};this.$refs.giveDialogToThis.open(h,void 0,s.handleId,"Given by "+((h==null?void 0:h.name)||"someone not named"))}addScheme(s){return de(s)?s:"https://"+s}domainForWebsite(s){try{const l=new URL(s).hostname;return l?s.endsWith(l)?l:l+"...":s}catch{return s}}checkIsConfirmable(s,l){const h={...L,claim:s.fullClaim,claimType:"GiveAction",issuer:s.issuerDid};return ce(this.isRegistered,h,this.activeDid,l)}shallowNotifyWhyCannotConfirm(s){const l=this.recentlyCheckedAndUnconfirmableJwts.includes(s.jwtId)?[this.activeDid]:[];A(this.$notify,this.isRegistered,"GiveAction",s,this.activeDid,l)}async deepCheckConfirmable(s){this.checkingConfirmationForJwtId=s.jwtId;const l=await he(this.apiServer,s.jwtId,s.issuerDid,this.activeDid);this.checkIsConfirmable(s,l==null?void 0:l.confirmerIdList)?this.confirmConfirmClaim(s):(this.recentlyCheckedAndUnconfirmableJwts=[...this.recentlyCheckedAndUnconfirmableJwts,s.jwtId],A(this.$notify,this.isRegistered,"GiveAction",s,this.activeDid,l==null?void 0:l.confirmerIdList)),this.checkingConfirmationForJwtId=""}confirmConfirmClaim(s){this.$notify({group:"modal",type:"confirm",title:"Confirm",text:"Do you personally confirm that this is true?",onYes:async()=>{await this.confirmClaim(s)}},-1)}async confirmClaim(s){var d;const h={"@context":"https://schema.org","@type":"AgreeAction",object:fe(ue(pe(s.fullClaim,s.jwtId,s.handleId)))},p=await me(h,this.activeDid,this.apiServer,this.axios);if(p.type==="success")this.$notify({group:"alert",type:"success",title:"Success",text:"Confirmation submitted."},5e3),this.recentlyCheckedAndUnconfirmableJwts=[...this.recentlyCheckedAndUnconfirmableJwts,s.jwtId];else{console.error("Got error submitting the confirmation:",p);const g=((d=p.error)==null?void 0:d.error)||"There was a problem submitting the confirmation.";this.$notify({group:"alert",type:"danger",title:"Error",text:g},5e3)}}openHiddenDidDialog(){this.$refs.hiddenDidDialog.open("creator",this.issuerVisibleToDids,this.allContacts,this.activeDid,this.allMyDids)}};B=Ne([N({components:{EntityIcon:te,GiftedDialog:K,HiddenDidDialog:He,OfferDialog:X,ProjectIcon:ie,QuickNav:ee,TopMessage:Z}})],B);const Me={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},Ve={id:"ViewBreadcrumb"},Je={class:"text-center text-lg font-light relative px-7"},We={class:"text-center text-xl font-semibold"},qe={class:"bg-slate-100 rounded-md overflow-hidden px-4 py-3 mt-4"},ze={class:"pb-4 flex gap-4"},Qe={class:"pt-1"},Ye={class:"overflow-hidden"},Ke={class:"text-sm mb-3"},Xe={class:"truncate"},Ze={key:0},et=["href"],tt={key:1},it={key:0},st={key:1},ot={key:2},nt=["href"],rt={key:3},lt=["href"],at={class:"text-sm text-slate-500"},dt={key:0},ct={key:1},ht={class:"grid items-start grid-cols-1 sm:grid-cols-2 gap-4 mt-4"},ft={key:0,class:"bg-slate-100 px-4 py-3 rounded-md"},ut={class:"text-center"},pt=["onClick"],mt={key:0,class:"text-center"},gt={key:0,class:"bg-slate-100 px-4 py-3 rounded-md"},yt={class:"text-center"},vt={key:0},bt={class:"grid grid-cols-4 sm:grid-cols-5 md:grid-cols-6 gap-x-3 gap-y-5 text-center mb-5 mt-2"},wt=["onClick"],kt={class:"text-xs text-blue-500 font-medium text-ellipsis whitespace-nowrap overflow-hidden cursor-pointer"},Ct={class:"grid items-start grid-cols-1 sm:grid-cols-3 gap-4 mt-4"},Tt={class:"bg-slate-100 px-4 py-3 rounded-md"},Dt={key:0},jt={class:"text-center"},It={key:1},$t={key:2,class:"text-sm border-t border-slate-300"},xt={class:"flex justify-between gap-4"},_t={key:0,class:"whitespace-nowrap"},Pt={key:0,class:"text-slate-500"},Ut={class:"flex justify-between"},Lt=["onClick"],St=["onClick"],Bt={key:3,class:"text-center text-blue-500"},Et={class:"bg-slate-100 px-4 py-3 rounded-md","data-testId":"gives-to"},Ot={key:0},Ft={class:"text-center"},Rt={key:1},Gt={key:2,class:"text-sm border-t border-slate-300"},Ht={class:"flex justify-between gap-4"},At={key:0,class:"whitespace-nowrap"},Nt={class:"text-slate-500"},Mt={key:0,class:"text-slate-500"},Vt={class:"flex justify-between"},Jt=["onClick"],Wt=["onClick"],qt={key:1},zt=["onClick"],Qt={key:1,class:"flex justify-center"},Yt=["href"],Kt=["src"],Xt={key:3,class:"text-center text-blue-500"},Zt={class:"bg-slate-100 px-4 py-3 rounded-md","data-testId":"gives-from"},ei={key:0},ti={class:"text-center"},ii={key:1},si={key:2,class:"text-sm border-t border-slate-300"},oi={class:"flex justify-between gap-4"},ni={key:0,class:"whitespace-nowrap"},ri={class:"text-slate-500"},li={key:0,class:"text-slate-500"},ai={class:"flex justify-between"},di=["onClick"],ci=["onClick"],hi={key:1},fi=["onClick"],ui={key:1,class:"flex justify-center"},pi=["href"],mi=["src"],gi={key:3,class:"text-center"};function yi(e,t,s,l,h,p){var I;const d=w("QuickNav"),g=w("TopMessage"),f=w("font-awesome"),x=w("ProjectIcon"),_=w("EntityIcon"),j=w("GiftedDialog"),P=w("OfferDialog"),U=w("HiddenDidDialog");return r(),n(C,null,[c(d),c(g),i("section",Me,[i("div",Ve,[i("div",null,[i("h1",Je,[i("button",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:t[0]||(t[0]=o=>e.$router.back())},[c(f,{icon:"chevron-left",class:"fa-fw"})]),t[18]||(t[18]=y(" Project Idea "))]),i("h2",We,[y(m(e.name)+" ",1),e.activeDid===e.issuer||e.activeDid===e.agentDid?(r(),n("button",{key:0,title:"Edit","data-testId":"editClaimButton",onClick:t[1]||(t[1]=o=>e.onEditClick())},[c(f,{icon:"pen",class:"text-sm text-blue-500 ml-2 mb-1"})])):u("",!0)])])]),i("div",qe,[i("div",null,[i("div",ze,[i("div",Qe,[c(x,{"entity-id":e.projectId,"icon-size":64,"image-url":e.imageUrl,"link-to-full":!0,class:"block border border-slate-300 rounded-md max-h-16 max-w-16"},null,8,["entity-id","image-url"])]),i("div",Ye,[i("div",Ke,[i("div",Xe,[c(f,{icon:"user",class:"fa-fw text-slate-400"}),y(" "+m((I=e.issuerInfoObject)==null?void 0:I.displayName)+" ",1),e.serverUtil.isEmptyOrHiddenDid(e.issuer)?e.serverUtil.isHiddenDid(e.issuer)?(r(),n("span",tt,[c(f,{icon:"info-circle",class:"fa-fw text-blue-500 cursor-pointer",onClick:t[2]||(t[2]=o=>e.openHiddenDidDialog())})])):u("",!0):(r(),n("span",Ze,[i("a",{href:`/did/${e.issuer}`,target:"_blank",class:"text-blue-500"},[c(f,{icon:"arrow-up-right-from-square",class:"fa-fw"})],8,et)]))]),e.startTime?(r(),n("div",it,[c(f,{icon:"calendar",class:"fa-fw text-slate-400"}),y(" Starts "+m(e.startTime),1)])):u("",!0),e.endTime?(r(),n("div",st,[c(f,{icon:"calendar",class:"fa-fw text-slate-400"}),y(" Ends "+m(e.endTime),1)])):u("",!0),e.latitude||e.longitude?(r(),n("div",ot,[c(f,{icon:"location-dot",class:"fa-fw text-slate-400"}),i("a",{href:e.getOpenStreetMapUrl(),target:"_blank",class:"underline text-blue-500"},[t[19]||(t[19]=y("Map View ")),c(f,{icon:"arrow-up-right-from-square",class:"fa-fw text-blue-500"})],8,nt)])):u("",!0),e.url?(r(),n("div",rt,[c(f,{icon:"globe",class:"fa-fw text-slate-400"}),i("a",{href:e.addScheme(e.url),target:"_blank",class:"underline text-blue-500"},[y(m(e.domainForWebsite(e.url))+" ",1),c(f,{icon:"arrow-up-right-from-square",class:"fa-fw"})],8,lt)])):u("",!0)])])]),i("div",at,[e.expanded?(r(),n("div",ct,[y(m(e.description)+" ",1),i("a",{class:"uppercase text-xs font-semibold text-slate-700",onClick:t[4]||(t[4]=(...o)=>e.collapseText&&e.collapseText(...o))},"- Read Less")])):(r(),n("div",dt,[y(m(e.truncatedDesc)+" ",1),e.description.length>=e.truncateLength?(r(),n("a",{key:0,class:"uppercase text-xs font-semibold text-slate-700",onClick:t[3]||(t[3]=(...o)=>e.expandText&&e.expandText(...o))},"... Read More")):u("",!0)]))]),i("a",{class:"cursor-pointer",onClick:t[5]||(t[5]=o=>e.onClickLoadClaim(e.projectId))},[c(f,{icon:"file-lines",class:"pl-2 pt-1 text-blue-500"})])])]),i("div",ht,[i("div",null,[e.fulfillersToThis.length>0?(r(),n("div",ft,[t[20]||(t[20]=i("h3",{class:"text-sm uppercase font-semibold mt-3"}," Projects That Contribute To This ",-1)),i("div",ut,[(r(!0),n(C,null,D(e.fulfillersToThis,o=>(r(),n("div",{key:o.handleId},[i("button",{class:"text-blue-500",onClick:b=>e.onClickLoadProject(o.handleId)},m(o.name),9,pt)]))),128)),e.fulfillersToHitLimit?(r(),n("div",mt,[i("button",{onClick:t[6]||(t[6]=o=>e.loadPlanFulfillersTo())},"Load More")])):u("",!0)])])):u("",!0)]),i("div",null,[e.fulfilledByThis?(r(),n("div",gt,[t[21]||(t[21]=i("h3",{class:"text-sm uppercase font-semibold mb-3"}," Projects Getting Contributions From This ",-1)),i("div",yt,[i("button",{class:"text-blue-500",onClick:t[7]||(t[7]=o=>e.onClickLoadProject(e.fulfilledByThis.handleId))},m(e.fulfilledByThis.name),1)])])):u("",!0)])]),e.activeDid&&e.isRegistered?(r(),n("div",vt,[t[24]||(t[24]=i("div",{class:"text-center"},[i("p",{class:"mt-2 mt-4 text-center"},"Record a contribution from:")],-1)),i("ul",bt,[i("li",{onClick:t[8]||(t[8]=o=>e.openGiftDialogToProject({name:"you",did:e.activeDid}))},[c(f,{icon:"hand",class:"fa-fw text-blue-500 text-5xl cursor-pointer"}),t[22]||(t[22]=i("h3",{class:"mt-5 text-xs text-blue-500 font-medium text-ellipsis whitespace-nowrap overflow-hidden cursor-pointer"}," You ",-1))]),i("li",{onClick:t[9]||(t[9]=o=>e.openGiftDialogToProject())},t[23]||(t[23]=[i("img",{src:ve,class:"mx-auto border border-blue-300 rounded-md mb-1 cursor-pointer"},null,-1),i("h3",{class:"text-xs text-blue-500 italic font-medium text-ellipsis whitespace-nowrap overflow-hidden cursor-pointer"}," Unnamed/Unknown ",-1)])),(r(!0),n(C,null,D(e.allContacts.slice(0,5),o=>(r(),n("li",{key:o.did,onClick:b=>e.openGiftDialogToProject(o)},[c(_,{contact:o,"icon-size":64,class:"mx-auto border border-blue-300 rounded-md mb-1 cursor-pointer"},null,8,["contact"]),i("h3",kt,m(o.name||"(no name)"),1)],8,wt))),128)),i("li",null,[e.allContacts.length>=5?(r(),n("span",{key:0,class:"flex align-bottom text-xs text-blue-500 mt-12 cursor-pointer",onClick:t[10]||(t[10]=o=>e.onClickAllContactsGifting())}," ... or someone else... ")):u("",!0)])]),c(j,{ref:"giveDialogToThis","to-project-id":e.projectId},null,8,["to-project-id"])])):u("",!0),i("div",Ct,[i("div",Tt,[e.activeDid&&e.isRegistered?(r(),n("div",Dt,[i("div",jt,[i("button",{"data-testId":"offerButton",class:"block w-full bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1 rounded-md",onClick:t[11]||(t[11]=o=>e.openOfferDialog())}," Offer to this (maybe with conditions)... ")])])):u("",!0),c(P,{ref:"customOfferDialog","project-id":e.projectId,"project-name":e.name},null,8,["project-id","project-name"]),t[27]||(t[27]=i("h3",{class:"text-lg font-bold mb-3 mt-4"},"Offered To This Idea",-1)),e.offersToThis.length===0?(r(),n("div",It,[t[25]||(t[25]=y(" (None yet. Wanna ")),i("span",{class:"cursor-pointer text-blue-500",onClick:t[12]||(t[12]=o=>e.openOfferDialog())},"offer something... especially if others join you"),t[26]||(t[26]=y("?) "))])):(r(),n("ul",$t,[(r(!0),n(C,null,D(e.offersToThis,o=>(r(),n("li",{key:o.jwtId,class:"py-1.5 border-b border-slate-300"},[i("div",xt,[i("span",null,[c(f,{icon:"user",class:"fa-fw text-slate-400"}),y(" "+m(e.serverUtil.didInfo(o.offeredByDid,e.activeDid,e.allMyDids,e.allContacts)),1)]),o.amount?(r(),n("span",_t,[c(f,{icon:e.libsUtil.iconForUnitCode(o.unit),class:"fa-fw text-slate-400"},null,8,["icon"]),y(m(o.amount),1)])):u("",!0)]),o.objectDescription?(r(),n("div",Pt,[c(f,{icon:"comment",class:"fa-fw text-slate-400"}),y(" "+m(o.objectDescription),1)])):u("",!0),i("div",Ut,[i("a",{class:"cursor-pointer",onClick:b=>e.onClickLoadClaim(o.jwtId)},[c(f,{icon:"file-lines",class:"pl-2 pt-1 text-blue-500"})],8,Lt),e.checkIsFulfillable(o)?(r(),n("a",{key:0,onClick:b=>e.onClickFulfillGiveToOffer(o)},[c(f,{icon:"hand-holding-heart",class:"text-blue-500 cursor-pointer"})],8,St)):u("",!0)])]))),128))])),e.offersHitLimit?(r(),n("div",Bt,[i("button",{onClick:t[13]||(t[13]=o=>e.loadOffers())},"Load More")])):u("",!0)]),i("div",Et,[e.activeDid&&e.isRegistered?(r(),n("div",Ot,[i("div",Ft,[i("button",{class:"block w-full bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1rounded-md",onClick:t[14]||(t[14]=o=>e.openGiftDialogToProject())}," Given To This... ")])])):u("",!0),t[28]||(t[28]=i("h3",{class:"text-lg font-bold mb-3 mt-4"},"Given To This Idea",-1)),e.givesToThis.length===0?(r(),n("div",Rt," (None yet. If you've seen something, say something by clicking a contact above.) ")):(r(),n("ul",Gt,[(r(!0),n(C,null,D(e.givesToThis,o=>{var b;return r(),n("li",{key:o.jwtId,class:"py-1.5 border-b border-slate-300"},[i("div",Ht,[i("span",null,[c(f,{icon:"user",class:"fa-fw text-slate-400"}),y(" "+m(e.serverUtil.didInfo(o.agentDid,e.activeDid,e.allMyDids,e.allContacts)),1)]),o.amount?(r(),n("span",At,[c(f,{icon:e.libsUtil.iconForUnitCode(o.unit),class:"fa-fw text-slate-400"},null,8,["icon"]),y(m(o.amount),1)])):u("",!0)]),i("div",Nt,[c(f,{icon:"calendar",class:"fa-fw text-slate-400"}),y(" "+m((b=o.issuedAt)==null?void 0:b.substring(0,10)),1)]),o.description?(r(),n("div",Mt,[c(f,{icon:"comment",class:"fa-fw text-slate-400"}),y(" "+m(o.description),1)])):u("",!0),i("div",Vt,[i("a",{onClick:k=>e.onClickLoadClaim(o.jwtId)},[c(f,{icon:"file-lines",class:"text-blue-500 cursor-pointer"})],8,Jt),e.checkIsConfirmable(o)&&!e.recentlyCheckedAndUnconfirmableJwts.includes(o.jwtId)?(r(),n("a",{key:0,onClick:k=>e.deepCheckConfirmable(o)},[c(f,{icon:"circle-check",class:"text-blue-500 cursor-pointer"})],8,Wt)):e.checkingConfirmationForJwtId===o.jwtId?(r(),n("a",qt,[c(f,{icon:"spinner",class:"fa-spin-pulse"})])):(r(),n("a",{key:2,onClick:k=>e.shallowNotifyWhyCannotConfirm(o)},[c(f,{icon:"circle-check",class:"text-slate-500 cursor-pointer"})],8,zt))]),o.fullClaim.image?(r(),n("div",Qt,[i("a",{href:o.fullClaim.image,target:"_blank"},[i("img",{src:o.fullClaim.image,class:"h-24 mt-2 rounded-xl"},null,8,Kt)],8,Yt)])):u("",!0)])}),128))])),e.givesHitLimit?(r(),n("div",Xt,[i("button",{onClick:t[15]||(t[15]=o=>e.loadGives())},"Load More")])):u("",!0)]),i("div",Zt,[e.activeDid&&e.isRegistered?(r(),n("div",ei,[i("div",ti,[i("button",{class:"block w-full bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1 rounded-md",onClick:t[16]||(t[16]=o=>e.openGiftDialogFromProject())}," Given By This... ")])])):u("",!0),c(j,{ref:"giveDialogFromThis","from-project-id":e.projectId},null,8,["from-project-id"]),t[29]||(t[29]=i("h3",{class:"text-lg font-bold mb-3 mt-4"}," Benefitted From This Project ",-1)),e.givesProvidedByThis.length===0?(r(),n("div",ii,"(None yet.)")):(r(),n("ul",si,[(r(!0),n(C,null,D(e.givesProvidedByThis,o=>{var b;return r(),n("li",{key:o.jwtId,class:"py-1.5 border-b border-slate-300"},[i("div",oi,[i("span",null,m(e.serverUtil.didInfo(o.recipientDid,e.activeDid,e.allMyDids,e.allContacts)),1),o.amount?(r(),n("span",ni,[c(f,{icon:e.libsUtil.iconForUnitCode(o.unit),class:"fa-fw text-slate-400"},null,8,["icon"]),y(m(o.amount),1)])):u("",!0)]),i("div",ri,[c(f,{icon:"calendar",class:"fa-fw text-slate-400"}),y(" "+m((b=o.issuedAt)==null?void 0:b.substring(0,10)),1)]),o.description?(r(),n("div",li,[c(f,{icon:"comment",class:"fa-fw text-slate-400"}),y(" "+m(o.description),1)])):u("",!0),i("div",ai,[i("a",{onClick:k=>e.onClickLoadClaim(o.jwtId)},[c(f,{icon:"file-lines",class:"text-blue-500 cursor-pointer"})],8,di),e.checkIsConfirmable(o)&&!e.recentlyCheckedAndUnconfirmableJwts.includes(o.jwtId)?(r(),n("a",{key:0,onClick:k=>e.deepCheckConfirmable(o)},[c(f,{icon:"circle-check",class:"text-blue-500 cursor-pointer"})],8,ci)):e.checkingConfirmationForJwtId===o.jwtId?(r(),n("a",hi,[c(f,{icon:"spinner",class:"fa-spin-pulse"})])):(r(),n("a",{key:2,onClick:k=>e.shallowNotifyWhyCannotConfirm(o)},[c(f,{icon:"circle-check",class:"text-slate-500 cursor-pointer"})],8,fi))]),o.fullClaim.image?(r(),n("div",ui,[i("a",{href:o.fullClaim.image,target:"_blank"},[i("img",{src:o.fullClaim.image,class:"h-24 mt-2 rounded-xl"},null,8,mi)],8,pi)])):u("",!0)])}),128))])),e.givesProvidedByHitLimit?(r(),n("div",gi,[i("button",{onClick:t[17]||(t[17]=o=>e.loadGivesProvidedBy())},"Load More")])):u("",!0)])])]),c(U,{ref:"hiddenDidDialog"},null,512)],64)}const Fi=V(B,[["render",yi]]);export{Fi as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ProjectsView-qIPma1jV.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ProjectsView-qIPma1jV.js deleted file mode 100644 index 80806ad..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ProjectsView-qIPma1jV.js +++ /dev/null @@ -1 +0,0 @@ -var L=Object.defineProperty;var S=(e,o,s)=>o in e?L(e,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[o]=s;var d=(e,o,s)=>S(e,typeof o!="symbol"?o+"":o,s);import{V as M,e as T,d as B,C as F,_ as H,h as i,j as c,k as n,m as g,y as P,x as _,w as C,F as D,z as y,B as r,n as f,E as N,t as m}from"./main.common-DD7dqhZp.js";import{E as R}from"./EntityIcon-DciUb57i.js";import{I as A}from"./InfiniteScroll-DZwFAI4R.js";import{Q as E}from"./QuickNav-C8jPGtUY.js";import{O as U}from"./OnboardingDialog-DKHXNqS_.js";import{P as V}from"./ProjectIcon-ChPLhl-Y.js";import{T as z}from"./TopMessage-ZWDDjman.js";import{U as Y}from"./UserNameDialog-BV49F4GW.js";import{l as Q,i as q,h as J,$ as K,g as $,a0 as W}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var X=Object.getOwnPropertyDescriptor,Z=(e,o,s,a)=>{for(var l=a>1?void 0:a?X(o,s):o,u=e.length-1,p;u>=0;u--)(p=e[u])&&(l=p(l)||l);return l};let x=class extends M{constructor(){super(...arguments);d(this,"$notify");d(this,"$router");d(this,"activeDid","");d(this,"allContacts",[]);d(this,"allMyDids",[]);d(this,"apiServer","");d(this,"givenName","");d(this,"isLoading",!1);d(this,"isRegistered",!1);d(this,"offers",[]);d(this,"projectNameFromHandleId",{});d(this,"projects",[]);d(this,"showOffers",!1);d(this,"showProjects",!0);d(this,"libsUtil",Q);d(this,"didInfo",q)}errNote(s){this.$notify({group:"alert",type:"danger",title:"Error",text:s},5e3)}async mounted(){try{const s=await T();this.activeDid=s.activeDid||"",this.apiServer=s.apiServer||"",this.isRegistered=!!s.isRegistered,this.givenName=s.firstName||"",this.allContacts=await B.contacts.toArray(),this.allMyDids=await J(),s.finishedOnboarding||this.$refs.onboardingDialog.open(K.Create),this.allMyDids.length===0?(console.error("No accounts found."),this.errNote("You need an identifier to load your projects.")):await this.loadProjects()}catch(s){console.error("Error initializing:",s),this.errNote("Something went wrong loading your projects.")}}async projectDataLoader(s){try{const a=await $(this.activeDid,this.$notify);this.isLoading=!0;const l=await this.axios.get(s,{headers:a});if(l.status===200&&l.data.data){const u=l.data.data;for(const p of u){const{name:w,description:v,handleId:h,image:k,issuerDid:b,rowId:j}=p;this.projects.push({name:w,description:v,image:k,handleId:h,issuerDid:b,rowId:j})}}else console.error("Bad server response & data for plans:",l.status,l.data),this.errNote("Failed to get projects from the server.")}catch(a){console.error("Got error loading plans:",a.message||a),this.errNote("Got an error loading projects.")}finally{this.isLoading=!1}}async loadMoreProjectData(s){if(this.projects.length>0&&s){const a=this.projects[this.projects.length-1];await this.loadProjects(`beforeId=${a.rowId}`)}}async loadProjects(s=""){const a=`${this.apiServer}/api/v2/report/plansByIssuer?${s}`;await this.projectDataLoader(a)}onClickLoadProject(s){const a={path:"/project/"+encodeURIComponent(s)};this.$router.push(a)}onClickNewProject(){const s={name:"new-edit-project"};this.$router.push(s)}onClickLoadClaim(s){const a={path:"/claim/"+encodeURIComponent(s)};this.$router.push(a)}async offerDataLoader(s){const a=await $(this.activeDid);try{this.isLoading=!0;const l=await this.axios.get(s,{headers:a});if(l.status===200&&l.data.data)for(const u of l.data.data){if(u.fulfillsPlanHandleId){const p=await W(u.fulfillsPlanHandleId,this.axios,this.apiServer,this.activeDid),w=p==null?void 0:p.name;this.projectNameFromHandleId[u.fulfillsPlanHandleId]=w}this.offers=this.offers.concat([u])}else console.error("Bad server response & data for offers:",l.status,l.data),this.$notify({group:"alert",type:"danger",title:"Error",text:"Failed to get offers from the server."},5e3)}catch(l){console.error("Got error loading offers:",l.message||l),this.$notify({group:"alert",type:"danger",title:"Error",text:"Got an error loading offers."},5e3)}finally{this.isLoading=!1}}async loadMoreOfferData(s){if(this.offers.length>0&&s){const a=this.offers[this.offers.length-1];await this.loadOffers(`&beforeId=${a.jwtId}`)}}async loadOffers(s=""){const a=`${this.apiServer}/api/v2/report/offers?offeredByDid=${this.activeDid}${s}`;await this.offerDataLoader(a)}showNameThenIdDialog(){this.givenName?this.promptForShareMethod():this.$refs.userNameDialog.open(()=>{this.promptForShareMethod()})}promptForShareMethod(){this.$notify({group:"modal",type:"confirm",title:"Are you nearby with cameras?",text:"If so, we'll use those with QR codes to share.",onCancel:async()=>{},onNo:async()=>{this.$router.push({name:"share-my-contact-info"})},onYes:async()=>{this.$router.push({name:"contact-qr"})},noText:"we will share another way",yesText:"we are nearby with cameras"},-1)}computedOfferTabClassNames(){return{"inline-block":!0,"py-3":!0,"rounded-t-lg":!0,"border-b-2":!0,active:this.showOffers,"text-black":this.showOffers,"border-black":this.showOffers,"font-semibold":this.showOffers,"text-blue-600":!this.showOffers,"border-transparent":!this.showOffers,"hover:border-slate-400":!this.showOffers}}computedProjectTabClassNames(){return{"inline-block":!0,"py-3":!0,"rounded-t-lg":!0,"border-b-2":!0,active:this.showProjects,"text-black":this.showProjects,"border-black":this.showProjects,"font-semibold":this.showProjects,"text-blue-600":!this.showProjects,"border-transparent":!this.showProjects,"hover:border-slate-400":!this.showProjects}}};x=Z([F({components:{EntityIcon:R,InfiniteScroll:A,QuickNav:E,OnboardingDialog:U,ProjectIcon:V,TopMessage:z,UserNameDialog:Y}})],x);const ee={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},te={class:"text-center text-slate-500 border-b border-slate-300 mt-8"},oe={class:"flex flex-wrap justify-center gap-4 -mb-px"},se={key:1,class:"fixed left-6 bottom-24 text-center text-4xl leading-none bg-slate-400 text-white w-14 py-2.5 rounded-full"},ne={key:0,class:"text-center py-4"},re={id:"listOffers",class:"border-t border-slate-300"},ae={class:"block py-4 flex gap-4"},ie={key:0,class:"flex-none"},le={key:1,class:"flex-none w-12"},de={class:"text-sm"},ce={key:0},he={key:0},ue={key:1},fe={key:2},me={class:"text-sm text-slate-400"},pe={key:0},ge={key:1},ye={key:1},we={key:0},be={key:1},ve=["onClick"],ke={key:0,class:"text-center py-4"},je={key:0},Pe={key:1},Ce={id:"listProjects",class:"border-t border-slate-300"},De=["onClick"],xe={class:"flex-none"},Ie={class:"grow overflow-hidden"},_e={class:"text-base font-semibold"},Ne={class:"text-sm truncate"};function $e(e,o,s,a,l,u){const p=y("QuickNav"),w=y("TopMessage"),v=y("OnboardingDialog"),h=y("font-awesome"),k=y("router-link"),b=y("ProjectIcon"),j=y("EntityIcon"),I=y("InfiniteScroll"),O=y("UserNameDialog");return r(),i(D,null,[c(p,{selected:"Projects"}),c(w),n("section",ee,[o[12]||(o[12]=n("h1",{id:"ViewHeading",class:"text-4xl text-center font-light"}," Your Project Ideas ",-1)),c(v,{ref:"onboardingDialog"},null,512),n("div",te,[n("ul",oe,[n("li",null,[n("a",{href:"#",class:_(e.computedOfferTabClassNames()),onClick:o[0]||(o[0]=t=>{e.offers=[],e.projects=[],e.showOffers=!0,e.showProjects=!1,e.loadOffers()})}," Offers ",2)]),n("li",null,[n("a",{href:"#",class:_(e.computedProjectTabClassNames()),onClick:o[1]||(o[1]=t=>{e.offers=[],e.projects=[],e.showOffers=!1,e.showProjects=!0,e.loadProjects()})}," Projects ",2)])])]),e.isRegistered&&e.showProjects?(r(),i("button",{key:0,class:"fixed right-6 top-24 text-center text-4xl leading-none bg-green-600 text-white w-14 py-2.5 rounded-full",onClick:o[2]||(o[2]=t=>e.onClickNewProject())},[c(h,{icon:"plus",class:"fa-fw"})])):g("",!0),e.isLoading?(r(),i("div",se,[c(h,{icon:"spinner",class:"fa-spin-pulse"})])):g("",!0),e.showOffers?(r(),P(I,{key:2,onReachedBottom:e.loadMoreOfferData},{default:C(()=>[e.offers.length===0?(r(),i("div",ne,[o[5]||(o[5]=f(" You have not offered anything. ")),o[6]||(o[6]=n("br",null,null,-1)),c(k,{to:"/discover",class:"text-blue-600"},{default:C(()=>o[4]||(o[4]=[f(" Look for projects worth some of your time. ")])),_:1})])):g("",!0),n("ul",re,[(r(!0),i(D,null,N(e.offers,t=>(r(),i("li",{key:t.handleId,class:"border-b border-slate-300"},[n("div",ae,[t.fulfillsPlanHandleId?(r(),i("div",ie,[c(b,{"entity-id":t.fulfillsPlanHandleId,"icon-size":48,class:"inline-block align-middle border border-slate-300 rounded-md max-h-12 max-w-12"},null,8,["entity-id"])])):g("",!0),t.recipientDid?(r(),i("div",le,[c(j,{"entity-id":t.recipientDid,"icon-size":48,class:"inline-block align-middle border border-slate-300 rounded-md"},null,8,["entity-id"])])):g("",!0),n("div",null,[n("div",null," To "+m(t.fulfillsPlanHandleId?e.projectNameFromHandleId[t.fulfillsPlanHandleId]:e.didInfo(t.recipientDid,e.activeDid,e.allMyDids,e.allContacts)),1),n("div",null,m(t.objectDescription),1),n("span",de,[t.amount?(r(),i("span",ce,[c(h,{icon:e.libsUtil.iconForUnitCode(t.unit),class:"fa-fw text-slate-400"},null,8,["icon"]),t.amountGiven>=t.amount?(r(),i("span",he,[c(h,{icon:"check-circle",class:"fa-fw text-green-500"}),f(" All "+m(t.amount)+" given ",1)])):(r(),i("span",ue,[c(h,{icon:"triangle-exclamation",class:"fa-fw text-yellow-500"}),f(" "+m(t.amountGiven?"":"All")+" "+m(t.amount-(t.amountGiven||0))+" remaining ",1)])),t.amountGiven>0?(r(),i("span",fe,[n("span",me,[f(" ("+m(t.amountGiven)+" given, ",1),t.amountGivenConfirmed>=t.amountGiven?(r(),i("span",pe," all ")):(r(),i("span",ge,[t.amountGiven>=t.amount?(r(),P(h,{key:0,icon:"triangle-exclamation",class:"fa-fw text-yellow-300"})):g("",!0),f(" "+m(t.amountGivenConfirmed||0),1)])),o[7]||(o[7]=f(" of that is confirmed) "))])])):g("",!0)])):(r(),i("span",ye,[t.nonAmountGivenConfirmed?(r(),i("span",we,[c(h,{icon:"check-circle",class:"fa-fw text-green-500"}),f(" "+m(t.nonAmountGivenConfirmed)+" "+m(t.nonAmountGivenConfirmed==1?"give":"gives")+" are confirmed. ",1)])):(r(),i("span",be,[c(h,{icon:"triangle-exclamation",class:"fa-fw text-yellow-500"}),o[8]||(o[8]=n("span",{class:"text-sm"},"Not confirmed by anyone",-1))]))])),n("a",{onClick:G=>e.onClickLoadClaim(t.jwtId)},[c(h,{icon:"file-lines",class:"pl-2 text-blue-500 cursor-pointer"})],8,ve)])])])]))),128))])]),_:1},8,["onReachedBottom"])):g("",!0),e.showProjects?(r(),P(I,{key:3,onReachedBottom:e.loadMoreProjectData},{default:C(()=>[e.projects.length===0?(r(),i("div",ke,[o[11]||(o[11]=f(" You have not announced any projects. ")),e.isRegistered?(r(),i("div",je,[o[9]||(o[9]=f(" Hit the big ")),c(h,{icon:"plus",class:"bg-green-600 text-white px-1.5 py-1 rounded-full"}),o[10]||(o[10]=f(" button. You'll never know until you try. "))])):(r(),i("div",Pe,[n("button",{class:"text-md font-bold bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white mt-2 px-2 py-3 rounded-md",onClick:o[3]||(o[3]=t=>e.showNameThenIdDialog())}," Get someone to onboard you. "),c(O,{ref:"userNameDialog"},null,512)]))])):g("",!0),n("ul",Ce,[(r(!0),i(D,null,N(e.projects,t=>(r(),i("li",{key:t.handleId,class:"border-b border-slate-300"},[n("a",{class:"block py-4 flex gap-4",onClick:G=>e.onClickLoadProject(t.handleId)},[n("div",xe,[c(b,{"entity-id":t.handleId,"icon-size":48,"image-url":t.image,class:"inline-block align-middle border border-slate-300 rounded-md max-h-12 max-w-12"},null,8,["entity-id","image-url"])]),n("div",Ie,[n("h2",_e,m(t.name),1),n("div",Ne,m(t.description),1)])],8,De)]))),128))])]),_:1},8,["onReachedBottom"])):g("",!0)])],64)}const ze=H(x,[["render",$e]]);export{ze as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/PushNotificationPermission-BPu7cCY7.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/PushNotificationPermission-BPu7cCY7.js deleted file mode 100644 index 71533f6..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/PushNotificationPermission-BPu7cCY7.js +++ /dev/null @@ -1 +0,0 @@ -var P=Object.defineProperty;var E=(i,e,t)=>e in i?P(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var p=(i,e,t)=>E(i,typeof e!="symbol"?e+"":e,t);import{C as A,V as C,e as x,D,l as u,Z as N,$ as O,_ as W,z as M,y as $,B as c,w as H,h,m as I,k as l,n as g,j as y,o as v,s as w,T as V}from"./main.common-DD7dqhZp.js";import{D as K,a as L,a6 as T,a5 as U}from"./index-ryzpKtgI.js";function R(i){const e="=".repeat((4-i.length%4)%4),t=(i+e).replace(/-/g,"+").replace(/_/g,"/"),s=window.atob(t),r=new Uint8Array(s.length);for(let n=0;n{for(var r=s>1?void 0:s?J(e,t):e,n=i.length-1,a;n>=0;n--)(a=i[n])&&(r=a(r)||r);return r};let b=class extends C{constructor(){super(...arguments);p(this,"$notify");p(this,"DAILY_CHECK_TITLE",K);p(this,"DIRECT_PUSH_TITLE",L);p(this,"callback",()=>{});p(this,"hourAm",!0);p(this,"hourInput","8");p(this,"isVisible",!1);p(this,"messageInput","");p(this,"minuteInput","00");p(this,"pushType","");p(this,"serviceWorkerReady",!1);p(this,"vapidKey","")}async open(t,s){var r;this.callback=s||this.callback,this.isVisible=!0,this.pushType=t;try{const n=await x();let a=D;if(n!=null&&n.webPushServer&&(a=n.webPushServer),a.startsWith("http://localhost"))u("Not checking for VAPID in this local environment.");else{let o="";await this.axios.get(a+"/web-push/vapid").then(d=>{var m,f;this.vapidKey=((m=d.data)==null?void 0:m.vapidKey)||"",u("Got vapid key: "+this.vapidKey),o=JSON.stringify(d.data),(f=navigator.serviceWorker)==null||f.addEventListener("controllerchange",()=>{u("New service worker is now controlling the page")})}),this.vapidKey||(this.$notify({group:"alert",type:"danger",title:"Error Setting Notifications",text:"Could not set notifications."},5e3),u("Error Setting Notifications: web push server response didn't have vapidKey: "+o,!0))}}catch(n){window.location.host.startsWith("localhost")?u("Ignoring the error getting VAPID for local development."):(u("Got an error initializing notifications: "+JSON.stringify(n),!0),this.$notify({group:"alert",type:"danger",title:"Error Setting Notifications",text:"Got an error setting notifications."},5e3))}(r=navigator.serviceWorker)==null||r.ready.then(()=>{this.serviceWorkerReady=!0}),this.pushType===this.DIRECT_PUSH_TITLE?(this.messageInput="Click to share some gratitude with the world -- even if they're unnamed.",setTimeout(function(){var n;(n=document.getElementById("push-message"))==null||n.focus()},100)):this.messageInput=""}close(){this.isVisible=!1}sendMessageToServiceWorker(t){return new Promise((s,r)=>{var n,a;if((n=navigator.serviceWorker)!=null&&n.controller){const o=new MessageChannel;o.port1.onmessage=d=>{d.data.error?r(d.data.error):s(d.data)},(a=navigator.serviceWorker)==null||a.controller.postMessage(t,[o.port2])}else r("Service worker controller not available")})}async askPermission(){var s,r;if(!("serviceWorker"in navigator&&((s=navigator.serviceWorker)!=null&&s.controller)))return Promise.reject("Service worker not available.");await N.open();const t=(r=await N.secret.get(O))==null?void 0:r.secret;return t?this.sendSecretToServiceWorker(t).then(()=>this.checkNotificationSupport()).then(()=>this.requestNotificationPermission()).catch(n=>Promise.reject(n)):Promise.reject("No secret found.")}sendSecretToServiceWorker(t){const s={type:"SEND_LOCAL_DATA",data:t};return this.sendMessageToServiceWorker(s).then(r=>{u("Response from service worker: "+JSON.stringify(r))})}checkNotificationSupport(){return"Notification"in window?(window.Notification.permission==="granted",Promise.resolve()):(this.$notify({group:"alert",type:"danger",title:"Browser Notifications Are Not Supported",text:"This browser does not support notifications."},3e3),Promise.reject("This browser does not support notifications."))}requestNotificationPermission(){return window.Notification.requestPermission().then(t=>{if(t!=="granted")throw this.$notify({group:"alert",type:"danger",title:"Error Requesting Notification Permission",text:"Allow this app permission to make notifications for personal reminders. You can adjust them at any time in your settings."},-1),new Error("Permission was not granted to this app.");return t})}checkHourInput(){const t=parseInt(this.hourInput);isNaN(t)?this.hourInput="12":t<1?(this.hourInput="12",this.hourAm=!this.hourAm):t>12?(this.hourInput="1",this.hourAm=!this.hourAm):this.hourInput=t.toString()}checkMinuteInput(){const t=parseInt(this.minuteInput);isNaN(t)?this.minuteInput="00":t<0?this.minuteInput="59":t<10?this.minuteInput="0"+t:t>59?this.minuteInput="00":this.minuteInput=t.toString()}async turnOnNotifications(){let t=()=>{};return this.askPermission().then(s=>(u("Permission granted: "+JSON.stringify(s)),this.subscribeToPush())).then(()=>{var s;return u("Subscribed successfully."),(s=navigator.serviceWorker)==null?void 0:s.ready}).then(s=>s.pushManager.getSubscription()).then(async s=>{if(s){t=await this.$notify({group:"alert",type:"info",title:"Notification Setup Underway",text:"Setting up notifications for interesting activity, which takes about 10 seconds. If you don't see a final confirmation, check the 'Troubleshoot' page."},-1);const r=T(this.hourInput),o=(this.hourAm?r===12?0:r:r===12?12:r+12)%24+Math.round(new Date().getTimezoneOffset()/60),d=(o+(o<0?24:0))%24,f=T(this.minuteInput)+Math.round(new Date().getTimezoneOffset()%60),S=(f+(f<0?60:0))%60,k={notifyTime:{utcHour:d,minute:S},notifyType:this.pushType,message:this.messageInput,...s.toJSON()};return await this.sendSubscriptionToServer(k),u("Subscription data sent to server with endpoint: "+s.endpoint),k}else throw new Error("Subscription object is not available.")}).then(async s=>{u("Subscription data sent to server and all finished successfully."),await U(s,!0),t(),setTimeout(()=>{this.$notify({group:"alert",type:"success",title:"Notification Is On",text:"You should see at least one on your device; if not, check the 'Troubleshoot' link."},7e3)},500);const r=this.hourInput+":"+this.minuteInput+" "+(this.hourAm?"AM":"PM");this.callback(!0,r,this.messageInput)}).catch(s=>{u("Got an error setting notification permissions: string "+s.toString()+" JSON "+JSON.stringify(s),!0),this.$notify({group:"alert",type:"danger",title:"Error Setting Notification Permissions",text:"Could not set notification permissions."},3e3)})}subscribeToPush(){return new Promise((t,s)=>{var a;if(!("serviceWorker"in navigator&&"PushManager"in window)){const o="Push messaging is not supported";return console.warn(o),s(new Error(o))}if(window.Notification.permission!=="granted"){const o="Notification permission not granted";return console.warn(o),s(new Error(o))}const n={userVisibleOnly:!0,applicationServerKey:R(this.vapidKey)};(a=navigator.serviceWorker)==null||a.ready.then(o=>o.pushManager.subscribe(n)).then(o=>{u("Push subscription successful: "+JSON.stringify(o)),t()}).catch(o=>{u("Push subscription failed: "+JSON.stringify(o)+" - "+JSON.stringify(n),!0),this.$notify({group:"alert",type:"danger",title:"Error Setting Push Notifications",text:"We encountered an issue setting up push notifications. If you wish to revoke notification permissions, please do so in your browser settings."},-1),s(o)})})}sendSubscriptionToServer(t){return u("About to send subscription... "+JSON.stringify(t)),fetch("/web-push/subscribe",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then(s=>{if(!s.ok)throw console.error("Bad response subscribing to web push: ",s),new Error("Failed to send push subscription to server");u("Push subscription sent to server successfully.")})}};b=j([A],b);const B={key:0,class:"fixed z-[100] top-0 inset-x-0 w-full inset-0 h-screen flex flex-col items-center justify-center bg-slate-900/50"},Y={class:"flex w-11/12 max-w-sm mx-auto mb-3 overflow-hidden bg-white rounded-lg shadow-lg"},_={class:"w-full px-6 py-6 text-slate-900 text-center"},z={key:0,class:"text-lg mb-4"},q={key:0},G={key:1},F={key:1,class:"text-lg mb-4"},Z={key:2},Q={key:0},X={key:1},ee={class:"flex flex-row justify-center"},te={key:0},se={key:1};function ie(i,e,t,s,r,n){const a=M("font-awesome");return c(),$(V,{"enter-active-class":"transform ease-out duration-300 transition","enter-from-class":"translate-y-2 opacity-0 sm:translate-y-4","enter-to-class":"translate-y-0 opacity-100 sm:translate-y-0","leave-active-class":"transition ease-in duration-500","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:H(()=>[i.isVisible?(c(),h("div",B,[l("div",Y,[l("div",_,[i.serviceWorkerReady&&i.vapidKey?(c(),h("p",z,[i.pushType===i.DAILY_CHECK_TITLE?(c(),h("span",q," Would you like to be notified of new activity, up to once a day? ")):(c(),h("span",G," Would you like to get a reminder message once a day? "))])):(c(),h("p",F,[e[8]||(e[8]=g(" Waiting for system initialization, which may take up to 5 seconds... ")),y(a,{icon:"spinner",spin:""})])),i.serviceWorkerReady&&i.vapidKey?(c(),h("div",Z,[i.pushType===i.DAILY_CHECK_TITLE?(c(),h("div",Q,e[9]||(e[9]=[l("span",null,"Yes, send me a message when there is new data for me",-1)]))):(c(),h("div",X,[e[10]||(e[10]=l("span",null,"Yes, send me this message:",-1)),v(l("textarea",{type:"text",id:"push-message","onUpdate:modelValue":e[0]||(e[0]=o=>i.messageInput=o),class:"rounded border border-slate-400 mt-2 px-2 py-2 w-full",maxlength:"100"},null,512),[[w,i.messageInput]]),e[11]||(e[11]=l("span",{class:"w-full flex justify-between text-xs text-slate-500"},[l("span"),l("span",null,"(100 characters max)")],-1))])),l("div",null,[l("span",ee,[e[14]||(e[14]=l("span",{class:"mt-2"},"... at: ",-1)),v(l("input",{"onUpdate:modelValue":e[1]||(e[1]=o=>i.hourInput=o),type:"number",class:"rounded-l border border-r-0 border-slate-400 ml-2 mt-2 px-2 py-2 text-center w-20",onChange:e[2]||(e[2]=(...o)=>i.checkHourInput&&i.checkHourInput(...o))},null,544),[[w,i.hourInput]]),v(l("input",{"onUpdate:modelValue":e[3]||(e[3]=o=>i.minuteInput=o),type:"number",class:"border border-slate-400 mt-2 px-2 py-2 text-center w-20",onChange:e[4]||(e[4]=(...o)=>i.checkMinuteInput&&i.checkMinuteInput(...o))},null,544),[[w,i.minuteInput]]),l("span",{class:"rounded-r border border-slate-400 bg-slate-200 text-center text-blue-500 mt-2 px-2 py-2 w-20",onClick:e[5]||(e[5]=o=>i.hourAm=!i.hourAm)},[i.hourAm?(c(),h("span",te,[e[12]||(e[12]=g(" AM ")),y(a,{icon:"chevron-down"})])):(c(),h("span",se,[e[13]||(e[13]=g(" PM ")),y(a,{icon:"chevron-up"})]))])])]),l("button",{class:"block w-full text-center text-md font-bold uppercase bg-blue-600 text-white mt-2 px-2 py-2 rounded-md",onClick:e[6]||(e[6]=o=>{i.close(),i.turnOnNotifications()})}," Turn on Daily Message ")])):I("",!0),l("button",{class:"block w-full text-center text-md font-bold uppercase bg-slate-600 text-white mt-4 px-2 py-2 rounded-md",onClick:e[7]||(e[7]=o=>i.close())}," No, Not Now ")])])])):I("",!0)]),_:1})}const ue=W(b,[["render",ie],["__scopeId","data-v-745fefb0"]]);export{ue as P}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/PushNotificationPermission-tn0RQdqM.css b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/PushNotificationPermission-tn0RQdqM.css deleted file mode 100644 index e69de29..0000000 diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/QuickActionBvcBeginView-BOihmGgs.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/QuickActionBvcBeginView-BOihmGgs.js deleted file mode 100644 index 1b03b73..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/QuickActionBvcBeginView-BOihmGgs.js +++ /dev/null @@ -1 +0,0 @@ -var w=Object.defineProperty;var S=(t,e,s)=>e in t?w(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var c=(t,e,s)=>S(t,typeof e!="symbol"?e+"":e,s);import{V as k,e as T,a6 as y,C as $,_ as C,h as m,j as v,k as o,o as f,q as x,n as B,s as V,F as D,z as h,B as g}from"./main.common-DD7dqhZp.js";import{D as M}from"./datetime-BDQ5ptpc.js";import{Q as _}from"./QuickNav-C8jPGtUY.js";import{T as O}from"./TopMessage-ZWDDjman.js";import{a6 as A,a2 as E,aB as P,v as N,aC as Q}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var j=Object.getOwnPropertyDescriptor,U=(t,e,s,a)=>{for(var i=a>1?void 0:a?j(e,s):e,l=t.length-1,d;l>=0;l--)(d=t[l])&&(i=d(i)||i);return i};let b=class extends k{constructor(){super(...arguments);c(this,"$notify");c(this,"$router");c(this,"attended",!0);c(this,"gaveTime",!0);c(this,"hoursStr","1");c(this,"todayOrPreviousStartDate","")}async mounted(){let s=M.now().setZone("America/Denver");s.weekday<6&&(s=s.minus({week:1}));const a=s.set({weekday:6}).set({hour:9}).startOf("hour");this.todayOrPreviousStartDate=a.toISO({suppressMilliseconds:!0})||""}async record(){var l,d;const s=await T(),a=s.activeDid||"",i=s.apiServer||"";try{const u=A(this.hoursStr);this.$notify({group:"alert",type:"toast",title:"Sent..."},1e3);let p=!1;if(this.gaveTime&&u>0){const r=await E(y,i,a,a,void 0,void 0,u,"HUR",P);r.type==="success"?p=!0:(console.error("Error sending time:",r),this.$notify({group:"alert",type:"danger",title:"Error",text:((l=r==null?void 0:r.error)==null?void 0:l.userMessage)||"There was an error sending the time."},5e3))}let n=!1;if(this.attended){const r=await N(Q(a,this.todayOrPreviousStartDate),a,i,y);r.type==="success"?n=!0:(console.error("Error sending attendance:",r),this.$notify({group:"alert",type:"danger",title:"Error",text:((d=r==null?void 0:r.error)==null?void 0:d.userMessage)||"There was an error sending the attendance."},5e3))}if(p||n){const r=p&&n?"Your attendance and time have been recorded.":p?"Your time has been recorded.":"Your attendance has been recorded.";this.$notify({group:"alert",type:"success",title:"Success",text:r},3e3),this.$router.push({path:"/quick-action-bvc"})}}catch(u){console.error("Error sending claims.",u),this.$notify({group:"alert",type:"danger",title:"Error",text:u.userMessage||"There was an error sending the claims."},5e3)}}};b=U([$({components:{QuickNav:_,TopMessage:O}})],b);const Y={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},H={class:"text-lg text-center font-light relative px-7"},F={class:"m-2 flex"},I={class:"m-2 flex"},q={key:0},z={key:1,class:"h-6"},J={key:0,class:"flex justify-center mt-4"},Z={key:1,class:"flex justify-center mt-4"};function G(t,e,s,a,i,l){const d=h("QuickNav"),u=h("TopMessage"),p=h("font-awesome");return g(),m(D,null,[v(d),v(u),o("section",Y,[o("div",H,[o("h1",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:e[0]||(e[0]=n=>t.$router.back())},[v(p,{icon:"chevron-left",class:"fa-fw"})])]),e[10]||(e[10]=o("h1",{id:"ViewHeading",class:"text-4xl text-center font-light px-4 mb-4"}," Beginning of BVC Saturday Meeting ",-1)),o("div",null,[e[8]||(e[8]=o("h2",{class:"text-2xl m-2"},"You're Here",-1)),o("div",F,[f(o("input",{"onUpdate:modelValue":e[1]||(e[1]=n=>t.attended=n),type:"checkbox",class:"h-6 w-6"},null,512),[[x,t.attended]]),e[5]||(e[5]=o("span",{class:"pb-2 pl-2 pr-2"},"Attended",-1))]),o("div",I,[f(o("input",{"onUpdate:modelValue":e[2]||(e[2]=n=>t.gaveTime=n),type:"checkbox",class:"h-6 w-6"},null,512),[[x,t.gaveTime]]),e[7]||(e[7]=o("span",{class:"pb-2 pl-2 pr-2"},"Spent Time",-1)),t.gaveTime?(g(),m("span",q,[f(o("input",{"onUpdate:modelValue":e[3]||(e[3]=n=>t.hoursStr=n),type:"text",placeholder:"How much time",size:"1",class:"border border-slate-400 h-6 px-2"},null,512),[[V,t.hoursStr]]),e[6]||(e[6]=B(" hour(s) "))])):(g(),m("span",z))])]),t.attended||t.gaveTime&&t.hoursStr&&t.hoursStr!="0"?(g(),m("div",J,[o("button",{class:"block text-center text-md font-bold bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md w-56",onClick:e[4]||(e[4]=n=>t.record())}," Sign & Send ")])):(g(),m("div",Z,e[9]||(e[9]=[o("button",{class:"block text-center text-md font-bold bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md w-56"}," Select Your Actions ",-1)])))])],64)}const ne=C(b,[["render",G]]);export{ne as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/QuickActionBvcEndView-D8eLkuZh.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/QuickActionBvcEndView-D8eLkuZh.js deleted file mode 100644 index a910845..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/QuickActionBvcEndView-D8eLkuZh.js +++ /dev/null @@ -1 +0,0 @@ -var E=Object.defineProperty;var M=(t,e,i)=>e in t?E(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var r=(t,e,i)=>M(t,typeof e!="symbol"?e+"":e,i);import{V as A,e as O,d as V,a5 as G,a6 as T,C as j,_ as U,h as m,j as u,k as o,m as y,F as S,E as P,n as v,t as g,o as C,q as D,s as H,z as b,B as p}from"./main.common-DD7dqhZp.js";import{D as I}from"./datetime-BDQ5ptpc.js";import{Q as N}from"./QuickNav-C8jPGtUY.js";import{T as W}from"./TopMessage-ZWDDjman.js";import{g as Q,ao as x,F as _,aD as F,a2 as L,aB as $,aE as R}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var Y=Object.getOwnPropertyDescriptor,q=(t,e,i,a)=>{for(var l=a>1?void 0:a?Y(e,i):e,s=t.length-1,d;s>=0;s--)(d=t[s])&&(l=d(l)||l);return l};let w=class extends A{constructor(){super(...arguments);r(this,"$notify");r(this,"activeDid","");r(this,"allContacts",[]);r(this,"allMyDids",[]);r(this,"apiServer","");r(this,"claimCountByUser",0);r(this,"claimCountWithHidden",0);r(this,"claimsToConfirm",[]);r(this,"claimsToConfirmSelected",[]);r(this,"description","breakfast");r(this,"loadingConfirms",!0);r(this,"someoneGave",!1);r(this,"supplyGiftDetails",!1)}async created(){this.loadingConfirms=!0;const e=await O();this.apiServer=e.apiServer||"",this.activeDid=e.activeDid||"",this.allContacts=await V.contacts.toArray();let i=I.now().setZone("America/Denver");i.weekday<6&&(i=i.minus({week:1}));const l=i.set({weekday:6}).set({hour:9}).startOf("hour").toISO({suppressMilliseconds:!0})||"",s=await G;await s.open();const d=await s.accounts.toArray();this.allMyDids=d.map(c=>c.did);const h=await Q(this.activeDid);try{const c=await fetch(this.apiServer+"/api/claim/?issuedAt_greaterThanOrEqualTo="+encodeURIComponent(l)+"&excludeConfirmations=true",{headers:h});if(!c.ok)throw console.error("Bad response",c),new Error("Bad response when retrieving claims.");await c.json().then(n=>{const f=x(B=>B.issuer===this.activeDid,n),k=x(_,f);this.claimsToConfirm=k,this.claimCountByUser=n.length-f.length,this.claimCountWithHidden=f.length-k.length})}catch(c){console.error("Error:",c),this.$notify({group:"alert",type:"danger",title:"Error",text:"There was an error retrieving today's claims to confirm."},5e3)}this.loadingConfirms=!1}onClickLoadClaim(e){const i={path:"/claim/"+encodeURIComponent(e)};this.$router.push(i)}async record(){var e;try{this.claimsToConfirmSelected.length>0&&this.$notify({group:"alert",type:"toast",title:"Sent..."},1e3);const i=await Promise.allSettled(this.claimsToConfirmSelected.map(async s=>{const d=this.claimsToConfirm.find(h=>h.id===s);return d?F(this.activeDid,d.claim,d.id,d.handleId,this.apiServer,T):{type:"error",error:"Record not found."}})),a=i.filter(s=>s.status==="fulfilled"&&s.value.type==="success");if(a.length0){const s=a.length===1?"Your confirmation has been recorded.":"Your confirmations have been recorded.";this.$notify({group:"alert",type:"success",title:"Success",text:s},3e3)}this.$router.push({name:"gifted-details",query:{description:this.description,destinationPathAfter:"/",providerProjectId:$,recipientDid:this.activeDid}})}else if(a.length>0||l){const s=a.length===1?"confirmation":"confirmations",d=a.length>0&&l?`Your ${s} and that give have been recorded.`:l?"That give has been recorded.":"Your "+s+" "+(a.length===1?"has":"have")+" been recorded.";this.$notify({group:"alert",type:"success",title:"Success",text:d},3e3),this.$router.push({path:"/"})}}catch(i){console.error("Error sending claims.",i),this.$notify({group:"alert",type:"danger",title:"Error",text:i.userMessage||"There was an error sending claims."},5e3)}}};w=q([j({methods:{claimSpecialDescription:R},components:{QuickNav:N,TopMessage:W}})],w);const z={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},J={class:"text-lg text-center font-light relative px-7"},Z={key:0,class:"flex justify-center"},K={key:1},X={class:"border-t border-slate-300 m-2"},ee={class:"grid grid-cols-12"},te={class:"col-span-11 justify-self-start"},se=["checked","onClick"],oe=["onClick"],ie={key:0,class:"border-b border-slate-300 pb-2"},ne={key:1,class:"border-b border-slate-300 pb-2"},re={class:"m-2 flex"},ae={key:0},le={key:1,class:"h-6"},de={key:2,class:"flex justify-center mt-4"},ce={key:3,class:"flex justify-center mt-4"};function me(t,e,i,a,l,s){const d=b("QuickNav"),h=b("TopMessage"),c=b("font-awesome");return p(),m(S,null,[u(d),u(h),o("section",z,[o("div",J,[o("h1",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:e[0]||(e[0]=n=>t.$router.back())},[u(c,{icon:"chevron-left",class:"fa-fw"})])]),e[13]||(e[13]=o("h1",{id:"ViewHeading",class:"text-4xl text-center font-light px-4 mb-4"}," End of BVC Saturday Meeting ",-1)),o("div",null,[e[5]||(e[5]=o("h2",{class:"text-2xl m-2"},"Confirm",-1)),t.loadingConfirms?(p(),m("div",Z,[u(c,{icon:"spinner",class:"fa-spin-pulse"})])):t.claimsToConfirm.length===0?(p(),m("div",K," There are no claims yet today for you to confirm. ")):y("",!0),o("ul",X,[(p(!0),m(S,null,P(t.claimsToConfirm,n=>(p(),m("li",{key:n.id,class:"border-b border-slate-300 py-2"},[o("div",ee,[o("span",te,[o("span",null,[o("input",{type:"checkbox",checked:t.claimsToConfirmSelected.includes(n.id),class:"mr-2 h-6 w-6",onClick:f=>t.claimsToConfirmSelected.includes(n.id)?t.claimsToConfirmSelected.splice(t.claimsToConfirmSelected.indexOf(n.id),1):t.claimsToConfirmSelected.push(n.id)},null,8,se)]),v(" "+g(t.claimSpecialDescription(n,t.activeDid,t.allMyDids,t.allContacts))+" ",1),o("a",{onClick:f=>t.onClickLoadClaim(n.id)},[u(c,{icon:"file-lines",class:"pl-2 text-blue-500 cursor-pointer"})],8,oe)])])]))),128))])]),t.claimCountWithHidden>0?(p(),m("div",ie,[o("span",null,[v(g(t.claimCountWithHidden===1?"There is 1 other claim with hidden details,":`There are ${t.claimCountWithHidden} other claims with hidden details,`)+" so if you expected but do not see details from someone then ask them to check that their activity is visible to you on their Contacts ",1),u(c,{icon:"users",class:"text-slate-500"}),e[6]||(e[6]=v(" page. "))])])):y("",!0),t.claimCountByUser>0?(p(),m("div",ne,[o("span",null,g(t.claimCountByUser===1?"There is 1 other claim by you":`There are ${t.claimCountByUser} other claims by you`)+" which you don't need to confirm. ",1)])):y("",!0),o("div",null,[e[11]||(e[11]=o("h2",{class:"text-2xl m-2"},"Anything else?",-1)),o("div",re,[C(o("input",{"onUpdate:modelValue":e[1]||(e[1]=n=>t.someoneGave=n),type:"checkbox",class:"h-6 w-6"},null,512),[[D,t.someoneGave]]),e[10]||(e[10]=o("span",{class:"pb-2 pl-2 pr-2"},"The group provided",-1)),t.someoneGave?(p(),m("span",ae,[C(o("input",{"onUpdate:modelValue":e[2]||(e[2]=n=>t.description=n),type:"text",size:"20",class:"border border-slate-400 h-6 px-2"},null,512),[[H,t.description]]),e[7]||(e[7]=o("br",null,null,-1)),e[8]||(e[8]=v(" (Everyone likes personalized messages! 😁 ... and for a pic: ")),C(o("input",{"onUpdate:modelValue":e[3]||(e[3]=n=>t.supplyGiftDetails=n),type:"checkbox"},null,512),[[D,t.supplyGiftDetails]]),e[9]||(e[9]=v(") "))])):(p(),m("span",le,"..."))])]),t.claimsToConfirmSelected.length||t.someoneGave&&t.description?(p(),m("div",de,[o("button",{class:"block text-center text-md font-bold bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md w-56",onClick:e[4]||(e[4]=n=>t.record())}," Sign & Send ")])):(p(),m("div",ce,e[12]||(e[12]=[o("button",{class:"block text-center text-md font-bold bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md w-56"}," Choose What To Confirm ",-1)])))])],64)}const we=U(w,[["render",me]]);export{we as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/QuickActionBvcView-DsgRspIO.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/QuickActionBvcView-DsgRspIO.js deleted file mode 100644 index 892e700..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/QuickActionBvcView-DsgRspIO.js +++ /dev/null @@ -1 +0,0 @@ -var b=Object.defineProperty;var g=(e,t,o)=>t in e?b(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var m=(e,t,o)=>g(e,typeof t!="symbol"?t+"":t,o);import{V as v,C as k,_ as w,h as V,j as s,k as a,w as d,F as B,z as c,B as C,n as x}from"./main.common-DD7dqhZp.js";import{Q as $}from"./QuickNav-C8jPGtUY.js";import{T as h}from"./TopMessage-ZWDDjman.js";import"./index-BGoTPXII.js";var Q=Object.getOwnPropertyDescriptor,y=(e,t,o,l)=>{for(var n=l>1?void 0:l?Q(t,o):t,r=e.length-1,i;r>=0;r--)(i=e[r])&&(n=i(n)||n);return n};let p=class extends v{constructor(){super(...arguments);m(this,"$router")}};p=y([k({components:{QuickNav:$,TopMessage:h}})],p);const N={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},M={class:"text-lg text-center font-light relative px-7"};function T(e,t,o,l,n,r){const i=c("QuickNav"),_=c("TopMessage"),f=c("font-awesome"),u=c("router-link");return C(),V(B,null,[s(i),s(_),a("section",N,[a("div",M,[a("h1",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:t[0]||(t[0]=A=>e.$router.back())},[s(f,{icon:"chevron-left",class:"fa-fw"})])]),t[3]||(t[3]=a("h1",{id:"ViewHeading",class:"text-4xl text-center font-light px-4 mb-4"}," Bountiful Voluntaryist Community Actions ",-1)),a("div",null,[s(u,{to:{name:"quick-action-bvc-begin"},class:"block text-center text-md font-bold uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white mt-2 px-2 py-3 rounded-md"},{default:d(()=>t[1]||(t[1]=[x(" Beginning of Meeting ")])),_:1}),s(u,{to:{name:"quick-action-bvc-end"},class:"block text-center text-md font-bold uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white mt-2 px-2 py-3 rounded-md"},{default:d(()=>t[2]||(t[2]=[x(" End of Meeting ")])),_:1})])])],64)}const P=w(p,[["render",T]]);export{P as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/QuickNav-C8jPGtUY.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/QuickNav-C8jPGtUY.js deleted file mode 100644 index 3409505..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/QuickNav-C8jPGtUY.js +++ /dev/null @@ -1 +0,0 @@ -var v=Object.defineProperty;var b=(s,e,o)=>e in s?v(s,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):s[e]=o;var u=(s,e,o)=>b(s,typeof e!="symbol"?e+"":e,o);import{a1 as w,C as _,V as h,_ as g,z as m,h as k,B as y,k as t,x as i,j as l,w as d}from"./main.common-DD7dqhZp.js";var C=Object.defineProperty,P=Object.getOwnPropertyDescriptor,p=(s,e,o,n)=>{for(var c=n>1?void 0:n?P(e,o):e,f=s.length-1,a;f>=0;f--)(a=s[f])&&(c=(n?a(e,o,c):a(c))||c);return n&&c&&C(e,o,c),c};let x=class extends h{constructor(){super(...arguments);u(this,"selected","")}};p([w],x.prototype,"selected",2);x=p([_],x);const j={id:"QuickNav",class:"fixed bottom-0 left-0 right-0 bg-slate-200 z-50"},N={class:"flex text-2xl p-2 gap-2 max-w-3xl mx-auto"},Q={class:"flex flex-col items-center"},$={class:"flex flex-col items-center"},B={class:"flex flex-col items-center"},D={class:"flex flex-col items-center"},O={class:"flex flex-col items-center"};function V(s,e,o,n,c,f){const a=m("font-awesome"),r=m("router-link");return y(),k("nav",j,[t("ul",N,[t("li",{class:i({"basis-1/5":!0,"rounded-md":!0,"bg-slate-400 text-white":s.selected==="Home","text-slate-500":s.selected!=="Home"})},[l(r,{to:{name:"home"},class:"block text-center py-2 px-1"},{default:d(()=>[t("div",Q,[l(a,{icon:"house-chimney",class:"fa-fw"}),e[0]||(e[0]=t("span",{class:"text-xs mt-1"},"feed",-1))])]),_:1})],2),t("li",{class:i({"basis-1/5":!0,"rounded-md":!0,"bg-slate-400 text-white":s.selected==="Discover","text-slate-500":s.selected!=="Discover"})},[l(r,{to:{name:"discover"},class:"block text-center py-2 px-1"},{default:d(()=>[t("div",$,[l(a,{icon:"magnifying-glass",class:"fa-fw"}),e[1]||(e[1]=t("span",{class:"text-xs mt-1"},"search",-1))])]),_:1})],2),t("li",{class:i({"basis-1/5":!0,"rounded-md":!0,"bg-slate-400 text-white":s.selected==="Projects","text-slate-500":s.selected!=="Projects"})},[l(r,{to:{name:"projects"},class:"block text-center py-2 px-1"},{default:d(()=>[t("div",B,[l(a,{icon:"hand",class:"fa-fw"}),e[2]||(e[2]=t("span",{class:"text-xs mt-1"},"your work",-1))])]),_:1})],2),t("li",{class:i({"basis-1/5":!0,"rounded-md":!0,"bg-slate-400 text-white":s.selected==="Contacts","text-slate-500":s.selected!=="Contacts"})},[l(r,{to:{name:"contacts"},class:"block text-center py-2 px-1"},{default:d(()=>[t("div",D,[l(a,{icon:"users",class:"fa-fw"}),e[3]||(e[3]=t("span",{class:"text-xs mt-1"},"contacts",-1))])]),_:1})],2),t("li",{class:i({"basis-1/5":!0,"rounded-md":!0,"bg-slate-400 text-white":s.selected==="Profile","text-slate-500":s.selected!=="Profile"})},[l(r,{to:{name:"account"},class:"block text-center py-2 px-1"},{default:d(()=>[t("div",O,[l(a,{icon:"circle-user",class:"fa-fw"}),e[4]||(e[4]=t("span",{class:"text-xs mt-1"},"profile",-1))])]),_:1})],2)])])}const q=g(x,[["render",V]]);export{q as Q}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/RecentOffersToUserProjectsView-DXDjfx6v.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/RecentOffersToUserProjectsView-DXDjfx6v.js deleted file mode 100644 index b852133..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/RecentOffersToUserProjectsView-DXDjfx6v.js +++ /dev/null @@ -1 +0,0 @@ -var U=Object.defineProperty;var b=(t,e,r)=>e in t?U(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var s=(t,e,r)=>b(t,typeof e!="symbol"?e+"":e,r);import{V as D,e as I,d as k,C as _,_ as A,h as l,j as n,k as a,m as w,n as i,w as v,F as P,z as h,B as c,E as x,t as f}from"./main.common-DD7dqhZp.js";import{E as C}from"./EntityIcon-DciUb57i.js";import{G as E}from"./GiftedDialog-DmRkVexW.js";import{I as N}from"./InfiniteScroll-DZwFAI4R.js";import{Q as S}from"./QuickNav-C8jPGtUY.js";import{i as V,z as $,h as B,a8 as T}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var M=Object.getOwnPropertyDescriptor,R=(t,e,r,j)=>{for(var d=j>1?void 0:j?M(e,r):e,p=t.length-1,u;p>=0;p--)(u=t[p])&&(d=u(d)||d);return d};let O=class extends D{constructor(){super(...arguments);s(this,"$notify");s(this,"$router");s(this,"activeDid","");s(this,"allContacts",[]);s(this,"allMyDids",[]);s(this,"apiServer","");s(this,"lastAckedOfferToUserProjectsJwtId","");s(this,"newOffersToUserProjects",[]);s(this,"newOffersToUserProjectsAtEnd",!1);s(this,"showOffersDetails",!1);s(this,"showOffersToUserProjectsDetails",!1);s(this,"didInfo",V);s(this,"displayAmount",$)}async created(){try{const e=await I();this.apiServer=e.apiServer||"",this.activeDid=e.activeDid||"",this.lastAckedOfferToUserProjectsJwtId=e.lastAckedOfferToUserProjectsJwtId||"",this.allContacts=await k.contacts.toArray(),this.allMyDids=await B();const r=await T(this.axios,this.apiServer,this.activeDid,void 0,void 0);this.newOffersToUserProjects=r.data,this.newOffersToUserProjectsAtEnd=!r.hitLimit}catch(e){console.error("Error retrieving settings & contacts:",e),this.$notify({group:"alert",type:"danger",title:"Error",text:e.message||"There was an error retrieving your activity."},5e3)}}async loadMoreOffersToUserProjects(){if(this.newOffersToUserProjectsAtEnd)return;const e=await T(this.axios,this.apiServer,this.activeDid,void 0,this.newOffersToUserProjects[this.newOffersToUserProjects.length-1].jwtId);this.newOffersToUserProjects.push(...e.data),this.newOffersToUserProjectsAtEnd=!e.hitLimit}};O=R([_({components:{EntityIcon:C,GiftedDialog:E,InfiniteScroll:N,QuickNav:S}})],O);const J={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},Q={id:"ViewBreadcrumb",class:"mb-8"},Y={class:"text-lg text-center font-light relative px-7"},F={key:0},L={class:"mt-2"},z={class:"mt-2"},G={"data-testId":"listRecentOffersToUserProjects",class:"border-t border-slate-300"},H={key:0,class:"border-b border-slate-300 text-orange-400 pb-2 mb-2 font-bold text-sm"},q={key:1},K={key:2};function W(t,e,r,j,d,p){const u=h("QuickNav"),m=h("font-awesome"),y=h("router-link"),g=h("InfiniteScroll");return c(),l(P,null,[n(u,{selected:"Home"}),a("section",J,[a("div",Q,[a("h1",Y,[n(m,{icon:"chevron-left",class:"fa-fw text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:e[0]||(e[0]=o=>t.$router.back())}),e[1]||(e[1]=i(" Offers to Your Projects "))])]),t.newOffersToUserProjects.length===0?(c(),l("div",F,[e[6]||(e[6]=a("p",null,"Nobody has given any offers to your projects.",-1)),a("p",L,[e[3]||(e[3]=i(" Maybe there are already some projects you can help on the ")),n(y,{to:"/discover",class:"text-blue-500"},{default:v(()=>[e[2]||(e[2]=i(" Discover page ")),n(m,{icon:"search"})]),_:1})]),a("p",z,[e[5]||(e[5]=i(" You can announce more of your own on ")),n(y,{to:"/contacts",class:"text-blue-500"},{default:v(()=>[e[4]||(e[4]=i(" Your Ideas page ")),n(m,{icon:"hand"})]),_:1})])])):w("",!0),n(g,{onReachedBottom:t.loadMoreOffersToUserProjects},{default:v(()=>[a("ul",G,[(c(!0),l(P,null,x(t.newOffersToUserProjects,o=>(c(),l("li",{key:o.jwtId,class:"mt-4 relative group"},[o.jwtId==t.lastAckedOfferToUserProjectsJwtId?(c(),l("div",H," You've already seen all the following ")):w("",!0),a("span",null,f(t.didInfo(o.offeredByDid,t.activeDid,t.allMyDids,t.allContacts)),1),e[7]||(e[7]=i(" offered ")),o.objectDescription?(c(),l("span",q,f(o.objectDescription),1)):w("",!0),i(f(o.objectDescription&&o.amount?", and ":"")+" ",1),o.amount?(c(),l("span",K,f(t.displayAmount(o.unit,o.amount)),1)):w("",!0),e[8]||(e[8]=i(" to ")),a("span",null,f(o.planName),1),n(y,{to:{path:"/claim/"+encodeURIComponent(o.jwtId)},class:"text-blue-500"},{default:v(()=>[n(m,{icon:"file-lines",class:"pl-2 text-blue-500 cursor-pointer"})]),_:2},1032,["to"])]))),128))])]),_:1},8,["onReachedBottom"])])],64)}const le=A(O,[["render",W]]);export{le as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/RecentOffersToUserView-DFvU7HF3.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/RecentOffersToUserView-DFvU7HF3.js deleted file mode 100644 index d6e7c50..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/RecentOffersToUserView-DFvU7HF3.js +++ /dev/null @@ -1 +0,0 @@ -var D=Object.defineProperty;var k=(t,e,s)=>e in t?D(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var o=(t,e,s)=>k(t,typeof e!="symbol"?e+"":e,s);import{V as I,e as _,d as A,C as x,_ as C,h as n,j as i,k as a,m,n as c,w as y,F as U,z as w,B as l,E as j,t as h}from"./main.common-DD7dqhZp.js";import{G as E}from"./GiftedDialog-DmRkVexW.js";import{E as S}from"./EntityIcon-DciUb57i.js";import{I as V}from"./InfiniteScroll-DZwFAI4R.js";import{Q as $}from"./QuickNav-C8jPGtUY.js";import{i as N,z as B,h as R,a7 as g}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var M=Object.getOwnPropertyDescriptor,J=(t,e,s,d)=>{for(var f=d>1?void 0:d?M(e,s):e,p=t.length-1,u;p>=0;p--)(u=t[p])&&(f=u(f)||f);return f};let O=class extends I{constructor(){super(...arguments);o(this,"$notify");o(this,"$router");o(this,"activeDid","");o(this,"allContacts",[]);o(this,"allMyDids",[]);o(this,"apiServer","");o(this,"lastAckedOfferToUserJwtId","");o(this,"newOffersToUser",[]);o(this,"newOffersToUserAtEnd",!1);o(this,"showOffersDetails",!1);o(this,"showOffersToUserProjectsDetails",!1);o(this,"didInfo",N);o(this,"displayAmount",B)}async created(){try{const s=await _();this.apiServer=s.apiServer||"",this.activeDid=s.activeDid||"",this.lastAckedOfferToUserJwtId=s.lastAckedOfferToUserJwtId||"",this.allContacts=await A.contacts.toArray(),this.allMyDids=await R();const d=await g(this.axios,this.apiServer,this.activeDid,void 0,void 0);this.newOffersToUser=d.data,this.newOffersToUserAtEnd=!d.hitLimit}catch(s){console.error("Error retrieving settings & contacts:",s),this.$notify({group:"alert",type:"danger",title:"Error",text:s.message||"There was an error retrieving your activity."},5e3)}}async loadMoreOffersToUser(){if(this.newOffersToUserAtEnd)return;const s=await g(this.axios,this.apiServer,this.activeDid,void 0,this.newOffersToUser[this.newOffersToUser.length-1].jwtId);this.newOffersToUser.push(...s.data),this.newOffersToUserAtEnd=!s.hitLimit}};O=J([x({components:{EntityIcon:S,GiftedDialog:E,InfiniteScroll:V,QuickNav:$}})],O);const Q={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},F={id:"ViewBreadcrumb",class:"mb-8"},L={class:"text-lg text-center font-light relative px-7"},P={key:0},Y={class:"mt-2"},z={"data-testId":"listRecentOffersToUser",class:"border-t border-slate-300"},G={key:0,class:"border-b border-slate-300 text-orange-400 pb-2 mb-2 font-bold text-sm"},H={key:1},q={key:2};function K(t,e,s,d,f,p){const u=w("QuickNav"),v=w("font-awesome"),T=w("router-link"),b=w("InfiniteScroll");return l(),n(U,null,[i(u,{selected:"Home"}),a("section",Q,[a("div",F,[a("h1",L,[i(v,{icon:"chevron-left",class:"fa-fw text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:e[0]||(e[0]=r=>t.$router.back())}),e[1]||(e[1]=c(" Offers to You "))])]),t.newOffersToUser.length===0?(l(),n("div",P,[e[5]||(e[5]=a("p",null,"Nobody has given you an offer.",-1)),a("p",Y,[e[3]||(e[3]=c(" You can start the cycle on the ")),i(T,{to:"/contacts",class:"text-blue-500"},{default:y(()=>[e[2]||(e[2]=c(" Contacts page ")),i(v,{icon:"users"})]),_:1}),e[4]||(e[4]=c(` with an "Offer" directly to someone. Hopefully you'll find a common interest! `))])])):m("",!0),i(b,{onReachedBottom:t.loadMoreOffersToUser},{default:y(()=>[a("ul",z,[(l(!0),n(U,null,j(t.newOffersToUser,r=>(l(),n("li",{key:r.jwtId,class:"mt-4 relative group"},[r.jwtId==t.lastAckedOfferToUserJwtId?(l(),n("div",G," You've already seen all the following ")):m("",!0),a("span",null,h(t.didInfo(r.offeredByDid,t.activeDid,t.allMyDids,t.allContacts)),1),e[6]||(e[6]=c(" offered ")),r.objectDescription?(l(),n("span",H,h(r.objectDescription),1)):m("",!0),c(h(r.objectDescription&&r.amount?", and ":"")+" ",1),r.amount?(l(),n("span",q,h(t.displayAmount(r.unit,r.amount)),1)):m("",!0),i(T,{to:{path:"/claim/"+encodeURIComponent(r.jwtId)},class:"text-blue-500"},{default:y(()=>[i(v,{icon:"file-lines",class:"pl-2 text-blue-500 cursor-pointer"})]),_:2},1032,["to"])]))),128))])]),_:1},8,["onReachedBottom"])])],64)}const le=C(O,[["render",K]]);export{le as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/SearchAreaView-lyPWi-VO.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/SearchAreaView-lyPWi-VO.js deleted file mode 100644 index d37e195..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/SearchAreaView-lyPWi-VO.js +++ /dev/null @@ -1 +0,0 @@ -var v=Object.defineProperty;var D=(e,t,o)=>t in e?v(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var r=(e,t,o)=>D(e,typeof t!="symbol"?t+"":t,o);/* empty css */import{V as T,e as $,d,M as S,C as E,_ as O,h as p,j as c,k as f,m as h,n as b,w as A,F as V,z as L,B as l,y as k}from"./main.common-DD7dqhZp.js";import{v as Z,u as F,i as z,m as U}from"./vue-leaflet.es-DQekxOGR.js";import{Q as P}from"./QuickNav-C8jPGtUY.js";import"./index-BGoTPXII.js";var Q=Object.getOwnPropertyDescriptor,R=(e,t,o,a)=>{for(var i=a>1?void 0:a?Q(t,o):t,g=e.length-1,u;g>=0;g--)(u=e[g])&&(i=u(i)||i);return i};const m=.01,C=2,w=2;let y=class extends T{constructor(){super(...arguments);r(this,"$notify");r(this,"$router");r(this,"isChoosingSearchBox",!1);r(this,"isNewMarkerSet",!1);r(this,"localCenterLat",0);r(this,"localCenterLong",0);r(this,"localLatDiff",m);r(this,"localLongDiff",m);r(this,"localZoom",w);r(this,"searchBox",null)}async mounted(){var a;const o=await $();this.searchBox=((a=o.searchBoxes)==null?void 0:a[0])||null,this.resetLatLong()}setMapPoint(o){var a,i;if(this.isNewMarkerSet)this.localLatDiff=Math.abs(o.latlng.lat-this.localCenterLat),this.localLongDiff=Math.abs(o.latlng.lng-this.localCenterLong);else{this.localCenterLat=o.latlng.lat,this.localCenterLong=o.latlng.lng;let g=m,u=m;const s=(i=(a=o.target.boxZoom)==null?void 0:a._map)==null?void 0:i.getBounds();s&&(g=Math.abs(s.getNorthEast().lat-s.getSouthWest().lat)/8,u=Math.abs(s.getNorthEast().lng-s.getSouthWest().lng)/8),this.localLatDiff=g,this.localLongDiff=u,this.isNewMarkerSet=!0}}resetLatLong(){var o;if((o=this.searchBox)!=null&&o.bbox){const a=this.searchBox.bbox;this.localCenterLat=(a.maxLat+a.minLat)/2,this.localCenterLong=(a.eastLong+a.westLong)/2,this.localLatDiff=(a.maxLat-a.minLat)/2,this.localLongDiff=(a.eastLong-a.westLong)/2,this.localZoom=C,this.isNewMarkerSet=!0}else this.isNewMarkerSet=!1}async storeSearchBox(){if(this.localCenterLong||this.localCenterLat)try{const o={name:"Local",bbox:{eastLong:this.localCenterLong+this.localLongDiff,maxLat:this.localCenterLat+this.localLatDiff,minLat:this.localCenterLat-this.localLatDiff,westLong:this.localCenterLong-this.localLongDiff}};await d.open(),await d.settings.update(S,{searchBoxes:[o]}),this.searchBox=o,this.isChoosingSearchBox=!1,this.$notify({group:"alert",type:"success",title:"Saved",text:"That has been saved in your preferences. You can now filter by it on your home screen feed."},7e3),this.$router.back()}catch(o){this.$notify({group:"alert",type:"danger",title:"Error Updating Search Settings",text:"Try going to a different page and then coming back."},5e3),console.error("Telling user to retry the location search setting because:",o)}else this.$notify({group:"alert",type:"warning",title:"No Location Selected",text:"Select a location on the map."},5e3)}async forgetSearchBox(){try{await d.open(),await d.settings.update(S,{searchBoxes:[],filterFeedByNearby:!1}),this.searchBox=null,this.localCenterLat=0,this.localCenterLong=0,this.localLatDiff=m,this.localLongDiff=m,this.localZoom=w,this.isChoosingSearchBox=!1,this.isNewMarkerSet=!1}catch(o){this.$notify({group:"alert",type:"danger",title:"Error Updating Search Settings",text:"Try going to a different page and then coming back."},5e3),console.error("Telling user to retry the location search setting because:",o)}}cancelSearchBoxSelect(){this.isChoosingSearchBox=!1,this.localZoom=C}};y=R([E({components:{QuickNav:P,LRectangle:U,LMap:z,LMarker:F,LTileLayer:Z}})],y);const I={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},W={class:"mb-8"},j={class:"text-lg text-center font-light relative px-7"},G={class:"text-center"},Y={key:0,class:"m-4 px-4 py-2"},H={key:5},K={class:"aspect-video"};function q(e,t,o,a,i,g){const u=L("QuickNav"),s=L("font-awesome"),x=L("l-tile-layer"),B=L("l-marker"),N=L("l-rectangle"),M=L("l-map");return l(),p(V,null,[c(u),f("section",I,[f("div",W,[f("div",j,[f("h1",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:t[0]||(t[0]=n=>e.$router.back())},[c(s,{icon:"chevron-left",class:"fa-fw"})])]),t[7]||(t[7]=f("h1",{id:"ViewHeading",class:"text-4xl text-center font-light pt-4 mb-8"}," Area for Nearby Search ",-1))]),t[12]||(t[12]=f("div",{class:"px-2 py-4"}," This location is only stored on your device. It is sometimes sent from your device to run searches but it is not stored on our servers. ",-1)),f("div",G,[!e.searchBox&&!e.isNewMarkerSet?(l(),p("button",Y," Click to Choose a Location for Nearby Search ")):h("",!0),e.isNewMarkerSet?(l(),p("button",{key:1,class:"m-4 px-4 py-2 rounded-md bg-blue-200 text-blue-500",onClick:t[1]||(t[1]=(...n)=>e.storeSearchBox&&e.storeSearchBox(...n))},[c(s,{icon:"save",class:"fa-fw"}),t[8]||(t[8]=b(" Store This Location for Nearby Search "))])):h("",!0),e.searchBox?(l(),p("button",{key:2,class:"m-4 px-4 py-2 rounded-md bg-blue-200 text-blue-500",onClick:t[2]||(t[2]=(...n)=>e.forgetSearchBox&&e.forgetSearchBox(...n))},[c(s,{icon:"trash-can",class:"fa-fw"}),t[9]||(t[9]=b(" Delete Stored Location "))])):h("",!0),e.searchBox?(l(),p("button",{key:3,class:"m-4 px-4 py-2 rounded-md bg-blue-200 text-blue-500",onClick:t[3]||(t[3]=(...n)=>e.resetLatLong&&e.resetLatLong(...n))},[c(s,{icon:"rotate",class:"fa-fw"}),t[10]||(t[10]=b(" Reset To Original "))])):h("",!0),e.isNewMarkerSet?(l(),p("button",{key:4,class:"m-4 px-4 py-2 rounded-md bg-blue-200 text-blue-500",onClick:t[4]||(t[4]=n=>e.isNewMarkerSet=!1)},[c(s,{icon:"eraser",class:"fa-fw"}),t[11]||(t[11]=b(" Erase Marker "))])):h("",!0),e.isNewMarkerSet?(l(),p("div",H," Click on the pin to erase it. Click anywhere else to set a different different corner. ")):h("",!0)]),f("div",K,[c(M,{ref:"map",zoom:e.localZoom,"onUpdate:zoom":t[6]||(t[6]=n=>e.localZoom=n),center:[e.localCenterLat,e.localCenterLong],class:"!z-40 rounded-md",onClick:e.setMapPoint},{default:A(()=>[c(x,{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png","layer-type":"base",name:"OpenStreetMap"}),e.isNewMarkerSet?(l(),k(B,{key:0,"lat-lng":[e.localCenterLat,e.localCenterLong],onClick:t[5]||(t[5]=n=>e.isNewMarkerSet=!1)},null,8,["lat-lng"])):h("",!0),e.isNewMarkerSet?(l(),k(N,{key:1,bounds:[[e.localCenterLat-e.localLatDiff,e.localCenterLong-e.localLongDiff],[e.localCenterLat+e.localLatDiff,e.localCenterLong+e.localLongDiff]],weight:1},null,8,["bounds"])):h("",!0)]),_:1},8,["zoom","center","onClick"])])])],64)}const se=O(y,[["render",q]]);export{se as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/SeedBackupView-BDz7XsWF.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/SeedBackupView-BDz7XsWF.js deleted file mode 100644 index 98f698c..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/SeedBackupView-BDz7XsWF.js +++ /dev/null @@ -1 +0,0 @@ -var C=Object.defineProperty;var k=(t,e,s)=>e in t?C(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var i=(t,e,s)=>k(t,typeof e!="symbol"?e+"":e,s);import{V as x,e as S,C as A,_ as D,h as a,j as l,k as o,w as $,m as V,n as p,o as m,t as b,v,F as B,z as f,B as r}from"./main.common-DD7dqhZp.js";import{u as N}from"./index-CZnn7ED5.js";import{Q as _}from"./QuickNav-C8jPGtUY.js";import{G as P,at as R}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./_isString-B7bbuhPA.js";var T=Object.getOwnPropertyDescriptor,E=(t,e,s,n)=>{for(var d=n>1?void 0:n?T(e,s):e,u=t.length-1,c;u>=0;u--)(c=t[u])&&(d=c(d)||d);return d};let y=class extends x{constructor(){super(...arguments);i(this,"$notify");i(this,"$router");i(this,"activeAccount",null);i(this,"numAccounts",0);i(this,"showCopiedDeri",!1);i(this,"showCopiedSeed",!1);i(this,"showSeed",!1)}async created(){try{const n=(await S()).activeDid||"";this.numAccounts=await P(),this.activeAccount=await R(n)}catch(s){console.error("Got an error loading an identifier:",s),this.$notify({group:"alert",type:"danger",title:"Error Loading Profile",text:"Got an error loading your seed data."},3e3)}}doCopyTwoSecRedo(s,n){n(),N().copy(s).then(()=>setTimeout(n,2e3))}};y=E([A({components:{QuickNav:_}})],y);const F={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},O={class:"text-lg text-center font-light relative px-7"},Q={class:"flex justify-between py-2"},j={key:0},G={key:0},H={class:"bg-slate-100 rounded-md overflow-hidden p-4 mb-4"},W={key:0,class:"text-center text-slate-700 mt-2"},Y={class:"text-sm text-green-500"},z={class:"text-sm text-green-500"},I={key:1};function L(t,e,s,n,d,u){const c=f("QuickNav"),h=f("font-awesome"),g=f("router-link");return r(),a(B,null,[l(c,{selected:"Profile"}),o("section",F,[o("div",O,[o("h1",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:e[0]||(e[0]=w=>t.$router.back())},[l(h,{icon:"chevron-left",class:"fa-fw"})])]),e[10]||(e[10]=o("h1",{id:"ViewHeading",class:"text-4xl text-center font-light pt-4 mb-8"}," Seed Backup ",-1)),o("div",Q,[e[5]||(e[5]=o("span",null,null,-1)),o("span",null,[l(g,{to:{name:"help"},class:"text-xs uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-1 rounded-md ml-1"},{default:$(()=>e[4]||(e[4]=[p(" Help ")])),_:1})])]),t.activeAccount?(r(),a("div",j,[e[9]||(e[9]=o("p",{class:"text-center mb-4"},[o("b",{class:"text-red-600"},"BEWARE!"),p(" Anyone who has this seed phrase will be able impersonate you and take over any digital holdings based on it. Reveal it when you are somewhere private, when only you can see your screen, and record it somewhere only you have access. A password manager is a good idea, and so is a piece of paper in a vault. "),o("i",null,"We recommend you do NOT take a screenshot or send it to any online service.")],-1)),t.numAccounts>1?(r(),a("p",G,e[6]||(e[6]=[o("b",{class:"text-orange-600"},"Note:",-1),p(" You have more than one identifier stored in this browser. If they are all based on the same seed as the current identifier, this one backup is sufficient, as long as you also record the derivation path. However, if you have different seeds for other identifiers, you will have to back them up separately. ")]))):V("",!0),o("div",H,[t.showSeed?(r(),a("p",W,[p(b(t.activeAccount.mnemonic)+" ",1),m(o("button",{onClick:e[1]||(e[1]=w=>t.doCopyTwoSecRedo(t.activeAccount.mnemonic,()=>t.showCopiedSeed=!t.showCopiedSeed))},[l(h,{icon:"copy",class:"text-slate-400 fa-fw"})],512),[[v,!t.showCopiedSeed]]),m(o("span",Y," Copied ",512),[[v,t.showCopiedSeed]]),e[7]||(e[7]=o("br",null,null,-1)),e[8]||(e[8]=o("br",null,null,-1)),p(" Derivation Path: "+b(t.activeAccount.derivationPath)+" ",1),m(o("button",{onClick:e[2]||(e[2]=w=>t.doCopyTwoSecRedo(t.activeAccount.derivationPath,()=>t.showCopiedDeri=!t.showCopiedDeri))},[l(h,{icon:"copy",class:"text-slate-400 fa-fw"})],512),[[v,!t.showCopiedDeri]]),m(o("span",z,"Copied",512),[[v,t.showCopiedDeri]])])):(r(),a("button",{key:1,class:"block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md",onClick:e[3]||(e[3]=w=>t.showSeed=!0)}," Reveal my Seed Phrase "))])])):(r(),a("div",I,"You do not have an active identity."))])],64)}const te=D(y,[["render",L]]);export{te as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ShareMyContactInfoView-BFOKyt7V.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ShareMyContactInfoView-BFOKyt7V.js deleted file mode 100644 index 7dae996..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/ShareMyContactInfoView-BFOKyt7V.js +++ /dev/null @@ -1 +0,0 @@ -var g=Object.defineProperty;var v=(e,t,o)=>t in e?g(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var d=(e,t,o)=>v(e,typeof t!="symbol"?t+"":t,o);import{V as x,H as w,e as y,d as C,C as b,_,h as $,j as p,k as s,n as h,F as k,z as m,B as S}from"./main.common-DD7dqhZp.js";import{u as V}from"./index-CZnn7ED5.js";import{Q as N}from"./QuickNav-C8jPGtUY.js";import{T as E}from"./TopMessage-ZWDDjman.js";import{r as I,O as M}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./_isString-B7bbuhPA.js";var T=Object.getOwnPropertyDescriptor,A=(e,t,o,i)=>{for(var n=i>1?void 0:i?T(t,o):t,a=e.length-1,r;a>=0;a--)(r=e[a])&&(n=r(n)||n);return n};let f=class extends x{constructor(){super(...arguments);d(this,"$notify");d(this,"$router")}mounted(){console.log("APP_SERVER in mounted:",w)}async onClickShare(){const o=await y(),i=o.activeDid||"",n=o.firstName||"",a=!!o.isRegistered,r=o.profileImageUrl||"",c=await I(i),l=await C.contacts.count();if(c){const u=await M(c,a,n,r,!0);V().copy(u).then(()=>{this.$notify({group:"alert",type:"info",title:"Copied",text:"Your contact info was copied to the clipboard. Have them paste it in the box on their 'Contacts' screen."},5e3),l>0&&setTimeout(()=>{this.$notify({group:"alert",type:"success",title:"Share Other Contacts",text:"You may want to share some of your contacts with them. Select them below to copy and send."},1e4)},3e3)}),this.$router.push({name:"contacts"})}else this.$notify({group:"alert",type:"error",title:"Error",text:"No account was found for the active DID."},5e3)}};f=A([b({components:{QuickNav:N,TopMessage:E}})],f);const D={id:"Content",class:"p-2 pb-24 max-w-3xl mx-auto"},P={class:"text-lg text-center font-light relative px-7"},R={class:"flex justify-center mt-8"},O={class:"ml-12"};function B(e,t,o,i,n,a){const r=m("QuickNav"),c=m("TopMessage"),l=m("font-awesome");return S(),$(k,null,[p(r),p(c),s("section",D,[s("div",null,[s("div",P,[s("h1",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:t[0]||(t[0]=u=>e.$router.back())},[p(l,{icon:"chevron-left",class:"fa-fw"})])]),t[2]||(t[2]=s("h1",{id:"ViewHeading",class:"text-4xl text-center font-light"}," Share Your Contact Info ",-1))]),s("div",R,[s("button",{class:"block w-fit text-center text-lg font-bold bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md",onClick:t[1]||(t[1]=u=>e.onClickShare())}," Copy to Clipboard ")]),s("div",O,[t[5]||(t[5]=s("div",{class:"mt-8"},"Click to copy your info, then send it to them.",-1)),s("div",null,[t[3]||(t[3]=h(" They will paste it in the input box on the Contacts ")),p(l,{icon:"users"}),t[4]||(t[4]=h(" screen. "))])])])],64)}const G=_(f,[["render",B]]);export{G as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/SharedPhotoView-FMHGExnU.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/SharedPhotoView-FMHGExnU.js deleted file mode 100644 index 12a9eb6..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/SharedPhotoView-FMHGExnU.js +++ /dev/null @@ -1 +0,0 @@ -var _=Object.defineProperty;var x=(t,e,o)=>e in t?_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o;var n=(t,e,o)=>x(t,typeof e!="symbol"?e+"":e,o);import{V as k,e as P,d as g,M as B,I as E,a as y,a6 as D,C as N,_ as $,h as p,j as c,k as s,n as f,F as T,z as b,B as u}from"./main.common-DD7dqhZp.js";import{P as A}from"./PhotoDialog-DZbf20A6.js";import{Q as I}from"./QuickNav-C8jPGtUY.js";import{aF as w,aG as S,ah as F}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var G=Object.getOwnPropertyDescriptor,R=(t,e,o,a)=>{for(var r=a>1?void 0:a?G(e,o):e,l=t.length-1,d;l>=0;l--)(d=t[l])&&(r=d(r)||r);return r};let v=class extends k{constructor(){super(...arguments);n(this,"$notify");n(this,"$router");n(this,"$route");n(this,"activeDid");n(this,"imageBlob");n(this,"imageFileName");n(this,"uploading",!1);n(this,"URL",window.URL||window.webkitURL)}async mounted(){try{const o=await P();this.activeDid=o.activeDid;const a=await g.temp.get(w),r=a==null?void 0:a.blobB64;a?(this.imageBlob=S(r),g.temp.delete(w),this.imageFileName=this.$route.query.fileName):console.error("No appropriate image found in temp storage.",a)}catch(o){console.error("Got an error loading an identifier:",o),this.$notify({group:"alert",type:"danger",title:"Error",text:"Got an error loading this data."},3e3)}}async recordGift(){await this.sendToImageServer("GiveAction").then(o=>{if(o){const a={name:"gifted-details",query:{destinationPathAfter:"/",hideBackButton:!0,imageUrl:o,recipientDid:this.activeDid}};this.$router.push(a)}})}recordProfile(){this.$refs.photoDialog.open(async o=>{await g.settings.update(B,{profileImageUrl:o}),this.$router.push({name:"account"})},E,!0,this.imageBlob,this.imageFileName)}async cancel(){this.imageBlob=void 0,this.imageFileName=void 0,this.$router.push({name:"home"})}async sendToImageServer(o){var r,l;this.uploading=!0;let a;try{const m={Authorization:"Bearer "+await F(this.activeDid)},h=new FormData;h.append("image",this.imageBlob,this.imageFileName),h.append("claimType",o),window.location.hostname==="localhost"&&!y.includes("localhost")&&console.log("Using shared image API server, so only users on that server can play with images.");const i=await D.post(y+"/image",h,{headers:m});(r=i==null?void 0:i.data)!=null&&r.url?(this.imageBlob=void 0,this.imageFileName=void 0,a=i.data.url):(console.error("Problem uploading the image",i.data),this.$notify({group:"alert",type:"danger",title:"Error",text:"There was a problem saving the picture. "+(((l=i==null?void 0:i.data)==null?void 0:l.message)||"")},5e3)),this.uploading=!1}catch(d){console.error("Error uploading the image",d),this.$notify({group:"alert",type:"danger",title:"Error",text:"There was an error saving the picture."},5e3),this.uploading=!1}return a}};v=R([N({components:{PhotoDialog:A,QuickNav:I}})],v);const C={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},V={key:0},U={key:0,class:"text-center mb-4"},L={key:1},O={class:"grid grid-cols-1 sm:grid-cols-3 gap-4"},j={class:"flex justify-center"},H=["src"],M={key:1,class:"text-center mb-4"};function Q(t,e,o,a,r,l){const d=b("QuickNav"),m=b("font-awesome"),h=b("PhotoDialog");return u(),p(T,null,[c(d),s("section",C,[e[8]||(e[8]=s("h1",{id:"ViewHeading",class:"text-4xl text-center font-light pt-4 mb-8"}," Image ",-1)),t.imageBlob?(u(),p("div",V,[t.uploading?(u(),p("div",U,[c(m,{icon:"spinner",class:"fa-spin-pulse"})])):(u(),p("div",L,[e[6]||(e[6]=s("div",{class:"text-center mb-4"},"Choose how to use this image",-1)),s("div",O,[s("button",{class:"text-center text-md font-bold bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md",onClick:e[0]||(e[0]=(...i)=>t.recordGift&&t.recordGift(...i))},[c(m,{icon:"gift",class:"fa-fw"}),e[3]||(e[3]=f(" Record a Gift "))]),s("button",{class:"text-center text-md font-bold bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md",onClick:e[1]||(e[1]=(...i)=>t.recordProfile&&t.recordProfile(...i))},[c(m,{icon:"circle-user",class:"fa-fw"}),e[4]||(e[4]=f(" Save as Profile Image "))]),s("button",{class:"text-center text-md font-bold bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md",onClick:e[2]||(e[2]=(...i)=>t.cancel&&t.cancel(...i))},[c(m,{icon:"ban",class:"fa-fw"}),e[5]||(e[5]=f(" Cancel "))])]),c(h,{ref:"photoDialog"},null,512)])),s("div",j,[s("img",{src:t.URL.createObjectURL(t.imageBlob),alt:"Shared Image",class:"rounded mt-4"},null,8,H)])])):(u(),p("div",M,e[7]||(e[7]=[s("p",null,"No image found.",-1),s("p",{class:"mt-4"},' If you shared an image, the cause is usually that you do not have the recent version of this app, or that the app has not refreshed the service code underneath. To fix this, first make sure you have latest version by comparing your version at the bottom of "Help" with the version at the bottom of https://timesafari.app/help in a browser. After that, it may eventually work, but you can speed up the process by clearing your data cache (in the browser on mobile, even if you installed it) and/or reinstalling the app (after backing up all your data, of course). ',-1)])))])],64)}const te=$(v,[["render",Q]]);export{te as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/StartView-vHoI6X9y.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/StartView-vHoI6X9y.js deleted file mode 100644 index 5524ea1..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/StartView-vHoI6X9y.js +++ /dev/null @@ -1 +0,0 @@ -var f=Object.defineProperty;var x=(t,e,o)=>e in t?f(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o;var i=(t,e,o)=>x(t,typeof e!="symbol"?e+"":e,o);import{V as b,a3 as v,e as h,A as k,C as y,_,h as d,k as s,j as m,m as g,n as p,z as A,B as u}from"./main.common-DD7dqhZp.js";import{G as N,aH as S}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var C=Object.getOwnPropertyDescriptor,$=(t,e,o,c)=>{for(var r=c>1?void 0:c?C(e,o):e,a=t.length-1,n;a>=0;a--)(n=t[a])&&(r=n(r)||r);return r};let w=class extends b{constructor(){super(...arguments);i(this,"$router");i(this,"PASSKEYS_ENABLED",v);i(this,"givenName","");i(this,"numAccounts",0)}async mounted(){const o=await h();this.givenName=o.firstName||"",this.numAccounts=await N()}onClickNewSeed(){this.$router.push({name:"new-identifier"})}async onClickNewPasskey(){const o=k.APP_NAME+(this.givenName?" - "+this.givenName:"");await S(o),this.$router.push({name:"account"})}onClickNo(){this.$router.push({name:"import-account"})}onClickDerive(){this.$router.push({name:"import-derive"})}};w=$([y({components:{}})],w);const E={id:"Content",class:"p-6 pb-24 min-h-screen flex flex-col justify-center"},P={class:"text-lg text-center font-light relative px-7"},V={id:"start-question",class:"mt-8"},D={class:"max-w-3xl mx-auto"},B={key:0,class:"text-center font-light mt-6"},Y={href:"https://www.perplexity.ai/search/what-are-passkeys-v2SHV3yLQlyA2CYH6.Nvhg",target:"_blank"},H={class:"text-center font-light mt-4"},K={href:"https://www.perplexity.ai/search/what-is-a-seed-phrase-OqiP9foVRXidr_2le5OFKA",target:"_blank"},L={class:"grid grid-cols-1 sm:grid-cols-2 gap-2 mt-4"},O={class:"grid grid-cols-1 sm:grid-cols-2 gap-2 mt-2"};function G(t,e,o,c,r,a){const n=A("font-awesome");return u(),d("section",E,[s("div",null,[s("div",P,[s("h1",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:e[0]||(e[0]=l=>t.$router.back())},[m(n,{icon:"chevron-left",class:"fa-fw"})])]),e[5]||(e[5]=s("h1",{id:"ViewHeading",class:"text-4xl text-center font-light pt-4 mb-8"}," Generate an Identity ",-1))]),s("div",V,[s("div",D,[e[12]||(e[12]=s("p",{class:"text-center text-xl font-light"}," How do you want to create this identifier? ",-1)),t.PASSKEYS_ENABLED?(u(),d("p",B,[e[6]||(e[6]=p(" A ")),e[7]||(e[7]=s("strong",null,"passkey",-1)),e[8]||(e[8]=p(" is easy to manage, though it is less interoperable with other systems for advanced uses. ")),s("a",Y,[m(n,{icon:"info-circle",class:"fa-fw text-blue-500"})])])):g("",!0),s("p",H,[e[9]||(e[9]=p(" A ")),e[10]||(e[10]=s("strong",null,"new seed",-1)),e[11]||(e[11]=p(" allows you full control over the keys, though you are responsible for backups. ")),s("a",K,[m(n,{icon:"info-circle",class:"fa-fw text-blue-500"})])]),s("div",L,[t.PASSKEYS_ENABLED?(u(),d("a",{key:0,class:"block w-full text-center text-lg uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md mb-2 cursor-pointer",onClick:e[1]||(e[1]=l=>t.onClickNewPasskey())}," Generate one with a passkey ")):g("",!0),s("a",{class:"block w-full text-center text-lg uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md mb-2 cursor-pointer","data-testId":"newSeed",onClick:e[2]||(e[2]=l=>t.onClickNewSeed())}," Generate one with a new seed ")]),e[13]||(e[13]=s("p",{class:"text-center font-light mt-4"}," You can also import an existing seed or derive a new address from an existing seed. ",-1)),s("div",O,[s("a",{class:"block w-full text-center text-md uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md cursor-pointer",onClick:e[3]||(e[3]=l=>t.onClickNo())}," You have a seed "),t.numAccounts>0?(u(),d("a",{key:0,class:"block w-full text-center text-md uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md cursor-pointer",onClick:e[4]||(e[4]=l=>t.onClickDerive())}," Derive new address from existing seed ")):g("",!0)])])])])}const R=_(w,[["render",G]]);export{R as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/StatisticsView-CerH3Xe1.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/StatisticsView-CerH3Xe1.js deleted file mode 100644 index 5902dc3..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/StatisticsView-CerH3Xe1.js +++ /dev/null @@ -1,3563 +0,0 @@ -var yc=Object.defineProperty;var Ec=(i,e,t)=>e in i?yc(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var Di=(i,e,t)=>Ec(i,typeof e!="symbol"?e+"":e,t);import{e as Tc,a6 as bc,V as Ac,C as wc,_ as Rc,h as js,j as xa,k as vt,n as qs,m as va,t as Ys,F as Cc,z as Ma,B as Ks}from"./main.common-DD7dqhZp.js";import{g as Lc}from"./index-ryzpKtgI.js";import{Q as Pc}from"./QuickNav-C8jPGtUY.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";/** - * @license - * Copyright 2010-2023 Three.js Authors - * SPDX-License-Identifier: MIT - */const Zr="156",jn={ROTATE:0,DOLLY:1,PAN:2},qn={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},Ic=0,Sa=1,Dc=2,Tl=1,Uc=2,cn=3,dn=0,bt=1,Gt=2,yn=0,pi=1,ya=2,Ea=3,Ta=4,Nc=5,di=100,Oc=101,Fc=102,ba=103,Aa=104,Bc=200,zc=201,Hc=202,kc=203,bl=204,Al=205,Gc=206,Vc=207,Wc=208,Xc=209,jc=210,qc=0,Yc=1,Kc=2,Ur=3,Zc=4,$c=5,Jc=6,Qc=7,$r=0,eh=1,th=2,En=0,nh=1,ih=2,sh=3,rh=4,ah=5,wl=300,xi=301,vi=302,Nr=303,Or=304,Os=306,Mi=1e3,Nt=1001,Is=1002,ut=1003,Fr=1004,Ls=1005,Tt=1006,Rl=1007,kn=1008,Tn=1009,oh=1010,lh=1011,Jr=1012,Cl=1013,Sn=1014,hn=1015,Yi=1016,Ll=1017,Pl=1018,Fn=1020,ch=1021,Ot=1023,hh=1024,uh=1025,Bn=1026,Si=1027,dh=1028,Il=1029,fh=1030,Dl=1031,Ul=1033,Zs=33776,$s=33777,Js=33778,Qs=33779,wa=35840,Ra=35841,Ca=35842,La=35843,ph=36196,Pa=37492,Ia=37496,Da=37808,Ua=37809,Na=37810,Oa=37811,Fa=37812,Ba=37813,za=37814,Ha=37815,ka=37816,Ga=37817,Va=37818,Wa=37819,Xa=37820,ja=37821,er=36492,qa=36494,Ya=36495,mh=36283,Ka=36284,Za=36285,$a=36286,Ki=2300,yi=2301,tr=2302,Ja=2400,Qa=2401,eo=2402,gh=2500,_h=0,Nl=1,Br=2,Ol=3e3,zn=3001,xh=3200,vh=3201,Qr=0,Mh=1,Hn="",Ye="srgb",dt="srgb-linear",Fs="display-p3",nr=7680,Sh=519,yh=512,Eh=513,Th=514,bh=515,Ah=516,wh=517,Rh=518,Ch=519,zr=35044,to="300 es",Hr=1035,un=2e3,Ds=2001;class Xn{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;const n=this._listeners;return n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;const s=this._listeners[e];if(s!==void 0){const r=s.indexOf(t);r!==-1&&s.splice(r,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const n=this._listeners[e.type];if(n!==void 0){e.target=this;const s=n.slice(0);for(let r=0,a=s.length;r>8&255]+mt[i>>16&255]+mt[i>>24&255]+"-"+mt[e&255]+mt[e>>8&255]+"-"+mt[e>>16&15|64]+mt[e>>24&255]+"-"+mt[t&63|128]+mt[t>>8&255]+"-"+mt[t>>16&255]+mt[t>>24&255]+mt[n&255]+mt[n>>8&255]+mt[n>>16&255]+mt[n>>24&255]).toLowerCase()}function ft(i,e,t){return Math.max(e,Math.min(t,i))}function ea(i,e){return(i%e+e)%e}function Lh(i,e,t,n,s){return n+(i-e)*(s-n)/(t-e)}function Ph(i,e,t){return i!==e?(t-i)/(e-i):0}function Xi(i,e,t){return(1-t)*i+t*e}function Ih(i,e,t,n){return Xi(i,e,1-Math.exp(-t*n))}function Dh(i,e=1){return e-Math.abs(ea(i,e*2)-e)}function Uh(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*(3-2*i))}function Nh(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*i*(i*(i*6-15)+10))}function Oh(i,e){return i+Math.floor(Math.random()*(e-i+1))}function Fh(i,e){return i+Math.random()*(e-i)}function Bh(i){return i*(.5-Math.random())}function zh(i){i!==void 0&&(no=i);let e=no+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function Hh(i){return i*Wi}function kh(i){return i*Ei}function kr(i){return(i&i-1)===0&&i!==0}function Fl(i){return Math.pow(2,Math.ceil(Math.log(i)/Math.LN2))}function Us(i){return Math.pow(2,Math.floor(Math.log(i)/Math.LN2))}function Gh(i,e,t,n,s){const r=Math.cos,a=Math.sin,o=r(t/2),l=a(t/2),c=r((e+n)/2),h=a((e+n)/2),u=r((e-n)/2),d=a((e-n)/2),p=r((n-e)/2),g=a((n-e)/2);switch(s){case"XYX":i.set(o*h,l*u,l*d,o*c);break;case"YZY":i.set(l*d,o*h,l*u,o*c);break;case"ZXZ":i.set(l*u,l*d,o*h,o*c);break;case"XZX":i.set(o*h,l*g,l*p,o*c);break;case"YXY":i.set(l*p,o*h,l*g,o*c);break;case"ZYZ":i.set(l*g,l*p,o*h,o*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+s)}}function Kt(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return i/4294967295;case Uint16Array:return i/65535;case Uint8Array:return i/255;case Int32Array:return Math.max(i/2147483647,-1);case Int16Array:return Math.max(i/32767,-1);case Int8Array:return Math.max(i/127,-1);default:throw new Error("Invalid component type.")}}function Je(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return Math.round(i*4294967295);case Uint16Array:return Math.round(i*65535);case Uint8Array:return Math.round(i*255);case Int32Array:return Math.round(i*2147483647);case Int16Array:return Math.round(i*32767);case Int8Array:return Math.round(i*127);default:throw new Error("Invalid component type.")}}const Ns={DEG2RAD:Wi,RAD2DEG:Ei,generateUUID:Vt,clamp:ft,euclideanModulo:ea,mapLinear:Lh,inverseLerp:Ph,lerp:Xi,damp:Ih,pingpong:Dh,smoothstep:Uh,smootherstep:Nh,randInt:Oh,randFloat:Fh,randFloatSpread:Bh,seededRandom:zh,degToRad:Hh,radToDeg:kh,isPowerOfTwo:kr,ceilPowerOfTwo:Fl,floorPowerOfTwo:Us,setQuaternionFromProperEuler:Gh,normalize:Je,denormalize:Kt};class Ce{constructor(e=0,t=0){Ce.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,n=this.y,s=e.elements;return this.x=s[0]*t+s[3]*n+s[6],this.y=s[1]*t+s[4]*n+s[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(ft(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const n=Math.cos(t),s=Math.sin(t),r=this.x-e.x,a=this.y-e.y;return this.x=r*n-a*s+e.x,this.y=r*s+a*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class ke{constructor(e,t,n,s,r,a,o,l,c){ke.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,n,s,r,a,o,l,c)}set(e,t,n,s,r,a,o,l,c){const h=this.elements;return h[0]=e,h[1]=s,h[2]=o,h[3]=t,h[4]=r,h[5]=l,h[6]=n,h[7]=a,h[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,s=t.elements,r=this.elements,a=n[0],o=n[3],l=n[6],c=n[1],h=n[4],u=n[7],d=n[2],p=n[5],g=n[8],_=s[0],m=s[3],f=s[6],y=s[1],v=s[4],T=s[7],w=s[2],C=s[5],b=s[8];return r[0]=a*_+o*y+l*w,r[3]=a*m+o*v+l*C,r[6]=a*f+o*T+l*b,r[1]=c*_+h*y+u*w,r[4]=c*m+h*v+u*C,r[7]=c*f+h*T+u*b,r[2]=d*_+p*y+g*w,r[5]=d*m+p*v+g*C,r[8]=d*f+p*T+g*b,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[1],s=e[2],r=e[3],a=e[4],o=e[5],l=e[6],c=e[7],h=e[8];return t*a*h-t*o*c-n*r*h+n*o*l+s*r*c-s*a*l}invert(){const e=this.elements,t=e[0],n=e[1],s=e[2],r=e[3],a=e[4],o=e[5],l=e[6],c=e[7],h=e[8],u=h*a-o*c,d=o*l-h*r,p=c*r-a*l,g=t*u+n*d+s*p;if(g===0)return this.set(0,0,0,0,0,0,0,0,0);const _=1/g;return e[0]=u*_,e[1]=(s*c-h*n)*_,e[2]=(o*n-s*a)*_,e[3]=d*_,e[4]=(h*t-s*l)*_,e[5]=(s*r-o*t)*_,e[6]=p*_,e[7]=(n*l-c*t)*_,e[8]=(a*t-n*r)*_,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,s,r,a,o){const l=Math.cos(r),c=Math.sin(r);return this.set(n*l,n*c,-n*(l*a+c*o)+a+e,-s*c,s*l,-s*(-c*a+l*o)+o+t,0,0,1),this}scale(e,t){return this.premultiply(ir.makeScale(e,t)),this}rotate(e){return this.premultiply(ir.makeRotation(-e)),this}translate(e,t){return this.premultiply(ir.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,n=e.elements;for(let s=0;s<9;s++)if(t[s]!==n[s])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const ir=new ke;function Bl(i){for(let e=i.length-1;e>=0;--e)if(i[e]>=65535)return!0;return!1}function Zi(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function Vh(){const i=Zi("canvas");return i.style.display="block",i}const io={};function ji(i){i in io||(io[i]=!0,console.warn(i))}function mi(i){return i<.04045?i*.0773993808:Math.pow(i*.9478672986+.0521327014,2.4)}function sr(i){return i<.0031308?i*12.92:1.055*Math.pow(i,.41666)-.055}const Wh=new ke().fromArray([.8224621,.0331941,.0170827,.177538,.9668058,.0723974,-1e-7,1e-7,.9105199]),Xh=new ke().fromArray([1.2249401,-.0420569,-.0196376,-.2249404,1.0420571,-.0786361,1e-7,0,1.0982735]);function jh(i){return i.convertSRGBToLinear().applyMatrix3(Xh)}function qh(i){return i.applyMatrix3(Wh).convertLinearToSRGB()}const Yh={[dt]:i=>i,[Ye]:i=>i.convertSRGBToLinear(),[Fs]:jh},Kh={[dt]:i=>i,[Ye]:i=>i.convertLinearToSRGB(),[Fs]:qh},Lt={enabled:!0,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(i){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!i},get workingColorSpace(){return dt},set workingColorSpace(i){console.warn("THREE.ColorManagement: .workingColorSpace is readonly.")},convert:function(i,e,t){if(this.enabled===!1||e===t||!e||!t)return i;const n=Yh[e],s=Kh[t];if(n===void 0||s===void 0)throw new Error(`Unsupported color space conversion, "${e}" to "${t}".`);return s(n(i))},fromWorkingColorSpace:function(i,e){return this.convert(i,this.workingColorSpace,e)},toWorkingColorSpace:function(i,e){return this.convert(i,e,this.workingColorSpace)}};let Yn;class zl{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{Yn===void 0&&(Yn=Zi("canvas")),Yn.width=e.width,Yn.height=e.height;const n=Yn.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=Yn}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=Zi("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);const s=n.getImageData(0,0,e.width,e.height),r=s.data;for(let a=0;a0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==wl)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Mi:e.x=e.x-Math.floor(e.x);break;case Nt:e.x=e.x<0?0:1;break;case Is:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case Mi:e.y=e.y-Math.floor(e.y);break;case Nt:e.y=e.y<0?0:1;break;case Is:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return ji("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===Ye?zn:Ol}set encoding(e){ji("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===zn?Ye:Hn}}pt.DEFAULT_IMAGE=null;pt.DEFAULT_MAPPING=wl;pt.DEFAULT_ANISOTROPY=1;class $e{constructor(e=0,t=0,n=0,s=1){$e.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,this.w=s}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,s){return this.x=e,this.y=t,this.z=n,this.w=s,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,n=this.y,s=this.z,r=this.w,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*s+a[12]*r,this.y=a[1]*t+a[5]*n+a[9]*s+a[13]*r,this.z=a[2]*t+a[6]*n+a[10]*s+a[14]*r,this.w=a[3]*t+a[7]*n+a[11]*s+a[15]*r,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,s,r;const l=e.elements,c=l[0],h=l[4],u=l[8],d=l[1],p=l[5],g=l[9],_=l[2],m=l[6],f=l[10];if(Math.abs(h-d)<.01&&Math.abs(u-_)<.01&&Math.abs(g-m)<.01){if(Math.abs(h+d)<.1&&Math.abs(u+_)<.1&&Math.abs(g+m)<.1&&Math.abs(c+p+f-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const v=(c+1)/2,T=(p+1)/2,w=(f+1)/2,C=(h+d)/4,b=(u+_)/4,O=(g+m)/4;return v>T&&v>w?v<.01?(n=0,s=.707106781,r=.707106781):(n=Math.sqrt(v),s=C/n,r=b/n):T>w?T<.01?(n=.707106781,s=0,r=.707106781):(s=Math.sqrt(T),n=C/s,r=O/s):w<.01?(n=.707106781,s=.707106781,r=0):(r=Math.sqrt(w),n=b/r,s=O/r),this.set(n,s,r,t),this}let y=Math.sqrt((m-g)*(m-g)+(u-_)*(u-_)+(d-h)*(d-h));return Math.abs(y)<.001&&(y=1),this.x=(m-g)/y,this.y=(u-_)/y,this.z=(d-h)/y,this.w=Math.acos((c+p+f-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class Jh extends Xn{constructor(e=1,t=1,n={}){super(),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new $e(0,0,e,t),this.scissorTest=!1,this.viewport=new $e(0,0,e,t);const s={width:e,height:t,depth:1};n.encoding!==void 0&&(ji("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),n.colorSpace=n.encoding===zn?Ye:Hn),this.texture=new pt(s,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.internalFormat=n.internalFormat!==void 0?n.internalFormat:null,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:Tt,this.depthBuffer=n.depthBuffer!==void 0?n.depthBuffer:!0,this.stencilBuffer=n.stencilBuffer!==void 0?n.stencilBuffer:!1,this.depthTexture=n.depthTexture!==void 0?n.depthTexture:null,this.samples=n.samples!==void 0?n.samples:0}setSize(e,t,n=1){(this.width!==e||this.height!==t||this.depth!==n)&&(this.width=e,this.height=t,this.depth=n,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const t=Object.assign({},e.texture.image);return this.texture.source=new Hl(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class Gn extends Jh{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}}class kl extends pt{constructor(e=null,t=1,n=1,s=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:s},this.magFilter=ut,this.minFilter=ut,this.wrapR=Nt,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Qh extends pt{constructor(e=null,t=1,n=1,s=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:s},this.magFilter=ut,this.minFilter=ut,this.wrapR=Nt,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Zt{constructor(e=0,t=0,n=0,s=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=s}static slerpFlat(e,t,n,s,r,a,o){let l=n[s+0],c=n[s+1],h=n[s+2],u=n[s+3];const d=r[a+0],p=r[a+1],g=r[a+2],_=r[a+3];if(o===0){e[t+0]=l,e[t+1]=c,e[t+2]=h,e[t+3]=u;return}if(o===1){e[t+0]=d,e[t+1]=p,e[t+2]=g,e[t+3]=_;return}if(u!==_||l!==d||c!==p||h!==g){let m=1-o;const f=l*d+c*p+h*g+u*_,y=f>=0?1:-1,v=1-f*f;if(v>Number.EPSILON){const w=Math.sqrt(v),C=Math.atan2(w,f*y);m=Math.sin(m*C)/w,o=Math.sin(o*C)/w}const T=o*y;if(l=l*m+d*T,c=c*m+p*T,h=h*m+g*T,u=u*m+_*T,m===1-o){const w=1/Math.sqrt(l*l+c*c+h*h+u*u);l*=w,c*=w,h*=w,u*=w}}e[t]=l,e[t+1]=c,e[t+2]=h,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,s,r,a){const o=n[s],l=n[s+1],c=n[s+2],h=n[s+3],u=r[a],d=r[a+1],p=r[a+2],g=r[a+3];return e[t]=o*g+h*u+l*p-c*d,e[t+1]=l*g+h*d+c*u-o*p,e[t+2]=c*g+h*p+o*d-l*u,e[t+3]=h*g-o*u-l*d-c*p,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,s){return this._x=e,this._y=t,this._z=n,this._w=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){const n=e._x,s=e._y,r=e._z,a=e._order,o=Math.cos,l=Math.sin,c=o(n/2),h=o(s/2),u=o(r/2),d=l(n/2),p=l(s/2),g=l(r/2);switch(a){case"XYZ":this._x=d*h*u+c*p*g,this._y=c*p*u-d*h*g,this._z=c*h*g+d*p*u,this._w=c*h*u-d*p*g;break;case"YXZ":this._x=d*h*u+c*p*g,this._y=c*p*u-d*h*g,this._z=c*h*g-d*p*u,this._w=c*h*u+d*p*g;break;case"ZXY":this._x=d*h*u-c*p*g,this._y=c*p*u+d*h*g,this._z=c*h*g+d*p*u,this._w=c*h*u-d*p*g;break;case"ZYX":this._x=d*h*u-c*p*g,this._y=c*p*u+d*h*g,this._z=c*h*g-d*p*u,this._w=c*h*u+d*p*g;break;case"YZX":this._x=d*h*u+c*p*g,this._y=c*p*u+d*h*g,this._z=c*h*g-d*p*u,this._w=c*h*u-d*p*g;break;case"XZY":this._x=d*h*u-c*p*g,this._y=c*p*u-d*h*g,this._z=c*h*g+d*p*u,this._w=c*h*u+d*p*g;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return t!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,s=Math.sin(n);return this._x=e.x*s,this._y=e.y*s,this._z=e.z*s,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],s=t[4],r=t[8],a=t[1],o=t[5],l=t[9],c=t[2],h=t[6],u=t[10],d=n+o+u;if(d>0){const p=.5/Math.sqrt(d+1);this._w=.25/p,this._x=(h-l)*p,this._y=(r-c)*p,this._z=(a-s)*p}else if(n>o&&n>u){const p=2*Math.sqrt(1+n-o-u);this._w=(h-l)/p,this._x=.25*p,this._y=(s+a)/p,this._z=(r+c)/p}else if(o>u){const p=2*Math.sqrt(1+o-n-u);this._w=(r-c)/p,this._x=(s+a)/p,this._y=.25*p,this._z=(l+h)/p}else{const p=2*Math.sqrt(1+u-n-o);this._w=(a-s)/p,this._x=(r+c)/p,this._y=(l+h)/p,this._z=.25*p}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return nMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(ft(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(n===0)return this;const s=Math.min(1,t/n);return this.slerp(e,s),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const n=e._x,s=e._y,r=e._z,a=e._w,o=t._x,l=t._y,c=t._z,h=t._w;return this._x=n*h+a*o+s*c-r*l,this._y=s*h+a*l+r*o-n*c,this._z=r*h+a*c+n*l-s*o,this._w=a*h-n*o-s*l-r*c,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);const n=this._x,s=this._y,r=this._z,a=this._w;let o=a*e._w+n*e._x+s*e._y+r*e._z;if(o<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,o=-o):this.copy(e),o>=1)return this._w=a,this._x=n,this._y=s,this._z=r,this;const l=1-o*o;if(l<=Number.EPSILON){const p=1-t;return this._w=p*a+t*this._w,this._x=p*n+t*this._x,this._y=p*s+t*this._y,this._z=p*r+t*this._z,this.normalize(),this._onChangeCallback(),this}const c=Math.sqrt(l),h=Math.atan2(c,o),u=Math.sin((1-t)*h)/c,d=Math.sin(t*h)/c;return this._w=a*u+this._w*d,this._x=n*u+this._x*d,this._y=s*u+this._y*d,this._z=r*u+this._z*d,this._onChangeCallback(),this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){const e=Math.random(),t=Math.sqrt(1-e),n=Math.sqrt(e),s=2*Math.PI*Math.random(),r=2*Math.PI*Math.random();return this.set(t*Math.cos(s),n*Math.sin(r),n*Math.cos(r),t*Math.sin(s))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class L{constructor(e=0,t=0,n=0){L.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(so.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(so.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,s=this.z,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6]*s,this.y=r[1]*t+r[4]*n+r[7]*s,this.z=r[2]*t+r[5]*n+r[8]*s,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,s=this.z,r=e.elements,a=1/(r[3]*t+r[7]*n+r[11]*s+r[15]);return this.x=(r[0]*t+r[4]*n+r[8]*s+r[12])*a,this.y=(r[1]*t+r[5]*n+r[9]*s+r[13])*a,this.z=(r[2]*t+r[6]*n+r[10]*s+r[14])*a,this}applyQuaternion(e){const t=this.x,n=this.y,s=this.z,r=e.x,a=e.y,o=e.z,l=e.w,c=l*t+a*s-o*n,h=l*n+o*t-r*s,u=l*s+r*n-a*t,d=-r*t-a*n-o*s;return this.x=c*l+d*-r+h*-o-u*-a,this.y=h*l+d*-a+u*-r-c*-o,this.z=u*l+d*-o+c*-a-h*-r,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,n=this.y,s=this.z,r=e.elements;return this.x=r[0]*t+r[4]*n+r[8]*s,this.y=r[1]*t+r[5]*n+r[9]*s,this.z=r[2]*t+r[6]*n+r[10]*s,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const n=e.x,s=e.y,r=e.z,a=t.x,o=t.y,l=t.z;return this.x=s*l-r*o,this.y=r*a-n*l,this.z=n*o-s*a,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return ar.copy(this).projectOnVector(e),this.sub(ar)}reflect(e){return this.sub(ar.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(ft(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,s=this.z-e.z;return t*t+n*n+s*s}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){const s=Math.sin(t)*e;return this.x=s*Math.sin(n),this.y=Math.cos(t)*e,this.z=s*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),s=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=s,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=(Math.random()-.5)*2,t=Math.random()*Math.PI*2,n=Math.sqrt(1-e**2);return this.x=n*Math.cos(t),this.y=n*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const ar=new L,so=new Zt;class jt{constructor(e=new L(1/0,1/0,1/0),t=new L(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;tthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,nn),nn.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Ui),is.subVectors(this.max,Ui),Zn.subVectors(e.a,Ui),$n.subVectors(e.b,Ui),Jn.subVectors(e.c,Ui),fn.subVectors($n,Zn),pn.subVectors(Jn,$n),Rn.subVectors(Zn,Jn);let t=[0,-fn.z,fn.y,0,-pn.z,pn.y,0,-Rn.z,Rn.y,fn.z,0,-fn.x,pn.z,0,-pn.x,Rn.z,0,-Rn.x,-fn.y,fn.x,0,-pn.y,pn.x,0,-Rn.y,Rn.x,0];return!or(t,Zn,$n,Jn,is)||(t=[1,0,0,0,1,0,0,0,1],!or(t,Zn,$n,Jn,is))?!1:(ss.crossVectors(fn,pn),t=[ss.x,ss.y,ss.z],or(t,Zn,$n,Jn,is))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,nn).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(nn).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(tn[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),tn[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),tn[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),tn[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),tn[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),tn[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),tn[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),tn[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(tn),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const tn=[new L,new L,new L,new L,new L,new L,new L,new L],nn=new L,Kn=new jt,Zn=new L,$n=new L,Jn=new L,fn=new L,pn=new L,Rn=new L,Ui=new L,is=new L,ss=new L,Cn=new L;function or(i,e,t,n,s){for(let r=0,a=i.length-3;r<=a;r+=3){Cn.fromArray(i,r);const o=s.x*Math.abs(Cn.x)+s.y*Math.abs(Cn.y)+s.z*Math.abs(Cn.z),l=e.dot(Cn),c=t.dot(Cn),h=n.dot(Cn);if(Math.max(-Math.max(l,c,h),Math.min(l,c,h))>o)return!1}return!0}const eu=new jt,Ni=new L,lr=new L;class Jt{constructor(e=new L,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;t!==void 0?n.copy(t):eu.setFromPoints(e).getCenter(n);let s=0;for(let r=0,a=e.length;rthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Ni.subVectors(e,this.center);const t=Ni.lengthSq();if(t>this.radius*this.radius){const n=Math.sqrt(t),s=(n-this.radius)*.5;this.center.addScaledVector(Ni,s/n),this.radius+=s}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(lr.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Ni.copy(e.center).add(lr)),this.expandByPoint(Ni.copy(e.center).sub(lr))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const sn=new L,cr=new L,rs=new L,mn=new L,hr=new L,as=new L,ur=new L;class Ji{constructor(e=new L,t=new L(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,sn)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=sn.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(sn.copy(this.origin).addScaledVector(this.direction,t),sn.distanceToSquared(e))}distanceSqToSegment(e,t,n,s){cr.copy(e).add(t).multiplyScalar(.5),rs.copy(t).sub(e).normalize(),mn.copy(this.origin).sub(cr);const r=e.distanceTo(t)*.5,a=-this.direction.dot(rs),o=mn.dot(this.direction),l=-mn.dot(rs),c=mn.lengthSq(),h=Math.abs(1-a*a);let u,d,p,g;if(h>0)if(u=a*l-o,d=a*o-l,g=r*h,u>=0)if(d>=-g)if(d<=g){const _=1/h;u*=_,d*=_,p=u*(u+a*d+2*o)+d*(a*u+d+2*l)+c}else d=r,u=Math.max(0,-(a*d+o)),p=-u*u+d*(d+2*l)+c;else d=-r,u=Math.max(0,-(a*d+o)),p=-u*u+d*(d+2*l)+c;else d<=-g?(u=Math.max(0,-(-a*r+o)),d=u>0?-r:Math.min(Math.max(-r,-l),r),p=-u*u+d*(d+2*l)+c):d<=g?(u=0,d=Math.min(Math.max(-r,-l),r),p=d*(d+2*l)+c):(u=Math.max(0,-(a*r+o)),d=u>0?r:Math.min(Math.max(-r,-l),r),p=-u*u+d*(d+2*l)+c);else d=a>0?-r:r,u=Math.max(0,-(a*d+o)),p=-u*u+d*(d+2*l)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,u),s&&s.copy(cr).addScaledVector(rs,d),p}intersectSphere(e,t){sn.subVectors(e.center,this.origin);const n=sn.dot(this.direction),s=sn.dot(sn)-n*n,r=e.radius*e.radius;if(s>r)return null;const a=Math.sqrt(r-s),o=n-a,l=n+a;return l<0?null:o<0?this.at(l,t):this.at(o,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return n===null?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,s,r,a,o,l;const c=1/this.direction.x,h=1/this.direction.y,u=1/this.direction.z,d=this.origin;return c>=0?(n=(e.min.x-d.x)*c,s=(e.max.x-d.x)*c):(n=(e.max.x-d.x)*c,s=(e.min.x-d.x)*c),h>=0?(r=(e.min.y-d.y)*h,a=(e.max.y-d.y)*h):(r=(e.max.y-d.y)*h,a=(e.min.y-d.y)*h),n>a||r>s||((r>n||isNaN(n))&&(n=r),(a=0?(o=(e.min.z-d.z)*u,l=(e.max.z-d.z)*u):(o=(e.max.z-d.z)*u,l=(e.min.z-d.z)*u),n>l||o>s)||((o>n||n!==n)&&(n=o),(l=0?n:s,t)}intersectsBox(e){return this.intersectBox(e,sn)!==null}intersectTriangle(e,t,n,s,r){hr.subVectors(t,e),as.subVectors(n,e),ur.crossVectors(hr,as);let a=this.direction.dot(ur),o;if(a>0){if(s)return null;o=1}else if(a<0)o=-1,a=-a;else return null;mn.subVectors(this.origin,e);const l=o*this.direction.dot(as.crossVectors(mn,as));if(l<0)return null;const c=o*this.direction.dot(hr.cross(mn));if(c<0||l+c>a)return null;const h=-o*mn.dot(ur);return h<0?null:this.at(h/a,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Be{constructor(e,t,n,s,r,a,o,l,c,h,u,d,p,g,_,m){Be.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,n,s,r,a,o,l,c,h,u,d,p,g,_,m)}set(e,t,n,s,r,a,o,l,c,h,u,d,p,g,_,m){const f=this.elements;return f[0]=e,f[4]=t,f[8]=n,f[12]=s,f[1]=r,f[5]=a,f[9]=o,f[13]=l,f[2]=c,f[6]=h,f[10]=u,f[14]=d,f[3]=p,f[7]=g,f[11]=_,f[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Be().fromArray(this.elements)}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,n=e.elements,s=1/Qn.setFromMatrixColumn(e,0).length(),r=1/Qn.setFromMatrixColumn(e,1).length(),a=1/Qn.setFromMatrixColumn(e,2).length();return t[0]=n[0]*s,t[1]=n[1]*s,t[2]=n[2]*s,t[3]=0,t[4]=n[4]*r,t[5]=n[5]*r,t[6]=n[6]*r,t[7]=0,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,n=e.x,s=e.y,r=e.z,a=Math.cos(n),o=Math.sin(n),l=Math.cos(s),c=Math.sin(s),h=Math.cos(r),u=Math.sin(r);if(e.order==="XYZ"){const d=a*h,p=a*u,g=o*h,_=o*u;t[0]=l*h,t[4]=-l*u,t[8]=c,t[1]=p+g*c,t[5]=d-_*c,t[9]=-o*l,t[2]=_-d*c,t[6]=g+p*c,t[10]=a*l}else if(e.order==="YXZ"){const d=l*h,p=l*u,g=c*h,_=c*u;t[0]=d+_*o,t[4]=g*o-p,t[8]=a*c,t[1]=a*u,t[5]=a*h,t[9]=-o,t[2]=p*o-g,t[6]=_+d*o,t[10]=a*l}else if(e.order==="ZXY"){const d=l*h,p=l*u,g=c*h,_=c*u;t[0]=d-_*o,t[4]=-a*u,t[8]=g+p*o,t[1]=p+g*o,t[5]=a*h,t[9]=_-d*o,t[2]=-a*c,t[6]=o,t[10]=a*l}else if(e.order==="ZYX"){const d=a*h,p=a*u,g=o*h,_=o*u;t[0]=l*h,t[4]=g*c-p,t[8]=d*c+_,t[1]=l*u,t[5]=_*c+d,t[9]=p*c-g,t[2]=-c,t[6]=o*l,t[10]=a*l}else if(e.order==="YZX"){const d=a*l,p=a*c,g=o*l,_=o*c;t[0]=l*h,t[4]=_-d*u,t[8]=g*u+p,t[1]=u,t[5]=a*h,t[9]=-o*h,t[2]=-c*h,t[6]=p*u+g,t[10]=d-_*u}else if(e.order==="XZY"){const d=a*l,p=a*c,g=o*l,_=o*c;t[0]=l*h,t[4]=-u,t[8]=c*h,t[1]=d*u+_,t[5]=a*h,t[9]=p*u-g,t[2]=g*u-p,t[6]=o*h,t[10]=_*u+d}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(tu,e,nu)}lookAt(e,t,n){const s=this.elements;return Rt.subVectors(e,t),Rt.lengthSq()===0&&(Rt.z=1),Rt.normalize(),gn.crossVectors(n,Rt),gn.lengthSq()===0&&(Math.abs(n.z)===1?Rt.x+=1e-4:Rt.z+=1e-4,Rt.normalize(),gn.crossVectors(n,Rt)),gn.normalize(),os.crossVectors(Rt,gn),s[0]=gn.x,s[4]=os.x,s[8]=Rt.x,s[1]=gn.y,s[5]=os.y,s[9]=Rt.y,s[2]=gn.z,s[6]=os.z,s[10]=Rt.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,s=t.elements,r=this.elements,a=n[0],o=n[4],l=n[8],c=n[12],h=n[1],u=n[5],d=n[9],p=n[13],g=n[2],_=n[6],m=n[10],f=n[14],y=n[3],v=n[7],T=n[11],w=n[15],C=s[0],b=s[4],O=s[8],S=s[12],A=s[1],Q=s[5],re=s[9],z=s[13],G=s[2],k=s[6],ne=s[10],V=s[14],W=s[3],te=s[7],K=s[11],F=s[15];return r[0]=a*C+o*A+l*G+c*W,r[4]=a*b+o*Q+l*k+c*te,r[8]=a*O+o*re+l*ne+c*K,r[12]=a*S+o*z+l*V+c*F,r[1]=h*C+u*A+d*G+p*W,r[5]=h*b+u*Q+d*k+p*te,r[9]=h*O+u*re+d*ne+p*K,r[13]=h*S+u*z+d*V+p*F,r[2]=g*C+_*A+m*G+f*W,r[6]=g*b+_*Q+m*k+f*te,r[10]=g*O+_*re+m*ne+f*K,r[14]=g*S+_*z+m*V+f*F,r[3]=y*C+v*A+T*G+w*W,r[7]=y*b+v*Q+T*k+w*te,r[11]=y*O+v*re+T*ne+w*K,r[15]=y*S+v*z+T*V+w*F,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[4],s=e[8],r=e[12],a=e[1],o=e[5],l=e[9],c=e[13],h=e[2],u=e[6],d=e[10],p=e[14],g=e[3],_=e[7],m=e[11],f=e[15];return g*(+r*l*u-s*c*u-r*o*d+n*c*d+s*o*p-n*l*p)+_*(+t*l*p-t*c*d+r*a*d-s*a*p+s*c*h-r*l*h)+m*(+t*c*u-t*o*p-r*a*u+n*a*p+r*o*h-n*c*h)+f*(-s*o*h-t*l*u+t*o*d+s*a*u-n*a*d+n*l*h)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){const s=this.elements;return e.isVector3?(s[12]=e.x,s[13]=e.y,s[14]=e.z):(s[12]=e,s[13]=t,s[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],s=e[2],r=e[3],a=e[4],o=e[5],l=e[6],c=e[7],h=e[8],u=e[9],d=e[10],p=e[11],g=e[12],_=e[13],m=e[14],f=e[15],y=u*m*c-_*d*c+_*l*p-o*m*p-u*l*f+o*d*f,v=g*d*c-h*m*c-g*l*p+a*m*p+h*l*f-a*d*f,T=h*_*c-g*u*c+g*o*p-a*_*p-h*o*f+a*u*f,w=g*u*l-h*_*l-g*o*d+a*_*d+h*o*m-a*u*m,C=t*y+n*v+s*T+r*w;if(C===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const b=1/C;return e[0]=y*b,e[1]=(_*d*r-u*m*r-_*s*p+n*m*p+u*s*f-n*d*f)*b,e[2]=(o*m*r-_*l*r+_*s*c-n*m*c-o*s*f+n*l*f)*b,e[3]=(u*l*r-o*d*r-u*s*c+n*d*c+o*s*p-n*l*p)*b,e[4]=v*b,e[5]=(h*m*r-g*d*r+g*s*p-t*m*p-h*s*f+t*d*f)*b,e[6]=(g*l*r-a*m*r-g*s*c+t*m*c+a*s*f-t*l*f)*b,e[7]=(a*d*r-h*l*r+h*s*c-t*d*c-a*s*p+t*l*p)*b,e[8]=T*b,e[9]=(g*u*r-h*_*r-g*n*p+t*_*p+h*n*f-t*u*f)*b,e[10]=(a*_*r-g*o*r+g*n*c-t*_*c-a*n*f+t*o*f)*b,e[11]=(h*o*r-a*u*r-h*n*c+t*u*c+a*n*p-t*o*p)*b,e[12]=w*b,e[13]=(h*_*s-g*u*s+g*n*d-t*_*d-h*n*m+t*u*m)*b,e[14]=(g*o*s-a*_*s-g*n*l+t*_*l+a*n*m-t*o*m)*b,e[15]=(a*u*s-h*o*s+h*n*l-t*u*l-a*n*d+t*o*d)*b,this}scale(e){const t=this.elements,n=e.x,s=e.y,r=e.z;return t[0]*=n,t[4]*=s,t[8]*=r,t[1]*=n,t[5]*=s,t[9]*=r,t[2]*=n,t[6]*=s,t[10]*=r,t[3]*=n,t[7]*=s,t[11]*=r,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],s=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,s))}makeTranslation(e,t,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),s=Math.sin(t),r=1-n,a=e.x,o=e.y,l=e.z,c=r*a,h=r*o;return this.set(c*a+n,c*o-s*l,c*l+s*o,0,c*o+s*l,h*o+n,h*l-s*a,0,c*l-s*o,h*l+s*a,r*l*l+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,s,r,a){return this.set(1,n,r,0,e,1,a,0,t,s,1,0,0,0,0,1),this}compose(e,t,n){const s=this.elements,r=t._x,a=t._y,o=t._z,l=t._w,c=r+r,h=a+a,u=o+o,d=r*c,p=r*h,g=r*u,_=a*h,m=a*u,f=o*u,y=l*c,v=l*h,T=l*u,w=n.x,C=n.y,b=n.z;return s[0]=(1-(_+f))*w,s[1]=(p+T)*w,s[2]=(g-v)*w,s[3]=0,s[4]=(p-T)*C,s[5]=(1-(d+f))*C,s[6]=(m+y)*C,s[7]=0,s[8]=(g+v)*b,s[9]=(m-y)*b,s[10]=(1-(d+_))*b,s[11]=0,s[12]=e.x,s[13]=e.y,s[14]=e.z,s[15]=1,this}decompose(e,t,n){const s=this.elements;let r=Qn.set(s[0],s[1],s[2]).length();const a=Qn.set(s[4],s[5],s[6]).length(),o=Qn.set(s[8],s[9],s[10]).length();this.determinant()<0&&(r=-r),e.x=s[12],e.y=s[13],e.z=s[14],Bt.copy(this);const c=1/r,h=1/a,u=1/o;return Bt.elements[0]*=c,Bt.elements[1]*=c,Bt.elements[2]*=c,Bt.elements[4]*=h,Bt.elements[5]*=h,Bt.elements[6]*=h,Bt.elements[8]*=u,Bt.elements[9]*=u,Bt.elements[10]*=u,t.setFromRotationMatrix(Bt),n.x=r,n.y=a,n.z=o,this}makePerspective(e,t,n,s,r,a,o=un){const l=this.elements,c=2*r/(t-e),h=2*r/(n-s),u=(t+e)/(t-e),d=(n+s)/(n-s);let p,g;if(o===un)p=-(a+r)/(a-r),g=-2*a*r/(a-r);else if(o===Ds)p=-a/(a-r),g=-a*r/(a-r);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+o);return l[0]=c,l[4]=0,l[8]=u,l[12]=0,l[1]=0,l[5]=h,l[9]=d,l[13]=0,l[2]=0,l[6]=0,l[10]=p,l[14]=g,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,t,n,s,r,a,o=un){const l=this.elements,c=1/(t-e),h=1/(n-s),u=1/(a-r),d=(t+e)*c,p=(n+s)*h;let g,_;if(o===un)g=(a+r)*u,_=-2*u;else if(o===Ds)g=r*u,_=-1*u;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+o);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-d,l[1]=0,l[5]=2*h,l[9]=0,l[13]=-p,l[2]=0,l[6]=0,l[10]=_,l[14]=-g,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let s=0;s<16;s++)if(t[s]!==n[s])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}const Qn=new L,Bt=new Be,tu=new L(0,0,0),nu=new L(1,1,1),gn=new L,os=new L,Rt=new L,ro=new Be,ao=new Zt;class Bs{constructor(e=0,t=0,n=0,s=Bs.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=n,this._order=s}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,s=this._order){return this._x=e,this._y=t,this._z=n,this._order=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){const s=e.elements,r=s[0],a=s[4],o=s[8],l=s[1],c=s[5],h=s[9],u=s[2],d=s[6],p=s[10];switch(t){case"XYZ":this._y=Math.asin(ft(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-h,p),this._z=Math.atan2(-a,r)):(this._x=Math.atan2(d,c),this._z=0);break;case"YXZ":this._x=Math.asin(-ft(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(o,p),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-u,r),this._z=0);break;case"ZXY":this._x=Math.asin(ft(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(-u,p),this._z=Math.atan2(-a,c)):(this._y=0,this._z=Math.atan2(l,r));break;case"ZYX":this._y=Math.asin(-ft(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(d,p),this._z=Math.atan2(l,r)):(this._x=0,this._z=Math.atan2(-a,c));break;case"YZX":this._z=Math.asin(ft(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,c),this._y=Math.atan2(-u,r)):(this._x=0,this._y=Math.atan2(o,p));break;case"XZY":this._z=Math.asin(-ft(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(d,c),this._y=Math.atan2(o,r)):(this._x=Math.atan2(-h,p),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,n===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return ro.makeRotationFromQuaternion(e),this.setFromRotationMatrix(ro,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return ao.setFromEuler(this),this.setFromQuaternion(ao,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}Bs.DEFAULT_ORDER="XYZ";class Gl{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let t=0;t1){for(let n=0;n0&&(n=n.concat(a))}return n}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Oi,e,su),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Oi,ru,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let n=0,s=t.length;n0&&(s.userData=this.userData),s.layers=this.layers.mask,s.matrix=this.matrix.toArray(),s.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(s.matrixAutoUpdate=!1),this.isInstancedMesh&&(s.type="InstancedMesh",s.count=this.count,s.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(s.instanceColor=this.instanceColor.toJSON()));function r(o,l){return o[l.uuid]===void 0&&(o[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?s.background=this.background.toJSON():this.background.isTexture&&(s.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(s.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){s.geometry=r(e.geometries,this.geometry);const o=this.geometry.parameters;if(o!==void 0&&o.shapes!==void 0){const l=o.shapes;if(Array.isArray(l))for(let c=0,h=l.length;c0){s.children=[];for(let o=0;o0){s.animations=[];for(let o=0;o0&&(n.geometries=o),l.length>0&&(n.materials=l),c.length>0&&(n.textures=c),h.length>0&&(n.images=h),u.length>0&&(n.shapes=u),d.length>0&&(n.skeletons=d),p.length>0&&(n.animations=p),g.length>0&&(n.nodes=g)}return n.object=s,n;function a(o){const l=[];for(const c in o){const h=o[c];delete h.metadata,l.push(h)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let n=0;n0?s.multiplyScalar(1/Math.sqrt(r)):s.set(0,0,0)}static getBarycoord(e,t,n,s,r){zt.subVectors(s,t),an.subVectors(n,t),dr.subVectors(e,t);const a=zt.dot(zt),o=zt.dot(an),l=zt.dot(dr),c=an.dot(an),h=an.dot(dr),u=a*c-o*o;if(u===0)return r.set(-2,-1,-1);const d=1/u,p=(c*l-o*h)*d,g=(a*h-o*l)*d;return r.set(1-p-g,g,p)}static containsPoint(e,t,n,s){return this.getBarycoord(e,t,n,s,on),on.x>=0&&on.y>=0&&on.x+on.y<=1}static getUV(e,t,n,s,r,a,o,l){return cs===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),cs=!0),this.getInterpolation(e,t,n,s,r,a,o,l)}static getInterpolation(e,t,n,s,r,a,o,l){return this.getBarycoord(e,t,n,s,on),l.setScalar(0),l.addScaledVector(r,on.x),l.addScaledVector(a,on.y),l.addScaledVector(o,on.z),l}static isFrontFacing(e,t,n,s){return zt.subVectors(n,t),an.subVectors(e,t),zt.cross(an).dot(s)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,s){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[s]),this}setFromAttributeAndIndices(e,t,n,s){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,s),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return zt.subVectors(this.c,this.b),an.subVectors(this.a,this.b),zt.cross(an).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return kt.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return kt.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,n,s,r){return cs===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),cs=!0),kt.getInterpolation(e,this.a,this.b,this.c,t,n,s,r)}getInterpolation(e,t,n,s,r){return kt.getInterpolation(e,this.a,this.b,this.c,t,n,s,r)}containsPoint(e){return kt.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return kt.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,s=this.b,r=this.c;let a,o;ti.subVectors(s,n),ni.subVectors(r,n),fr.subVectors(e,n);const l=ti.dot(fr),c=ni.dot(fr);if(l<=0&&c<=0)return t.copy(n);pr.subVectors(e,s);const h=ti.dot(pr),u=ni.dot(pr);if(h>=0&&u<=h)return t.copy(s);const d=l*u-h*c;if(d<=0&&l>=0&&h<=0)return a=l/(l-h),t.copy(n).addScaledVector(ti,a);mr.subVectors(e,r);const p=ti.dot(mr),g=ni.dot(mr);if(g>=0&&p<=g)return t.copy(r);const _=p*c-l*g;if(_<=0&&c>=0&&g<=0)return o=c/(c-g),t.copy(n).addScaledVector(ni,o);const m=h*g-p*u;if(m<=0&&u-h>=0&&p-g>=0)return uo.subVectors(r,s),o=(u-h)/(u-h+(p-g)),t.copy(s).addScaledVector(uo,o);const f=1/(m+_+d);return a=_*f,o=d*f,t.copy(n).addScaledVector(ti,a).addScaledVector(ni,o)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let lu=0;class Wt extends Xn{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:lu++}),this.uuid=Vt(),this.name="",this.type="Material",this.blending=pi,this.side=dn,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=bl,this.blendDst=Al,this.blendEquation=di,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=Ur,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=Sh,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=nr,this.stencilZFail=nr,this.stencilZPass=nr,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const n=e[t];if(n===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const s=this[t];if(s===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}s&&s.isColor?s.set(n):s&&s.isVector3&&n&&n.isVector3?s.copy(n):this[t]=n}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const n={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==pi&&(n.blending=this.blending),this.side!==dn&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaHash===!0&&(n.alphaHash=this.alphaHash),this.alphaToCoverage===!0&&(n.alphaToCoverage=this.alphaToCoverage),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=this.premultipliedAlpha),this.forceSinglePass===!0&&(n.forceSinglePass=this.forceSinglePass),this.wireframe===!0&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=this.flatShading),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function s(r){const a=[];for(const o in r){const l=r[o];delete l.metadata,a.push(l)}return a}if(t){const r=s(e.textures),a=s(e.images);r.length>0&&(n.textures=r),a.length>0&&(n.images=a)}return n}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(t!==null){const s=t.length;n=new Array(s);for(let r=0;r!==s;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}const Vl={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Ht={h:0,s:0,l:0},hs={h:0,s:0,l:0};function gr(i,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?i+(e-i)*6*t:t<1/2?e:t<2/3?i+(e-i)*6*(2/3-t):i}class Pe{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(t===void 0&&n===void 0){const s=e;s&&s.isColor?this.copy(s):typeof s=="number"?this.setHex(s):typeof s=="string"&&this.setStyle(s)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Ye){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Lt.toWorkingColorSpace(this,t),this}setRGB(e,t,n,s=Lt.workingColorSpace){return this.r=e,this.g=t,this.b=n,Lt.toWorkingColorSpace(this,s),this}setHSL(e,t,n,s=Lt.workingColorSpace){if(e=ea(e,1),t=ft(t,0,1),n=ft(n,0,1),t===0)this.r=this.g=this.b=n;else{const r=n<=.5?n*(1+t):n+t-n*t,a=2*n-r;this.r=gr(a,r,e+1/3),this.g=gr(a,r,e),this.b=gr(a,r,e-1/3)}return Lt.toWorkingColorSpace(this,s),this}setStyle(e,t=Ye){function n(r){r!==void 0&&parseFloat(r)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let s;if(s=/^(\w+)\(([^\)]*)\)/.exec(e)){let r;const a=s[1],o=s[2];switch(a){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,t);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,t);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(s=/^\#([A-Fa-f\d]+)$/.exec(e)){const r=s[1],a=r.length;if(a===3)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,t);if(a===6)return this.setHex(parseInt(r,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=Ye){const n=Vl[e.toLowerCase()];return n!==void 0?this.setHex(n,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=mi(e.r),this.g=mi(e.g),this.b=mi(e.b),this}copyLinearToSRGB(e){return this.r=sr(e.r),this.g=sr(e.g),this.b=sr(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Ye){return Lt.fromWorkingColorSpace(gt.copy(this),e),Math.round(ft(gt.r*255,0,255))*65536+Math.round(ft(gt.g*255,0,255))*256+Math.round(ft(gt.b*255,0,255))}getHexString(e=Ye){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Lt.workingColorSpace){Lt.fromWorkingColorSpace(gt.copy(this),t);const n=gt.r,s=gt.g,r=gt.b,a=Math.max(n,s,r),o=Math.min(n,s,r);let l,c;const h=(o+a)/2;if(o===a)l=0,c=0;else{const u=a-o;switch(c=h<=.5?u/(a+o):u/(2-a-o),a){case n:l=(s-r)/u+(s0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const l in n){const c=n[l];e.data.attributes[l]=c.toJSON(e.data)}const s={};let r=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],h=[];for(let u=0,d=c.length;u0&&(s[l]=h,r=!0)}r&&(e.data.morphAttributes=s,e.data.morphTargetsRelative=this.morphTargetsRelative);const a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));const o=this.boundingSphere;return o!==null&&(e.data.boundingSphere={center:o.center.toArray(),radius:o.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const n=e.index;n!==null&&this.setIndex(n.clone(t));const s=e.attributes;for(const c in s){const h=s[c];this.setAttribute(c,h.clone(t))}const r=e.morphAttributes;for(const c in r){const h=[],u=r[c];for(let d=0,p=u.length;d0){const s=t[n[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,a=s.length;r(e.far-e.near)**2))&&(fo.copy(r).invert(),Ln.copy(e.ray).applyMatrix4(fo),!(n.boundingBox!==null&&Ln.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,Ln)))}_computeIntersections(e,t,n){let s;const r=this.geometry,a=this.material,o=r.index,l=r.attributes.position,c=r.attributes.uv,h=r.attributes.uv1,u=r.attributes.normal,d=r.groups,p=r.drawRange;if(o!==null)if(Array.isArray(a))for(let g=0,_=d.length;g<_;g++){const m=d[g],f=a[m.materialIndex],y=Math.max(m.start,p.start),v=Math.min(o.count,Math.min(m.start+m.count,p.start+p.count));for(let T=y,w=v;Tt.far?null:{distance:c,point:xs.clone(),object:i}}function vs(i,e,t,n,s,r,a,o,l,c){i.getVertexPosition(o,si),i.getVertexPosition(l,ri),i.getVertexPosition(c,ai);const h=hu(i,e,t,n,si,ri,ai,_s);if(h){s&&(ps.fromBufferAttribute(s,o),ms.fromBufferAttribute(s,l),gs.fromBufferAttribute(s,c),h.uv=kt.getInterpolation(_s,si,ri,ai,ps,ms,gs,new Ce)),r&&(ps.fromBufferAttribute(r,o),ms.fromBufferAttribute(r,l),gs.fromBufferAttribute(r,c),h.uv1=kt.getInterpolation(_s,si,ri,ai,ps,ms,gs,new Ce),h.uv2=h.uv1),a&&(mo.fromBufferAttribute(a,o),go.fromBufferAttribute(a,l),_o.fromBufferAttribute(a,c),h.normal=kt.getInterpolation(_s,si,ri,ai,mo,go,_o,new L),h.normal.dot(n.direction)>0&&h.normal.multiplyScalar(-1));const u={a:o,b:l,c,normal:new L,materialIndex:0};kt.getNormal(si,ri,ai,u.normal),h.face=u}return h}class Qi extends Ft{constructor(e=1,t=1,n=1,s=1,r=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:s,heightSegments:r,depthSegments:a};const o=this;s=Math.floor(s),r=Math.floor(r),a=Math.floor(a);const l=[],c=[],h=[],u=[];let d=0,p=0;g("z","y","x",-1,-1,n,t,e,a,r,0),g("z","y","x",1,-1,n,t,-e,a,r,1),g("x","z","y",1,1,e,n,t,s,a,2),g("x","z","y",1,-1,e,n,-t,s,a,3),g("x","y","z",1,-1,e,t,n,s,r,4),g("x","y","z",-1,-1,e,t,-n,s,r,5),this.setIndex(l),this.setAttribute("position",new Xt(c,3)),this.setAttribute("normal",new Xt(h,3)),this.setAttribute("uv",new Xt(u,2));function g(_,m,f,y,v,T,w,C,b,O,S){const A=T/b,Q=w/O,re=T/2,z=w/2,G=C/2,k=b+1,ne=O+1;let V=0,W=0;const te=new L;for(let K=0;K0?1:-1,h.push(te.x,te.y,te.z),u.push(Y/b),u.push(1-K/O),V+=1}}for(let K=0;K0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const n={};for(const s in this.extensions)this.extensions[s]===!0&&(n[s]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}class ta extends tt{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Be,this.projectionMatrix=new Be,this.projectionMatrixInverse=new Be,this.coordinateSystem=un}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}class yt extends ta{constructor(e=50,t=1,n=.1,s=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=s,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=Ei*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(Wi*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Ei*2*Math.atan(Math.tan(Wi*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,n,s,r,a){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=s,this.view.width=r,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(Wi*.5*this.fov)/this.zoom,n=2*t,s=this.aspect*n,r=-.5*s;const a=this.view;if(this.view!==null&&this.view.enabled){const l=a.fullWidth,c=a.fullHeight;r+=a.offsetX*s/l,t-=a.offsetY*n/c,s*=a.width/l,n*=a.height/c}const o=this.filmOffset;o!==0&&(r+=e*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+s,t,t-n,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}const oi=-90,li=1;class mu extends tt{constructor(e,t,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null;const s=new yt(oi,li,e,t);s.layers=this.layers,this.add(s);const r=new yt(oi,li,e,t);r.layers=this.layers,this.add(r);const a=new yt(oi,li,e,t);a.layers=this.layers,this.add(a);const o=new yt(oi,li,e,t);o.layers=this.layers,this.add(o);const l=new yt(oi,li,e,t);l.layers=this.layers,this.add(l);const c=new yt(oi,li,e,t);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[n,s,r,a,o,l]=t;for(const c of t)this.remove(c);if(e===un)n.up.set(0,1,0),n.lookAt(1,0,0),s.up.set(0,1,0),s.lookAt(-1,0,0),r.up.set(0,0,-1),r.lookAt(0,1,0),a.up.set(0,0,1),a.lookAt(0,-1,0),o.up.set(0,1,0),o.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(e===Ds)n.up.set(0,-1,0),n.lookAt(-1,0,0),s.up.set(0,-1,0),s.lookAt(1,0,0),r.up.set(0,0,1),r.lookAt(0,1,0),a.up.set(0,0,-1),a.lookAt(0,-1,0),o.up.set(0,-1,0),o.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const c of t)this.add(c),c.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();const n=this.renderTarget;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[s,r,a,o,l,c]=this.children,h=e.getRenderTarget(),u=e.xr.enabled;e.xr.enabled=!1;const d=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0),e.render(t,s),e.setRenderTarget(n,1),e.render(t,r),e.setRenderTarget(n,2),e.render(t,a),e.setRenderTarget(n,3),e.render(t,o),e.setRenderTarget(n,4),e.render(t,l),n.texture.generateMipmaps=d,e.setRenderTarget(n,5),e.render(t,c),e.setRenderTarget(h),e.xr.enabled=u,n.texture.needsPMREMUpdate=!0}}class ql extends pt{constructor(e,t,n,s,r,a,o,l,c,h){e=e!==void 0?e:[],t=t!==void 0?t:xi,super(e,t,n,s,r,a,o,l,c,h),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class gu extends Gn{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const n={width:e,height:e,depth:1},s=[n,n,n,n,n,n];t.encoding!==void 0&&(ji("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),t.colorSpace=t.encoding===zn?Ye:Hn),this.texture=new ql(s,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=t.generateMipmaps!==void 0?t.generateMipmaps:!1,this.texture.minFilter=t.minFilter!==void 0?t.minFilter:Tt}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const n={uniforms:{tEquirect:{value:null}},vertexShader:` - - varying vec3 vWorldDirection; - - vec3 transformDirection( in vec3 dir, in mat4 matrix ) { - - return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); - - } - - void main() { - - vWorldDirection = transformDirection( position, modelMatrix ); - - #include - #include - - } - `,fragmentShader:` - - uniform sampler2D tEquirect; - - varying vec3 vWorldDirection; - - #include - - void main() { - - vec3 direction = normalize( vWorldDirection ); - - vec2 sampleUV = equirectUv( direction ); - - gl_FragColor = texture2D( tEquirect, sampleUV ); - - } - `},s=new Qi(5,5,5),r=new Vn({name:"CubemapFromEquirect",uniforms:Ti(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:bt,blending:yn});r.uniforms.tEquirect.value=t;const a=new Pt(s,r),o=t.minFilter;return t.minFilter===kn&&(t.minFilter=Tt),new mu(1,10,this).update(e,a),t.minFilter=o,a.geometry.dispose(),a.material.dispose(),this}clear(e,t,n,s){const r=e.getRenderTarget();for(let a=0;a<6;a++)e.setRenderTarget(this,a),e.clear(t,n,s);e.setRenderTarget(r)}}const vr=new L,_u=new L,xu=new ke;class vn{constructor(e=new L(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,s){return this.normal.set(e,t,n),this.constant=s,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){const s=vr.subVectors(n,t).cross(_u.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(s,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const n=e.delta(vr),s=this.normal.dot(n);if(s===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;const r=-(e.start.dot(this.normal)+this.constant)/s;return r<0||r>1?null:t.copy(e.start).addScaledVector(n,r)}intersectsLine(e){const t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const n=t||xu.getNormalMatrix(e),s=this.coplanarPoint(vr).applyMatrix4(e),r=this.normal.applyMatrix3(n).normalize();return this.constant=-s.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const Pn=new Jt,Ms=new L;class zs{constructor(e=new vn,t=new vn,n=new vn,s=new vn,r=new vn,a=new vn){this.planes=[e,t,n,s,r,a]}set(e,t,n,s,r,a){const o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(n),o[3].copy(s),o[4].copy(r),o[5].copy(a),this}copy(e){const t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e,t=un){const n=this.planes,s=e.elements,r=s[0],a=s[1],o=s[2],l=s[3],c=s[4],h=s[5],u=s[6],d=s[7],p=s[8],g=s[9],_=s[10],m=s[11],f=s[12],y=s[13],v=s[14],T=s[15];if(n[0].setComponents(l-r,d-c,m-p,T-f).normalize(),n[1].setComponents(l+r,d+c,m+p,T+f).normalize(),n[2].setComponents(l+a,d+h,m+g,T+y).normalize(),n[3].setComponents(l-a,d-h,m-g,T-y).normalize(),n[4].setComponents(l-o,d-u,m-_,T-v).normalize(),t===un)n[5].setComponents(l+o,d+u,m+_,T+v).normalize();else if(t===Ds)n[5].setComponents(o,u,_,v).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Pn.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Pn.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Pn)}intersectsSprite(e){return Pn.center.set(0,0,0),Pn.radius=.7071067811865476,Pn.applyMatrix4(e.matrixWorld),this.intersectsSphere(Pn)}intersectsSphere(e){const t=this.planes,n=e.center,s=-e.radius;for(let r=0;r<6;r++)if(t[r].distanceToPoint(n)0?e.max.x:e.min.x,Ms.y=s.normal.y>0?e.max.y:e.min.y,Ms.z=s.normal.z>0?e.max.z:e.min.z,s.distanceToPoint(Ms)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function Yl(){let i=null,e=!1,t=null,n=null;function s(r,a){t(r,a),n=i.requestAnimationFrame(s)}return{start:function(){e!==!0&&t!==null&&(n=i.requestAnimationFrame(s),e=!0)},stop:function(){i.cancelAnimationFrame(n),e=!1},setAnimationLoop:function(r){t=r},setContext:function(r){i=r}}}function vu(i,e){const t=e.isWebGL2,n=new WeakMap;function s(c,h){const u=c.array,d=c.usage,p=i.createBuffer();i.bindBuffer(h,p),i.bufferData(h,u,d),c.onUploadCallback();let g;if(u instanceof Float32Array)g=i.FLOAT;else if(u instanceof Uint16Array)if(c.isFloat16BufferAttribute)if(t)g=i.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else g=i.UNSIGNED_SHORT;else if(u instanceof Int16Array)g=i.SHORT;else if(u instanceof Uint32Array)g=i.UNSIGNED_INT;else if(u instanceof Int32Array)g=i.INT;else if(u instanceof Int8Array)g=i.BYTE;else if(u instanceof Uint8Array)g=i.UNSIGNED_BYTE;else if(u instanceof Uint8ClampedArray)g=i.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+u);return{buffer:p,type:g,bytesPerElement:u.BYTES_PER_ELEMENT,version:c.version}}function r(c,h,u){const d=h.array,p=h.updateRange;i.bindBuffer(u,c),p.count===-1?i.bufferSubData(u,0,d):(t?i.bufferSubData(u,p.offset*d.BYTES_PER_ELEMENT,d,p.offset,p.count):i.bufferSubData(u,p.offset*d.BYTES_PER_ELEMENT,d.subarray(p.offset,p.offset+p.count)),p.count=-1),h.onUploadCallback()}function a(c){return c.isInterleavedBufferAttribute&&(c=c.data),n.get(c)}function o(c){c.isInterleavedBufferAttribute&&(c=c.data);const h=n.get(c);h&&(i.deleteBuffer(h.buffer),n.delete(c))}function l(c,h){if(c.isGLBufferAttribute){const d=n.get(c);(!d||d.version 0 - vec4 plane; - #pragma unroll_loop_start - for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { - plane = clippingPlanes[ i ]; - if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard; - } - #pragma unroll_loop_end - #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES - bool clipped = true; - #pragma unroll_loop_start - for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { - plane = clippingPlanes[ i ]; - clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped; - } - #pragma unroll_loop_end - if ( clipped ) discard; - #endif -#endif`,Uu=`#if NUM_CLIPPING_PLANES > 0 - varying vec3 vClipPosition; - uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; -#endif`,Nu=`#if NUM_CLIPPING_PLANES > 0 - varying vec3 vClipPosition; -#endif`,Ou=`#if NUM_CLIPPING_PLANES > 0 - vClipPosition = - mvPosition.xyz; -#endif`,Fu=`#if defined( USE_COLOR_ALPHA ) - diffuseColor *= vColor; -#elif defined( USE_COLOR ) - diffuseColor.rgb *= vColor; -#endif`,Bu=`#if defined( USE_COLOR_ALPHA ) - varying vec4 vColor; -#elif defined( USE_COLOR ) - varying vec3 vColor; -#endif`,zu=`#if defined( USE_COLOR_ALPHA ) - varying vec4 vColor; -#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) - varying vec3 vColor; -#endif`,Hu=`#if defined( USE_COLOR_ALPHA ) - vColor = vec4( 1.0 ); -#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) - vColor = vec3( 1.0 ); -#endif -#ifdef USE_COLOR - vColor *= color; -#endif -#ifdef USE_INSTANCING_COLOR - vColor.xyz *= instanceColor.xyz; -#endif`,ku=`#define PI 3.141592653589793 -#define PI2 6.283185307179586 -#define PI_HALF 1.5707963267948966 -#define RECIPROCAL_PI 0.3183098861837907 -#define RECIPROCAL_PI2 0.15915494309189535 -#define EPSILON 1e-6 -#ifndef saturate -#define saturate( a ) clamp( a, 0.0, 1.0 ) -#endif -#define whiteComplement( a ) ( 1.0 - saturate( a ) ) -float pow2( const in float x ) { return x*x; } -vec3 pow2( const in vec3 x ) { return x*x; } -float pow3( const in float x ) { return x*x*x; } -float pow4( const in float x ) { float x2 = x*x; return x2*x2; } -float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); } -float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); } -highp float rand( const in vec2 uv ) { - const highp float a = 12.9898, b = 78.233, c = 43758.5453; - highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); - return fract( sin( sn ) * c ); -} -#ifdef HIGH_PRECISION - float precisionSafeLength( vec3 v ) { return length( v ); } -#else - float precisionSafeLength( vec3 v ) { - float maxComponent = max3( abs( v ) ); - return length( v / maxComponent ) * maxComponent; - } -#endif -struct IncidentLight { - vec3 color; - vec3 direction; - bool visible; -}; -struct ReflectedLight { - vec3 directDiffuse; - vec3 directSpecular; - vec3 indirectDiffuse; - vec3 indirectSpecular; -}; -struct GeometricContext { - vec3 position; - vec3 normal; - vec3 viewDir; -#ifdef USE_CLEARCOAT - vec3 clearcoatNormal; -#endif -}; -#ifdef USE_ALPHAHASH - varying vec3 vPosition; -#endif -vec3 transformDirection( in vec3 dir, in mat4 matrix ) { - return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); -} -vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { - return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz ); -} -mat3 transposeMat3( const in mat3 m ) { - mat3 tmp; - tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x ); - tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y ); - tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z ); - return tmp; -} -float luminance( const in vec3 rgb ) { - const vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 ); - return dot( weights, rgb ); -} -bool isPerspectiveMatrix( mat4 m ) { - return m[ 2 ][ 3 ] == - 1.0; -} -vec2 equirectUv( in vec3 dir ) { - float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; - float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; - return vec2( u, v ); -} -vec3 BRDF_Lambert( const in vec3 diffuseColor ) { - return RECIPROCAL_PI * diffuseColor; -} -vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { - float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); - return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); -} -float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { - float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); - return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); -} // validated`,Gu=`#ifdef ENVMAP_TYPE_CUBE_UV - #define cubeUV_minMipLevel 4.0 - #define cubeUV_minTileSize 16.0 - float getFace( vec3 direction ) { - vec3 absDirection = abs( direction ); - float face = - 1.0; - if ( absDirection.x > absDirection.z ) { - if ( absDirection.x > absDirection.y ) - face = direction.x > 0.0 ? 0.0 : 3.0; - else - face = direction.y > 0.0 ? 1.0 : 4.0; - } else { - if ( absDirection.z > absDirection.y ) - face = direction.z > 0.0 ? 2.0 : 5.0; - else - face = direction.y > 0.0 ? 1.0 : 4.0; - } - return face; - } - vec2 getUV( vec3 direction, float face ) { - vec2 uv; - if ( face == 0.0 ) { - uv = vec2( direction.z, direction.y ) / abs( direction.x ); - } else if ( face == 1.0 ) { - uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); - } else if ( face == 2.0 ) { - uv = vec2( - direction.x, direction.y ) / abs( direction.z ); - } else if ( face == 3.0 ) { - uv = vec2( - direction.z, direction.y ) / abs( direction.x ); - } else if ( face == 4.0 ) { - uv = vec2( - direction.x, direction.z ) / abs( direction.y ); - } else { - uv = vec2( direction.x, direction.y ) / abs( direction.z ); - } - return 0.5 * ( uv + 1.0 ); - } - vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { - float face = getFace( direction ); - float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); - mipInt = max( mipInt, cubeUV_minMipLevel ); - float faceSize = exp2( mipInt ); - highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0; - if ( face > 2.0 ) { - uv.y += faceSize; - face -= 3.0; - } - uv.x += face * faceSize; - uv.x += filterInt * 3.0 * cubeUV_minTileSize; - uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize ); - uv.x *= CUBEUV_TEXEL_WIDTH; - uv.y *= CUBEUV_TEXEL_HEIGHT; - #ifdef texture2DGradEXT - return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; - #else - return texture2D( envMap, uv ).rgb; - #endif - } - #define cubeUV_r0 1.0 - #define cubeUV_v0 0.339 - #define cubeUV_m0 - 2.0 - #define cubeUV_r1 0.8 - #define cubeUV_v1 0.276 - #define cubeUV_m1 - 1.0 - #define cubeUV_r4 0.4 - #define cubeUV_v4 0.046 - #define cubeUV_m4 2.0 - #define cubeUV_r5 0.305 - #define cubeUV_v5 0.016 - #define cubeUV_m5 3.0 - #define cubeUV_r6 0.21 - #define cubeUV_v6 0.0038 - #define cubeUV_m6 4.0 - float roughnessToMip( float roughness ) { - float mip = 0.0; - if ( roughness >= cubeUV_r1 ) { - mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0; - } else if ( roughness >= cubeUV_r4 ) { - mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1; - } else if ( roughness >= cubeUV_r5 ) { - mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4; - } else if ( roughness >= cubeUV_r6 ) { - mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5; - } else { - mip = - 2.0 * log2( 1.16 * roughness ); } - return mip; - } - vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { - float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP ); - float mipF = fract( mip ); - float mipInt = floor( mip ); - vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); - if ( mipF == 0.0 ) { - return vec4( color0, 1.0 ); - } else { - vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); - return vec4( mix( color0, color1, mipF ), 1.0 ); - } - } -#endif`,Vu=`vec3 transformedNormal = objectNormal; -#ifdef USE_INSTANCING - mat3 m = mat3( instanceMatrix ); - transformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) ); - transformedNormal = m * transformedNormal; -#endif -transformedNormal = normalMatrix * transformedNormal; -#ifdef FLIP_SIDED - transformedNormal = - transformedNormal; -#endif -#ifdef USE_TANGENT - vec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz; - #ifdef FLIP_SIDED - transformedTangent = - transformedTangent; - #endif -#endif`,Wu=`#ifdef USE_DISPLACEMENTMAP - uniform sampler2D displacementMap; - uniform float displacementScale; - uniform float displacementBias; -#endif`,Xu=`#ifdef USE_DISPLACEMENTMAP - transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); -#endif`,ju=`#ifdef USE_EMISSIVEMAP - vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); - totalEmissiveRadiance *= emissiveColor.rgb; -#endif`,qu=`#ifdef USE_EMISSIVEMAP - uniform sampler2D emissiveMap; -#endif`,Yu="gl_FragColor = linearToOutputTexel( gl_FragColor );",Ku=`vec4 LinearToLinear( in vec4 value ) { - return value; -} -vec4 LinearTosRGB( in vec4 value ) { - return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a ); -}`,Zu=`#ifdef USE_ENVMAP - #ifdef ENV_WORLDPOS - vec3 cameraToFrag; - if ( isOrthographic ) { - cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); - } else { - cameraToFrag = normalize( vWorldPosition - cameraPosition ); - } - vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); - #ifdef ENVMAP_MODE_REFLECTION - vec3 reflectVec = reflect( cameraToFrag, worldNormal ); - #else - vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); - #endif - #else - vec3 reflectVec = vReflect; - #endif - #ifdef ENVMAP_TYPE_CUBE - vec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); - #else - vec4 envColor = vec4( 0.0 ); - #endif - #ifdef ENVMAP_BLENDING_MULTIPLY - outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); - #elif defined( ENVMAP_BLENDING_MIX ) - outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); - #elif defined( ENVMAP_BLENDING_ADD ) - outgoingLight += envColor.xyz * specularStrength * reflectivity; - #endif -#endif`,$u=`#ifdef USE_ENVMAP - uniform float envMapIntensity; - uniform float flipEnvMap; - #ifdef ENVMAP_TYPE_CUBE - uniform samplerCube envMap; - #else - uniform sampler2D envMap; - #endif - -#endif`,Ju=`#ifdef USE_ENVMAP - uniform float reflectivity; - #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) - #define ENV_WORLDPOS - #endif - #ifdef ENV_WORLDPOS - varying vec3 vWorldPosition; - uniform float refractionRatio; - #else - varying vec3 vReflect; - #endif -#endif`,Qu=`#ifdef USE_ENVMAP - #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) - #define ENV_WORLDPOS - #endif - #ifdef ENV_WORLDPOS - - varying vec3 vWorldPosition; - #else - varying vec3 vReflect; - uniform float refractionRatio; - #endif -#endif`,ed=`#ifdef USE_ENVMAP - #ifdef ENV_WORLDPOS - vWorldPosition = worldPosition.xyz; - #else - vec3 cameraToVertex; - if ( isOrthographic ) { - cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); - } else { - cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); - } - vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); - #ifdef ENVMAP_MODE_REFLECTION - vReflect = reflect( cameraToVertex, worldNormal ); - #else - vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); - #endif - #endif -#endif`,td=`#ifdef USE_FOG - vFogDepth = - mvPosition.z; -#endif`,nd=`#ifdef USE_FOG - varying float vFogDepth; -#endif`,id=`#ifdef USE_FOG - #ifdef FOG_EXP2 - float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); - #else - float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); - #endif - gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); -#endif`,sd=`#ifdef USE_FOG - uniform vec3 fogColor; - varying float vFogDepth; - #ifdef FOG_EXP2 - uniform float fogDensity; - #else - uniform float fogNear; - uniform float fogFar; - #endif -#endif`,rd=`#ifdef USE_GRADIENTMAP - uniform sampler2D gradientMap; -#endif -vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { - float dotNL = dot( normal, lightDirection ); - vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); - #ifdef USE_GRADIENTMAP - return vec3( texture2D( gradientMap, coord ).r ); - #else - vec2 fw = fwidth( coord ) * 0.5; - return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); - #endif -}`,ad=`#ifdef USE_LIGHTMAP - vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); - vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; - reflectedLight.indirectDiffuse += lightMapIrradiance; -#endif`,od=`#ifdef USE_LIGHTMAP - uniform sampler2D lightMap; - uniform float lightMapIntensity; -#endif`,ld=`LambertMaterial material; -material.diffuseColor = diffuseColor.rgb; -material.specularStrength = specularStrength;`,cd=`varying vec3 vViewPosition; -struct LambertMaterial { - vec3 diffuseColor; - float specularStrength; -}; -void RE_Direct_Lambert( const in IncidentLight directLight, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { - float dotNL = saturate( dot( geometry.normal, directLight.direction ) ); - vec3 irradiance = dotNL * directLight.color; - reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { - reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -#define RE_Direct RE_Direct_Lambert -#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,hd=`uniform bool receiveShadow; -uniform vec3 ambientLightColor; -uniform vec3 lightProbe[ 9 ]; -vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { - float x = normal.x, y = normal.y, z = normal.z; - vec3 result = shCoefficients[ 0 ] * 0.886227; - result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; - result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; - result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; - result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; - result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; - result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); - result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; - result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); - return result; -} -vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) { - vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); - vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); - return irradiance; -} -vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { - vec3 irradiance = ambientLightColor; - return irradiance; -} -float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { - #if defined ( LEGACY_LIGHTS ) - if ( cutoffDistance > 0.0 && decayExponent > 0.0 ) { - return pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent ); - } - return 1.0; - #else - float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); - if ( cutoffDistance > 0.0 ) { - distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); - } - return distanceFalloff; - #endif -} -float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) { - return smoothstep( coneCosine, penumbraCosine, angleCosine ); -} -#if NUM_DIR_LIGHTS > 0 - struct DirectionalLight { - vec3 direction; - vec3 color; - }; - uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; - void getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) { - light.color = directionalLight.color; - light.direction = directionalLight.direction; - light.visible = true; - } -#endif -#if NUM_POINT_LIGHTS > 0 - struct PointLight { - vec3 position; - vec3 color; - float distance; - float decay; - }; - uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; - void getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) { - vec3 lVector = pointLight.position - geometry.position; - light.direction = normalize( lVector ); - float lightDistance = length( lVector ); - light.color = pointLight.color; - light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay ); - light.visible = ( light.color != vec3( 0.0 ) ); - } -#endif -#if NUM_SPOT_LIGHTS > 0 - struct SpotLight { - vec3 position; - vec3 direction; - vec3 color; - float distance; - float decay; - float coneCos; - float penumbraCos; - }; - uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; - void getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) { - vec3 lVector = spotLight.position - geometry.position; - light.direction = normalize( lVector ); - float angleCos = dot( light.direction, spotLight.direction ); - float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos ); - if ( spotAttenuation > 0.0 ) { - float lightDistance = length( lVector ); - light.color = spotLight.color * spotAttenuation; - light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay ); - light.visible = ( light.color != vec3( 0.0 ) ); - } else { - light.color = vec3( 0.0 ); - light.visible = false; - } - } -#endif -#if NUM_RECT_AREA_LIGHTS > 0 - struct RectAreaLight { - vec3 color; - vec3 position; - vec3 halfWidth; - vec3 halfHeight; - }; - uniform sampler2D ltc_1; uniform sampler2D ltc_2; - uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; -#endif -#if NUM_HEMI_LIGHTS > 0 - struct HemisphereLight { - vec3 direction; - vec3 skyColor; - vec3 groundColor; - }; - uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; - vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) { - float dotNL = dot( normal, hemiLight.direction ); - float hemiDiffuseWeight = 0.5 * dotNL + 0.5; - vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); - return irradiance; - } -#endif`,ud=`#ifdef USE_ENVMAP - vec3 getIBLIrradiance( const in vec3 normal ) { - #ifdef ENVMAP_TYPE_CUBE_UV - vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); - vec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 ); - return PI * envMapColor.rgb * envMapIntensity; - #else - return vec3( 0.0 ); - #endif - } - vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { - #ifdef ENVMAP_TYPE_CUBE_UV - vec3 reflectVec = reflect( - viewDir, normal ); - reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) ); - reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); - vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness ); - return envMapColor.rgb * envMapIntensity; - #else - return vec3( 0.0 ); - #endif - } - #ifdef USE_ANISOTROPY - vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) { - #ifdef ENVMAP_TYPE_CUBE_UV - vec3 bentNormal = cross( bitangent, viewDir ); - bentNormal = normalize( cross( bentNormal, bitangent ) ); - bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) ); - return getIBLRadiance( viewDir, bentNormal, roughness ); - #else - return vec3( 0.0 ); - #endif - } - #endif -#endif`,dd=`ToonMaterial material; -material.diffuseColor = diffuseColor.rgb;`,fd=`varying vec3 vViewPosition; -struct ToonMaterial { - vec3 diffuseColor; -}; -void RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { - vec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color; - reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { - reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -#define RE_Direct RE_Direct_Toon -#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,pd=`BlinnPhongMaterial material; -material.diffuseColor = diffuseColor.rgb; -material.specularColor = specular; -material.specularShininess = shininess; -material.specularStrength = specularStrength;`,md=`varying vec3 vViewPosition; -struct BlinnPhongMaterial { - vec3 diffuseColor; - vec3 specularColor; - float specularShininess; - float specularStrength; -}; -void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { - float dotNL = saturate( dot( geometry.normal, directLight.direction ) ); - vec3 irradiance = dotNL * directLight.color; - reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); - reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength; -} -void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { - reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -#define RE_Direct RE_Direct_BlinnPhong -#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,gd=`PhysicalMaterial material; -material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); -vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) ); -float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); -material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness; -material.roughness = min( material.roughness, 1.0 ); -#ifdef IOR - material.ior = ior; - #ifdef USE_SPECULAR - float specularIntensityFactor = specularIntensity; - vec3 specularColorFactor = specularColor; - #ifdef USE_SPECULAR_COLORMAP - specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb; - #endif - #ifdef USE_SPECULAR_INTENSITYMAP - specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a; - #endif - material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor ); - #else - float specularIntensityFactor = 1.0; - vec3 specularColorFactor = vec3( 1.0 ); - material.specularF90 = 1.0; - #endif - material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor ); -#else - material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor ); - material.specularF90 = 1.0; -#endif -#ifdef USE_CLEARCOAT - material.clearcoat = clearcoat; - material.clearcoatRoughness = clearcoatRoughness; - material.clearcoatF0 = vec3( 0.04 ); - material.clearcoatF90 = 1.0; - #ifdef USE_CLEARCOATMAP - material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x; - #endif - #ifdef USE_CLEARCOAT_ROUGHNESSMAP - material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y; - #endif - material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); - material.clearcoatRoughness += geometryRoughness; - material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); -#endif -#ifdef USE_IRIDESCENCE - material.iridescence = iridescence; - material.iridescenceIOR = iridescenceIOR; - #ifdef USE_IRIDESCENCEMAP - material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r; - #endif - #ifdef USE_IRIDESCENCE_THICKNESSMAP - material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum; - #else - material.iridescenceThickness = iridescenceThicknessMaximum; - #endif -#endif -#ifdef USE_SHEEN - material.sheenColor = sheenColor; - #ifdef USE_SHEEN_COLORMAP - material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb; - #endif - material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 ); - #ifdef USE_SHEEN_ROUGHNESSMAP - material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a; - #endif -#endif -#ifdef USE_ANISOTROPY - #ifdef USE_ANISOTROPYMAP - mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x ); - vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb; - vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b; - #else - vec2 anisotropyV = anisotropyVector; - #endif - material.anisotropy = length( anisotropyV ); - anisotropyV /= material.anisotropy; - material.anisotropy = saturate( material.anisotropy ); - material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) ); - material.anisotropyT = tbn[ 0 ] * anisotropyV.x - tbn[ 1 ] * anisotropyV.y; - material.anisotropyB = tbn[ 1 ] * anisotropyV.x + tbn[ 0 ] * anisotropyV.y; -#endif`,_d=`struct PhysicalMaterial { - vec3 diffuseColor; - float roughness; - vec3 specularColor; - float specularF90; - #ifdef USE_CLEARCOAT - float clearcoat; - float clearcoatRoughness; - vec3 clearcoatF0; - float clearcoatF90; - #endif - #ifdef USE_IRIDESCENCE - float iridescence; - float iridescenceIOR; - float iridescenceThickness; - vec3 iridescenceFresnel; - vec3 iridescenceF0; - #endif - #ifdef USE_SHEEN - vec3 sheenColor; - float sheenRoughness; - #endif - #ifdef IOR - float ior; - #endif - #ifdef USE_TRANSMISSION - float transmission; - float transmissionAlpha; - float thickness; - float attenuationDistance; - vec3 attenuationColor; - #endif - #ifdef USE_ANISOTROPY - float anisotropy; - float alphaT; - vec3 anisotropyT; - vec3 anisotropyB; - #endif -}; -vec3 clearcoatSpecular = vec3( 0.0 ); -vec3 sheenSpecular = vec3( 0.0 ); -vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) { - float x = clamp( 1.0 - dotVH, 0.0, 1.0 ); - float x2 = x * x; - float x5 = clamp( x * x2 * x2, 0.0, 0.9999 ); - return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 ); -} -float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) { - float a2 = pow2( alpha ); - float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); - float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); - return 0.5 / max( gv + gl, EPSILON ); -} -float D_GGX( const in float alpha, const in float dotNH ) { - float a2 = pow2( alpha ); - float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; - return RECIPROCAL_PI * a2 / pow2( denom ); -} -#ifdef USE_ANISOTROPY - float V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) { - float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) ); - float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) ); - float v = 0.5 / ( gv + gl ); - return saturate(v); - } - float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) { - float a2 = alphaT * alphaB; - highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH ); - highp float v2 = dot( v, v ); - float w2 = a2 / v2; - return RECIPROCAL_PI * a2 * pow2 ( w2 ); - } -#endif -#ifdef USE_CLEARCOAT - vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) { - vec3 f0 = material.clearcoatF0; - float f90 = material.clearcoatF90; - float roughness = material.clearcoatRoughness; - float alpha = pow2( roughness ); - vec3 halfDir = normalize( lightDir + viewDir ); - float dotNL = saturate( dot( normal, lightDir ) ); - float dotNV = saturate( dot( normal, viewDir ) ); - float dotNH = saturate( dot( normal, halfDir ) ); - float dotVH = saturate( dot( viewDir, halfDir ) ); - vec3 F = F_Schlick( f0, f90, dotVH ); - float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); - float D = D_GGX( alpha, dotNH ); - return F * ( V * D ); - } -#endif -vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { - vec3 f0 = material.specularColor; - float f90 = material.specularF90; - float roughness = material.roughness; - float alpha = pow2( roughness ); - vec3 halfDir = normalize( lightDir + viewDir ); - float dotNL = saturate( dot( normal, lightDir ) ); - float dotNV = saturate( dot( normal, viewDir ) ); - float dotNH = saturate( dot( normal, halfDir ) ); - float dotVH = saturate( dot( viewDir, halfDir ) ); - vec3 F = F_Schlick( f0, f90, dotVH ); - #ifdef USE_IRIDESCENCE - F = mix( F, material.iridescenceFresnel, material.iridescence ); - #endif - #ifdef USE_ANISOTROPY - float dotTL = dot( material.anisotropyT, lightDir ); - float dotTV = dot( material.anisotropyT, viewDir ); - float dotTH = dot( material.anisotropyT, halfDir ); - float dotBL = dot( material.anisotropyB, lightDir ); - float dotBV = dot( material.anisotropyB, viewDir ); - float dotBH = dot( material.anisotropyB, halfDir ); - float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL ); - float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH ); - #else - float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); - float D = D_GGX( alpha, dotNH ); - #endif - return F * ( V * D ); -} -vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) { - const float LUT_SIZE = 64.0; - const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE; - const float LUT_BIAS = 0.5 / LUT_SIZE; - float dotNV = saturate( dot( N, V ) ); - vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) ); - uv = uv * LUT_SCALE + LUT_BIAS; - return uv; -} -float LTC_ClippedSphereFormFactor( const in vec3 f ) { - float l = length( f ); - return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 ); -} -vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) { - float x = dot( v1, v2 ); - float y = abs( x ); - float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y; - float b = 3.4175940 + ( 4.1616724 + y ) * y; - float v = a / b; - float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; - return cross( v1, v2 ) * theta_sintheta; -} -vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { - vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; - vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; - vec3 lightNormal = cross( v1, v2 ); - if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); - vec3 T1, T2; - T1 = normalize( V - N * dot( V, N ) ); - T2 = - cross( N, T1 ); - mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) ); - vec3 coords[ 4 ]; - coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); - coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); - coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); - coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); - coords[ 0 ] = normalize( coords[ 0 ] ); - coords[ 1 ] = normalize( coords[ 1 ] ); - coords[ 2 ] = normalize( coords[ 2 ] ); - coords[ 3 ] = normalize( coords[ 3 ] ); - vec3 vectorFormFactor = vec3( 0.0 ); - vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); - vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); - vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); - vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); - float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); - return vec3( result ); -} -#if defined( USE_SHEEN ) -float D_Charlie( float roughness, float dotNH ) { - float alpha = pow2( roughness ); - float invAlpha = 1.0 / alpha; - float cos2h = dotNH * dotNH; - float sin2h = max( 1.0 - cos2h, 0.0078125 ); - return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI ); -} -float V_Neubelt( float dotNV, float dotNL ) { - return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ); -} -vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) { - vec3 halfDir = normalize( lightDir + viewDir ); - float dotNL = saturate( dot( normal, lightDir ) ); - float dotNV = saturate( dot( normal, viewDir ) ); - float dotNH = saturate( dot( normal, halfDir ) ); - float D = D_Charlie( sheenRoughness, dotNH ); - float V = V_Neubelt( dotNV, dotNL ); - return sheenColor * ( D * V ); -} -#endif -float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { - float dotNV = saturate( dot( normal, viewDir ) ); - float r2 = roughness * roughness; - float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95; - float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72; - float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) ); - return saturate( DG * RECIPROCAL_PI ); -} -vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { - float dotNV = saturate( dot( normal, viewDir ) ); - const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 ); - const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 ); - vec4 r = roughness * c0 + c1; - float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y; - vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw; - return fab; -} -vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { - vec2 fab = DFGApprox( normal, viewDir, roughness ); - return specularColor * fab.x + specularF90 * fab.y; -} -#ifdef USE_IRIDESCENCE -void computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { -#else -void computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { -#endif - vec2 fab = DFGApprox( normal, viewDir, roughness ); - #ifdef USE_IRIDESCENCE - vec3 Fr = mix( specularColor, iridescenceF0, iridescence ); - #else - vec3 Fr = specularColor; - #endif - vec3 FssEss = Fr * fab.x + specularF90 * fab.y; - float Ess = fab.x + fab.y; - float Ems = 1.0 - Ess; - vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); - singleScatter += FssEss; - multiScatter += Fms * Ems; -} -#if NUM_RECT_AREA_LIGHTS > 0 - void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { - vec3 normal = geometry.normal; - vec3 viewDir = geometry.viewDir; - vec3 position = geometry.position; - vec3 lightPos = rectAreaLight.position; - vec3 halfWidth = rectAreaLight.halfWidth; - vec3 halfHeight = rectAreaLight.halfHeight; - vec3 lightColor = rectAreaLight.color; - float roughness = material.roughness; - vec3 rectCoords[ 4 ]; - rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; - rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; - rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; - vec2 uv = LTC_Uv( normal, viewDir, roughness ); - vec4 t1 = texture2D( ltc_1, uv ); - vec4 t2 = texture2D( ltc_2, uv ); - mat3 mInv = mat3( - vec3( t1.x, 0, t1.y ), - vec3( 0, 1, 0 ), - vec3( t1.z, 0, t1.w ) - ); - vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y ); - reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); - reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); - } -#endif -void RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { - float dotNL = saturate( dot( geometry.normal, directLight.direction ) ); - vec3 irradiance = dotNL * directLight.color; - #ifdef USE_CLEARCOAT - float dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) ); - vec3 ccIrradiance = dotNLcc * directLight.color; - clearcoatSpecular += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material ); - #endif - #ifdef USE_SHEEN - sheenSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness ); - #endif - reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material ); - reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { - reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) { - #ifdef USE_CLEARCOAT - clearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); - #endif - #ifdef USE_SHEEN - sheenSpecular += irradiance * material.sheenColor * IBLSheenBRDF( geometry.normal, geometry.viewDir, material.sheenRoughness ); - #endif - vec3 singleScattering = vec3( 0.0 ); - vec3 multiScattering = vec3( 0.0 ); - vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; - #ifdef USE_IRIDESCENCE - computeMultiscatteringIridescence( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering ); - #else - computeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering ); - #endif - vec3 totalScattering = singleScattering + multiScattering; - vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) ); - reflectedLight.indirectSpecular += radiance * singleScattering; - reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance; - reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance; -} -#define RE_Direct RE_Direct_Physical -#define RE_Direct_RectArea RE_Direct_RectArea_Physical -#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical -#define RE_IndirectSpecular RE_IndirectSpecular_Physical -float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { - return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); -}`,xd=` -GeometricContext geometry; -geometry.position = - vViewPosition; -geometry.normal = normal; -geometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); -#ifdef USE_CLEARCOAT - geometry.clearcoatNormal = clearcoatNormal; -#endif -#ifdef USE_IRIDESCENCE - float dotNVi = saturate( dot( normal, geometry.viewDir ) ); - if ( material.iridescenceThickness == 0.0 ) { - material.iridescence = 0.0; - } else { - material.iridescence = saturate( material.iridescence ); - } - if ( material.iridescence > 0.0 ) { - material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor ); - material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi ); - } -#endif -IncidentLight directLight; -#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) - PointLight pointLight; - #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 - PointLightShadow pointLightShadow; - #endif - #pragma unroll_loop_start - for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { - pointLight = pointLights[ i ]; - getPointLightInfo( pointLight, geometry, directLight ); - #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) - pointLightShadow = pointLightShadows[ i ]; - directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; - #endif - RE_Direct( directLight, geometry, material, reflectedLight ); - } - #pragma unroll_loop_end -#endif -#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) - SpotLight spotLight; - vec4 spotColor; - vec3 spotLightCoord; - bool inSpotLightMap; - #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 - SpotLightShadow spotLightShadow; - #endif - #pragma unroll_loop_start - for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { - spotLight = spotLights[ i ]; - getSpotLightInfo( spotLight, geometry, directLight ); - #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) - #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX - #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) - #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS - #else - #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) - #endif - #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS ) - spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w; - inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) ); - spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy ); - directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color; - #endif - #undef SPOT_LIGHT_MAP_INDEX - #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) - spotLightShadow = spotLightShadows[ i ]; - directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; - #endif - RE_Direct( directLight, geometry, material, reflectedLight ); - } - #pragma unroll_loop_end -#endif -#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) - DirectionalLight directionalLight; - #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 - DirectionalLightShadow directionalLightShadow; - #endif - #pragma unroll_loop_start - for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { - directionalLight = directionalLights[ i ]; - getDirectionalLightInfo( directionalLight, geometry, directLight ); - #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) - directionalLightShadow = directionalLightShadows[ i ]; - directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; - #endif - RE_Direct( directLight, geometry, material, reflectedLight ); - } - #pragma unroll_loop_end -#endif -#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) - RectAreaLight rectAreaLight; - #pragma unroll_loop_start - for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { - rectAreaLight = rectAreaLights[ i ]; - RE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight ); - } - #pragma unroll_loop_end -#endif -#if defined( RE_IndirectDiffuse ) - vec3 iblIrradiance = vec3( 0.0 ); - vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); - irradiance += getLightProbeIrradiance( lightProbe, geometry.normal ); - #if ( NUM_HEMI_LIGHTS > 0 ) - #pragma unroll_loop_start - for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { - irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal ); - } - #pragma unroll_loop_end - #endif -#endif -#if defined( RE_IndirectSpecular ) - vec3 radiance = vec3( 0.0 ); - vec3 clearcoatRadiance = vec3( 0.0 ); -#endif`,vd=`#if defined( RE_IndirectDiffuse ) - #ifdef USE_LIGHTMAP - vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); - vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; - irradiance += lightMapIrradiance; - #endif - #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) - iblIrradiance += getIBLIrradiance( geometry.normal ); - #endif -#endif -#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) - #ifdef USE_ANISOTROPY - radiance += getIBLAnisotropyRadiance( geometry.viewDir, geometry.normal, material.roughness, material.anisotropyB, material.anisotropy ); - #else - radiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness ); - #endif - #ifdef USE_CLEARCOAT - clearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness ); - #endif -#endif`,Md=`#if defined( RE_IndirectDiffuse ) - RE_IndirectDiffuse( irradiance, geometry, material, reflectedLight ); -#endif -#if defined( RE_IndirectSpecular ) - RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight ); -#endif`,Sd=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) - gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; -#endif`,yd=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) - uniform float logDepthBufFC; - varying float vFragDepth; - varying float vIsPerspective; -#endif`,Ed=`#ifdef USE_LOGDEPTHBUF - #ifdef USE_LOGDEPTHBUF_EXT - varying float vFragDepth; - varying float vIsPerspective; - #else - uniform float logDepthBufFC; - #endif -#endif`,Td=`#ifdef USE_LOGDEPTHBUF - #ifdef USE_LOGDEPTHBUF_EXT - vFragDepth = 1.0 + gl_Position.w; - vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); - #else - if ( isPerspectiveMatrix( projectionMatrix ) ) { - gl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0; - gl_Position.z *= gl_Position.w; - } - #endif -#endif`,bd=`#ifdef USE_MAP - vec4 sampledDiffuseColor = texture2D( map, vMapUv ); - #ifdef DECODE_VIDEO_TEXTURE - sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w ); - - #endif - diffuseColor *= sampledDiffuseColor; -#endif`,Ad=`#ifdef USE_MAP - uniform sampler2D map; -#endif`,wd=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) - #if defined( USE_POINTS_UV ) - vec2 uv = vUv; - #else - vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; - #endif -#endif -#ifdef USE_MAP - diffuseColor *= texture2D( map, uv ); -#endif -#ifdef USE_ALPHAMAP - diffuseColor.a *= texture2D( alphaMap, uv ).g; -#endif`,Rd=`#if defined( USE_POINTS_UV ) - varying vec2 vUv; -#else - #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) - uniform mat3 uvTransform; - #endif -#endif -#ifdef USE_MAP - uniform sampler2D map; -#endif -#ifdef USE_ALPHAMAP - uniform sampler2D alphaMap; -#endif`,Cd=`float metalnessFactor = metalness; -#ifdef USE_METALNESSMAP - vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); - metalnessFactor *= texelMetalness.b; -#endif`,Ld=`#ifdef USE_METALNESSMAP - uniform sampler2D metalnessMap; -#endif`,Pd=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) - vColor *= morphTargetBaseInfluence; - for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { - #if defined( USE_COLOR_ALPHA ) - if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ]; - #elif defined( USE_COLOR ) - if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; - #endif - } -#endif`,Id=`#ifdef USE_MORPHNORMALS - objectNormal *= morphTargetBaseInfluence; - #ifdef MORPHTARGETS_TEXTURE - for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { - if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ]; - } - #else - objectNormal += morphNormal0 * morphTargetInfluences[ 0 ]; - objectNormal += morphNormal1 * morphTargetInfluences[ 1 ]; - objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; - objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; - #endif -#endif`,Dd=`#ifdef USE_MORPHTARGETS - uniform float morphTargetBaseInfluence; - #ifdef MORPHTARGETS_TEXTURE - uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; - uniform sampler2DArray morphTargetsTexture; - uniform ivec2 morphTargetsTextureSize; - vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) { - int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset; - int y = texelIndex / morphTargetsTextureSize.x; - int x = texelIndex - y * morphTargetsTextureSize.x; - ivec3 morphUV = ivec3( x, y, morphTargetIndex ); - return texelFetch( morphTargetsTexture, morphUV, 0 ); - } - #else - #ifndef USE_MORPHNORMALS - uniform float morphTargetInfluences[ 8 ]; - #else - uniform float morphTargetInfluences[ 4 ]; - #endif - #endif -#endif`,Ud=`#ifdef USE_MORPHTARGETS - transformed *= morphTargetBaseInfluence; - #ifdef MORPHTARGETS_TEXTURE - for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { - if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ]; - } - #else - transformed += morphTarget0 * morphTargetInfluences[ 0 ]; - transformed += morphTarget1 * morphTargetInfluences[ 1 ]; - transformed += morphTarget2 * morphTargetInfluences[ 2 ]; - transformed += morphTarget3 * morphTargetInfluences[ 3 ]; - #ifndef USE_MORPHNORMALS - transformed += morphTarget4 * morphTargetInfluences[ 4 ]; - transformed += morphTarget5 * morphTargetInfluences[ 5 ]; - transformed += morphTarget6 * morphTargetInfluences[ 6 ]; - transformed += morphTarget7 * morphTargetInfluences[ 7 ]; - #endif - #endif -#endif`,Nd=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; -#ifdef FLAT_SHADED - vec3 fdx = dFdx( vViewPosition ); - vec3 fdy = dFdy( vViewPosition ); - vec3 normal = normalize( cross( fdx, fdy ) ); -#else - vec3 normal = normalize( vNormal ); - #ifdef DOUBLE_SIDED - normal *= faceDirection; - #endif -#endif -#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) - #ifdef USE_TANGENT - mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); - #else - mat3 tbn = getTangentFrame( - vViewPosition, normal, - #if defined( USE_NORMALMAP ) - vNormalMapUv - #elif defined( USE_CLEARCOAT_NORMALMAP ) - vClearcoatNormalMapUv - #else - vUv - #endif - ); - #endif - #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) - tbn[0] *= faceDirection; - tbn[1] *= faceDirection; - #endif -#endif -#ifdef USE_CLEARCOAT_NORMALMAP - #ifdef USE_TANGENT - mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); - #else - mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv ); - #endif - #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) - tbn2[0] *= faceDirection; - tbn2[1] *= faceDirection; - #endif -#endif -vec3 geometryNormal = normal;`,Od=`#ifdef USE_NORMALMAP_OBJECTSPACE - normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; - #ifdef FLIP_SIDED - normal = - normal; - #endif - #ifdef DOUBLE_SIDED - normal = normal * faceDirection; - #endif - normal = normalize( normalMatrix * normal ); -#elif defined( USE_NORMALMAP_TANGENTSPACE ) - vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; - mapN.xy *= normalScale; - normal = normalize( tbn * mapN ); -#elif defined( USE_BUMPMAP ) - normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); -#endif`,Fd=`#ifndef FLAT_SHADED - varying vec3 vNormal; - #ifdef USE_TANGENT - varying vec3 vTangent; - varying vec3 vBitangent; - #endif -#endif`,Bd=`#ifndef FLAT_SHADED - varying vec3 vNormal; - #ifdef USE_TANGENT - varying vec3 vTangent; - varying vec3 vBitangent; - #endif -#endif`,zd=`#ifndef FLAT_SHADED - vNormal = normalize( transformedNormal ); - #ifdef USE_TANGENT - vTangent = normalize( transformedTangent ); - vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); - #endif -#endif`,Hd=`#ifdef USE_NORMALMAP - uniform sampler2D normalMap; - uniform vec2 normalScale; -#endif -#ifdef USE_NORMALMAP_OBJECTSPACE - uniform mat3 normalMatrix; -#endif -#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) ) - mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) { - vec3 q0 = dFdx( eye_pos.xyz ); - vec3 q1 = dFdy( eye_pos.xyz ); - vec2 st0 = dFdx( uv.st ); - vec2 st1 = dFdy( uv.st ); - vec3 N = surf_norm; - vec3 q1perp = cross( q1, N ); - vec3 q0perp = cross( N, q0 ); - vec3 T = q1perp * st0.x + q0perp * st1.x; - vec3 B = q1perp * st0.y + q0perp * st1.y; - float det = max( dot( T, T ), dot( B, B ) ); - float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); - return mat3( T * scale, B * scale, N ); - } -#endif`,kd=`#ifdef USE_CLEARCOAT - vec3 clearcoatNormal = geometryNormal; -#endif`,Gd=`#ifdef USE_CLEARCOAT_NORMALMAP - vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; - clearcoatMapN.xy *= clearcoatNormalScale; - clearcoatNormal = normalize( tbn2 * clearcoatMapN ); -#endif`,Vd=`#ifdef USE_CLEARCOATMAP - uniform sampler2D clearcoatMap; -#endif -#ifdef USE_CLEARCOAT_NORMALMAP - uniform sampler2D clearcoatNormalMap; - uniform vec2 clearcoatNormalScale; -#endif -#ifdef USE_CLEARCOAT_ROUGHNESSMAP - uniform sampler2D clearcoatRoughnessMap; -#endif`,Wd=`#ifdef USE_IRIDESCENCEMAP - uniform sampler2D iridescenceMap; -#endif -#ifdef USE_IRIDESCENCE_THICKNESSMAP - uniform sampler2D iridescenceThicknessMap; -#endif`,Xd=`#ifdef OPAQUE -diffuseColor.a = 1.0; -#endif -#ifdef USE_TRANSMISSION -diffuseColor.a *= material.transmissionAlpha; -#endif -gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,jd=`vec3 packNormalToRGB( const in vec3 normal ) { - return normalize( normal ) * 0.5 + 0.5; -} -vec3 unpackRGBToNormal( const in vec3 rgb ) { - return 2.0 * rgb.xyz - 1.0; -} -const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.; -const vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. ); -const vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. ); -const float ShiftRight8 = 1. / 256.; -vec4 packDepthToRGBA( const in float v ) { - vec4 r = vec4( fract( v * PackFactors ), v ); - r.yzw -= r.xyz * ShiftRight8; return r * PackUpscale; -} -float unpackRGBAToDepth( const in vec4 v ) { - return dot( v, UnpackFactors ); -} -vec2 packDepthToRG( in highp float v ) { - return packDepthToRGBA( v ).yx; -} -float unpackRGToDepth( const in highp vec2 v ) { - return unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) ); -} -vec4 pack2HalfToRGBA( vec2 v ) { - vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) ); - return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w ); -} -vec2 unpackRGBATo2Half( vec4 v ) { - return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); -} -float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { - return ( viewZ + near ) / ( near - far ); -} -float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) { - return depth * ( near - far ) - near; -} -float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { - return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ ); -} -float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { - return ( near * far ) / ( ( far - near ) * depth - far ); -}`,qd=`#ifdef PREMULTIPLIED_ALPHA - gl_FragColor.rgb *= gl_FragColor.a; -#endif`,Yd=`vec4 mvPosition = vec4( transformed, 1.0 ); -#ifdef USE_INSTANCING - mvPosition = instanceMatrix * mvPosition; -#endif -mvPosition = modelViewMatrix * mvPosition; -gl_Position = projectionMatrix * mvPosition;`,Kd=`#ifdef DITHERING - gl_FragColor.rgb = dithering( gl_FragColor.rgb ); -#endif`,Zd=`#ifdef DITHERING - vec3 dithering( vec3 color ) { - float grid_position = rand( gl_FragCoord.xy ); - vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); - dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); - return color + dither_shift_RGB; - } -#endif`,$d=`float roughnessFactor = roughness; -#ifdef USE_ROUGHNESSMAP - vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); - roughnessFactor *= texelRoughness.g; -#endif`,Jd=`#ifdef USE_ROUGHNESSMAP - uniform sampler2D roughnessMap; -#endif`,Qd=`#if NUM_SPOT_LIGHT_COORDS > 0 - varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; -#endif -#if NUM_SPOT_LIGHT_MAPS > 0 - uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ]; -#endif -#ifdef USE_SHADOWMAP - #if NUM_DIR_LIGHT_SHADOWS > 0 - uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; - varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; - struct DirectionalLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - }; - uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; - #endif - #if NUM_SPOT_LIGHT_SHADOWS > 0 - uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; - struct SpotLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - }; - uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 - uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; - varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; - struct PointLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - float shadowCameraNear; - float shadowCameraFar; - }; - uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; - #endif - float texture2DCompare( sampler2D depths, vec2 uv, float compare ) { - return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) ); - } - vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) { - return unpackRGBATo2Half( texture2D( shadow, uv ) ); - } - float VSMShadow (sampler2D shadow, vec2 uv, float compare ){ - float occlusion = 1.0; - vec2 distribution = texture2DDistribution( shadow, uv ); - float hard_shadow = step( compare , distribution.x ); - if (hard_shadow != 1.0 ) { - float distance = compare - distribution.x ; - float variance = max( 0.00000, distribution.y * distribution.y ); - float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 ); - } - return occlusion; - } - float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) { - float shadow = 1.0; - shadowCoord.xyz /= shadowCoord.w; - shadowCoord.z += shadowBias; - bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; - bool frustumTest = inFrustum && shadowCoord.z <= 1.0; - if ( frustumTest ) { - #if defined( SHADOWMAP_TYPE_PCF ) - vec2 texelSize = vec2( 1.0 ) / shadowMapSize; - float dx0 = - texelSize.x * shadowRadius; - float dy0 = - texelSize.y * shadowRadius; - float dx1 = + texelSize.x * shadowRadius; - float dy1 = + texelSize.y * shadowRadius; - float dx2 = dx0 / 2.0; - float dy2 = dy0 / 2.0; - float dx3 = dx1 / 2.0; - float dy3 = dy1 / 2.0; - shadow = ( - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z ) - ) * ( 1.0 / 17.0 ); - #elif defined( SHADOWMAP_TYPE_PCF_SOFT ) - vec2 texelSize = vec2( 1.0 ) / shadowMapSize; - float dx = texelSize.x; - float dy = texelSize.y; - vec2 uv = shadowCoord.xy; - vec2 f = fract( uv * shadowMapSize + 0.5 ); - uv -= f * texelSize; - shadow = ( - texture2DCompare( shadowMap, uv, shadowCoord.z ) + - texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) + - texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) + - mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ), - f.x ) + - mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ), - f.x ) + - mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ), - f.y ) + - mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ), - f.y ) + - mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ), - f.x ), - mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ), - f.x ), - f.y ) - ) * ( 1.0 / 9.0 ); - #elif defined( SHADOWMAP_TYPE_VSM ) - shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z ); - #else - shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ); - #endif - } - return shadow; - } - vec2 cubeToUV( vec3 v, float texelSizeY ) { - vec3 absV = abs( v ); - float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) ); - absV *= scaleToCube; - v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY ); - vec2 planar = v.xy; - float almostATexel = 1.5 * texelSizeY; - float almostOne = 1.0 - almostATexel; - if ( absV.z >= almostOne ) { - if ( v.z > 0.0 ) - planar.x = 4.0 - v.x; - } else if ( absV.x >= almostOne ) { - float signX = sign( v.x ); - planar.x = v.z * signX + 2.0 * signX; - } else if ( absV.y >= almostOne ) { - float signY = sign( v.y ); - planar.x = v.x + 2.0 * signY + 2.0; - planar.y = v.z * signY - 2.0; - } - return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 ); - } - float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { - vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) ); - vec3 lightToPosition = shadowCoord.xyz; - float dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias; - vec3 bd3D = normalize( lightToPosition ); - #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM ) - vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y; - return ( - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp ) - ) * ( 1.0 / 9.0 ); - #else - return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); - #endif - } -#endif`,ef=`#if NUM_SPOT_LIGHT_COORDS > 0 - uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; - varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; -#endif -#ifdef USE_SHADOWMAP - #if NUM_DIR_LIGHT_SHADOWS > 0 - uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; - varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; - struct DirectionalLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - }; - uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; - #endif - #if NUM_SPOT_LIGHT_SHADOWS > 0 - struct SpotLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - }; - uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 - uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; - varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; - struct PointLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - float shadowCameraNear; - float shadowCameraFar; - }; - uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; - #endif -#endif`,tf=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) - vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); - vec4 shadowWorldPosition; -#endif -#if defined( USE_SHADOWMAP ) - #if NUM_DIR_LIGHT_SHADOWS > 0 - #pragma unroll_loop_start - for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { - shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 ); - vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition; - } - #pragma unroll_loop_end - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 - #pragma unroll_loop_start - for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { - shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 ); - vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition; - } - #pragma unroll_loop_end - #endif -#endif -#if NUM_SPOT_LIGHT_COORDS > 0 - #pragma unroll_loop_start - for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) { - shadowWorldPosition = worldPosition; - #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) - shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias; - #endif - vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; - } - #pragma unroll_loop_end -#endif`,nf=`float getShadowMask() { - float shadow = 1.0; - #ifdef USE_SHADOWMAP - #if NUM_DIR_LIGHT_SHADOWS > 0 - DirectionalLightShadow directionalLight; - #pragma unroll_loop_start - for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { - directionalLight = directionalLightShadows[ i ]; - shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; - } - #pragma unroll_loop_end - #endif - #if NUM_SPOT_LIGHT_SHADOWS > 0 - SpotLightShadow spotLight; - #pragma unroll_loop_start - for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { - spotLight = spotLightShadows[ i ]; - shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; - } - #pragma unroll_loop_end - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 - PointLightShadow pointLight; - #pragma unroll_loop_start - for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { - pointLight = pointLightShadows[ i ]; - shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; - } - #pragma unroll_loop_end - #endif - #endif - return shadow; -}`,sf=`#ifdef USE_SKINNING - mat4 boneMatX = getBoneMatrix( skinIndex.x ); - mat4 boneMatY = getBoneMatrix( skinIndex.y ); - mat4 boneMatZ = getBoneMatrix( skinIndex.z ); - mat4 boneMatW = getBoneMatrix( skinIndex.w ); -#endif`,rf=`#ifdef USE_SKINNING - uniform mat4 bindMatrix; - uniform mat4 bindMatrixInverse; - uniform highp sampler2D boneTexture; - uniform int boneTextureSize; - mat4 getBoneMatrix( const in float i ) { - float j = i * 4.0; - float x = mod( j, float( boneTextureSize ) ); - float y = floor( j / float( boneTextureSize ) ); - float dx = 1.0 / float( boneTextureSize ); - float dy = 1.0 / float( boneTextureSize ); - y = dy * ( y + 0.5 ); - vec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) ); - vec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) ); - vec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) ); - vec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) ); - mat4 bone = mat4( v1, v2, v3, v4 ); - return bone; - } -#endif`,af=`#ifdef USE_SKINNING - vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); - vec4 skinned = vec4( 0.0 ); - skinned += boneMatX * skinVertex * skinWeight.x; - skinned += boneMatY * skinVertex * skinWeight.y; - skinned += boneMatZ * skinVertex * skinWeight.z; - skinned += boneMatW * skinVertex * skinWeight.w; - transformed = ( bindMatrixInverse * skinned ).xyz; -#endif`,of=`#ifdef USE_SKINNING - mat4 skinMatrix = mat4( 0.0 ); - skinMatrix += skinWeight.x * boneMatX; - skinMatrix += skinWeight.y * boneMatY; - skinMatrix += skinWeight.z * boneMatZ; - skinMatrix += skinWeight.w * boneMatW; - skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; - objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; - #ifdef USE_TANGENT - objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; - #endif -#endif`,lf=`float specularStrength; -#ifdef USE_SPECULARMAP - vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); - specularStrength = texelSpecular.r; -#else - specularStrength = 1.0; -#endif`,cf=`#ifdef USE_SPECULARMAP - uniform sampler2D specularMap; -#endif`,hf=`#if defined( TONE_MAPPING ) - gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); -#endif`,uf=`#ifndef saturate -#define saturate( a ) clamp( a, 0.0, 1.0 ) -#endif -uniform float toneMappingExposure; -vec3 LinearToneMapping( vec3 color ) { - return saturate( toneMappingExposure * color ); -} -vec3 ReinhardToneMapping( vec3 color ) { - color *= toneMappingExposure; - return saturate( color / ( vec3( 1.0 ) + color ) ); -} -vec3 OptimizedCineonToneMapping( vec3 color ) { - color *= toneMappingExposure; - color = max( vec3( 0.0 ), color - 0.004 ); - return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); -} -vec3 RRTAndODTFit( vec3 v ) { - vec3 a = v * ( v + 0.0245786 ) - 0.000090537; - vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; - return a / b; -} -vec3 ACESFilmicToneMapping( vec3 color ) { - const mat3 ACESInputMat = mat3( - vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ), - vec3( 0.04823, 0.01566, 0.83777 ) - ); - const mat3 ACESOutputMat = mat3( - vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ), - vec3( -0.07367, -0.00605, 1.07602 ) - ); - color *= toneMappingExposure / 0.6; - color = ACESInputMat * color; - color = RRTAndODTFit( color ); - color = ACESOutputMat * color; - return saturate( color ); -} -vec3 CustomToneMapping( vec3 color ) { return color; }`,df=`#ifdef USE_TRANSMISSION - material.transmission = transmission; - material.transmissionAlpha = 1.0; - material.thickness = thickness; - material.attenuationDistance = attenuationDistance; - material.attenuationColor = attenuationColor; - #ifdef USE_TRANSMISSIONMAP - material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r; - #endif - #ifdef USE_THICKNESSMAP - material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g; - #endif - vec3 pos = vWorldPosition; - vec3 v = normalize( cameraPosition - pos ); - vec3 n = inverseTransformDirection( normal, viewMatrix ); - vec4 transmitted = getIBLVolumeRefraction( - n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90, - pos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness, - material.attenuationColor, material.attenuationDistance ); - material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); - totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); -#endif`,ff=`#ifdef USE_TRANSMISSION - uniform float transmission; - uniform float thickness; - uniform float attenuationDistance; - uniform vec3 attenuationColor; - #ifdef USE_TRANSMISSIONMAP - uniform sampler2D transmissionMap; - #endif - #ifdef USE_THICKNESSMAP - uniform sampler2D thicknessMap; - #endif - uniform vec2 transmissionSamplerSize; - uniform sampler2D transmissionSamplerMap; - uniform mat4 modelMatrix; - uniform mat4 projectionMatrix; - varying vec3 vWorldPosition; - float w0( float a ) { - return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 ); - } - float w1( float a ) { - return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 ); - } - float w2( float a ){ - return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 ); - } - float w3( float a ) { - return ( 1.0 / 6.0 ) * ( a * a * a ); - } - float g0( float a ) { - return w0( a ) + w1( a ); - } - float g1( float a ) { - return w2( a ) + w3( a ); - } - float h0( float a ) { - return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) ); - } - float h1( float a ) { - return 1.0 + w3( a ) / ( w2( a ) + w3( a ) ); - } - vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) { - uv = uv * texelSize.zw + 0.5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - float g0x = g0( fuv.x ); - float g1x = g1( fuv.x ); - float h0x = h0( fuv.x ); - float h1x = h1( fuv.x ); - float h0y = h0( fuv.y ); - float h1y = h1( fuv.y ); - vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; - vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; - vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; - vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; - return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) + - g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) ); - } - vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) { - vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) ); - vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) ); - vec2 fLodSizeInv = 1.0 / fLodSize; - vec2 cLodSizeInv = 1.0 / cLodSize; - vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) ); - vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) ); - return mix( fSample, cSample, fract( lod ) ); - } - vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) { - vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior ); - vec3 modelScale; - modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) ); - modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) ); - modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) ); - return normalize( refractionVector ) * thickness * modelScale; - } - float applyIorToRoughness( const in float roughness, const in float ior ) { - return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 ); - } - vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) { - float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior ); - return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod ); - } - vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) { - if ( isinf( attenuationDistance ) ) { - return vec3( 1.0 ); - } else { - vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance; - vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance; - } - } - vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor, - const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix, - const in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness, - const in vec3 attenuationColor, const in float attenuationDistance ) { - vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix ); - vec3 refractedRayExit = position + transmissionRay; - vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); - vec2 refractionCoords = ndcPos.xy / ndcPos.w; - refractionCoords += 1.0; - refractionCoords /= 2.0; - vec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior ); - vec3 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance ); - vec3 attenuatedColor = transmittance * transmittedLight.rgb; - vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); - float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; - return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); - } -#endif`,pf=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) - varying vec2 vUv; -#endif -#ifdef USE_MAP - varying vec2 vMapUv; -#endif -#ifdef USE_ALPHAMAP - varying vec2 vAlphaMapUv; -#endif -#ifdef USE_LIGHTMAP - varying vec2 vLightMapUv; -#endif -#ifdef USE_AOMAP - varying vec2 vAoMapUv; -#endif -#ifdef USE_BUMPMAP - varying vec2 vBumpMapUv; -#endif -#ifdef USE_NORMALMAP - varying vec2 vNormalMapUv; -#endif -#ifdef USE_EMISSIVEMAP - varying vec2 vEmissiveMapUv; -#endif -#ifdef USE_METALNESSMAP - varying vec2 vMetalnessMapUv; -#endif -#ifdef USE_ROUGHNESSMAP - varying vec2 vRoughnessMapUv; -#endif -#ifdef USE_ANISOTROPYMAP - varying vec2 vAnisotropyMapUv; -#endif -#ifdef USE_CLEARCOATMAP - varying vec2 vClearcoatMapUv; -#endif -#ifdef USE_CLEARCOAT_NORMALMAP - varying vec2 vClearcoatNormalMapUv; -#endif -#ifdef USE_CLEARCOAT_ROUGHNESSMAP - varying vec2 vClearcoatRoughnessMapUv; -#endif -#ifdef USE_IRIDESCENCEMAP - varying vec2 vIridescenceMapUv; -#endif -#ifdef USE_IRIDESCENCE_THICKNESSMAP - varying vec2 vIridescenceThicknessMapUv; -#endif -#ifdef USE_SHEEN_COLORMAP - varying vec2 vSheenColorMapUv; -#endif -#ifdef USE_SHEEN_ROUGHNESSMAP - varying vec2 vSheenRoughnessMapUv; -#endif -#ifdef USE_SPECULARMAP - varying vec2 vSpecularMapUv; -#endif -#ifdef USE_SPECULAR_COLORMAP - varying vec2 vSpecularColorMapUv; -#endif -#ifdef USE_SPECULAR_INTENSITYMAP - varying vec2 vSpecularIntensityMapUv; -#endif -#ifdef USE_TRANSMISSIONMAP - uniform mat3 transmissionMapTransform; - varying vec2 vTransmissionMapUv; -#endif -#ifdef USE_THICKNESSMAP - uniform mat3 thicknessMapTransform; - varying vec2 vThicknessMapUv; -#endif`,mf=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) - varying vec2 vUv; -#endif -#ifdef USE_MAP - uniform mat3 mapTransform; - varying vec2 vMapUv; -#endif -#ifdef USE_ALPHAMAP - uniform mat3 alphaMapTransform; - varying vec2 vAlphaMapUv; -#endif -#ifdef USE_LIGHTMAP - uniform mat3 lightMapTransform; - varying vec2 vLightMapUv; -#endif -#ifdef USE_AOMAP - uniform mat3 aoMapTransform; - varying vec2 vAoMapUv; -#endif -#ifdef USE_BUMPMAP - uniform mat3 bumpMapTransform; - varying vec2 vBumpMapUv; -#endif -#ifdef USE_NORMALMAP - uniform mat3 normalMapTransform; - varying vec2 vNormalMapUv; -#endif -#ifdef USE_DISPLACEMENTMAP - uniform mat3 displacementMapTransform; - varying vec2 vDisplacementMapUv; -#endif -#ifdef USE_EMISSIVEMAP - uniform mat3 emissiveMapTransform; - varying vec2 vEmissiveMapUv; -#endif -#ifdef USE_METALNESSMAP - uniform mat3 metalnessMapTransform; - varying vec2 vMetalnessMapUv; -#endif -#ifdef USE_ROUGHNESSMAP - uniform mat3 roughnessMapTransform; - varying vec2 vRoughnessMapUv; -#endif -#ifdef USE_ANISOTROPYMAP - uniform mat3 anisotropyMapTransform; - varying vec2 vAnisotropyMapUv; -#endif -#ifdef USE_CLEARCOATMAP - uniform mat3 clearcoatMapTransform; - varying vec2 vClearcoatMapUv; -#endif -#ifdef USE_CLEARCOAT_NORMALMAP - uniform mat3 clearcoatNormalMapTransform; - varying vec2 vClearcoatNormalMapUv; -#endif -#ifdef USE_CLEARCOAT_ROUGHNESSMAP - uniform mat3 clearcoatRoughnessMapTransform; - varying vec2 vClearcoatRoughnessMapUv; -#endif -#ifdef USE_SHEEN_COLORMAP - uniform mat3 sheenColorMapTransform; - varying vec2 vSheenColorMapUv; -#endif -#ifdef USE_SHEEN_ROUGHNESSMAP - uniform mat3 sheenRoughnessMapTransform; - varying vec2 vSheenRoughnessMapUv; -#endif -#ifdef USE_IRIDESCENCEMAP - uniform mat3 iridescenceMapTransform; - varying vec2 vIridescenceMapUv; -#endif -#ifdef USE_IRIDESCENCE_THICKNESSMAP - uniform mat3 iridescenceThicknessMapTransform; - varying vec2 vIridescenceThicknessMapUv; -#endif -#ifdef USE_SPECULARMAP - uniform mat3 specularMapTransform; - varying vec2 vSpecularMapUv; -#endif -#ifdef USE_SPECULAR_COLORMAP - uniform mat3 specularColorMapTransform; - varying vec2 vSpecularColorMapUv; -#endif -#ifdef USE_SPECULAR_INTENSITYMAP - uniform mat3 specularIntensityMapTransform; - varying vec2 vSpecularIntensityMapUv; -#endif -#ifdef USE_TRANSMISSIONMAP - uniform mat3 transmissionMapTransform; - varying vec2 vTransmissionMapUv; -#endif -#ifdef USE_THICKNESSMAP - uniform mat3 thicknessMapTransform; - varying vec2 vThicknessMapUv; -#endif`,gf=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) - vUv = vec3( uv, 1 ).xy; -#endif -#ifdef USE_MAP - vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy; -#endif -#ifdef USE_ALPHAMAP - vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_LIGHTMAP - vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_AOMAP - vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_BUMPMAP - vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_NORMALMAP - vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_DISPLACEMENTMAP - vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_EMISSIVEMAP - vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_METALNESSMAP - vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_ROUGHNESSMAP - vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_ANISOTROPYMAP - vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_CLEARCOATMAP - vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_CLEARCOAT_NORMALMAP - vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_CLEARCOAT_ROUGHNESSMAP - vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_IRIDESCENCEMAP - vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_IRIDESCENCE_THICKNESSMAP - vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_SHEEN_COLORMAP - vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_SHEEN_ROUGHNESSMAP - vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_SPECULARMAP - vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_SPECULAR_COLORMAP - vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_SPECULAR_INTENSITYMAP - vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_TRANSMISSIONMAP - vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_THICKNESSMAP - vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; -#endif`,_f=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 - vec4 worldPosition = vec4( transformed, 1.0 ); - #ifdef USE_INSTANCING - worldPosition = instanceMatrix * worldPosition; - #endif - worldPosition = modelMatrix * worldPosition; -#endif`;const xf=`varying vec2 vUv; -uniform mat3 uvTransform; -void main() { - vUv = ( uvTransform * vec3( uv, 1 ) ).xy; - gl_Position = vec4( position.xy, 1.0, 1.0 ); -}`,vf=`uniform sampler2D t2D; -uniform float backgroundIntensity; -varying vec2 vUv; -void main() { - vec4 texColor = texture2D( t2D, vUv ); - #ifdef DECODE_VIDEO_TEXTURE - texColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w ); - #endif - texColor.rgb *= backgroundIntensity; - gl_FragColor = texColor; - #include - #include -}`,Mf=`varying vec3 vWorldDirection; -#include -void main() { - vWorldDirection = transformDirection( position, modelMatrix ); - #include - #include - gl_Position.z = gl_Position.w; -}`,Sf=`#ifdef ENVMAP_TYPE_CUBE - uniform samplerCube envMap; -#elif defined( ENVMAP_TYPE_CUBE_UV ) - uniform sampler2D envMap; -#endif -uniform float flipEnvMap; -uniform float backgroundBlurriness; -uniform float backgroundIntensity; -varying vec3 vWorldDirection; -#include -void main() { - #ifdef ENVMAP_TYPE_CUBE - vec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) ); - #elif defined( ENVMAP_TYPE_CUBE_UV ) - vec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness ); - #else - vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 ); - #endif - texColor.rgb *= backgroundIntensity; - gl_FragColor = texColor; - #include - #include -}`,yf=`varying vec3 vWorldDirection; -#include -void main() { - vWorldDirection = transformDirection( position, modelMatrix ); - #include - #include - gl_Position.z = gl_Position.w; -}`,Ef=`uniform samplerCube tCube; -uniform float tFlip; -uniform float opacity; -varying vec3 vWorldDirection; -void main() { - vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) ); - gl_FragColor = texColor; - gl_FragColor.a *= opacity; - #include - #include -}`,Tf=`#include -#include -#include -#include -#include -#include -#include -varying vec2 vHighPrecisionZW; -void main() { - #include - #include - #ifdef USE_DISPLACEMENTMAP - #include - #include - #include - #endif - #include - #include - #include - #include - #include - #include - #include - vHighPrecisionZW = gl_Position.zw; -}`,bf=`#if DEPTH_PACKING == 3200 - uniform float opacity; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -varying vec2 vHighPrecisionZW; -void main() { - #include - vec4 diffuseColor = vec4( 1.0 ); - #if DEPTH_PACKING == 3200 - diffuseColor.a = opacity; - #endif - #include - #include - #include - #include - #include - float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5; - #if DEPTH_PACKING == 3200 - gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); - #elif DEPTH_PACKING == 3201 - gl_FragColor = packDepthToRGBA( fragCoordZ ); - #endif -}`,Af=`#define DISTANCE -varying vec3 vWorldPosition; -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #ifdef USE_DISPLACEMENTMAP - #include - #include - #include - #endif - #include - #include - #include - #include - #include - #include - #include - vWorldPosition = worldPosition.xyz; -}`,wf=`#define DISTANCE -uniform vec3 referencePosition; -uniform float nearDistance; -uniform float farDistance; -varying vec3 vWorldPosition; -#include -#include -#include -#include -#include -#include -#include -#include -void main () { - #include - vec4 diffuseColor = vec4( 1.0 ); - #include - #include - #include - #include - float dist = length( vWorldPosition - referencePosition ); - dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); - dist = saturate( dist ); - gl_FragColor = packDepthToRGBA( dist ); -}`,Rf=`varying vec3 vWorldDirection; -#include -void main() { - vWorldDirection = transformDirection( position, modelMatrix ); - #include - #include -}`,Cf=`uniform sampler2D tEquirect; -varying vec3 vWorldDirection; -#include -void main() { - vec3 direction = normalize( vWorldDirection ); - vec2 sampleUV = equirectUv( direction ); - gl_FragColor = texture2D( tEquirect, sampleUV ); - #include - #include -}`,Lf=`uniform float scale; -attribute float lineDistance; -varying float vLineDistance; -#include -#include -#include -#include -#include -#include -#include -void main() { - vLineDistance = scale * lineDistance; - #include - #include - #include - #include - #include - #include - #include - #include - #include -}`,Pf=`uniform vec3 diffuse; -uniform float opacity; -uniform float dashSize; -uniform float totalSize; -varying float vLineDistance; -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - if ( mod( vLineDistance, totalSize ) > dashSize ) { - discard; - } - vec3 outgoingLight = vec3( 0.0 ); - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - #include - outgoingLight = diffuseColor.rgb; - #include - #include - #include - #include - #include -}`,If=`#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) - #include - #include - #include - #include - #include - #endif - #include - #include - #include - #include - #include - #include - #include - #include - #include -}`,Df=`uniform vec3 diffuse; -uniform float opacity; -#ifndef FLAT_SHADED - varying vec3 vNormal; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - #include - #include - #include - #include - #include - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - #ifdef USE_LIGHTMAP - vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); - reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI; - #else - reflectedLight.indirectDiffuse += vec3( 1.0 ); - #endif - #include - reflectedLight.indirectDiffuse *= diffuseColor.rgb; - vec3 outgoingLight = reflectedLight.indirectDiffuse; - #include - #include - #include - #include - #include - #include - #include -}`,Uf=`#define LAMBERT -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; - #include - #include - #include - #include -}`,Nf=`#define LAMBERT -uniform vec3 diffuse; -uniform vec3 emissive; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - vec3 totalEmissiveRadiance = emissive; - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; - #include - #include - #include - #include - #include - #include - #include -}`,Of=`#define MATCAP -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; -}`,Ff=`#define MATCAP -uniform vec3 diffuse; -uniform float opacity; -uniform sampler2D matcap; -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - #include - #include - #include - #include - #include - #include - vec3 viewDir = normalize( vViewPosition ); - vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); - vec3 y = cross( viewDir, x ); - vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; - #ifdef USE_MATCAP - vec4 matcapColor = texture2D( matcap, uv ); - #else - vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 ); - #endif - vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; - #include - #include - #include - #include - #include - #include -}`,Bf=`#define NORMAL -#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) - varying vec3 vViewPosition; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include -#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) - vViewPosition = - mvPosition.xyz; -#endif -}`,zf=`#define NORMAL -uniform float opacity; -#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) - varying vec3 vViewPosition; -#endif -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - gl_FragColor = vec4( packNormalToRGB( normal ), opacity ); - #ifdef OPAQUE - gl_FragColor.a = 1.0; - #endif -}`,Hf=`#define PHONG -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; - #include - #include - #include - #include -}`,kf=`#define PHONG -uniform vec3 diffuse; -uniform vec3 emissive; -uniform vec3 specular; -uniform float shininess; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - vec3 totalEmissiveRadiance = emissive; - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; - #include - #include - #include - #include - #include - #include - #include -}`,Gf=`#define STANDARD -varying vec3 vViewPosition; -#ifdef USE_TRANSMISSION - varying vec3 vWorldPosition; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; - #include - #include - #include -#ifdef USE_TRANSMISSION - vWorldPosition = worldPosition.xyz; -#endif -}`,Vf=`#define STANDARD -#ifdef PHYSICAL - #define IOR - #define USE_SPECULAR -#endif -uniform vec3 diffuse; -uniform vec3 emissive; -uniform float roughness; -uniform float metalness; -uniform float opacity; -#ifdef IOR - uniform float ior; -#endif -#ifdef USE_SPECULAR - uniform float specularIntensity; - uniform vec3 specularColor; - #ifdef USE_SPECULAR_COLORMAP - uniform sampler2D specularColorMap; - #endif - #ifdef USE_SPECULAR_INTENSITYMAP - uniform sampler2D specularIntensityMap; - #endif -#endif -#ifdef USE_CLEARCOAT - uniform float clearcoat; - uniform float clearcoatRoughness; -#endif -#ifdef USE_IRIDESCENCE - uniform float iridescence; - uniform float iridescenceIOR; - uniform float iridescenceThicknessMinimum; - uniform float iridescenceThicknessMaximum; -#endif -#ifdef USE_SHEEN - uniform vec3 sheenColor; - uniform float sheenRoughness; - #ifdef USE_SHEEN_COLORMAP - uniform sampler2D sheenColorMap; - #endif - #ifdef USE_SHEEN_ROUGHNESSMAP - uniform sampler2D sheenRoughnessMap; - #endif -#endif -#ifdef USE_ANISOTROPY - uniform vec2 anisotropyVector; - #ifdef USE_ANISOTROPYMAP - uniform sampler2D anisotropyMap; - #endif -#endif -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - vec3 totalEmissiveRadiance = emissive; - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse; - vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular; - #include - vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance; - #ifdef USE_SHEEN - float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor ); - outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecular; - #endif - #ifdef USE_CLEARCOAT - float dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) ); - vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc ); - outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + clearcoatSpecular * material.clearcoat; - #endif - #include - #include - #include - #include - #include - #include -}`,Wf=`#define TOON -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; - #include - #include - #include -}`,Xf=`#define TOON -uniform vec3 diffuse; -uniform vec3 emissive; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - vec3 totalEmissiveRadiance = emissive; - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; - #include - #include - #include - #include - #include - #include -}`,jf=`uniform float size; -uniform float scale; -#include -#include -#include -#include -#include -#include -#ifdef USE_POINTS_UV - varying vec2 vUv; - uniform mat3 uvTransform; -#endif -void main() { - #ifdef USE_POINTS_UV - vUv = ( uvTransform * vec3( uv, 1 ) ).xy; - #endif - #include - #include - #include - #include - #include - gl_PointSize = size; - #ifdef USE_SIZEATTENUATION - bool isPerspective = isPerspectiveMatrix( projectionMatrix ); - if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); - #endif - #include - #include - #include - #include -}`,qf=`uniform vec3 diffuse; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec3 outgoingLight = vec3( 0.0 ); - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - #include - #include - #include - outgoingLight = diffuseColor.rgb; - #include - #include - #include - #include - #include -}`,Yf=`#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include -}`,Kf=`uniform vec3 color; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); - #include - #include - #include -}`,Zf=`uniform float rotation; -uniform vec2 center; -#include -#include -#include -#include -#include -void main() { - #include - vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); - vec2 scale; - scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) ); - scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) ); - #ifndef USE_SIZEATTENUATION - bool isPerspective = isPerspectiveMatrix( projectionMatrix ); - if ( isPerspective ) scale *= - mvPosition.z; - #endif - vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; - vec2 rotatedPosition; - rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; - rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; - mvPosition.xy += rotatedPosition; - gl_Position = projectionMatrix * mvPosition; - #include - #include - #include -}`,$f=`uniform vec3 diffuse; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec3 outgoingLight = vec3( 0.0 ); - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - #include - #include - #include - outgoingLight = diffuseColor.rgb; - #include - #include - #include - #include -}`,He={alphahash_fragment:Mu,alphahash_pars_fragment:Su,alphamap_fragment:yu,alphamap_pars_fragment:Eu,alphatest_fragment:Tu,alphatest_pars_fragment:bu,aomap_fragment:Au,aomap_pars_fragment:wu,begin_vertex:Ru,beginnormal_vertex:Cu,bsdfs:Lu,iridescence_fragment:Pu,bumpmap_pars_fragment:Iu,clipping_planes_fragment:Du,clipping_planes_pars_fragment:Uu,clipping_planes_pars_vertex:Nu,clipping_planes_vertex:Ou,color_fragment:Fu,color_pars_fragment:Bu,color_pars_vertex:zu,color_vertex:Hu,common:ku,cube_uv_reflection_fragment:Gu,defaultnormal_vertex:Vu,displacementmap_pars_vertex:Wu,displacementmap_vertex:Xu,emissivemap_fragment:ju,emissivemap_pars_fragment:qu,colorspace_fragment:Yu,colorspace_pars_fragment:Ku,envmap_fragment:Zu,envmap_common_pars_fragment:$u,envmap_pars_fragment:Ju,envmap_pars_vertex:Qu,envmap_physical_pars_fragment:ud,envmap_vertex:ed,fog_vertex:td,fog_pars_vertex:nd,fog_fragment:id,fog_pars_fragment:sd,gradientmap_pars_fragment:rd,lightmap_fragment:ad,lightmap_pars_fragment:od,lights_lambert_fragment:ld,lights_lambert_pars_fragment:cd,lights_pars_begin:hd,lights_toon_fragment:dd,lights_toon_pars_fragment:fd,lights_phong_fragment:pd,lights_phong_pars_fragment:md,lights_physical_fragment:gd,lights_physical_pars_fragment:_d,lights_fragment_begin:xd,lights_fragment_maps:vd,lights_fragment_end:Md,logdepthbuf_fragment:Sd,logdepthbuf_pars_fragment:yd,logdepthbuf_pars_vertex:Ed,logdepthbuf_vertex:Td,map_fragment:bd,map_pars_fragment:Ad,map_particle_fragment:wd,map_particle_pars_fragment:Rd,metalnessmap_fragment:Cd,metalnessmap_pars_fragment:Ld,morphcolor_vertex:Pd,morphnormal_vertex:Id,morphtarget_pars_vertex:Dd,morphtarget_vertex:Ud,normal_fragment_begin:Nd,normal_fragment_maps:Od,normal_pars_fragment:Fd,normal_pars_vertex:Bd,normal_vertex:zd,normalmap_pars_fragment:Hd,clearcoat_normal_fragment_begin:kd,clearcoat_normal_fragment_maps:Gd,clearcoat_pars_fragment:Vd,iridescence_pars_fragment:Wd,opaque_fragment:Xd,packing:jd,premultiplied_alpha_fragment:qd,project_vertex:Yd,dithering_fragment:Kd,dithering_pars_fragment:Zd,roughnessmap_fragment:$d,roughnessmap_pars_fragment:Jd,shadowmap_pars_fragment:Qd,shadowmap_pars_vertex:ef,shadowmap_vertex:tf,shadowmask_pars_fragment:nf,skinbase_vertex:sf,skinning_pars_vertex:rf,skinning_vertex:af,skinnormal_vertex:of,specularmap_fragment:lf,specularmap_pars_fragment:cf,tonemapping_fragment:hf,tonemapping_pars_fragment:uf,transmission_fragment:df,transmission_pars_fragment:ff,uv_pars_fragment:pf,uv_pars_vertex:mf,uv_vertex:gf,worldpos_vertex:_f,background_vert:xf,background_frag:vf,backgroundCube_vert:Mf,backgroundCube_frag:Sf,cube_vert:yf,cube_frag:Ef,depth_vert:Tf,depth_frag:bf,distanceRGBA_vert:Af,distanceRGBA_frag:wf,equirect_vert:Rf,equirect_frag:Cf,linedashed_vert:Lf,linedashed_frag:Pf,meshbasic_vert:If,meshbasic_frag:Df,meshlambert_vert:Uf,meshlambert_frag:Nf,meshmatcap_vert:Of,meshmatcap_frag:Ff,meshnormal_vert:Bf,meshnormal_frag:zf,meshphong_vert:Hf,meshphong_frag:kf,meshphysical_vert:Gf,meshphysical_frag:Vf,meshtoon_vert:Wf,meshtoon_frag:Xf,points_vert:jf,points_frag:qf,shadow_vert:Yf,shadow_frag:Kf,sprite_vert:Zf,sprite_frag:$f},pe={common:{diffuse:{value:new Pe(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new ke},alphaMap:{value:null},alphaMapTransform:{value:new ke},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new ke}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new ke}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new ke}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new ke},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new ke},normalScale:{value:new Ce(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new ke},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new ke}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new ke}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new ke}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Pe(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Pe(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new ke},alphaTest:{value:0},uvTransform:{value:new ke}},sprite:{diffuse:{value:new Pe(16777215)},opacity:{value:1},center:{value:new Ce(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new ke},alphaMap:{value:null},alphaMapTransform:{value:new ke},alphaTest:{value:0}}},Yt={basic:{uniforms:St([pe.common,pe.specularmap,pe.envmap,pe.aomap,pe.lightmap,pe.fog]),vertexShader:He.meshbasic_vert,fragmentShader:He.meshbasic_frag},lambert:{uniforms:St([pe.common,pe.specularmap,pe.envmap,pe.aomap,pe.lightmap,pe.emissivemap,pe.bumpmap,pe.normalmap,pe.displacementmap,pe.fog,pe.lights,{emissive:{value:new Pe(0)}}]),vertexShader:He.meshlambert_vert,fragmentShader:He.meshlambert_frag},phong:{uniforms:St([pe.common,pe.specularmap,pe.envmap,pe.aomap,pe.lightmap,pe.emissivemap,pe.bumpmap,pe.normalmap,pe.displacementmap,pe.fog,pe.lights,{emissive:{value:new Pe(0)},specular:{value:new Pe(1118481)},shininess:{value:30}}]),vertexShader:He.meshphong_vert,fragmentShader:He.meshphong_frag},standard:{uniforms:St([pe.common,pe.envmap,pe.aomap,pe.lightmap,pe.emissivemap,pe.bumpmap,pe.normalmap,pe.displacementmap,pe.roughnessmap,pe.metalnessmap,pe.fog,pe.lights,{emissive:{value:new Pe(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:He.meshphysical_vert,fragmentShader:He.meshphysical_frag},toon:{uniforms:St([pe.common,pe.aomap,pe.lightmap,pe.emissivemap,pe.bumpmap,pe.normalmap,pe.displacementmap,pe.gradientmap,pe.fog,pe.lights,{emissive:{value:new Pe(0)}}]),vertexShader:He.meshtoon_vert,fragmentShader:He.meshtoon_frag},matcap:{uniforms:St([pe.common,pe.bumpmap,pe.normalmap,pe.displacementmap,pe.fog,{matcap:{value:null}}]),vertexShader:He.meshmatcap_vert,fragmentShader:He.meshmatcap_frag},points:{uniforms:St([pe.points,pe.fog]),vertexShader:He.points_vert,fragmentShader:He.points_frag},dashed:{uniforms:St([pe.common,pe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:He.linedashed_vert,fragmentShader:He.linedashed_frag},depth:{uniforms:St([pe.common,pe.displacementmap]),vertexShader:He.depth_vert,fragmentShader:He.depth_frag},normal:{uniforms:St([pe.common,pe.bumpmap,pe.normalmap,pe.displacementmap,{opacity:{value:1}}]),vertexShader:He.meshnormal_vert,fragmentShader:He.meshnormal_frag},sprite:{uniforms:St([pe.sprite,pe.fog]),vertexShader:He.sprite_vert,fragmentShader:He.sprite_frag},background:{uniforms:{uvTransform:{value:new ke},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:He.background_vert,fragmentShader:He.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:He.backgroundCube_vert,fragmentShader:He.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:He.cube_vert,fragmentShader:He.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:He.equirect_vert,fragmentShader:He.equirect_frag},distanceRGBA:{uniforms:St([pe.common,pe.displacementmap,{referencePosition:{value:new L},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:He.distanceRGBA_vert,fragmentShader:He.distanceRGBA_frag},shadow:{uniforms:St([pe.lights,pe.fog,{color:{value:new Pe(0)},opacity:{value:1}}]),vertexShader:He.shadow_vert,fragmentShader:He.shadow_frag}};Yt.physical={uniforms:St([Yt.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new ke},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new ke},clearcoatNormalScale:{value:new Ce(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new ke},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new ke},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new ke},sheen:{value:0},sheenColor:{value:new Pe(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new ke},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new ke},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new ke},transmissionSamplerSize:{value:new Ce},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new ke},attenuationDistance:{value:0},attenuationColor:{value:new Pe(0)},specularColor:{value:new Pe(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new ke},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new ke},anisotropyVector:{value:new Ce},anisotropyMap:{value:null},anisotropyMapTransform:{value:new ke}}]),vertexShader:He.meshphysical_vert,fragmentShader:He.meshphysical_frag};const Ss={r:0,b:0,g:0};function Jf(i,e,t,n,s,r,a){const o=new Pe(0);let l=r===!0?0:1,c,h,u=null,d=0,p=null;function g(m,f){let y=!1,v=f.isScene===!0?f.background:null;v&&v.isTexture&&(v=(f.backgroundBlurriness>0?t:e).get(v)),v===null?_(o,l):v&&v.isColor&&(_(v,1),y=!0);const T=i.xr.getEnvironmentBlendMode();T==="additive"?n.buffers.color.setClear(0,0,0,1,a):T==="alpha-blend"&&n.buffers.color.setClear(0,0,0,0,a),(i.autoClear||y)&&i.clear(i.autoClearColor,i.autoClearDepth,i.autoClearStencil),v&&(v.isCubeTexture||v.mapping===Os)?(h===void 0&&(h=new Pt(new Qi(1,1,1),new Vn({name:"BackgroundCubeMaterial",uniforms:Ti(Yt.backgroundCube.uniforms),vertexShader:Yt.backgroundCube.vertexShader,fragmentShader:Yt.backgroundCube.fragmentShader,side:bt,depthTest:!1,depthWrite:!1,fog:!1})),h.geometry.deleteAttribute("normal"),h.geometry.deleteAttribute("uv"),h.onBeforeRender=function(w,C,b){this.matrixWorld.copyPosition(b.matrixWorld)},Object.defineProperty(h.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),s.update(h)),h.material.uniforms.envMap.value=v,h.material.uniforms.flipEnvMap.value=v.isCubeTexture&&v.isRenderTargetTexture===!1?-1:1,h.material.uniforms.backgroundBlurriness.value=f.backgroundBlurriness,h.material.uniforms.backgroundIntensity.value=f.backgroundIntensity,h.material.toneMapped=v.colorSpace!==Ye,(u!==v||d!==v.version||p!==i.toneMapping)&&(h.material.needsUpdate=!0,u=v,d=v.version,p=i.toneMapping),h.layers.enableAll(),m.unshift(h,h.geometry,h.material,0,0,null)):v&&v.isTexture&&(c===void 0&&(c=new Pt(new Hs(2,2),new Vn({name:"BackgroundMaterial",uniforms:Ti(Yt.background.uniforms),vertexShader:Yt.background.vertexShader,fragmentShader:Yt.background.fragmentShader,side:dn,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),s.update(c)),c.material.uniforms.t2D.value=v,c.material.uniforms.backgroundIntensity.value=f.backgroundIntensity,c.material.toneMapped=v.colorSpace!==Ye,v.matrixAutoUpdate===!0&&v.updateMatrix(),c.material.uniforms.uvTransform.value.copy(v.matrix),(u!==v||d!==v.version||p!==i.toneMapping)&&(c.material.needsUpdate=!0,u=v,d=v.version,p=i.toneMapping),c.layers.enableAll(),m.unshift(c,c.geometry,c.material,0,0,null))}function _(m,f){m.getRGB(Ss,jl(i)),n.buffers.color.setClear(Ss.r,Ss.g,Ss.b,f,a)}return{getClearColor:function(){return o},setClearColor:function(m,f=1){o.set(m),l=f,_(o,l)},getClearAlpha:function(){return l},setClearAlpha:function(m){l=m,_(o,l)},render:g}}function Qf(i,e,t,n){const s=i.getParameter(i.MAX_VERTEX_ATTRIBS),r=n.isWebGL2?null:e.get("OES_vertex_array_object"),a=n.isWebGL2||r!==null,o={},l=m(null);let c=l,h=!1;function u(G,k,ne,V,W){let te=!1;if(a){const K=_(V,ne,k);c!==K&&(c=K,p(c.object)),te=f(G,V,ne,W),te&&y(G,V,ne,W)}else{const K=k.wireframe===!0;(c.geometry!==V.id||c.program!==ne.id||c.wireframe!==K)&&(c.geometry=V.id,c.program=ne.id,c.wireframe=K,te=!0)}W!==null&&t.update(W,i.ELEMENT_ARRAY_BUFFER),(te||h)&&(h=!1,O(G,k,ne,V),W!==null&&i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,t.get(W).buffer))}function d(){return n.isWebGL2?i.createVertexArray():r.createVertexArrayOES()}function p(G){return n.isWebGL2?i.bindVertexArray(G):r.bindVertexArrayOES(G)}function g(G){return n.isWebGL2?i.deleteVertexArray(G):r.deleteVertexArrayOES(G)}function _(G,k,ne){const V=ne.wireframe===!0;let W=o[G.id];W===void 0&&(W={},o[G.id]=W);let te=W[k.id];te===void 0&&(te={},W[k.id]=te);let K=te[V];return K===void 0&&(K=m(d()),te[V]=K),K}function m(G){const k=[],ne=[],V=[];for(let W=0;W=0){const ve=W[Y];let ye=te[Y];if(ye===void 0&&(Y==="instanceMatrix"&&G.instanceMatrix&&(ye=G.instanceMatrix),Y==="instanceColor"&&G.instanceColor&&(ye=G.instanceColor)),ve===void 0||ve.attribute!==ye||ye&&ve.data!==ye.data)return!0;K++}return c.attributesNum!==K||c.index!==V}function y(G,k,ne,V){const W={},te=k.attributes;let K=0;const F=ne.getAttributes();for(const Y in F)if(F[Y].location>=0){let ve=te[Y];ve===void 0&&(Y==="instanceMatrix"&&G.instanceMatrix&&(ve=G.instanceMatrix),Y==="instanceColor"&&G.instanceColor&&(ve=G.instanceColor));const ye={};ye.attribute=ve,ve&&ve.data&&(ye.data=ve.data),W[Y]=ye,K++}c.attributes=W,c.attributesNum=K,c.index=V}function v(){const G=c.newAttributes;for(let k=0,ne=G.length;k=0){let me=W[F];if(me===void 0&&(F==="instanceMatrix"&&G.instanceMatrix&&(me=G.instanceMatrix),F==="instanceColor"&&G.instanceColor&&(me=G.instanceColor)),me!==void 0){const ve=me.normalized,ye=me.itemSize,Re=t.get(me);if(Re===void 0)continue;const Ie=Re.buffer,q=Re.type,ge=Re.bytesPerElement,ue=n.isWebGL2===!0&&(q===i.INT||q===i.UNSIGNED_INT||me.gpuType===Cl);if(me.isInterleavedBufferAttribute){const ie=me.data,P=ie.stride,Se=me.offset;if(ie.isInstancedInterleavedBuffer){for(let J=0;J0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT).precision>0)return"highp";b="mediump"}return b==="mediump"&&i.getShaderPrecisionFormat(i.VERTEX_SHADER,i.MEDIUM_FLOAT).precision>0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const a=typeof WebGL2RenderingContext<"u"&&i.constructor.name==="WebGL2RenderingContext";let o=t.precision!==void 0?t.precision:"highp";const l=r(o);l!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",l,"instead."),o=l);const c=a||e.has("WEBGL_draw_buffers"),h=t.logarithmicDepthBuffer===!0,u=i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS),d=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS),p=i.getParameter(i.MAX_TEXTURE_SIZE),g=i.getParameter(i.MAX_CUBE_MAP_TEXTURE_SIZE),_=i.getParameter(i.MAX_VERTEX_ATTRIBS),m=i.getParameter(i.MAX_VERTEX_UNIFORM_VECTORS),f=i.getParameter(i.MAX_VARYING_VECTORS),y=i.getParameter(i.MAX_FRAGMENT_UNIFORM_VECTORS),v=d>0,T=a||e.has("OES_texture_float"),w=v&&T,C=a?i.getParameter(i.MAX_SAMPLES):0;return{isWebGL2:a,drawBuffers:c,getMaxAnisotropy:s,getMaxPrecision:r,precision:o,logarithmicDepthBuffer:h,maxTextures:u,maxVertexTextures:d,maxTextureSize:p,maxCubemapSize:g,maxAttributes:_,maxVertexUniforms:m,maxVaryings:f,maxFragmentUniforms:y,vertexTextures:v,floatFragmentTextures:T,floatVertexTextures:w,maxSamples:C}}function np(i){const e=this;let t=null,n=0,s=!1,r=!1;const a=new vn,o=new ke,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(u,d){const p=u.length!==0||d||n!==0||s;return s=d,n=u.length,p},this.beginShadows=function(){r=!0,h(null)},this.endShadows=function(){r=!1},this.setGlobalState=function(u,d){t=h(u,d,0)},this.setState=function(u,d,p){const g=u.clippingPlanes,_=u.clipIntersection,m=u.clipShadows,f=i.get(u);if(!s||g===null||g.length===0||r&&!m)r?h(null):c();else{const y=r?0:n,v=y*4;let T=f.clippingState||null;l.value=T,T=h(g,d,v,p);for(let w=0;w!==v;++w)T[w]=t[w];f.clippingState=T,this.numIntersection=_?this.numPlanes:0,this.numPlanes+=y}};function c(){l.value!==t&&(l.value=t,l.needsUpdate=n>0),e.numPlanes=n,e.numIntersection=0}function h(u,d,p,g){const _=u!==null?u.length:0;let m=null;if(_!==0){if(m=l.value,g!==!0||m===null){const f=p+_*4,y=d.matrixWorldInverse;o.getNormalMatrix(y),(m===null||m.length0){const c=new gu(l.height/2);return c.fromEquirectangularTexture(i,a),e.set(a,c),a.addEventListener("dispose",s),t(c.texture,a.mapping)}else return null}}return a}function s(a){const o=a.target;o.removeEventListener("dispose",s);const l=e.get(o);l!==void 0&&(e.delete(o),l.dispose())}function r(){e=new WeakMap}return{get:n,dispose:r}}class na extends ta{constructor(e=-1,t=1,n=1,s=-1,r=.1,a=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=s,this.near=r,this.far=a,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,n,s,r,a){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=s,this.view.width=r,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,s=(this.top+this.bottom)/2;let r=n-e,a=n+e,o=s+t,l=s-t;if(this.view!==null&&this.view.enabled){const c=(this.right-this.left)/this.view.fullWidth/this.zoom,h=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=c*this.view.offsetX,a=r+c*this.view.width,o-=h*this.view.offsetY,l=o-h*this.view.height}this.projectionMatrix.makeOrthographic(r,a,o,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}const fi=4,xo=[.125,.215,.35,.446,.526,.582],Un=20,Mr=new na,vo=new Pe;let Sr=null;const Dn=(1+Math.sqrt(5))/2,ci=1/Dn,Mo=[new L(1,1,1),new L(-1,1,1),new L(1,1,-1),new L(-1,1,-1),new L(0,Dn,ci),new L(0,Dn,-ci),new L(ci,0,Dn),new L(-ci,0,Dn),new L(Dn,ci,0),new L(-Dn,ci,0)];class So{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,n=.1,s=100){Sr=this._renderer.getRenderTarget(),this._setSize(256);const r=this._allocateTargets();return r.depthBuffer=!0,this._sceneToCubeUV(e,n,s,r),t>0&&this._blur(r,0,0,t),this._applyPMREM(r),this._cleanup(r),r}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=To(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=Eo(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?v:0,v,v),h.setRenderTarget(s),_&&h.render(g,o),h.render(e,o)}g.geometry.dispose(),g.material.dispose(),h.toneMapping=d,h.autoClear=u,e.background=m}_textureToCubeUV(e,t){const n=this._renderer,s=e.mapping===xi||e.mapping===vi;s?(this._cubemapMaterial===null&&(this._cubemapMaterial=To()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=Eo());const r=s?this._cubemapMaterial:this._equirectMaterial,a=new Pt(this._lodPlanes[0],r),o=r.uniforms;o.envMap.value=e;const l=this._cubeSize;ys(t,0,0,3*l,2*l),n.setRenderTarget(t),n.render(a,Mr)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;for(let s=1;sUn&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${m} samples when the maximum is set to ${Un}`);const f=[];let y=0;for(let b=0;bv-fi?s-v+fi:0),C=4*(this._cubeSize-T);ys(t,w,C,3*T,2*T),l.setRenderTarget(t),l.render(u,Mr)}}function sp(i){const e=[],t=[],n=[];let s=i;const r=i-fi+1+xo.length;for(let a=0;ai-fi?l=xo[a-i+fi-1]:a===0&&(l=0),n.push(l);const c=1/(o-2),h=-c,u=1+c,d=[h,h,u,h,u,u,h,h,u,u,h,u],p=6,g=6,_=3,m=2,f=1,y=new Float32Array(_*g*p),v=new Float32Array(m*g*p),T=new Float32Array(f*g*p);for(let C=0;C2?0:-1,S=[b,O,0,b+2/3,O,0,b+2/3,O+1,0,b,O,0,b+2/3,O+1,0,b,O+1,0];y.set(S,_*g*C),v.set(d,m*g*C);const A=[C,C,C,C,C,C];T.set(A,f*g*C)}const w=new Ft;w.setAttribute("position",new Et(y,_)),w.setAttribute("uv",new Et(v,m)),w.setAttribute("faceIndex",new Et(T,f)),e.push(w),s>fi&&s--}return{lodPlanes:e,sizeLods:t,sigmas:n}}function yo(i,e,t){const n=new Gn(i,e,t);return n.texture.mapping=Os,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function ys(i,e,t,n,s){i.viewport.set(e,t,n,s),i.scissor.set(e,t,n,s)}function rp(i,e,t){const n=new Float32Array(Un),s=new L(0,1,0);return new Vn({name:"SphericalGaussianBlur",defines:{n:Un,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${i}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:s}},vertexShader:ia(),fragmentShader:` - - precision mediump float; - precision mediump int; - - varying vec3 vOutputDirection; - - uniform sampler2D envMap; - uniform int samples; - uniform float weights[ n ]; - uniform bool latitudinal; - uniform float dTheta; - uniform float mipInt; - uniform vec3 poleAxis; - - #define ENVMAP_TYPE_CUBE_UV - #include - - vec3 getSample( float theta, vec3 axis ) { - - float cosTheta = cos( theta ); - // Rodrigues' axis-angle rotation - vec3 sampleDirection = vOutputDirection * cosTheta - + cross( axis, vOutputDirection ) * sin( theta ) - + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); - - return bilinearCubeUV( envMap, sampleDirection, mipInt ); - - } - - void main() { - - vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); - - if ( all( equal( axis, vec3( 0.0 ) ) ) ) { - - axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); - - } - - axis = normalize( axis ); - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); - gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); - - for ( int i = 1; i < n; i++ ) { - - if ( i >= samples ) { - - break; - - } - - float theta = dTheta * float( i ); - gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); - gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); - - } - - } - `,blending:yn,depthTest:!1,depthWrite:!1})}function Eo(){return new Vn({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:ia(),fragmentShader:` - - precision mediump float; - precision mediump int; - - varying vec3 vOutputDirection; - - uniform sampler2D envMap; - - #include - - void main() { - - vec3 outputDirection = normalize( vOutputDirection ); - vec2 uv = equirectUv( outputDirection ); - - gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); - - } - `,blending:yn,depthTest:!1,depthWrite:!1})}function To(){return new Vn({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:ia(),fragmentShader:` - - precision mediump float; - precision mediump int; - - uniform float flipEnvMap; - - varying vec3 vOutputDirection; - - uniform samplerCube envMap; - - void main() { - - gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); - - } - `,blending:yn,depthTest:!1,depthWrite:!1})}function ia(){return` - - precision mediump float; - precision mediump int; - - attribute float faceIndex; - - varying vec3 vOutputDirection; - - // RH coordinate system; PMREM face-indexing convention - vec3 getDirection( vec2 uv, float face ) { - - uv = 2.0 * uv - 1.0; - - vec3 direction = vec3( uv, 1.0 ); - - if ( face == 0.0 ) { - - direction = direction.zyx; // ( 1, v, u ) pos x - - } else if ( face == 1.0 ) { - - direction = direction.xzy; - direction.xz *= -1.0; // ( -u, 1, -v ) pos y - - } else if ( face == 2.0 ) { - - direction.x *= -1.0; // ( -u, v, 1 ) pos z - - } else if ( face == 3.0 ) { - - direction = direction.zyx; - direction.xz *= -1.0; // ( -1, v, -u ) neg x - - } else if ( face == 4.0 ) { - - direction = direction.xzy; - direction.xy *= -1.0; // ( -u, -1, v ) neg y - - } else if ( face == 5.0 ) { - - direction.z *= -1.0; // ( u, v, -1 ) neg z - - } - - return direction; - - } - - void main() { - - vOutputDirection = getDirection( uv, faceIndex ); - gl_Position = vec4( position, 1.0 ); - - } - `}function ap(i){let e=new WeakMap,t=null;function n(o){if(o&&o.isTexture){const l=o.mapping,c=l===Nr||l===Or,h=l===xi||l===vi;if(c||h)if(o.isRenderTargetTexture&&o.needsPMREMUpdate===!0){o.needsPMREMUpdate=!1;let u=e.get(o);return t===null&&(t=new So(i)),u=c?t.fromEquirectangular(o,u):t.fromCubemap(o,u),e.set(o,u),u.texture}else{if(e.has(o))return e.get(o).texture;{const u=o.image;if(c&&u&&u.height>0||h&&u&&s(u)){t===null&&(t=new So(i));const d=c?t.fromEquirectangular(o):t.fromCubemap(o);return e.set(o,d),o.addEventListener("dispose",r),d.texture}else return null}}}return o}function s(o){let l=0;const c=6;for(let h=0;he.maxTextureSize&&(A=Math.ceil(S/e.maxTextureSize),S=e.maxTextureSize);const Q=new Float32Array(S*A*4*g),re=new kl(Q,S,A,g);re.type=hn,re.needsUpdate=!0;const z=O*4;for(let k=0;k0)return i;const s=e*t;let r=bo[s];if(r===void 0&&(r=new Float32Array(s),bo[s]=r),e!==0){n.toArray(r,0);for(let a=1,o=0;a!==e;++a)o+=t,i[a].toArray(r,o)}return r}function lt(i,e){if(i.length!==e.length)return!1;for(let t=0,n=i.length;t":" "} ${o}: ${t[a]}`)}return n.join(` -`)}function om(i){switch(i){case dt:return["Linear","( value )"];case Ye:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",i),["Linear","( value )"]}}function Io(i,e,t){const n=i.getShaderParameter(e,i.COMPILE_STATUS),s=i.getShaderInfoLog(e).trim();if(n&&s==="")return"";const r=/ERROR: 0:(\d+)/.exec(s);if(r){const a=parseInt(r[1]);return t.toUpperCase()+` - -`+s+` - -`+am(i.getShaderSource(e),a)}else return s}function lm(i,e){const t=om(e);return"vec4 "+i+"( vec4 value ) { return LinearTo"+t[0]+t[1]+"; }"}function cm(i,e){let t;switch(e){case nh:t="Linear";break;case ih:t="Reinhard";break;case sh:t="OptimizedCineon";break;case rh:t="ACESFilmic";break;case ah:t="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),t="Linear"}return"vec3 "+i+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}function hm(i){return[i.extensionDerivatives||i.envMapCubeUVHeight||i.bumpMap||i.normalMapTangentSpace||i.clearcoatNormalMap||i.flatShading||i.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(i.extensionFragDepth||i.logarithmicDepthBuffer)&&i.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",i.extensionDrawBuffers&&i.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(i.extensionShaderTextureLOD||i.envMap||i.transmission)&&i.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Gi).join(` -`)}function um(i){const e=[];for(const t in i){const n=i[t];n!==!1&&e.push("#define "+t+" "+n)}return e.join(` -`)}function dm(i,e){const t={},n=i.getProgramParameter(e,i.ACTIVE_ATTRIBUTES);for(let s=0;s/gm;function Gr(i){return i.replace(fm,mm)}const pm=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function mm(i,e){let t=He[e];if(t===void 0){const n=pm.get(e);if(n!==void 0)t=He[n],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,n);else throw new Error("Can not resolve #include <"+e+">")}return Gr(t)}const gm=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function No(i){return i.replace(gm,_m)}function _m(i,e,t,n){let s="";for(let r=parseInt(e);r0&&(m+=` -`),f=[p,"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g].filter(Gi).join(` -`),f.length>0&&(f+=` -`)):(m=[Oo(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g,t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+h:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.displacementMap?"#define USE_DISPLACEMENTMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.mapUv?"#define MAP_UV "+t.mapUv:"",t.alphaMapUv?"#define ALPHAMAP_UV "+t.alphaMapUv:"",t.lightMapUv?"#define LIGHTMAP_UV "+t.lightMapUv:"",t.aoMapUv?"#define AOMAP_UV "+t.aoMapUv:"",t.emissiveMapUv?"#define EMISSIVEMAP_UV "+t.emissiveMapUv:"",t.bumpMapUv?"#define BUMPMAP_UV "+t.bumpMapUv:"",t.normalMapUv?"#define NORMALMAP_UV "+t.normalMapUv:"",t.displacementMapUv?"#define DISPLACEMENTMAP_UV "+t.displacementMapUv:"",t.metalnessMapUv?"#define METALNESSMAP_UV "+t.metalnessMapUv:"",t.roughnessMapUv?"#define ROUGHNESSMAP_UV "+t.roughnessMapUv:"",t.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+t.anisotropyMapUv:"",t.clearcoatMapUv?"#define CLEARCOATMAP_UV "+t.clearcoatMapUv:"",t.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+t.clearcoatNormalMapUv:"",t.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+t.clearcoatRoughnessMapUv:"",t.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+t.iridescenceMapUv:"",t.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+t.iridescenceThicknessMapUv:"",t.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+t.sheenColorMapUv:"",t.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+t.sheenRoughnessMapUv:"",t.specularMapUv?"#define SPECULARMAP_UV "+t.specularMapUv:"",t.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+t.specularColorMapUv:"",t.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+t.specularIntensityMapUv:"",t.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+t.transmissionMapUv:"",t.thicknessMapUv?"#define THICKNESSMAP_UV "+t.thicknessMapUv:"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.morphColors&&t.isWebGL2?"#define USE_MORPHCOLORS":"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+t.morphTextureStride:"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.useLegacyLights?"#define LEGACY_LIGHTS":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` -`].filter(Gi).join(` -`),f=[p,Oo(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+c:"",t.envMap?"#define "+h:"",t.envMap?"#define "+u:"",d?"#define CUBEUV_TEXEL_WIDTH "+d.texelWidth:"",d?"#define CUBEUV_TEXEL_HEIGHT "+d.texelHeight:"",d?"#define CUBEUV_MAX_MIP "+d.maxMip+".0":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescence?"#define USE_IRIDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.useLegacyLights?"#define LEGACY_LIGHTS":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==En?"#define TONE_MAPPING":"",t.toneMapping!==En?He.tonemapping_pars_fragment:"",t.toneMapping!==En?cm("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",He.colorspace_pars_fragment,lm("linearToOutputTexel",t.outputColorSpace),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` -`].filter(Gi).join(` -`)),a=Gr(a),a=Do(a,t),a=Uo(a,t),o=Gr(o),o=Do(o,t),o=Uo(o,t),a=No(a),o=No(o),t.isWebGL2&&t.isRawShaderMaterial!==!0&&(y=`#version 300 es -`,m=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(` -`)+` -`+m,f=["#define varying in",t.glslVersion===to?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===to?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` -`)+` -`+f);const v=y+m+a,T=y+f+o,w=Po(s,s.VERTEX_SHADER,v),C=Po(s,s.FRAGMENT_SHADER,T);if(s.attachShader(_,w),s.attachShader(_,C),t.index0AttributeName!==void 0?s.bindAttribLocation(_,0,t.index0AttributeName):t.morphTargets===!0&&s.bindAttribLocation(_,0,"position"),s.linkProgram(_),i.debug.checkShaderErrors){const S=s.getProgramInfoLog(_).trim(),A=s.getShaderInfoLog(w).trim(),Q=s.getShaderInfoLog(C).trim();let re=!0,z=!0;if(s.getProgramParameter(_,s.LINK_STATUS)===!1)if(re=!1,typeof i.debug.onShaderError=="function")i.debug.onShaderError(s,_,w,C);else{const G=Io(s,w,"vertex"),k=Io(s,C,"fragment");console.error("THREE.WebGLProgram: Shader Error "+s.getError()+" - VALIDATE_STATUS "+s.getProgramParameter(_,s.VALIDATE_STATUS)+` - -Program Info Log: `+S+` -`+G+` -`+k)}else S!==""?console.warn("THREE.WebGLProgram: Program Info Log:",S):(A===""||Q==="")&&(z=!1);z&&(this.diagnostics={runnable:re,programLog:S,vertexShader:{log:A,prefix:m},fragmentShader:{log:Q,prefix:f}})}s.deleteShader(w),s.deleteShader(C);let b;this.getUniforms=function(){return b===void 0&&(b=new Ps(s,_)),b};let O;return this.getAttributes=function(){return O===void 0&&(O=dm(s,_)),O},this.destroy=function(){n.releaseStatesOfProgram(this),s.deleteProgram(_),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=rm++,this.cacheKey=e,this.usedTimes=1,this.program=_,this.vertexShader=w,this.fragmentShader=C,this}let Tm=0;class bm{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,n=e.fragmentShader,s=this._getShaderStage(t),r=this._getShaderStage(n),a=this._getShaderCacheForMaterial(e);return a.has(s)===!1&&(a.add(s),s.usedTimes++),a.has(r)===!1&&(a.add(r),r.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const n of t)n.usedTimes--,n.usedTimes===0&&this.shaderCache.delete(n.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let n=t.get(e);return n===void 0&&(n=new Set,t.set(e,n)),n}_getShaderStage(e){const t=this.shaderCache;let n=t.get(e);return n===void 0&&(n=new Am(e),t.set(e,n)),n}}class Am{constructor(e){this.id=Tm++,this.code=e,this.usedTimes=0}}function wm(i,e,t,n,s,r,a){const o=new Gl,l=new bm,c=[],h=s.isWebGL2,u=s.logarithmicDepthBuffer,d=s.vertexTextures;let p=s.precision;const g={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function _(S){return S===0?"uv":`uv${S}`}function m(S,A,Q,re,z){const G=re.fog,k=z.geometry,ne=S.isMeshStandardMaterial?re.environment:null,V=(S.isMeshStandardMaterial?t:e).get(S.envMap||ne),W=V&&V.mapping===Os?V.image.height:null,te=g[S.type];S.precision!==null&&(p=s.getMaxPrecision(S.precision),p!==S.precision&&console.warn("THREE.WebGLProgram.getParameters:",S.precision,"not supported, using",p,"instead."));const K=k.morphAttributes.position||k.morphAttributes.normal||k.morphAttributes.color,F=K!==void 0?K.length:0;let Y=0;k.morphAttributes.position!==void 0&&(Y=1),k.morphAttributes.normal!==void 0&&(Y=2),k.morphAttributes.color!==void 0&&(Y=3);let me,ve,ye,Re;if(te){const et=Yt[te];me=et.vertexShader,ve=et.fragmentShader}else me=S.vertexShader,ve=S.fragmentShader,l.update(S),ye=l.getVertexShaderID(S),Re=l.getFragmentShaderID(S);const Ie=i.getRenderTarget(),q=z.isInstancedMesh===!0,ge=!!S.map,ue=!!S.matcap,ie=!!V,P=!!S.aoMap,Se=!!S.lightMap,J=!!S.bumpMap,oe=!!S.normalMap,he=!!S.displacementMap,Le=!!S.emissiveMap,we=!!S.metalnessMap,le=!!S.roughnessMap,be=S.anisotropy>0,We=S.clearcoat>0,Ee=S.iridescence>0,M=S.sheen>0,x=S.transmission>0,D=be&&!!S.anisotropyMap,Z=We&&!!S.clearcoatMap,ee=We&&!!S.clearcoatNormalMap,ae=We&&!!S.clearcoatRoughnessMap,Te=Ee&&!!S.iridescenceMap,se=Ee&&!!S.iridescenceThicknessMap,B=M&&!!S.sheenColorMap,R=M&&!!S.sheenRoughnessMap,$=!!S.specularMap,Me=!!S.specularColorMap,fe=!!S.specularIntensityMap,xe=x&&!!S.transmissionMap,Fe=x&&!!S.thicknessMap,je=!!S.gradientMap,I=!!S.alphaMap,_e=S.alphaTest>0,H=!!S.alphaHash,ce=!!S.extensions,de=!!k.attributes.uv1,Ge=!!k.attributes.uv2,Ke=!!k.attributes.uv3;let Qe=En;return S.toneMapped&&(Ie===null||Ie.isXRRenderTarget===!0)&&(Qe=i.toneMapping),{isWebGL2:h,shaderID:te,shaderType:S.type,shaderName:S.name,vertexShader:me,fragmentShader:ve,defines:S.defines,customVertexShaderID:ye,customFragmentShaderID:Re,isRawShaderMaterial:S.isRawShaderMaterial===!0,glslVersion:S.glslVersion,precision:p,instancing:q,instancingColor:q&&z.instanceColor!==null,supportsVertexTextures:d,outputColorSpace:Ie===null?i.outputColorSpace:Ie.isXRRenderTarget===!0?Ie.texture.colorSpace:dt,map:ge,matcap:ue,envMap:ie,envMapMode:ie&&V.mapping,envMapCubeUVHeight:W,aoMap:P,lightMap:Se,bumpMap:J,normalMap:oe,displacementMap:d&&he,emissiveMap:Le,normalMapObjectSpace:oe&&S.normalMapType===Mh,normalMapTangentSpace:oe&&S.normalMapType===Qr,metalnessMap:we,roughnessMap:le,anisotropy:be,anisotropyMap:D,clearcoat:We,clearcoatMap:Z,clearcoatNormalMap:ee,clearcoatRoughnessMap:ae,iridescence:Ee,iridescenceMap:Te,iridescenceThicknessMap:se,sheen:M,sheenColorMap:B,sheenRoughnessMap:R,specularMap:$,specularColorMap:Me,specularIntensityMap:fe,transmission:x,transmissionMap:xe,thicknessMap:Fe,gradientMap:je,opaque:S.transparent===!1&&S.blending===pi,alphaMap:I,alphaTest:_e,alphaHash:H,combine:S.combine,mapUv:ge&&_(S.map.channel),aoMapUv:P&&_(S.aoMap.channel),lightMapUv:Se&&_(S.lightMap.channel),bumpMapUv:J&&_(S.bumpMap.channel),normalMapUv:oe&&_(S.normalMap.channel),displacementMapUv:he&&_(S.displacementMap.channel),emissiveMapUv:Le&&_(S.emissiveMap.channel),metalnessMapUv:we&&_(S.metalnessMap.channel),roughnessMapUv:le&&_(S.roughnessMap.channel),anisotropyMapUv:D&&_(S.anisotropyMap.channel),clearcoatMapUv:Z&&_(S.clearcoatMap.channel),clearcoatNormalMapUv:ee&&_(S.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:ae&&_(S.clearcoatRoughnessMap.channel),iridescenceMapUv:Te&&_(S.iridescenceMap.channel),iridescenceThicknessMapUv:se&&_(S.iridescenceThicknessMap.channel),sheenColorMapUv:B&&_(S.sheenColorMap.channel),sheenRoughnessMapUv:R&&_(S.sheenRoughnessMap.channel),specularMapUv:$&&_(S.specularMap.channel),specularColorMapUv:Me&&_(S.specularColorMap.channel),specularIntensityMapUv:fe&&_(S.specularIntensityMap.channel),transmissionMapUv:xe&&_(S.transmissionMap.channel),thicknessMapUv:Fe&&_(S.thicknessMap.channel),alphaMapUv:I&&_(S.alphaMap.channel),vertexTangents:!!k.attributes.tangent&&(oe||be),vertexColors:S.vertexColors,vertexAlphas:S.vertexColors===!0&&!!k.attributes.color&&k.attributes.color.itemSize===4,vertexUv1s:de,vertexUv2s:Ge,vertexUv3s:Ke,pointsUvs:z.isPoints===!0&&!!k.attributes.uv&&(ge||I),fog:!!G,useFog:S.fog===!0,fogExp2:G&&G.isFogExp2,flatShading:S.flatShading===!0,sizeAttenuation:S.sizeAttenuation===!0,logarithmicDepthBuffer:u,skinning:z.isSkinnedMesh===!0,morphTargets:k.morphAttributes.position!==void 0,morphNormals:k.morphAttributes.normal!==void 0,morphColors:k.morphAttributes.color!==void 0,morphTargetsCount:F,morphTextureStride:Y,numDirLights:A.directional.length,numPointLights:A.point.length,numSpotLights:A.spot.length,numSpotLightMaps:A.spotLightMap.length,numRectAreaLights:A.rectArea.length,numHemiLights:A.hemi.length,numDirLightShadows:A.directionalShadowMap.length,numPointLightShadows:A.pointShadowMap.length,numSpotLightShadows:A.spotShadowMap.length,numSpotLightShadowsWithMaps:A.numSpotLightShadowsWithMaps,numClippingPlanes:a.numPlanes,numClipIntersection:a.numIntersection,dithering:S.dithering,shadowMapEnabled:i.shadowMap.enabled&&Q.length>0,shadowMapType:i.shadowMap.type,toneMapping:Qe,useLegacyLights:i._useLegacyLights,decodeVideoTexture:ge&&S.map.isVideoTexture===!0&&S.map.colorSpace===Ye,premultipliedAlpha:S.premultipliedAlpha,doubleSided:S.side===Gt,flipSided:S.side===bt,useDepthPacking:S.depthPacking>=0,depthPacking:S.depthPacking||0,index0AttributeName:S.index0AttributeName,extensionDerivatives:ce&&S.extensions.derivatives===!0,extensionFragDepth:ce&&S.extensions.fragDepth===!0,extensionDrawBuffers:ce&&S.extensions.drawBuffers===!0,extensionShaderTextureLOD:ce&&S.extensions.shaderTextureLOD===!0,rendererExtensionFragDepth:h||n.has("EXT_frag_depth"),rendererExtensionDrawBuffers:h||n.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:h||n.has("EXT_shader_texture_lod"),customProgramCacheKey:S.customProgramCacheKey()}}function f(S){const A=[];if(S.shaderID?A.push(S.shaderID):(A.push(S.customVertexShaderID),A.push(S.customFragmentShaderID)),S.defines!==void 0)for(const Q in S.defines)A.push(Q),A.push(S.defines[Q]);return S.isRawShaderMaterial===!1&&(y(A,S),v(A,S),A.push(i.outputColorSpace)),A.push(S.customProgramCacheKey),A.join()}function y(S,A){S.push(A.precision),S.push(A.outputColorSpace),S.push(A.envMapMode),S.push(A.envMapCubeUVHeight),S.push(A.mapUv),S.push(A.alphaMapUv),S.push(A.lightMapUv),S.push(A.aoMapUv),S.push(A.bumpMapUv),S.push(A.normalMapUv),S.push(A.displacementMapUv),S.push(A.emissiveMapUv),S.push(A.metalnessMapUv),S.push(A.roughnessMapUv),S.push(A.anisotropyMapUv),S.push(A.clearcoatMapUv),S.push(A.clearcoatNormalMapUv),S.push(A.clearcoatRoughnessMapUv),S.push(A.iridescenceMapUv),S.push(A.iridescenceThicknessMapUv),S.push(A.sheenColorMapUv),S.push(A.sheenRoughnessMapUv),S.push(A.specularMapUv),S.push(A.specularColorMapUv),S.push(A.specularIntensityMapUv),S.push(A.transmissionMapUv),S.push(A.thicknessMapUv),S.push(A.combine),S.push(A.fogExp2),S.push(A.sizeAttenuation),S.push(A.morphTargetsCount),S.push(A.morphAttributeCount),S.push(A.numDirLights),S.push(A.numPointLights),S.push(A.numSpotLights),S.push(A.numSpotLightMaps),S.push(A.numHemiLights),S.push(A.numRectAreaLights),S.push(A.numDirLightShadows),S.push(A.numPointLightShadows),S.push(A.numSpotLightShadows),S.push(A.numSpotLightShadowsWithMaps),S.push(A.shadowMapType),S.push(A.toneMapping),S.push(A.numClippingPlanes),S.push(A.numClipIntersection),S.push(A.depthPacking)}function v(S,A){o.disableAll(),A.isWebGL2&&o.enable(0),A.supportsVertexTextures&&o.enable(1),A.instancing&&o.enable(2),A.instancingColor&&o.enable(3),A.matcap&&o.enable(4),A.envMap&&o.enable(5),A.normalMapObjectSpace&&o.enable(6),A.normalMapTangentSpace&&o.enable(7),A.clearcoat&&o.enable(8),A.iridescence&&o.enable(9),A.alphaTest&&o.enable(10),A.vertexColors&&o.enable(11),A.vertexAlphas&&o.enable(12),A.vertexUv1s&&o.enable(13),A.vertexUv2s&&o.enable(14),A.vertexUv3s&&o.enable(15),A.vertexTangents&&o.enable(16),A.anisotropy&&o.enable(17),S.push(o.mask),o.disableAll(),A.fog&&o.enable(0),A.useFog&&o.enable(1),A.flatShading&&o.enable(2),A.logarithmicDepthBuffer&&o.enable(3),A.skinning&&o.enable(4),A.morphTargets&&o.enable(5),A.morphNormals&&o.enable(6),A.morphColors&&o.enable(7),A.premultipliedAlpha&&o.enable(8),A.shadowMapEnabled&&o.enable(9),A.useLegacyLights&&o.enable(10),A.doubleSided&&o.enable(11),A.flipSided&&o.enable(12),A.useDepthPacking&&o.enable(13),A.dithering&&o.enable(14),A.transmission&&o.enable(15),A.sheen&&o.enable(16),A.opaque&&o.enable(17),A.pointsUvs&&o.enable(18),A.decodeVideoTexture&&o.enable(19),S.push(o.mask)}function T(S){const A=g[S.type];let Q;if(A){const re=Yt[A];Q=du.clone(re.uniforms)}else Q=S.uniforms;return Q}function w(S,A){let Q;for(let re=0,z=c.length;re0?n.push(f):p.transparent===!0?s.push(f):t.push(f)}function l(u,d,p,g,_,m){const f=a(u,d,p,g,_,m);p.transmission>0?n.unshift(f):p.transparent===!0?s.unshift(f):t.unshift(f)}function c(u,d){t.length>1&&t.sort(u||Cm),n.length>1&&n.sort(d||Fo),s.length>1&&s.sort(d||Fo)}function h(){for(let u=e,d=i.length;u=r.length?(a=new Bo,r.push(a)):a=r[s],a}function t(){i=new WeakMap}return{get:e,dispose:t}}function Pm(){const i={};return{get:function(e){if(i[e.id]!==void 0)return i[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new L,color:new Pe};break;case"SpotLight":t={position:new L,direction:new L,color:new Pe,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new L,color:new Pe,distance:0,decay:0};break;case"HemisphereLight":t={direction:new L,skyColor:new Pe,groundColor:new Pe};break;case"RectAreaLight":t={color:new Pe,position:new L,halfWidth:new L,halfHeight:new L};break}return i[e.id]=t,t}}}function Im(){const i={};return{get:function(e){if(i[e.id]!==void 0)return i[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ce};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ce};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ce,shadowCameraNear:1,shadowCameraFar:1e3};break}return i[e.id]=t,t}}}let Dm=0;function Um(i,e){return(e.castShadow?2:0)-(i.castShadow?2:0)+(e.map?1:0)-(i.map?1:0)}function Nm(i,e){const t=new Pm,n=Im(),s={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0};for(let h=0;h<9;h++)s.probe.push(new L);const r=new L,a=new Be,o=new Be;function l(h,u){let d=0,p=0,g=0;for(let Q=0;Q<9;Q++)s.probe[Q].set(0,0,0);let _=0,m=0,f=0,y=0,v=0,T=0,w=0,C=0,b=0,O=0;h.sort(Um);const S=u===!0?Math.PI:1;for(let Q=0,re=h.length;Q0&&(e.isWebGL2||i.has("OES_texture_float_linear")===!0?(s.rectAreaLTC1=pe.LTC_FLOAT_1,s.rectAreaLTC2=pe.LTC_FLOAT_2):i.has("OES_texture_half_float_linear")===!0?(s.rectAreaLTC1=pe.LTC_HALF_1,s.rectAreaLTC2=pe.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),s.ambient[0]=d,s.ambient[1]=p,s.ambient[2]=g;const A=s.hash;(A.directionalLength!==_||A.pointLength!==m||A.spotLength!==f||A.rectAreaLength!==y||A.hemiLength!==v||A.numDirectionalShadows!==T||A.numPointShadows!==w||A.numSpotShadows!==C||A.numSpotMaps!==b)&&(s.directional.length=_,s.spot.length=f,s.rectArea.length=y,s.point.length=m,s.hemi.length=v,s.directionalShadow.length=T,s.directionalShadowMap.length=T,s.pointShadow.length=w,s.pointShadowMap.length=w,s.spotShadow.length=C,s.spotShadowMap.length=C,s.directionalShadowMatrix.length=T,s.pointShadowMatrix.length=w,s.spotLightMatrix.length=C+b-O,s.spotLightMap.length=b,s.numSpotLightShadowsWithMaps=O,A.directionalLength=_,A.pointLength=m,A.spotLength=f,A.rectAreaLength=y,A.hemiLength=v,A.numDirectionalShadows=T,A.numPointShadows=w,A.numSpotShadows=C,A.numSpotMaps=b,s.version=Dm++)}function c(h,u){let d=0,p=0,g=0,_=0,m=0;const f=u.matrixWorldInverse;for(let y=0,v=h.length;y=o.length?(l=new zo(i,e),o.push(l)):l=o[a],l}function s(){t=new WeakMap}return{get:n,dispose:s}}class Fm extends Wt{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=xh,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class Bm extends Wt{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const zm=`void main() { - gl_Position = vec4( position, 1.0 ); -}`,Hm=`uniform sampler2D shadow_pass; -uniform vec2 resolution; -uniform float radius; -#include -void main() { - const float samples = float( VSM_SAMPLES ); - float mean = 0.0; - float squared_mean = 0.0; - float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); - float uvStart = samples <= 1.0 ? 0.0 : - 1.0; - for ( float i = 0.0; i < samples; i ++ ) { - float uvOffset = uvStart + i * uvStride; - #ifdef HORIZONTAL_PASS - vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) ); - mean += distribution.x; - squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; - #else - float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) ); - mean += depth; - squared_mean += depth * depth; - #endif - } - mean = mean / samples; - squared_mean = squared_mean / samples; - float std_dev = sqrt( squared_mean - mean * mean ); - gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`;function km(i,e,t){let n=new zs;const s=new Ce,r=new Ce,a=new $e,o=new Fm({depthPacking:vh}),l=new Bm,c={},h=t.maxTextureSize,u={[dn]:bt,[bt]:dn,[Gt]:Gt},d=new Vn({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Ce},radius:{value:4}},vertexShader:zm,fragmentShader:Hm}),p=d.clone();p.defines.HORIZONTAL_PASS=1;const g=new Ft;g.setAttribute("position",new Et(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const _=new Pt(g,d),m=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Tl;let f=this.type;this.render=function(w,C,b){if(m.enabled===!1||m.autoUpdate===!1&&m.needsUpdate===!1||w.length===0)return;const O=i.getRenderTarget(),S=i.getActiveCubeFace(),A=i.getActiveMipmapLevel(),Q=i.state;Q.setBlending(yn),Q.buffers.color.setClear(1,1,1,1),Q.buffers.depth.setTest(!0),Q.setScissorTest(!1);const re=f!==cn&&this.type===cn,z=f===cn&&this.type!==cn;for(let G=0,k=w.length;Gh||s.y>h)&&(s.x>h&&(r.x=Math.floor(h/W.x),s.x=r.x*W.x,V.mapSize.x=r.x),s.y>h&&(r.y=Math.floor(h/W.y),s.y=r.y*W.y,V.mapSize.y=r.y)),V.map===null||re===!0||z===!0){const K=this.type!==cn?{minFilter:ut,magFilter:ut}:{};V.map!==null&&V.map.dispose(),V.map=new Gn(s.x,s.y,K),V.map.texture.name=ne.name+".shadowMap",V.camera.updateProjectionMatrix()}i.setRenderTarget(V.map),i.clear();const te=V.getViewportCount();for(let K=0;K0||C.map&&C.alphaTest>0){const Q=S.uuid,re=C.uuid;let z=c[Q];z===void 0&&(z={},c[Q]=z);let G=z[re];G===void 0&&(G=S.clone(),z[re]=G),S=G}if(S.visible=C.visible,S.wireframe=C.wireframe,O===cn?S.side=C.shadowSide!==null?C.shadowSide:C.side:S.side=C.shadowSide!==null?C.shadowSide:u[C.side],S.alphaMap=C.alphaMap,S.alphaTest=C.alphaTest,S.map=C.map,S.clipShadows=C.clipShadows,S.clippingPlanes=C.clippingPlanes,S.clipIntersection=C.clipIntersection,S.displacementMap=C.displacementMap,S.displacementScale=C.displacementScale,S.displacementBias=C.displacementBias,S.wireframeLinewidth=C.wireframeLinewidth,S.linewidth=C.linewidth,b.isPointLight===!0&&S.isMeshDistanceMaterial===!0){const Q=i.properties.get(S);Q.light=b}return S}function T(w,C,b,O,S){if(w.visible===!1)return;if(w.layers.test(C.layers)&&(w.isMesh||w.isLine||w.isPoints)&&(w.castShadow||w.receiveShadow&&S===cn)&&(!w.frustumCulled||n.intersectsObject(w))){w.modelViewMatrix.multiplyMatrices(b.matrixWorldInverse,w.matrixWorld);const re=e.update(w),z=w.material;if(Array.isArray(z)){const G=re.groups;for(let k=0,ne=G.length;k=1):W.indexOf("OpenGL ES")!==-1&&(V=parseFloat(/^OpenGL ES (\d)/.exec(W)[1]),ne=V>=2);let te=null,K={};const F=i.getParameter(i.SCISSOR_BOX),Y=i.getParameter(i.VIEWPORT),me=new $e().fromArray(F),ve=new $e().fromArray(Y);function ye(I,_e,H,ce){const de=new Uint8Array(4),Ge=i.createTexture();i.bindTexture(I,Ge),i.texParameteri(I,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(I,i.TEXTURE_MAG_FILTER,i.NEAREST);for(let Ke=0;Ke"u"?!1:/OculusBrowser/g.test(navigator.userAgent),g=new WeakMap;let _;const m=new WeakMap;let f=!1;try{f=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function y(M,x){return f?new OffscreenCanvas(M,x):Zi("canvas")}function v(M,x,D,Z){let ee=1;if((M.width>Z||M.height>Z)&&(ee=Z/Math.max(M.width,M.height)),ee<1||x===!0)if(typeof HTMLImageElement<"u"&&M instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&M instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&M instanceof ImageBitmap){const ae=x?Us:Math.floor,Te=ae(ee*M.width),se=ae(ee*M.height);_===void 0&&(_=y(Te,se));const B=D?y(Te,se):_;return B.width=Te,B.height=se,B.getContext("2d").drawImage(M,0,0,Te,se),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+M.width+"x"+M.height+") to ("+Te+"x"+se+")."),B}else return"data"in M&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+M.width+"x"+M.height+")."),M;return M}function T(M){return kr(M.width)&&kr(M.height)}function w(M){return o?!1:M.wrapS!==Nt||M.wrapT!==Nt||M.minFilter!==ut&&M.minFilter!==Tt}function C(M,x){return M.generateMipmaps&&x&&M.minFilter!==ut&&M.minFilter!==Tt}function b(M){i.generateMipmap(M)}function O(M,x,D,Z,ee=!1){if(o===!1)return x;if(M!==null){if(i[M]!==void 0)return i[M];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+M+"'")}let ae=x;return x===i.RED&&(D===i.FLOAT&&(ae=i.R32F),D===i.HALF_FLOAT&&(ae=i.R16F),D===i.UNSIGNED_BYTE&&(ae=i.R8)),x===i.RED_INTEGER&&(D===i.UNSIGNED_BYTE&&(ae=i.R8UI),D===i.UNSIGNED_SHORT&&(ae=i.R16UI),D===i.UNSIGNED_INT&&(ae=i.R32UI),D===i.BYTE&&(ae=i.R8I),D===i.SHORT&&(ae=i.R16I),D===i.INT&&(ae=i.R32I)),x===i.RG&&(D===i.FLOAT&&(ae=i.RG32F),D===i.HALF_FLOAT&&(ae=i.RG16F),D===i.UNSIGNED_BYTE&&(ae=i.RG8)),x===i.RGBA&&(D===i.FLOAT&&(ae=i.RGBA32F),D===i.HALF_FLOAT&&(ae=i.RGBA16F),D===i.UNSIGNED_BYTE&&(ae=Z===Ye&&ee===!1?i.SRGB8_ALPHA8:i.RGBA8),D===i.UNSIGNED_SHORT_4_4_4_4&&(ae=i.RGBA4),D===i.UNSIGNED_SHORT_5_5_5_1&&(ae=i.RGB5_A1)),(ae===i.R16F||ae===i.R32F||ae===i.RG16F||ae===i.RG32F||ae===i.RGBA16F||ae===i.RGBA32F)&&e.get("EXT_color_buffer_float"),ae}function S(M,x,D){return C(M,D)===!0||M.isFramebufferTexture&&M.minFilter!==ut&&M.minFilter!==Tt?Math.log2(Math.max(x.width,x.height))+1:M.mipmaps!==void 0&&M.mipmaps.length>0?M.mipmaps.length:M.isCompressedTexture&&Array.isArray(M.image)?x.mipmaps.length:1}function A(M){return M===ut||M===Fr||M===Ls?i.NEAREST:i.LINEAR}function Q(M){const x=M.target;x.removeEventListener("dispose",Q),z(x),x.isVideoTexture&&g.delete(x)}function re(M){const x=M.target;x.removeEventListener("dispose",re),k(x)}function z(M){const x=n.get(M);if(x.__webglInit===void 0)return;const D=M.source,Z=m.get(D);if(Z){const ee=Z[x.__cacheKey];ee.usedTimes--,ee.usedTimes===0&&G(M),Object.keys(Z).length===0&&m.delete(D)}n.remove(M)}function G(M){const x=n.get(M);i.deleteTexture(x.__webglTexture);const D=M.source,Z=m.get(D);delete Z[x.__cacheKey],a.memory.textures--}function k(M){const x=M.texture,D=n.get(M),Z=n.get(x);if(Z.__webglTexture!==void 0&&(i.deleteTexture(Z.__webglTexture),a.memory.textures--),M.depthTexture&&M.depthTexture.dispose(),M.isWebGLCubeRenderTarget)for(let ee=0;ee<6;ee++){if(Array.isArray(D.__webglFramebuffer[ee]))for(let ae=0;ae=l&&console.warn("THREE.WebGLTextures: Trying to use "+M+" texture units while this GPU supports only "+l),ne+=1,M}function te(M){const x=[];return x.push(M.wrapS),x.push(M.wrapT),x.push(M.wrapR||0),x.push(M.magFilter),x.push(M.minFilter),x.push(M.anisotropy),x.push(M.internalFormat),x.push(M.format),x.push(M.type),x.push(M.generateMipmaps),x.push(M.premultiplyAlpha),x.push(M.flipY),x.push(M.unpackAlignment),x.push(M.colorSpace),x.join()}function K(M,x){const D=n.get(M);if(M.isVideoTexture&&We(M),M.isRenderTargetTexture===!1&&M.version>0&&D.__version!==M.version){const Z=M.image;if(Z===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(Z.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{ge(D,M,x);return}}t.bindTexture(i.TEXTURE_2D,D.__webglTexture,i.TEXTURE0+x)}function F(M,x){const D=n.get(M);if(M.version>0&&D.__version!==M.version){ge(D,M,x);return}t.bindTexture(i.TEXTURE_2D_ARRAY,D.__webglTexture,i.TEXTURE0+x)}function Y(M,x){const D=n.get(M);if(M.version>0&&D.__version!==M.version){ge(D,M,x);return}t.bindTexture(i.TEXTURE_3D,D.__webglTexture,i.TEXTURE0+x)}function me(M,x){const D=n.get(M);if(M.version>0&&D.__version!==M.version){ue(D,M,x);return}t.bindTexture(i.TEXTURE_CUBE_MAP,D.__webglTexture,i.TEXTURE0+x)}const ve={[Mi]:i.REPEAT,[Nt]:i.CLAMP_TO_EDGE,[Is]:i.MIRRORED_REPEAT},ye={[ut]:i.NEAREST,[Fr]:i.NEAREST_MIPMAP_NEAREST,[Ls]:i.NEAREST_MIPMAP_LINEAR,[Tt]:i.LINEAR,[Rl]:i.LINEAR_MIPMAP_NEAREST,[kn]:i.LINEAR_MIPMAP_LINEAR},Re={[yh]:i.NEVER,[Ch]:i.ALWAYS,[Eh]:i.LESS,[bh]:i.LEQUAL,[Th]:i.EQUAL,[Rh]:i.GEQUAL,[Ah]:i.GREATER,[wh]:i.NOTEQUAL};function Ie(M,x,D){if(D?(i.texParameteri(M,i.TEXTURE_WRAP_S,ve[x.wrapS]),i.texParameteri(M,i.TEXTURE_WRAP_T,ve[x.wrapT]),(M===i.TEXTURE_3D||M===i.TEXTURE_2D_ARRAY)&&i.texParameteri(M,i.TEXTURE_WRAP_R,ve[x.wrapR]),i.texParameteri(M,i.TEXTURE_MAG_FILTER,ye[x.magFilter]),i.texParameteri(M,i.TEXTURE_MIN_FILTER,ye[x.minFilter])):(i.texParameteri(M,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(M,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),(M===i.TEXTURE_3D||M===i.TEXTURE_2D_ARRAY)&&i.texParameteri(M,i.TEXTURE_WRAP_R,i.CLAMP_TO_EDGE),(x.wrapS!==Nt||x.wrapT!==Nt)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),i.texParameteri(M,i.TEXTURE_MAG_FILTER,A(x.magFilter)),i.texParameteri(M,i.TEXTURE_MIN_FILTER,A(x.minFilter)),x.minFilter!==ut&&x.minFilter!==Tt&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),x.compareFunction&&(i.texParameteri(M,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE),i.texParameteri(M,i.TEXTURE_COMPARE_FUNC,Re[x.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){const Z=e.get("EXT_texture_filter_anisotropic");if(x.magFilter===ut||x.minFilter!==Ls&&x.minFilter!==kn||x.type===hn&&e.has("OES_texture_float_linear")===!1||o===!1&&x.type===Yi&&e.has("OES_texture_half_float_linear")===!1)return;(x.anisotropy>1||n.get(x).__currentAnisotropy)&&(i.texParameterf(M,Z.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(x.anisotropy,s.getMaxAnisotropy())),n.get(x).__currentAnisotropy=x.anisotropy)}}function q(M,x){let D=!1;M.__webglInit===void 0&&(M.__webglInit=!0,x.addEventListener("dispose",Q));const Z=x.source;let ee=m.get(Z);ee===void 0&&(ee={},m.set(Z,ee));const ae=te(x);if(ae!==M.__cacheKey){ee[ae]===void 0&&(ee[ae]={texture:i.createTexture(),usedTimes:0},a.memory.textures++,D=!0),ee[ae].usedTimes++;const Te=ee[M.__cacheKey];Te!==void 0&&(ee[M.__cacheKey].usedTimes--,Te.usedTimes===0&&G(x)),M.__cacheKey=ae,M.__webglTexture=ee[ae].texture}return D}function ge(M,x,D){let Z=i.TEXTURE_2D;(x.isDataArrayTexture||x.isCompressedArrayTexture)&&(Z=i.TEXTURE_2D_ARRAY),x.isData3DTexture&&(Z=i.TEXTURE_3D);const ee=q(M,x),ae=x.source;t.bindTexture(Z,M.__webglTexture,i.TEXTURE0+D);const Te=n.get(ae);if(ae.version!==Te.__version||ee===!0){t.activeTexture(i.TEXTURE0+D),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,x.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,x.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,x.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,i.NONE);const se=w(x)&&T(x.image)===!1;let B=v(x.image,se,!1,h);B=Ee(x,B);const R=T(B)||o,$=r.convert(x.format,x.colorSpace);let Me=r.convert(x.type),fe=O(x.internalFormat,$,Me,x.colorSpace,x.isVideoTexture);Ie(Z,x,R);let xe;const Fe=x.mipmaps,je=o&&x.isVideoTexture!==!0,I=Te.__version===void 0||ee===!0,_e=S(x,B,R);if(x.isDepthTexture)fe=i.DEPTH_COMPONENT,o?x.type===hn?fe=i.DEPTH_COMPONENT32F:x.type===Sn?fe=i.DEPTH_COMPONENT24:x.type===Fn?fe=i.DEPTH24_STENCIL8:fe=i.DEPTH_COMPONENT16:x.type===hn&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),x.format===Bn&&fe===i.DEPTH_COMPONENT&&x.type!==Jr&&x.type!==Sn&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),x.type=Sn,Me=r.convert(x.type)),x.format===Si&&fe===i.DEPTH_COMPONENT&&(fe=i.DEPTH_STENCIL,x.type!==Fn&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),x.type=Fn,Me=r.convert(x.type))),I&&(je?t.texStorage2D(i.TEXTURE_2D,1,fe,B.width,B.height):t.texImage2D(i.TEXTURE_2D,0,fe,B.width,B.height,0,$,Me,null));else if(x.isDataTexture)if(Fe.length>0&&R){je&&I&&t.texStorage2D(i.TEXTURE_2D,_e,fe,Fe[0].width,Fe[0].height);for(let H=0,ce=Fe.length;H>=1,ce>>=1}}else if(Fe.length>0&&R){je&&I&&t.texStorage2D(i.TEXTURE_2D,_e,fe,Fe[0].width,Fe[0].height);for(let H=0,ce=Fe.length;H0&&I++,t.texStorage2D(i.TEXTURE_CUBE_MAP,I,xe,B[0].width,B[0].height));for(let H=0;H<6;H++)if(se){Fe?t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+H,0,0,0,B[H].width,B[H].height,Me,fe,B[H].data):t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+H,0,xe,B[H].width,B[H].height,0,Me,fe,B[H].data);for(let ce=0;ce<_e.length;ce++){const Ge=_e[ce].image[H].image;Fe?t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+H,ce+1,0,0,Ge.width,Ge.height,Me,fe,Ge.data):t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+H,ce+1,xe,Ge.width,Ge.height,0,Me,fe,Ge.data)}}else{Fe?t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+H,0,0,0,Me,fe,B[H]):t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+H,0,xe,Me,fe,B[H]);for(let ce=0;ce<_e.length;ce++){const de=_e[ce];Fe?t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+H,ce+1,0,0,Me,fe,de.image[H]):t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+H,ce+1,xe,Me,fe,de.image[H])}}}C(x,$)&&b(i.TEXTURE_CUBE_MAP),ae.__version=ee.version,x.onUpdate&&x.onUpdate(x)}M.__version=x.version}function ie(M,x,D,Z,ee,ae){const Te=r.convert(D.format,D.colorSpace),se=r.convert(D.type),B=O(D.internalFormat,Te,se,D.colorSpace);if(!n.get(x).__hasExternalTextures){const $=Math.max(1,x.width>>ae),Me=Math.max(1,x.height>>ae);ee===i.TEXTURE_3D||ee===i.TEXTURE_2D_ARRAY?t.texImage3D(ee,ae,B,$,Me,x.depth,0,Te,se,null):t.texImage2D(ee,ae,B,$,Me,0,Te,se,null)}t.bindFramebuffer(i.FRAMEBUFFER,M),be(x)?d.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,Z,ee,n.get(D).__webglTexture,0,le(x)):(ee===i.TEXTURE_2D||ee>=i.TEXTURE_CUBE_MAP_POSITIVE_X&&ee<=i.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&i.framebufferTexture2D(i.FRAMEBUFFER,Z,ee,n.get(D).__webglTexture,ae),t.bindFramebuffer(i.FRAMEBUFFER,null)}function P(M,x,D){if(i.bindRenderbuffer(i.RENDERBUFFER,M),x.depthBuffer&&!x.stencilBuffer){let Z=i.DEPTH_COMPONENT16;if(D||be(x)){const ee=x.depthTexture;ee&&ee.isDepthTexture&&(ee.type===hn?Z=i.DEPTH_COMPONENT32F:ee.type===Sn&&(Z=i.DEPTH_COMPONENT24));const ae=le(x);be(x)?d.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,ae,Z,x.width,x.height):i.renderbufferStorageMultisample(i.RENDERBUFFER,ae,Z,x.width,x.height)}else i.renderbufferStorage(i.RENDERBUFFER,Z,x.width,x.height);i.framebufferRenderbuffer(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.RENDERBUFFER,M)}else if(x.depthBuffer&&x.stencilBuffer){const Z=le(x);D&&be(x)===!1?i.renderbufferStorageMultisample(i.RENDERBUFFER,Z,i.DEPTH24_STENCIL8,x.width,x.height):be(x)?d.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,Z,i.DEPTH24_STENCIL8,x.width,x.height):i.renderbufferStorage(i.RENDERBUFFER,i.DEPTH_STENCIL,x.width,x.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.DEPTH_STENCIL_ATTACHMENT,i.RENDERBUFFER,M)}else{const Z=x.isWebGLMultipleRenderTargets===!0?x.texture:[x.texture];for(let ee=0;ee0){D.__webglFramebuffer[se]=[];for(let B=0;B0){D.__webglFramebuffer=[];for(let se=0;se0&&be(M)===!1){const se=ae?x:[x];D.__webglMultisampledFramebuffer=i.createFramebuffer(),D.__webglColorRenderbuffer=[],t.bindFramebuffer(i.FRAMEBUFFER,D.__webglMultisampledFramebuffer);for(let B=0;B0)for(let B=0;B0)for(let B=0;B0&&be(M)===!1){const x=M.isWebGLMultipleRenderTargets?M.texture:[M.texture],D=M.width,Z=M.height;let ee=i.COLOR_BUFFER_BIT;const ae=[],Te=M.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,se=n.get(M),B=M.isWebGLMultipleRenderTargets===!0;if(B)for(let R=0;R0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&x.__useRenderToTexture!==!1}function We(M){const x=a.render.frame;g.get(M)!==x&&(g.set(M,x),M.update())}function Ee(M,x){const D=M.colorSpace,Z=M.format,ee=M.type;return M.isCompressedTexture===!0||M.isVideoTexture===!0||M.format===Hr||D!==dt&&D!==Hn&&(D===Ye||D===Fs?o===!1?e.has("EXT_sRGB")===!0&&Z===Ot?(M.format=Hr,M.minFilter=Tt,M.generateMipmaps=!1):x=zl.sRGBToLinear(x):(Z!==Ot||ee!==Tn)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",D)),x}this.allocateTextureUnit=W,this.resetTextureUnits=V,this.setTexture2D=K,this.setTexture2DArray=F,this.setTexture3D=Y,this.setTextureCube=me,this.rebindTextures=oe,this.setupRenderTarget=he,this.updateRenderTargetMipmap=Le,this.updateMultisampleRenderTarget=we,this.setupDepthRenderbuffer=J,this.setupFrameBufferTexture=ie,this.useMultisampledRTT=be}const Wm=0,ot=1;function Xm(i,e,t){const n=t.isWebGL2;function s(r,a=Hn){let o;const l=a===Ye||a===Fs?ot:Wm;if(r===Tn)return i.UNSIGNED_BYTE;if(r===Ll)return i.UNSIGNED_SHORT_4_4_4_4;if(r===Pl)return i.UNSIGNED_SHORT_5_5_5_1;if(r===oh)return i.BYTE;if(r===lh)return i.SHORT;if(r===Jr)return i.UNSIGNED_SHORT;if(r===Cl)return i.INT;if(r===Sn)return i.UNSIGNED_INT;if(r===hn)return i.FLOAT;if(r===Yi)return n?i.HALF_FLOAT:(o=e.get("OES_texture_half_float"),o!==null?o.HALF_FLOAT_OES:null);if(r===ch)return i.ALPHA;if(r===Ot)return i.RGBA;if(r===hh)return i.LUMINANCE;if(r===uh)return i.LUMINANCE_ALPHA;if(r===Bn)return i.DEPTH_COMPONENT;if(r===Si)return i.DEPTH_STENCIL;if(r===Hr)return o=e.get("EXT_sRGB"),o!==null?o.SRGB_ALPHA_EXT:null;if(r===dh)return i.RED;if(r===Il)return i.RED_INTEGER;if(r===fh)return i.RG;if(r===Dl)return i.RG_INTEGER;if(r===Ul)return i.RGBA_INTEGER;if(r===Zs||r===$s||r===Js||r===Qs)if(l===ot)if(o=e.get("WEBGL_compressed_texture_s3tc_srgb"),o!==null){if(r===Zs)return o.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(r===$s)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(r===Js)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(r===Qs)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(o=e.get("WEBGL_compressed_texture_s3tc"),o!==null){if(r===Zs)return o.COMPRESSED_RGB_S3TC_DXT1_EXT;if(r===$s)return o.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(r===Js)return o.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(r===Qs)return o.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(r===wa||r===Ra||r===Ca||r===La)if(o=e.get("WEBGL_compressed_texture_pvrtc"),o!==null){if(r===wa)return o.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(r===Ra)return o.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(r===Ca)return o.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(r===La)return o.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(r===ph)return o=e.get("WEBGL_compressed_texture_etc1"),o!==null?o.COMPRESSED_RGB_ETC1_WEBGL:null;if(r===Pa||r===Ia)if(o=e.get("WEBGL_compressed_texture_etc"),o!==null){if(r===Pa)return l===ot?o.COMPRESSED_SRGB8_ETC2:o.COMPRESSED_RGB8_ETC2;if(r===Ia)return l===ot?o.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:o.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(r===Da||r===Ua||r===Na||r===Oa||r===Fa||r===Ba||r===za||r===Ha||r===ka||r===Ga||r===Va||r===Wa||r===Xa||r===ja)if(o=e.get("WEBGL_compressed_texture_astc"),o!==null){if(r===Da)return l===ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:o.COMPRESSED_RGBA_ASTC_4x4_KHR;if(r===Ua)return l===ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:o.COMPRESSED_RGBA_ASTC_5x4_KHR;if(r===Na)return l===ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:o.COMPRESSED_RGBA_ASTC_5x5_KHR;if(r===Oa)return l===ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:o.COMPRESSED_RGBA_ASTC_6x5_KHR;if(r===Fa)return l===ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:o.COMPRESSED_RGBA_ASTC_6x6_KHR;if(r===Ba)return l===ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:o.COMPRESSED_RGBA_ASTC_8x5_KHR;if(r===za)return l===ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:o.COMPRESSED_RGBA_ASTC_8x6_KHR;if(r===Ha)return l===ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:o.COMPRESSED_RGBA_ASTC_8x8_KHR;if(r===ka)return l===ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:o.COMPRESSED_RGBA_ASTC_10x5_KHR;if(r===Ga)return l===ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:o.COMPRESSED_RGBA_ASTC_10x6_KHR;if(r===Va)return l===ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:o.COMPRESSED_RGBA_ASTC_10x8_KHR;if(r===Wa)return l===ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:o.COMPRESSED_RGBA_ASTC_10x10_KHR;if(r===Xa)return l===ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:o.COMPRESSED_RGBA_ASTC_12x10_KHR;if(r===ja)return l===ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:o.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(r===er||r===qa||r===Ya)if(o=e.get("EXT_texture_compression_bptc"),o!==null){if(r===er)return l===ot?o.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:o.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(r===qa)return o.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(r===Ya)return o.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(r===mh||r===Ka||r===Za||r===$a)if(o=e.get("EXT_texture_compression_rgtc"),o!==null){if(r===er)return o.COMPRESSED_RED_RGTC1_EXT;if(r===Ka)return o.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(r===Za)return o.COMPRESSED_RED_GREEN_RGTC2_EXT;if(r===$a)return o.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return r===Fn?n?i.UNSIGNED_INT_24_8:(o=e.get("WEBGL_depth_texture"),o!==null?o.UNSIGNED_INT_24_8_WEBGL:null):i[r]!==void 0?i[r]:null}return{convert:s}}class jm extends yt{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}let On=class extends tt{constructor(){super(),this.isGroup=!0,this.type="Group"}};const qm={type:"move"};class Er{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new On,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new On,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new L,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new L),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new On,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new L,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new L),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const n of e.hand.values())this._getHandJoint(t,n)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,n){let s=null,r=null,a=null;const o=this._targetRay,l=this._grip,c=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(c&&e.hand){a=!0;for(const _ of e.hand.values()){const m=t.getJointPose(_,n),f=this._getHandJoint(c,_);m!==null&&(f.matrix.fromArray(m.transform.matrix),f.matrix.decompose(f.position,f.rotation,f.scale),f.matrixWorldNeedsUpdate=!0,f.jointRadius=m.radius),f.visible=m!==null}const h=c.joints["index-finger-tip"],u=c.joints["thumb-tip"],d=h.position.distanceTo(u.position),p=.02,g=.005;c.inputState.pinching&&d>p+g?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&d<=p-g&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(r=t.getPose(e.gripSpace,n),r!==null&&(l.matrix.fromArray(r.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,r.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(r.linearVelocity)):l.hasLinearVelocity=!1,r.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(r.angularVelocity)):l.hasAngularVelocity=!1));o!==null&&(s=t.getPose(e.targetRaySpace,n),s===null&&r!==null&&(s=r),s!==null&&(o.matrix.fromArray(s.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,s.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(s.linearVelocity)):o.hasLinearVelocity=!1,s.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(s.angularVelocity)):o.hasAngularVelocity=!1,this.dispatchEvent(qm)))}return o!==null&&(o.visible=s!==null),l!==null&&(l.visible=r!==null),c!==null&&(c.visible=a!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const n=new On;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}class Ym extends pt{constructor(e,t,n,s,r,a,o,l,c,h){if(h=h!==void 0?h:Bn,h!==Bn&&h!==Si)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");n===void 0&&h===Bn&&(n=Sn),n===void 0&&h===Si&&(n=Fn),super(null,s,r,a,o,l,h,n,c),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=o!==void 0?o:ut,this.minFilter=l!==void 0?l:ut,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.compareFunction=e.compareFunction,this}toJSON(e){const t=super.toJSON(e);return this.compareFunction!==null&&(t.compareFunction=this.compareFunction),t}}class Km extends Xn{constructor(e,t){super();const n=this;let s=null,r=1,a=null,o="local-floor",l=1,c=null,h=null,u=null,d=null,p=null,g=null;const _=t.getContextAttributes();let m=null,f=null;const y=[],v=[],T=new yt;T.layers.enable(1),T.viewport=new $e;const w=new yt;w.layers.enable(2),w.viewport=new $e;const C=[T,w],b=new jm;b.layers.enable(1),b.layers.enable(2);let O=null,S=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(F){let Y=y[F];return Y===void 0&&(Y=new Er,y[F]=Y),Y.getTargetRaySpace()},this.getControllerGrip=function(F){let Y=y[F];return Y===void 0&&(Y=new Er,y[F]=Y),Y.getGripSpace()},this.getHand=function(F){let Y=y[F];return Y===void 0&&(Y=new Er,y[F]=Y),Y.getHandSpace()};function A(F){const Y=v.indexOf(F.inputSource);if(Y===-1)return;const me=y[Y];me!==void 0&&(me.update(F.inputSource,F.frame,c||a),me.dispatchEvent({type:F.type,data:F.inputSource}))}function Q(){s.removeEventListener("select",A),s.removeEventListener("selectstart",A),s.removeEventListener("selectend",A),s.removeEventListener("squeeze",A),s.removeEventListener("squeezestart",A),s.removeEventListener("squeezeend",A),s.removeEventListener("end",Q),s.removeEventListener("inputsourceschange",re);for(let F=0;F=0&&(v[ve]=null,y[ve].disconnect(me))}for(let Y=0;Y=v.length){v.push(me),ve=Re;break}else if(v[Re]===null){v[Re]=me,ve=Re;break}if(ve===-1)break}const ye=y[ve];ye&&ye.connect(me)}}const z=new L,G=new L;function k(F,Y,me){z.setFromMatrixPosition(Y.matrixWorld),G.setFromMatrixPosition(me.matrixWorld);const ve=z.distanceTo(G),ye=Y.projectionMatrix.elements,Re=me.projectionMatrix.elements,Ie=ye[14]/(ye[10]-1),q=ye[14]/(ye[10]+1),ge=(ye[9]+1)/ye[5],ue=(ye[9]-1)/ye[5],ie=(ye[8]-1)/ye[0],P=(Re[8]+1)/Re[0],Se=Ie*ie,J=Ie*P,oe=ve/(-ie+P),he=oe*-ie;Y.matrixWorld.decompose(F.position,F.quaternion,F.scale),F.translateX(he),F.translateZ(oe),F.matrixWorld.compose(F.position,F.quaternion,F.scale),F.matrixWorldInverse.copy(F.matrixWorld).invert();const Le=Ie+oe,we=q+oe,le=Se-he,be=J+(ve-he),We=ge*q/we*Le,Ee=ue*q/we*Le;F.projectionMatrix.makePerspective(le,be,We,Ee,Le,we),F.projectionMatrixInverse.copy(F.projectionMatrix).invert()}function ne(F,Y){Y===null?F.matrixWorld.copy(F.matrix):F.matrixWorld.multiplyMatrices(Y.matrixWorld,F.matrix),F.matrixWorldInverse.copy(F.matrixWorld).invert()}this.updateCamera=function(F){if(s===null)return;b.near=w.near=T.near=F.near,b.far=w.far=T.far=F.far,(O!==b.near||S!==b.far)&&(s.updateRenderState({depthNear:b.near,depthFar:b.far}),O=b.near,S=b.far);const Y=F.parent,me=b.cameras;ne(b,Y);for(let ve=0;ve0&&(m.alphaTest.value=f.alphaTest);const y=e.get(f).envMap;if(y&&(m.envMap.value=y,m.flipEnvMap.value=y.isCubeTexture&&y.isRenderTargetTexture===!1?-1:1,m.reflectivity.value=f.reflectivity,m.ior.value=f.ior,m.refractionRatio.value=f.refractionRatio),f.lightMap){m.lightMap.value=f.lightMap;const v=i._useLegacyLights===!0?Math.PI:1;m.lightMapIntensity.value=f.lightMapIntensity*v,t(f.lightMap,m.lightMapTransform)}f.aoMap&&(m.aoMap.value=f.aoMap,m.aoMapIntensity.value=f.aoMapIntensity,t(f.aoMap,m.aoMapTransform))}function a(m,f){m.diffuse.value.copy(f.color),m.opacity.value=f.opacity,f.map&&(m.map.value=f.map,t(f.map,m.mapTransform))}function o(m,f){m.dashSize.value=f.dashSize,m.totalSize.value=f.dashSize+f.gapSize,m.scale.value=f.scale}function l(m,f,y,v){m.diffuse.value.copy(f.color),m.opacity.value=f.opacity,m.size.value=f.size*y,m.scale.value=v*.5,f.map&&(m.map.value=f.map,t(f.map,m.uvTransform)),f.alphaMap&&(m.alphaMap.value=f.alphaMap,t(f.alphaMap,m.alphaMapTransform)),f.alphaTest>0&&(m.alphaTest.value=f.alphaTest)}function c(m,f){m.diffuse.value.copy(f.color),m.opacity.value=f.opacity,m.rotation.value=f.rotation,f.map&&(m.map.value=f.map,t(f.map,m.mapTransform)),f.alphaMap&&(m.alphaMap.value=f.alphaMap,t(f.alphaMap,m.alphaMapTransform)),f.alphaTest>0&&(m.alphaTest.value=f.alphaTest)}function h(m,f){m.specular.value.copy(f.specular),m.shininess.value=Math.max(f.shininess,1e-4)}function u(m,f){f.gradientMap&&(m.gradientMap.value=f.gradientMap)}function d(m,f){m.metalness.value=f.metalness,f.metalnessMap&&(m.metalnessMap.value=f.metalnessMap,t(f.metalnessMap,m.metalnessMapTransform)),m.roughness.value=f.roughness,f.roughnessMap&&(m.roughnessMap.value=f.roughnessMap,t(f.roughnessMap,m.roughnessMapTransform)),e.get(f).envMap&&(m.envMapIntensity.value=f.envMapIntensity)}function p(m,f,y){m.ior.value=f.ior,f.sheen>0&&(m.sheenColor.value.copy(f.sheenColor).multiplyScalar(f.sheen),m.sheenRoughness.value=f.sheenRoughness,f.sheenColorMap&&(m.sheenColorMap.value=f.sheenColorMap,t(f.sheenColorMap,m.sheenColorMapTransform)),f.sheenRoughnessMap&&(m.sheenRoughnessMap.value=f.sheenRoughnessMap,t(f.sheenRoughnessMap,m.sheenRoughnessMapTransform))),f.clearcoat>0&&(m.clearcoat.value=f.clearcoat,m.clearcoatRoughness.value=f.clearcoatRoughness,f.clearcoatMap&&(m.clearcoatMap.value=f.clearcoatMap,t(f.clearcoatMap,m.clearcoatMapTransform)),f.clearcoatRoughnessMap&&(m.clearcoatRoughnessMap.value=f.clearcoatRoughnessMap,t(f.clearcoatRoughnessMap,m.clearcoatRoughnessMapTransform)),f.clearcoatNormalMap&&(m.clearcoatNormalMap.value=f.clearcoatNormalMap,t(f.clearcoatNormalMap,m.clearcoatNormalMapTransform),m.clearcoatNormalScale.value.copy(f.clearcoatNormalScale),f.side===bt&&m.clearcoatNormalScale.value.negate())),f.iridescence>0&&(m.iridescence.value=f.iridescence,m.iridescenceIOR.value=f.iridescenceIOR,m.iridescenceThicknessMinimum.value=f.iridescenceThicknessRange[0],m.iridescenceThicknessMaximum.value=f.iridescenceThicknessRange[1],f.iridescenceMap&&(m.iridescenceMap.value=f.iridescenceMap,t(f.iridescenceMap,m.iridescenceMapTransform)),f.iridescenceThicknessMap&&(m.iridescenceThicknessMap.value=f.iridescenceThicknessMap,t(f.iridescenceThicknessMap,m.iridescenceThicknessMapTransform))),f.transmission>0&&(m.transmission.value=f.transmission,m.transmissionSamplerMap.value=y.texture,m.transmissionSamplerSize.value.set(y.width,y.height),f.transmissionMap&&(m.transmissionMap.value=f.transmissionMap,t(f.transmissionMap,m.transmissionMapTransform)),m.thickness.value=f.thickness,f.thicknessMap&&(m.thicknessMap.value=f.thicknessMap,t(f.thicknessMap,m.thicknessMapTransform)),m.attenuationDistance.value=f.attenuationDistance,m.attenuationColor.value.copy(f.attenuationColor)),f.anisotropy>0&&(m.anisotropyVector.value.set(f.anisotropy*Math.cos(f.anisotropyRotation),f.anisotropy*Math.sin(f.anisotropyRotation)),f.anisotropyMap&&(m.anisotropyMap.value=f.anisotropyMap,t(f.anisotropyMap,m.anisotropyMapTransform))),m.specularIntensity.value=f.specularIntensity,m.specularColor.value.copy(f.specularColor),f.specularColorMap&&(m.specularColorMap.value=f.specularColorMap,t(f.specularColorMap,m.specularColorMapTransform)),f.specularIntensityMap&&(m.specularIntensityMap.value=f.specularIntensityMap,t(f.specularIntensityMap,m.specularIntensityMapTransform))}function g(m,f){f.matcap&&(m.matcap.value=f.matcap)}function _(m,f){const y=e.get(f).light;m.referencePosition.value.setFromMatrixPosition(y.matrixWorld),m.nearDistance.value=y.shadow.camera.near,m.farDistance.value=y.shadow.camera.far}return{refreshFogUniforms:n,refreshMaterialUniforms:s}}function $m(i,e,t,n){let s={},r={},a=[];const o=t.isWebGL2?i.getParameter(i.MAX_UNIFORM_BUFFER_BINDINGS):0;function l(y,v){const T=v.program;n.uniformBlockBinding(y,T)}function c(y,v){let T=s[y.id];T===void 0&&(g(y),T=h(y),s[y.id]=T,y.addEventListener("dispose",m));const w=v.program;n.updateUBOMapping(y,w);const C=e.render.frame;r[y.id]!==C&&(d(y),r[y.id]=C)}function h(y){const v=u();y.__bindingPointIndex=v;const T=i.createBuffer(),w=y.__size,C=y.usage;return i.bindBuffer(i.UNIFORM_BUFFER,T),i.bufferData(i.UNIFORM_BUFFER,w,C),i.bindBuffer(i.UNIFORM_BUFFER,null),i.bindBufferBase(i.UNIFORM_BUFFER,v,T),T}function u(){for(let y=0;y0){C=T%w;const re=w-C;C!==0&&re-A.boundary<0&&(T+=w-C,S.__offset=T)}T+=A.storage}return C=T%w,C>0&&(T+=w-C),y.__size=T,y.__cache={},this}function _(y){const v={boundary:0,storage:0};return typeof y=="number"?(v.boundary=4,v.storage=4):y.isVector2?(v.boundary=8,v.storage=8):y.isVector3||y.isColor?(v.boundary=16,v.storage=12):y.isVector4?(v.boundary=16,v.storage=16):y.isMatrix3?(v.boundary=48,v.storage=48):y.isMatrix4?(v.boundary=64,v.storage=64):y.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",y),v}function m(y){const v=y.target;v.removeEventListener("dispose",m);const T=a.indexOf(v.__bindingPointIndex);a.splice(T,1),i.deleteBuffer(s[v.id]),delete s[v.id],delete r[v.id]}function f(){for(const y in s)i.deleteBuffer(s[y]);a=[],s={},r={}}return{bind:l,update:c,dispose:f}}class Ql{constructor(e={}){const{canvas:t=Vh(),context:n=null,depth:s=!0,stencil:r=!0,alpha:a=!1,antialias:o=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:h="default",failIfMajorPerformanceCaveat:u=!1}=e;this.isWebGLRenderer=!0;let d;n!==null?d=n.getContextAttributes().alpha:d=a;const p=new Uint32Array(4),g=new Int32Array(4);let _=null,m=null;const f=[],y=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.outputColorSpace=Ye,this._useLegacyLights=!1,this.toneMapping=En,this.toneMappingExposure=1;const v=this;let T=!1,w=0,C=0,b=null,O=-1,S=null;const A=new $e,Q=new $e;let re=null;const z=new Pe(0);let G=0,k=t.width,ne=t.height,V=1,W=null,te=null;const K=new $e(0,0,k,ne),F=new $e(0,0,k,ne);let Y=!1;const me=new zs;let ve=!1,ye=!1,Re=null;const Ie=new Be,q=new Ce,ge=new L,ue={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function ie(){return b===null?V:1}let P=n;function Se(E,U){for(let X=0;X0?m=y[y.length-1]:m=null,f.pop(),f.length>0?_=f[f.length-1]:_=null};function da(E,U,X,N){if(E.visible===!1)return;if(E.layers.test(U.layers)){if(E.isGroup)X=E.renderOrder;else if(E.isLOD)E.autoUpdate===!0&&E.update(U);else if(E.isLight)m.pushLight(E),E.castShadow&&m.pushShadow(E);else if(E.isSprite){if(!E.frustumCulled||me.intersectsSprite(E)){N&&ge.setFromMatrixPosition(E.matrixWorld).applyMatrix4(Ie);const De=x.update(E),Ne=E.material;Ne.visible&&_.push(E,De,Ne,X,ge.z,null)}}else if((E.isMesh||E.isLine||E.isPoints)&&(!E.frustumCulled||me.intersectsObject(E))){const De=x.update(E),Ne=E.material;if(N&&(E.boundingSphere!==void 0?(E.boundingSphere===null&&E.computeBoundingSphere(),ge.copy(E.boundingSphere.center)):(De.boundingSphere===null&&De.computeBoundingSphere(),ge.copy(De.boundingSphere.center)),ge.applyMatrix4(E.matrixWorld).applyMatrix4(Ie)),Array.isArray(Ne)){const Oe=De.groups;for(let Ve=0,Ue=Oe.length;Ve0&&_c(j,Ae,U,X),N&&he.viewport(A.copy(N)),j.length>0&&ts(j,U,X),Ae.length>0&&ts(Ae,U,X),De.length>0&&ts(De,U,X),he.buffers.depth.setTest(!0),he.buffers.depth.setMask(!0),he.buffers.color.setMask(!0),he.setPolygonOffset(!1)}function _c(E,U,X,N){const j=oe.isWebGL2;Re===null&&(Re=new Gn(1,1,{generateMipmaps:!0,type:J.has("EXT_color_buffer_half_float")?Yi:Tn,minFilter:kn,samples:j?4:0})),v.getDrawingBufferSize(q),j?Re.setSize(q.x,q.y):Re.setSize(Us(q.x),Us(q.y));const Ae=v.getRenderTarget();v.setRenderTarget(Re),v.getClearColor(z),G=v.getClearAlpha(),G<1&&v.setClearColor(16777215,.5),v.clear();const De=v.toneMapping;v.toneMapping=En,ts(E,X,N),le.updateMultisampleRenderTarget(Re),le.updateRenderTargetMipmap(Re);let Ne=!1;for(let Oe=0,Ve=U.length;Oe0),ze=!!X.morphAttributes.position,nt=!!X.morphAttributes.normal,it=!!X.morphAttributes.color;let It=En;N.toneMapped&&(b===null||b.isXRRenderTarget===!0)&&(It=v.toneMapping);const en=X.morphAttributes.position||X.morphAttributes.normal||X.morphAttributes.color,st=en!==void 0?en.length:0,Xe=we.get(N),Gs=m.state.lights;if(ve===!0&&(ye===!0||E!==S)){const wt=E===S&&N.id===O;Te.setState(N,E,wt)}let rt=!1;N.version===Xe.__version?(Xe.needsLights&&Xe.lightsStateVersion!==Gs.state.version||Xe.outputColorSpace!==Ne||j.isInstancedMesh&&Xe.instancing===!1||!j.isInstancedMesh&&Xe.instancing===!0||j.isSkinnedMesh&&Xe.skinning===!1||!j.isSkinnedMesh&&Xe.skinning===!0||j.isInstancedMesh&&Xe.instancingColor===!0&&j.instanceColor===null||j.isInstancedMesh&&Xe.instancingColor===!1&&j.instanceColor!==null||Xe.envMap!==Oe||N.fog===!0&&Xe.fog!==Ae||Xe.numClippingPlanes!==void 0&&(Xe.numClippingPlanes!==Te.numPlanes||Xe.numIntersection!==Te.numIntersection)||Xe.vertexAlphas!==Ve||Xe.vertexTangents!==Ue||Xe.morphTargets!==ze||Xe.morphNormals!==nt||Xe.morphColors!==it||Xe.toneMapping!==It||oe.isWebGL2===!0&&Xe.morphTargetsCount!==st)&&(rt=!0):(rt=!0,Xe.__version=N.version);let An=Xe.currentProgram;rt===!0&&(An=ns(N,U,j));let ga=!1,Ii=!1,Vs=!1;const xt=An.getUniforms(),wn=Xe.uniforms;if(he.useProgram(An.program)&&(ga=!0,Ii=!0,Vs=!0),N.id!==O&&(O=N.id,Ii=!0),ga||S!==E){xt.setValue(P,"projectionMatrix",E.projectionMatrix),xt.setValue(P,"viewMatrix",E.matrixWorldInverse);const wt=xt.map.cameraPosition;wt!==void 0&&wt.setValue(P,ge.setFromMatrixPosition(E.matrixWorld)),oe.logarithmicDepthBuffer&&xt.setValue(P,"logDepthBufFC",2/(Math.log(E.far+1)/Math.LN2)),(N.isMeshPhongMaterial||N.isMeshToonMaterial||N.isMeshLambertMaterial||N.isMeshBasicMaterial||N.isMeshStandardMaterial||N.isShaderMaterial)&&xt.setValue(P,"isOrthographic",E.isOrthographicCamera===!0),S!==E&&(S=E,Ii=!0,Vs=!0)}if(j.isSkinnedMesh){xt.setOptional(P,j,"bindMatrix"),xt.setOptional(P,j,"bindMatrixInverse");const wt=j.skeleton;wt&&(oe.floatVertexTextures?(wt.boneTexture===null&&wt.computeBoneTexture(),xt.setValue(P,"boneTexture",wt.boneTexture,le),xt.setValue(P,"boneTextureSize",wt.boneTextureSize)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}const Ws=X.morphAttributes;if((Ws.position!==void 0||Ws.normal!==void 0||Ws.color!==void 0&&oe.isWebGL2===!0)&&R.update(j,X,An),(Ii||Xe.receiveShadow!==j.receiveShadow)&&(Xe.receiveShadow=j.receiveShadow,xt.setValue(P,"receiveShadow",j.receiveShadow)),N.isMeshGouraudMaterial&&N.envMap!==null&&(wn.envMap.value=Oe,wn.flipEnvMap.value=Oe.isCubeTexture&&Oe.isRenderTargetTexture===!1?-1:1),Ii&&(xt.setValue(P,"toneMappingExposure",v.toneMappingExposure),Xe.needsLights&&vc(wn,Vs),Ae&&N.fog===!0&&Z.refreshFogUniforms(wn,Ae),Z.refreshMaterialUniforms(wn,N,V,ne,Re),Ps.upload(P,Xe.uniformsList,wn,le)),N.isShaderMaterial&&N.uniformsNeedUpdate===!0&&(Ps.upload(P,Xe.uniformsList,wn,le),N.uniformsNeedUpdate=!1),N.isSpriteMaterial&&xt.setValue(P,"center",j.center),xt.setValue(P,"modelViewMatrix",j.modelViewMatrix),xt.setValue(P,"normalMatrix",j.normalMatrix),xt.setValue(P,"modelMatrix",j.matrixWorld),N.isShaderMaterial||N.isRawShaderMaterial){const wt=N.uniformsGroups;for(let Xs=0,Sc=wt.length;Xs0&&le.useMultisampledRTT(E)===!1?j=we.get(E).__webglMultisampledFramebuffer:Array.isArray(Ue)?j=Ue[X]:j=Ue,A.copy(E.viewport),Q.copy(E.scissor),re=E.scissorTest}else A.copy(K).multiplyScalar(V).floor(),Q.copy(F).multiplyScalar(V).floor(),re=Y;if(he.bindFramebuffer(P.FRAMEBUFFER,j)&&oe.drawBuffers&&N&&he.drawBuffers(E,j),he.viewport(A),he.scissor(Q),he.setScissorTest(re),Ae){const Oe=we.get(E.texture);P.framebufferTexture2D(P.FRAMEBUFFER,P.COLOR_ATTACHMENT0,P.TEXTURE_CUBE_MAP_POSITIVE_X+U,Oe.__webglTexture,X)}else if(De){const Oe=we.get(E.texture),Ve=U||0;P.framebufferTextureLayer(P.FRAMEBUFFER,P.COLOR_ATTACHMENT0,Oe.__webglTexture,X||0,Ve)}O=-1},this.readRenderTargetPixels=function(E,U,X,N,j,Ae,De){if(!(E&&E.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Ne=we.get(E).__webglFramebuffer;if(E.isWebGLCubeRenderTarget&&De!==void 0&&(Ne=Ne[De]),Ne){he.bindFramebuffer(P.FRAMEBUFFER,Ne);try{const Oe=E.texture,Ve=Oe.format,Ue=Oe.type;if(Ve!==Ot&&fe.convert(Ve)!==P.getParameter(P.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const ze=Ue===Yi&&(J.has("EXT_color_buffer_half_float")||oe.isWebGL2&&J.has("EXT_color_buffer_float"));if(Ue!==Tn&&fe.convert(Ue)!==P.getParameter(P.IMPLEMENTATION_COLOR_READ_TYPE)&&!(Ue===hn&&(oe.isWebGL2||J.has("OES_texture_float")||J.has("WEBGL_color_buffer_float")))&&!ze){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}U>=0&&U<=E.width-N&&X>=0&&X<=E.height-j&&P.readPixels(U,X,N,j,fe.convert(Ve),fe.convert(Ue),Ae)}finally{const Oe=b!==null?we.get(b).__webglFramebuffer:null;he.bindFramebuffer(P.FRAMEBUFFER,Oe)}}},this.copyFramebufferToTexture=function(E,U,X=0){const N=Math.pow(2,-X),j=Math.floor(U.image.width*N),Ae=Math.floor(U.image.height*N);le.setTexture2D(U,0),P.copyTexSubImage2D(P.TEXTURE_2D,X,0,0,E.x,E.y,j,Ae),he.unbindTexture()},this.copyTextureToTexture=function(E,U,X,N=0){const j=U.image.width,Ae=U.image.height,De=fe.convert(X.format),Ne=fe.convert(X.type);le.setTexture2D(X,0),P.pixelStorei(P.UNPACK_FLIP_Y_WEBGL,X.flipY),P.pixelStorei(P.UNPACK_PREMULTIPLY_ALPHA_WEBGL,X.premultiplyAlpha),P.pixelStorei(P.UNPACK_ALIGNMENT,X.unpackAlignment),U.isDataTexture?P.texSubImage2D(P.TEXTURE_2D,N,E.x,E.y,j,Ae,De,Ne,U.image.data):U.isCompressedTexture?P.compressedTexSubImage2D(P.TEXTURE_2D,N,E.x,E.y,U.mipmaps[0].width,U.mipmaps[0].height,De,U.mipmaps[0].data):P.texSubImage2D(P.TEXTURE_2D,N,E.x,E.y,De,Ne,U.image),N===0&&X.generateMipmaps&&P.generateMipmap(P.TEXTURE_2D),he.unbindTexture()},this.copyTextureToTexture3D=function(E,U,X,N,j=0){if(v.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const Ae=E.max.x-E.min.x+1,De=E.max.y-E.min.y+1,Ne=E.max.z-E.min.z+1,Oe=fe.convert(N.format),Ve=fe.convert(N.type);let Ue;if(N.isData3DTexture)le.setTexture3D(N,0),Ue=P.TEXTURE_3D;else if(N.isDataArrayTexture)le.setTexture2DArray(N,0),Ue=P.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}P.pixelStorei(P.UNPACK_FLIP_Y_WEBGL,N.flipY),P.pixelStorei(P.UNPACK_PREMULTIPLY_ALPHA_WEBGL,N.premultiplyAlpha),P.pixelStorei(P.UNPACK_ALIGNMENT,N.unpackAlignment);const ze=P.getParameter(P.UNPACK_ROW_LENGTH),nt=P.getParameter(P.UNPACK_IMAGE_HEIGHT),it=P.getParameter(P.UNPACK_SKIP_PIXELS),It=P.getParameter(P.UNPACK_SKIP_ROWS),en=P.getParameter(P.UNPACK_SKIP_IMAGES),st=X.isCompressedTexture?X.mipmaps[0]:X.image;P.pixelStorei(P.UNPACK_ROW_LENGTH,st.width),P.pixelStorei(P.UNPACK_IMAGE_HEIGHT,st.height),P.pixelStorei(P.UNPACK_SKIP_PIXELS,E.min.x),P.pixelStorei(P.UNPACK_SKIP_ROWS,E.min.y),P.pixelStorei(P.UNPACK_SKIP_IMAGES,E.min.z),X.isDataTexture||X.isData3DTexture?P.texSubImage3D(Ue,j,U.x,U.y,U.z,Ae,De,Ne,Oe,Ve,st.data):X.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),P.compressedTexSubImage3D(Ue,j,U.x,U.y,U.z,Ae,De,Ne,Oe,st.data)):P.texSubImage3D(Ue,j,U.x,U.y,U.z,Ae,De,Ne,Oe,Ve,st),P.pixelStorei(P.UNPACK_ROW_LENGTH,ze),P.pixelStorei(P.UNPACK_IMAGE_HEIGHT,nt),P.pixelStorei(P.UNPACK_SKIP_PIXELS,it),P.pixelStorei(P.UNPACK_SKIP_ROWS,It),P.pixelStorei(P.UNPACK_SKIP_IMAGES,en),j===0&&N.generateMipmaps&&P.generateMipmap(Ue),he.unbindTexture()},this.initTexture=function(E){E.isCubeTexture?le.setTextureCube(E,0):E.isData3DTexture?le.setTexture3D(E,0):E.isDataArrayTexture||E.isCompressedArrayTexture?le.setTexture2DArray(E,0):le.setTexture2D(E,0),he.unbindTexture()},this.resetState=function(){w=0,C=0,b=null,he.reset(),xe.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return un}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(e){console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!e}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===Ye?zn:Ol}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===zn?Ye:dt}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(e){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=e}}class Jm extends Ql{}Jm.prototype.isWebGL1Renderer=!0;class Qm extends tt{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t}}class eg{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=zr,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=Vt()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let s=0,r=this.stride;sl)continue;d.applyMatrix4(this.matrixWorld);const O=e.ray.origin.distanceTo(d);Oe.far||t.push({distance:O,point:u.clone().applyMatrix4(this.matrixWorld),index:v,face:null,faceIndex:null,object:this})}}else{const f=Math.max(0,a.start),y=Math.min(m.count,a.start+a.count);for(let v=f,T=y-1;vl)continue;d.applyMatrix4(this.matrixWorld);const C=e.ray.origin.distanceTo(d);Ce.far||t.push({distance:C,point:u.clone().applyMatrix4(this.matrixWorld),index:v,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){const s=t[n[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,a=s.length;r0){const s=t[n[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,a=s.length;rs.far)return;r.push({distance:c,distanceToRay:Math.sqrt(o),point:l,index:e,face:null,object:a})}}class oa extends Wt{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new Pe(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Pe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Qr,this.normalScale=new Ce(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class bn extends oa{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Ce(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return ft(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(t){this.ior=(1+.4*t)/(1-.4*t)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new Pe(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new Pe(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new Pe(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class hg extends Wt{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Pe(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Pe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Qr,this.normalScale=new Ce(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=$r,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}function _n(i,e,t){return nc(i)?new i.constructor(i.subarray(e,t!==void 0?t:i.length)):i.slice(e,t)}function ws(i,e,t){return!i||!t&&i.constructor===e?i:typeof e.BYTES_PER_ELEMENT=="number"?new e(i):Array.prototype.slice.call(i)}function nc(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}function ug(i){function e(s,r){return i[s]-i[r]}const t=i.length,n=new Array(t);for(let s=0;s!==t;++s)n[s]=s;return n.sort(e),n}function nl(i,e,t){const n=i.length,s=new i.constructor(n);for(let r=0,a=0;a!==n;++r){const o=t[r]*e;for(let l=0;l!==e;++l)s[a++]=i[o+l]}return s}function ic(i,e,t,n){let s=1,r=i[0];for(;r!==void 0&&r[n]===void 0;)r=i[s++];if(r===void 0)return;let a=r[n];if(a!==void 0)if(Array.isArray(a))do a=r[n],a!==void 0&&(e.push(r.time),t.push.apply(t,a)),r=i[s++];while(r!==void 0);else if(a.toArray!==void 0)do a=r[n],a!==void 0&&(e.push(r.time),a.toArray(t,t.length)),r=i[s++];while(r!==void 0);else do a=r[n],a!==void 0&&(e.push(r.time),t.push(a)),r=i[s++];while(r!==void 0)}class es{constructor(e,t,n,s){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=s!==void 0?s:new t.constructor(n),this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let n=this._cachedIndex,s=t[n],r=t[n-1];n:{e:{let a;t:{i:if(!(e=r)){const o=t[1];e=r)break e}a=n,n=0;break t}break n}for(;n>>1;et;)--a;if(++a,r!==0||a!==s){r>=a&&(a=Math.max(a,1),r=a-1);const o=this.getValueSize();this.times=_n(n,r,a),this.values=_n(this.values,r*o,a*o)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,s=this.values,r=n.length;r===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let a=null;for(let o=0;o!==r;o++){const l=n[o];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,o,l),e=!1;break}if(a!==null&&a>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,o,l,a),e=!1;break}a=l}if(s!==void 0&&nc(s))for(let o=0,l=s.length;o!==l;++o){const c=s[o];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,o,c),e=!1;break}}return e}optimize(){const e=_n(this.times),t=_n(this.values),n=this.getValueSize(),s=this.getInterpolation()===tr,r=e.length-1;let a=1;for(let o=1;o0){e[a]=e[r];for(let o=r*n,l=a*n,c=0;c!==n;++c)t[l+c]=t[o+c];++a}return a!==e.length?(this.times=_n(e,0,a),this.values=_n(t,0,a*n)):(this.times=e,this.values=t),this}clone(){const e=_n(this.times,0),t=_n(this.values,0),n=this.constructor,s=new n(this.name,e,t);return s.createInterpolant=this.createInterpolant,s}}Qt.prototype.TimeBufferType=Float32Array;Qt.prototype.ValueBufferType=Float32Array;Qt.prototype.DefaultInterpolation=yi;class Ci extends Qt{}Ci.prototype.ValueTypeName="bool";Ci.prototype.ValueBufferType=Array;Ci.prototype.DefaultInterpolation=Ki;Ci.prototype.InterpolantFactoryMethodLinear=void 0;Ci.prototype.InterpolantFactoryMethodSmooth=void 0;class sc extends Qt{}sc.prototype.ValueTypeName="color";class bi extends Qt{}bi.prototype.ValueTypeName="number";class mg extends es{constructor(e,t,n,s){super(e,t,n,s)}interpolate_(e,t,n,s){const r=this.resultBuffer,a=this.sampleValues,o=this.valueSize,l=(n-t)/(s-t);let c=e*o;for(let h=c+o;c!==h;c+=4)Zt.slerpFlat(r,0,a,c-o,a,c,l);return r}}class Wn extends Qt{InterpolantFactoryMethodLinear(e){return new mg(this.times,this.values,this.getValueSize(),e)}}Wn.prototype.ValueTypeName="quaternion";Wn.prototype.DefaultInterpolation=yi;Wn.prototype.InterpolantFactoryMethodSmooth=void 0;class Li extends Qt{}Li.prototype.ValueTypeName="string";Li.prototype.ValueBufferType=Array;Li.prototype.DefaultInterpolation=Ki;Li.prototype.InterpolantFactoryMethodLinear=void 0;Li.prototype.InterpolantFactoryMethodSmooth=void 0;class Ai extends Qt{}Ai.prototype.ValueTypeName="vector";class gg{constructor(e,t=-1,n,s=gh){this.name=e,this.tracks=n,this.duration=t,this.blendMode=s,this.uuid=Vt(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,s=1/(e.fps||1);for(let a=0,o=n.length;a!==o;++a)t.push(xg(n[a]).scale(s));const r=new this(e.name,e.duration,t,e.blendMode);return r.uuid=e.uuid,r}static toJSON(e){const t=[],n=e.tracks,s={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let r=0,a=n.length;r!==a;++r)t.push(Qt.toJSON(n[r]));return s}static CreateFromMorphTargetSequence(e,t,n,s){const r=t.length,a=[];for(let o=0;o1){const u=h[1];let d=s[u];d||(s[u]=d=[]),d.push(c)}}const a=[];for(const o in s)a.push(this.CreateFromMorphTargetSequence(o,s[o],t,n));return a}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(u,d,p,g,_){if(p.length!==0){const m=[],f=[];ic(p,m,f,g),m.length!==0&&_.push(new u(d,m,f))}},s=[],r=e.name||"default",a=e.fps||30,o=e.blendMode;let l=e.length||-1;const c=e.hierarchy||[];for(let u=0;u{t&&t(r),this.manager.itemEnd(e)},0),r;if(ln[e]!==void 0){ln[e].push({onLoad:t,onProgress:n,onError:s});return}ln[e]=[],ln[e].push({onLoad:t,onProgress:n,onError:s});const a=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),o=this.mimeType,l=this.responseType;fetch(a).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||c.body===void 0||c.body.getReader===void 0)return c;const h=ln[e],u=c.body.getReader(),d=c.headers.get("Content-Length")||c.headers.get("X-File-Size"),p=d?parseInt(d):0,g=p!==0;let _=0;const m=new ReadableStream({start(f){y();function y(){u.read().then(({done:v,value:T})=>{if(v)f.close();else{_+=T.byteLength;const w=new ProgressEvent("progress",{lengthComputable:g,loaded:_,total:p});for(let C=0,b=h.length;C{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(h=>new DOMParser().parseFromString(h,o));case"json":return c.json();default:if(o===void 0)return c.text();{const u=/charset="?([^;"\s]*)"?/i.exec(o),d=u&&u[1]?u[1].toLowerCase():void 0,p=new TextDecoder(d);return c.arrayBuffer().then(g=>p.decode(g))}}}).then(c=>{wi.add(e,c);const h=ln[e];delete ln[e];for(let u=0,d=h.length;u{const h=ln[e];if(h===void 0)throw this.manager.itemError(e),c;delete ln[e];for(let u=0,d=h.length;u{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class yg extends Pi{constructor(e){super(e)}load(e,t,n,s){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,a=wi.get(e);if(a!==void 0)return r.manager.itemStart(e),setTimeout(function(){t&&t(a),r.manager.itemEnd(e)},0),a;const o=Zi("img");function l(){h(),wi.add(e,this),t&&t(this),r.manager.itemEnd(e)}function c(u){h(),s&&s(u),r.manager.itemError(e),r.manager.itemEnd(e)}function h(){o.removeEventListener("load",l,!1),o.removeEventListener("error",c,!1)}return o.addEventListener("load",l,!1),o.addEventListener("error",c,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(o.crossOrigin=this.crossOrigin),r.manager.itemStart(e),o.src=e,o}}class ac extends Pi{constructor(e){super(e)}load(e,t,n,s){const r=new pt,a=new yg(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setPath(this.path),a.load(e,function(o){r.image=o,r.needsUpdate=!0,t!==void 0&&t(r)},n,s),r}}class la extends tt{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new Pe(e),this.intensity=t}dispose(){}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,this.groundColor!==void 0&&(t.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(t.object.distance=this.distance),this.angle!==void 0&&(t.object.angle=this.angle),this.decay!==void 0&&(t.object.decay=this.decay),this.penumbra!==void 0&&(t.object.penumbra=this.penumbra),this.shadow!==void 0&&(t.object.shadow=this.shadow.toJSON()),t}}const wr=new Be,il=new L,sl=new L;class ca{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Ce(512,512),this.map=null,this.mapPass=null,this.matrix=new Be,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new zs,this._frameExtents=new Ce(1,1),this._viewportCount=1,this._viewports=[new $e(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;il.setFromMatrixPosition(e.matrixWorld),t.position.copy(il),sl.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(sl),t.updateMatrixWorld(),wr.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(wr),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(wr)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class Eg extends ca{constructor(){super(new yt(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const t=this.camera,n=Ei*2*e.angle*this.focus,s=this.mapSize.width/this.mapSize.height,r=e.distance||t.far;(n!==t.fov||s!==t.aspect||r!==t.far)&&(t.fov=n,t.aspect=s,t.far=r,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class oc extends la{constructor(e,t,n=0,s=Math.PI/3,r=0,a=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(tt.DEFAULT_UP),this.updateMatrix(),this.target=new tt,this.distance=n,this.angle=s,this.penumbra=r,this.decay=a,this.map=null,this.shadow=new Eg}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const rl=new Be,Hi=new L,Rr=new L;class Tg extends ca{constructor(){super(new yt(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new Ce(4,2),this._viewportCount=6,this._viewports=[new $e(2,1,1,1),new $e(0,1,1,1),new $e(3,1,1,1),new $e(1,1,1,1),new $e(3,0,1,1),new $e(1,0,1,1)],this._cubeDirections=[new L(1,0,0),new L(-1,0,0),new L(0,0,1),new L(0,0,-1),new L(0,1,0),new L(0,-1,0)],this._cubeUps=[new L(0,1,0),new L(0,1,0),new L(0,1,0),new L(0,1,0),new L(0,0,1),new L(0,0,-1)]}updateMatrices(e,t=0){const n=this.camera,s=this.matrix,r=e.distance||n.far;r!==n.far&&(n.far=r,n.updateProjectionMatrix()),Hi.setFromMatrixPosition(e.matrixWorld),n.position.copy(Hi),Rr.copy(n.position),Rr.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(Rr),n.updateMatrixWorld(),s.makeTranslation(-Hi.x,-Hi.y,-Hi.z),rl.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(rl)}}class bg extends la{constructor(e,t,n=0,s=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=n,this.decay=s,this.shadow=new Tg}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class Ag extends ca{constructor(){super(new na(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class lc extends la{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(tt.DEFAULT_UP),this.updateMatrix(),this.target=new tt,this.shadow=new Ag}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class Wr{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let t="";for(let n=0,s=e.length;n"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,n,s){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,a=wi.get(e);if(a!==void 0)return r.manager.itemStart(e),setTimeout(function(){t&&t(a),r.manager.itemEnd(e)},0),a;const o={};o.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",o.headers=this.requestHeader,fetch(e,o).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,Object.assign(r.options,{colorSpaceConversion:"none"}))}).then(function(l){wi.add(e,l),t&&t(l),r.manager.itemEnd(e)}).catch(function(l){s&&s(l),r.manager.itemError(e),r.manager.itemEnd(e)}),r.manager.itemStart(e)}}class Rg{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=al(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=al();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function al(){return(typeof performance>"u"?Date:performance).now()}const ha="\\[\\]\\.:\\/",Cg=new RegExp("["+ha+"]","g"),ua="[^"+ha+"]",Lg="[^"+ha.replace("\\.","")+"]",Pg=/((?:WC+[\/:])*)/.source.replace("WC",ua),Ig=/(WCOD+)?/.source.replace("WCOD",Lg),Dg=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",ua),Ug=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",ua),Ng=new RegExp("^"+Pg+Ig+Dg+Ug+"$"),Og=["material","materials","bones","map"];class Fg{constructor(e,t,n){const s=n||Ze.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,s)}getValue(e,t){this.bind();const n=this._targetGroup.nCachedObjects_,s=this._bindings[n];s!==void 0&&s.getValue(e,t)}setValue(e,t){const n=this._bindings;for(let s=this._targetGroup.nCachedObjects_,r=n.length;s!==r;++s)n[s].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}}class Ze{constructor(e,t,n){this.path=t,this.parsedPath=n||Ze.parseTrackName(t),this.node=Ze.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new Ze.Composite(e,t,n):new Ze(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(Cg,"")}static parseTrackName(e){const t=Ng.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},s=n.nodeName&&n.nodeName.lastIndexOf(".");if(s!==void 0&&s!==-1){const r=n.nodeName.substring(s+1);Og.indexOf(r)!==-1&&(n.nodeName=n.nodeName.substring(0,s),n.objectName=r)}if(n.propertyName===null||n.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const n=e.skeleton.getBoneByName(t);if(n!==void 0)return n}if(e.children){const n=function(r){for(let a=0;athis.max.x||e.ythis.max.y)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y)}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,ll).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const hl=new L,Rs=new L,ul=new L;class Bg extends tt{constructor(e,t,n){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,this.type="DirectionalLightHelper",t===void 0&&(t=1);let s=new Ft;s.setAttribute("position",new Xt([-t,t,0,t,t,0,t,-t,0,-t,-t,0,-t,t,0],3));const r=new aa({fog:!1,toneMapped:!1});this.lightPlane=new $i(s,r),this.add(this.lightPlane),s=new Ft,s.setAttribute("position",new Xt([0,0,0,0,0,1],3)),this.targetLine=new $i(s,r),this.add(this.targetLine),this.update()}dispose(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1),hl.setFromMatrixPosition(this.light.matrixWorld),Rs.setFromMatrixPosition(this.light.target.matrixWorld),ul.subVectors(Rs,hl),this.lightPlane.lookAt(Rs),this.color!==void 0?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(Rs),this.targetLine.scale.z=ul.length()}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Zr}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Zr);class zg{constructor(){this.id=0,this.object=null,this.z=0,this.renderOrder=0}}class cc{constructor(){this.id=0,this.v1=new gi,this.v2=new gi,this.v3=new gi,this.normalModel=new L,this.vertexNormalsModel=[new L,new L,new L],this.vertexNormalsLength=0,this.color=new Pe,this.material=null,this.uvs=[new Ce,new Ce,new Ce],this.z=0,this.renderOrder=0}}class gi{constructor(){this.position=new L,this.positionWorld=new L,this.positionScreen=new $e,this.visible=!0}copy(e){this.positionWorld.copy(e.positionWorld),this.positionScreen.copy(e.positionScreen)}}class hc{constructor(){this.id=0,this.v1=new gi,this.v2=new gi,this.vertexColors=[new Pe,new Pe],this.material=null,this.z=0,this.renderOrder=0}}class uc{constructor(){this.id=0,this.object=null,this.x=0,this.y=0,this.z=0,this.rotation=0,this.scale=new Ce,this.material=null,this.renderOrder=0}}class Hg{constructor(){let e,t,n=0,s,r,a=0,o,l,c=0,h,u,d=0,p,g,_=0,m;const f={objects:[],lights:[],elements:[]},y=new L,v=new $e,T=new jt(new L(-1,-1,-1),new L(1,1,1)),w=new jt,C=new Array(3),b=new Be,O=new Be,S=new Be,A=new zs,Q=[],re=[],z=[],G=[],k=[];function ne(){const q=[],ge=[],ue=[];let ie=null;const P=new ke;function Se(M){ie=M,P.getNormalMatrix(ie.matrixWorld),q.length=0,ge.length=0,ue.length=0}function J(M){const x=M.position,D=M.positionWorld,Z=M.positionScreen;D.copy(x).applyMatrix4(m),Z.copy(D).applyMatrix4(O);const ee=1/Z.w;Z.x*=ee,Z.y*=ee,Z.z*=ee,M.visible=Z.x>=-1&&Z.x<=1&&Z.y>=-1&&Z.y<=1&&Z.z>=-1&&Z.z<=1}function oe(M,x,D){s=Y(),s.position.set(M,x,D),J(s)}function he(M,x,D){q.push(M,x,D)}function Le(M,x,D){ge.push(M,x,D)}function we(M,x){ue.push(M,x)}function le(M,x,D){return M.visible===!0||x.visible===!0||D.visible===!0?!0:(C[0]=M.positionScreen,C[1]=x.positionScreen,C[2]=D.positionScreen,T.intersectsBox(w.setFromPoints(C)))}function be(M,x,D){return(D.positionScreen.x-M.positionScreen.x)*(x.positionScreen.y-M.positionScreen.y)-(D.positionScreen.y-M.positionScreen.y)*(x.positionScreen.x-M.positionScreen.x)<0}function We(M,x){const D=re[M],Z=re[x];D.positionScreen.copy(D.position).applyMatrix4(S),Z.positionScreen.copy(Z.position).applyMatrix4(S),Ie(D.positionScreen,Z.positionScreen)===!0&&(D.positionScreen.multiplyScalar(1/D.positionScreen.w),Z.positionScreen.multiplyScalar(1/Z.positionScreen.w),h=ve(),h.id=ie.id,h.v1.copy(D),h.v2.copy(Z),h.z=Math.max(D.positionScreen.z,Z.positionScreen.z),h.renderOrder=ie.renderOrder,h.material=ie.material,ie.material.vertexColors&&(h.vertexColors[0].fromArray(ge,M*3),h.vertexColors[1].fromArray(ge,x*3)),f.elements.push(h))}function Ee(M,x,D,Z){const ee=re[M],ae=re[x],Te=re[D];if(le(ee,ae,Te)!==!1&&(Z.side===Gt||be(ee,ae,Te)===!0)){o=me(),o.id=ie.id,o.v1.copy(ee),o.v2.copy(ae),o.v3.copy(Te),o.z=(ee.positionScreen.z+ae.positionScreen.z+Te.positionScreen.z)/3,o.renderOrder=ie.renderOrder,y.subVectors(Te.position,ae.position),v.subVectors(ee.position,ae.position),y.cross(v),o.normalModel.copy(y),o.normalModel.applyMatrix3(P).normalize();for(let se=0;se<3;se++){const B=o.vertexNormalsModel[se];B.fromArray(q,arguments[se]*3),B.applyMatrix3(P).normalize(),o.uvs[se].fromArray(ue,arguments[se]*2)}o.vertexNormalsLength=3,o.material=Z,Z.vertexColors&&o.color.fromArray(ge,M*3),f.elements.push(o)}}return{setObject:Se,projectVertex:J,checkTriangleVisibility:le,checkBackfaceCulling:be,pushVertex:oe,pushNormal:he,pushColor:Le,pushUv:we,pushLine:We,pushTriangle:Ee}}const V=new ne;function W(q){if(q.visible===!1)return;if(q.isLight)f.lights.push(q);else if(q.isMesh||q.isLine||q.isPoints){if(q.material.visible===!1||q.frustumCulled===!0&&A.intersectsObject(q)===!1)return;te(q)}else if(q.isSprite){if(q.material.visible===!1||q.frustumCulled===!0&&A.intersectsSprite(q)===!1)return;te(q)}const ge=q.children;for(let ue=0,ie=ge.length;ue0)for(let M=0;M0)for(let Ee=0;Ee=-1&&q.z<=1&&(p=ye(),p.id=ge.id,p.x=q.x*ie,p.y=q.y*ie,p.z=q.z,p.renderOrder=ge.renderOrder,p.object=ge,p.rotation=ge.rotation,p.scale.x=ge.scale.x*Math.abs(p.x-(q.x+ue.projectionMatrix.elements[0])/(q.w+ue.projectionMatrix.elements[12])),p.scale.y=ge.scale.y*Math.abs(p.y-(q.y+ue.projectionMatrix.elements[5])/(q.w+ue.projectionMatrix.elements[13])),p.material=ge.material,f.elements.push(p))}function F(){if(t===n){const q=new zg;return Q.push(q),n++,t++,q}return Q[t++]}function Y(){if(r===a){const q=new gi;return re.push(q),a++,r++,q}return re[r++]}function me(){if(l===c){const q=new cc;return z.push(q),c++,l++,q}return z[l++]}function ve(){if(u===d){const q=new hc;return G.push(q),d++,u++,q}return G[u++]}function ye(){if(g===_){const q=new uc;return k.push(q),_++,g++,q}return k[g++]}function Re(q,ge){return q.renderOrder!==ge.renderOrder?q.renderOrder-ge.renderOrder:q.z!==ge.z?ge.z-q.z:q.id!==ge.id?q.id-ge.id:0}function Ie(q,ge){let ue=0,ie=1;const P=q.z+q.w,Se=ge.z+ge.w,J=-q.z+q.w,oe=-ge.z+ge.w;return P>=0&&Se>=0&&J>=0&&oe>=0?!0:P<0&&Se<0||J<0&&oe<0?!1:(P<0?ue=Math.max(ue,P/(P-Se)):Se<0&&(ie=Math.min(ie,P/(P-Se))),J<0?ue=Math.max(ue,J/(J-oe)):oe<0&&(ie=Math.min(ie,J/(J-oe))),ie0;)W.removeChild(W.childNodes[0])}function K(ue){return p!==null?ue.toFixed(p):ue}this.clear=function(){te(),W.style.backgroundColor=S.getStyle()},this.render=function(ue,ie){if(!(ie instanceof ta)){console.error("THREE.SVGRenderer.render: camera is not an instance of Camera.");return}const P=ue.background;P&&P.isColor?(te(),W.style.backgroundColor=P.getStyle()):this.autoClear===!0&&this.clear(),f.info.render.vertices=0,f.info.render.faces=0,G.copy(ie.matrixWorldInverse),k.multiplyMatrices(ie.projectionMatrix,G),e=V.projectScene(ue,ie,this.sortObjects,this.sortElements),t=e.elements,n=e.lights,z.getNormalMatrix(ie.matrixWorldInverse),F(n),_="",m="";for(let Se=0,J=t.length;Se1||c.positionScreen.z<-1||c.positionScreen.z>1||h.positionScreen.z<-1||h.positionScreen.z>1)continue;l.positionScreen.x*=a,l.positionScreen.y*=-o,c.positionScreen.x*=a,c.positionScreen.y*=-o,h.positionScreen.x*=a,h.positionScreen.y*=-o,this.overdraw>0&&(Re(l.positionScreen,c.positionScreen,this.overdraw),Re(c.positionScreen,h.positionScreen,this.overdraw),Re(h.positionScreen,l.positionScreen,this.overdraw)),v.setFromPoints([l.positionScreen,c.positionScreen,h.positionScreen]),y.intersectsBox(v)===!0&&ye(l,c,h,oe,he)}}}q(),ue.traverseVisible(function(Se){if(Se.isSVGObject){if(A.setFromMatrixPosition(Se.matrixWorld),A.applyMatrix4(k),A.z<-1||A.z>1)return;const J=A.x*a,oe=-A.y*o,he=Se.node;he.setAttribute("transform","translate("+J+","+oe+")"),W.appendChild(he)}})};function F(ue){C.setRGB(0,0,0),b.setRGB(0,0,0),O.setRGB(0,0,0);for(let ie=0,P=ue.length;ie1e4?1e4:i,{In:function(e){return Math.pow(e,i)},Out:function(e){return 1-Math.pow(1-e,i)},InOut:function(e){return e<.5?Math.pow(e*2,i)/2:(1-Math.pow(2-e*2,i))/2+.5}}}}),Vi=function(){return performance.now()},Gg=function(){function i(){this._tweens={},this._tweensAddedDuringUpdate={}}return i.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map(function(t){return e._tweens[t]})},i.prototype.removeAll=function(){this._tweens={}},i.prototype.add=function(e){this._tweens[e.getId()]=e,this._tweensAddedDuringUpdate[e.getId()]=e},i.prototype.remove=function(e){delete this._tweens[e.getId()],delete this._tweensAddedDuringUpdate[e.getId()]},i.prototype.update=function(e,t){e===void 0&&(e=Vi()),t===void 0&&(t=!1);var n=Object.keys(this._tweens);if(n.length===0)return!1;for(;n.length>0;){this._tweensAddedDuringUpdate={};for(var s=0;s1?r(i[t],i[t-1],t-n):r(i[s],i[s+1>t?t:s+1],n-s)},Utils:{Linear:function(i,e,t){return(e-i)*t+i}}},dc=function(){function i(){}return i.nextId=function(){return i._nextId++},i._nextId=0,i}(),jr=new Gg,Cr=function(){function i(e,t){t===void 0&&(t=jr),this._object=e,this._group=t,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=qi.Linear.None,this._interpolationFunction=Xr.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=dc.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1}return i.prototype.getId=function(){return this._id},i.prototype.isPlaying=function(){return this._isPlaying},i.prototype.isPaused=function(){return this._isPaused},i.prototype.to=function(e,t){if(t===void 0&&(t=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=e,this._propertiesAreSetUp=!1,this._duration=t,this},i.prototype.duration=function(e){return e===void 0&&(e=1e3),this._duration=e,this},i.prototype.dynamic=function(e){return e===void 0&&(e=!1),this._isDynamic=e,this},i.prototype.start=function(e,t){if(e===void 0&&(e=Vi()),t===void 0&&(t=!1),this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var n in this._valuesStartRepeat)this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=e,this._startTime+=this._delayTime,!this._propertiesAreSetUp||t){if(this._propertiesAreSetUp=!0,!this._isDynamic){var s={};for(var r in this._valuesEnd)s[r]=this._valuesEnd[r];this._valuesEnd=s}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,t)}return this},i.prototype.startFromCurrentValues=function(e){return this.start(e,!0)},i.prototype._setupProperties=function(e,t,n,s,r){for(var a in n){var o=e[a],l=Array.isArray(o),c=l?"array":typeof o,h=!l&&Array.isArray(n[a]);if(!(c==="undefined"||c==="function")){if(h){var u=n[a];if(u.length===0)continue;for(var d=[o],p=0,g=u.length;p"u"||r)&&(t[a]=o),l||(t[a]*=1),h?s[a]=n[a].slice().reverse():s[a]=t[a]||0}}},i.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},i.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},i.prototype.pause=function(e){return e===void 0&&(e=Vi()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=e,this._group&&this._group.remove(this),this)},i.prototype.resume=function(e){return e===void 0&&(e=Vi()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this)},i.prototype.stopChainedTweens=function(){for(var e=0,t=this._chainedTweens.length;er)return!1;t&&this.start(e,!0)}if(this._goToEnd=!1,e1?1:s;var a=this._easingFunction(s);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,a),this._onUpdateCallback&&this._onUpdateCallback(this._object,s),s===1)if(this._repeat>0){isFinite(this._repeat)&&this._repeat--;for(n in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[n]=="string"&&(this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(this._valuesEnd[n])),this._yoyo&&this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n];return this._yoyo&&(this._reversed=!this._reversed),this._repeatDelayTime!==void 0?this._startTime=e+this._repeatDelayTime:this._startTime=e+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var o=0,l=this._chainedTweens.length;o{},i}function Xg(i){const e=new lc(i,4),t=new Bg(e,0);return e.position.set(60,100,30),e.tick=()=>{},{light:e,lightHelper:t}}function jg(i){const e=new Qm;return e.background=new Pe(i),e}function dl(i,e){if(e===_h)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),i;if(e===Br||e===Nl){let t=i.getIndex();if(t===null){const a=[],o=i.getAttribute("position");if(o!==void 0){for(let l=0;l=2.0 are supported."));return}const c=new T_(r,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});c.fileLoader.setRequestHeader(this.requestHeader);for(let h=0;h=0&&o[u]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+u+'".')}}c.setExtensions(a),c.setPlugins(o),c.parse(n,s)}parseAsync(e,t){const n=this;return new Promise(function(s,r){n.parse(e,t,s,r)})}}function Yg(){let i={};return{get:function(e){return i[e]},add:function(e,t){i[e]=t},remove:function(e){delete i[e]},removeAll:function(){i={}}}}const qe={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class Kg{constructor(e){this.parser=e,this.name=qe.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let n=0,s=t.length;n=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,r.source,a)}}class o_{constructor(e){this.parser=e,this.name=qe.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,s=n.json,r=s.textures[e];if(!r.extensions||!r.extensions[t])return null;const a=r.extensions[t],o=s.images[a.source];let l=n.textureLoader;if(o.uri){const c=n.options.manager.getHandler(o.uri);c!==null&&(l=c)}return this.detectSupport().then(function(c){if(c)return n.loadTextureImage(e,a.source,l);if(s.extensionsRequired&&s.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return n.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class l_{constructor(e){this.parser=e,this.name=qe.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,s=n.json,r=s.textures[e];if(!r.extensions||!r.extensions[t])return null;const a=r.extensions[t],o=s.images[a.source];let l=n.textureLoader;if(o.uri){const c=n.options.manager.getHandler(o.uri);c!==null&&(l=c)}return this.detectSupport().then(function(c){if(c)return n.loadTextureImage(e,a.source,l);if(s.extensionsRequired&&s.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return n.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class c_{constructor(e){this.name=qe.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,n=t.bufferViews[e];if(n.extensions&&n.extensions[this.name]){const s=n.extensions[this.name],r=this.parser.getDependency("buffer",s.buffer),a=this.parser.options.meshoptDecoder;if(!a||!a.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return r.then(function(o){const l=s.byteOffset||0,c=s.byteLength||0,h=s.count,u=s.byteStride,d=new Uint8Array(o,l,c);return a.decodeGltfBufferAsync?a.decodeGltfBufferAsync(h,u,d,s.mode,s.filter).then(function(p){return p.buffer}):a.ready.then(function(){const p=new ArrayBuffer(h*u);return a.decodeGltfBuffer(new Uint8Array(p),h,u,d,s.mode,s.filter),p})})}else return null}}class h_{constructor(e){this.name=qe.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,n=t.nodes[e];if(!n.extensions||!n.extensions[this.name]||n.mesh===void 0)return null;const s=t.meshes[n.mesh];for(const c of s.primitives)if(c.mode!==Ut.TRIANGLES&&c.mode!==Ut.TRIANGLE_STRIP&&c.mode!==Ut.TRIANGLE_FAN&&c.mode!==void 0)return null;const a=n.extensions[this.name].attributes,o=[],l={};for(const c in a)o.push(this.parser.getDependency("accessor",a[c]).then(h=>(l[c]=h,l[c])));return o.length<1?null:(o.push(this.parser.createNodeMesh(e)),Promise.all(o).then(c=>{const h=c.pop(),u=h.isGroup?h.children:[h],d=c[0].count,p=[];for(const g of u){const _=new Be,m=new L,f=new Zt,y=new L(1,1,1),v=new ag(g.geometry,g.material,d);for(let T=0;T0||i.search(/^data\:image\/jpeg/)===0?"image/jpeg":i.search(/\.webp($|\?)/i)>0||i.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const E_=new Be;class T_{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new Yg,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let n=!1,s=!1,r=-1;typeof navigator<"u"&&(n=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,s=navigator.userAgent.indexOf("Firefox")>-1,r=s?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||n||s&&r<98?this.textureLoader=new ac(this.options.manager):this.textureLoader=new wg(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new rc(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const n=this,s=this.json,r=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(a){return a._markDefs&&a._markDefs()}),Promise.all(this._invokeAll(function(a){return a.beforeRoot&&a.beforeRoot()})).then(function(){return Promise.all([n.getDependencies("scene"),n.getDependencies("animation"),n.getDependencies("camera")])}).then(function(a){const o={scene:a[0][s.scene||0],scenes:a[0],animations:a[1],cameras:a[2],asset:s.asset,parser:n,userData:{}};In(r,o,s),Mn(o,s),Promise.all(n._invokeAll(function(l){return l.afterRoot&&l.afterRoot(o)})).then(function(){e(o)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],n=this.json.meshes||[];for(let s=0,r=t.length;s{const l=this.associations.get(a);l!=null&&this.associations.set(o,l);for(const[c,h]of a.children.entries())r(h,o.children[c])};return r(n,s),s.name+="_instance_"+e.uses[t]++,s}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let n=0;n=2&&m.setY(S,C[b*l+1]),l>=3&&m.setZ(S,C[b*l+2]),l>=4&&m.setW(S,C[b*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return m})}loadTexture(e){const t=this.json,n=this.options,r=t.textures[e].source,a=t.images[r];let o=this.textureLoader;if(a.uri){const l=n.manager.getHandler(a.uri);l!==null&&(o=l)}return this.loadTextureImage(e,r,o)}loadTextureImage(e,t,n){const s=this,r=this.json,a=r.textures[e],o=r.images[t],l=(o.uri||o.bufferView)+":"+a.sampler;if(this.textureCache[l])return this.textureCache[l];const c=this.loadImageSource(t,n).then(function(h){h.flipY=!1,h.name=a.name||o.name||"",h.name===""&&typeof o.uri=="string"&&o.uri.startsWith("data:image/")===!1&&(h.name=o.uri);const d=(r.samplers||{})[a.sampler]||{};return h.magFilter=pl[d.magFilter]||Tt,h.minFilter=pl[d.minFilter]||kn,h.wrapS=ml[d.wrapS]||Mi,h.wrapT=ml[d.wrapT]||Mi,s.associations.set(h,{textures:e}),h}).catch(function(){return null});return this.textureCache[l]=c,c}loadImageSource(e,t){const n=this,s=this.json,r=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(u=>u.clone());const a=s.images[e],o=self.URL||self.webkitURL;let l=a.uri||"",c=!1;if(a.bufferView!==void 0)l=n.getDependency("bufferView",a.bufferView).then(function(u){c=!0;const d=new Blob([u],{type:a.mimeType});return l=o.createObjectURL(d),l});else if(a.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const h=Promise.resolve(l).then(function(u){return new Promise(function(d,p){let g=d;t.isImageBitmapLoader===!0&&(g=function(_){const m=new pt(_);m.needsUpdate=!0,d(m)}),t.load(Wr.resolveURL(u,r.path),g,void 0,p)})}).then(function(u){return c===!0&&o.revokeObjectURL(l),u.userData.mimeType=a.mimeType||y_(a.uri),u}).catch(function(u){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),u});return this.sourceCache[e]=h,h}assignTexture(e,t,n,s){const r=this;return this.getDependency("texture",n.index).then(function(a){if(!a)return null;if(n.texCoord!==void 0&&n.texCoord>0&&(a=a.clone(),a.channel=n.texCoord),r.extensions[qe.KHR_TEXTURE_TRANSFORM]){const o=n.extensions!==void 0?n.extensions[qe.KHR_TEXTURE_TRANSFORM]:void 0;if(o){const l=r.associations.get(a);a=r.extensions[qe.KHR_TEXTURE_TRANSFORM].extendTexture(a,o),r.associations.set(a,l)}}return s!==void 0&&(a.colorSpace=s),e[t]=a,a})}assignFinalMaterial(e){const t=e.geometry;let n=e.material;const s=t.attributes.tangent===void 0,r=t.attributes.color!==void 0,a=t.attributes.normal===void 0;if(e.isPoints){const o="PointsMaterial:"+n.uuid;let l=this.cache.get(o);l||(l=new tc,Wt.prototype.copy.call(l,n),l.color.copy(n.color),l.map=n.map,l.sizeAttenuation=!1,this.cache.add(o,l)),n=l}else if(e.isLine){const o="LineBasicMaterial:"+n.uuid;let l=this.cache.get(o);l||(l=new aa,Wt.prototype.copy.call(l,n),l.color.copy(n.color),l.map=n.map,this.cache.add(o,l)),n=l}if(s||r||a){let o="ClonedMaterial:"+n.uuid+":";s&&(o+="derivative-tangents:"),r&&(o+="vertex-colors:"),a&&(o+="flat-shading:");let l=this.cache.get(o);l||(l=n.clone(),r&&(l.vertexColors=!0),a&&(l.flatShading=!0),s&&(l.normalScale&&(l.normalScale.y*=-1),l.clearcoatNormalScale&&(l.clearcoatNormalScale.y*=-1)),this.cache.add(o,l),this.associations.set(l,this.associations.get(n))),n=l}e.material=n}getMaterialType(){return oa}loadMaterial(e){const t=this,n=this.json,s=this.extensions,r=n.materials[e];let a;const o={},l=r.extensions||{},c=[];if(l[qe.KHR_MATERIALS_UNLIT]){const u=s[qe.KHR_MATERIALS_UNLIT];a=u.getMaterialType(),c.push(u.extendParams(o,r,t))}else{const u=r.pbrMetallicRoughness||{};if(o.color=new Pe(1,1,1),o.opacity=1,Array.isArray(u.baseColorFactor)){const d=u.baseColorFactor;o.color.setRGB(d[0],d[1],d[2],dt),o.opacity=d[3]}u.baseColorTexture!==void 0&&c.push(t.assignTexture(o,"map",u.baseColorTexture,Ye)),o.metalness=u.metallicFactor!==void 0?u.metallicFactor:1,o.roughness=u.roughnessFactor!==void 0?u.roughnessFactor:1,u.metallicRoughnessTexture!==void 0&&(c.push(t.assignTexture(o,"metalnessMap",u.metallicRoughnessTexture)),c.push(t.assignTexture(o,"roughnessMap",u.metallicRoughnessTexture))),a=this._invokeOne(function(d){return d.getMaterialType&&d.getMaterialType(e)}),c.push(Promise.all(this._invokeAll(function(d){return d.extendMaterialParams&&d.extendMaterialParams(e,o)})))}r.doubleSided===!0&&(o.side=Gt);const h=r.alphaMode||Pr.OPAQUE;if(h===Pr.BLEND?(o.transparent=!0,o.depthWrite=!1):(o.transparent=!1,h===Pr.MASK&&(o.alphaTest=r.alphaCutoff!==void 0?r.alphaCutoff:.5)),r.normalTexture!==void 0&&a!==Nn&&(c.push(t.assignTexture(o,"normalMap",r.normalTexture)),o.normalScale=new Ce(1,1),r.normalTexture.scale!==void 0)){const u=r.normalTexture.scale;o.normalScale.set(u,u)}if(r.occlusionTexture!==void 0&&a!==Nn&&(c.push(t.assignTexture(o,"aoMap",r.occlusionTexture)),r.occlusionTexture.strength!==void 0&&(o.aoMapIntensity=r.occlusionTexture.strength)),r.emissiveFactor!==void 0&&a!==Nn){const u=r.emissiveFactor;o.emissive=new Pe().setRGB(u[0],u[1],u[2],dt)}return r.emissiveTexture!==void 0&&a!==Nn&&c.push(t.assignTexture(o,"emissiveMap",r.emissiveTexture,Ye)),Promise.all(c).then(function(){const u=new a(o);return r.name&&(u.name=r.name),Mn(u,r),t.associations.set(u,{materials:e}),r.extensions&&In(s,u,r),u})}createUniqueName(e){const t=Ze.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,n=this.extensions,s=this.primitiveCache;function r(o){return n[qe.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(o,t).then(function(l){return gl(l,o,t)})}const a=[];for(let o=0,l=e.length;o0&&M_(f,r),f.name=t.createUniqueName(r.name||"mesh_"+e),Mn(f,r),m.extensions&&In(s,f,m),t.assignFinalMaterial(f),u.push(f)}for(let p=0,g=u.length;p1?h=new On:c.length===1?h=c[0]:h=new tt,h!==c[0])for(let u=0,d=c.length;u{const u=new Map;for(const[d,p]of s.associations)(d instanceof Wt||d instanceof pt)&&u.set(d,p);return h.traverse(d=>{const p=s.associations.get(d);p!=null&&u.set(d,p)}),u};return s.associations=c(r),r})}_createAnimationTracks(e,t,n,s,r){const a=[],o=e.name?e.name:e.uuid,l=[];xn[r.path]===xn.weights?e.traverse(function(d){d.morphTargetInfluences&&l.push(d.name?d.name:d.uuid)}):l.push(o);let c;switch(xn[r.path]){case xn.weights:c=bi;break;case xn.rotation:c=Wn;break;case xn.position:case xn.scale:c=Ai;break;default:switch(n.itemSize){case 1:c=bi;break;case 2:case 3:default:c=Ai;break}break}const h=s.interpolation!==void 0?__[s.interpolation]:yi,u=this._getArrayFromAccessor(n);for(let d=0,p=l.length;du?new Date(d).getTime()-p:1,_=_l*1e3/g,m=new qg,f="/models/lupine_plant/scene.gltf",y=.1,v=h.map(T=>R_(T,e.PLATFORM_SIZE,e.PLATFORM_EDGE_FOR_UNKNOWNS));m.load(f,function(T){T.scene.scale.set(0,0,0);for(let w=0;w{t.remove(b),b.dispose()})).start(),e.lights=[...e.lights,b]}}else console.error("Got bad server response status & data of",c.status,c.data),i.setAlert("Error With Server","There was an error retrieving your claims from the server.")}catch(s){console.error("Got exception contacting server:",s),i.setAlert("Error With Server","There was a problem retrieving your claims from the server.")}}function R_(i,e,t){var s,r,a,o;let n;if((r=(s=i==null?void 0:i.claim)==null?void 0:s.recipient)!=null&&r.identifier)n=L_(i.claim.recipient.identifier),n={x:n.x-e/2,z:n.z-e/2};else if((o=(a=i==null?void 0:i.object)==null?void 0:a.isPartOf)!=null&&o.identifier){const l=i.object.isPartOf.identifier;l.startsWith(xl)&&(n=C_(l.substring(xl.length)),n={x:n.x-e/2,z:n.z-e/2})}return n||(n={x:Math.random()<.5?-e/2-t/2:e/2+t/2,z:Math.random()*e-e/2}),n}function C_(i){const e=i.substring(0,13).split("").reverse().join(""),t=i.substring(13,26).split("").reverse().join(""),n="0123456789ABCDEFGHJKMNPQRSTVWXYZ",s=n.indexOf(e[1])*32+n.indexOf(e[0]),r=n.indexOf(t[1])*32+n.indexOf(t[0]),a=100*s/1024,o=100*r/1024;return{x:a,z:o}}function L_(i){if(i.length<51)return{x:0,z:0};{const e=i.substring(11),n=parseInt(+("0x"+e.substring(0,2)),10)*100/256,r=parseInt(+("0x"+e.substring(20,22)),10)*100/256;return{x:n,z:r}}}function P_(){const i=new oc(16777215,0,0,Math.PI/8,.5,0);return i.tick=()=>{},i}function I_(i){const t=new ac().load("img/textures/leafy-autumn-forest-floor.jpg"),n=new Hs(i.width,i.height,64,64),s=new hg({color:i.color,flatShading:!0,map:t}),r=new Pt(n,s);return r.position.set(0,0,0),r.rotation.x-=Math.PI*.5,r.geometry.attributes.position.originalPosition=r.geometry.attributes.position.array,r.tick=()=>{},r}const D_=new Rg;class U_{constructor(e,t,n){this.camera=e,this.scene=t,this.renderer=n,this.updatables=[]}start(){this.renderer.setAnimationLoop(()=>{this.tick(),this.renderer.render(this.scene,this.camera)})}stop(){this.renderer.setAnimationLoop(null)}tick(){const e=D_.getDelta();for(const t of this.updatables)t.tick(e)}}const vl=(i,e,t)=>{const n=window.innerHeight,s=window.innerWidth-50;e.aspect=s/n,e.updateProjectionMatrix(),t.setSize(s,n),t.setPixelRatio(window.devicePixelRatio)};class N_{constructor(e,t,n){vl(e,t,n),window.addEventListener("resize",()=>{vl(e,t,n),this.onResize()})}onResize(){}}const Ml={type:"change"},Dr={type:"start"},Sl={type:"end"},Cs=new Ji,yl=new vn,O_=Math.cos(70*Ns.DEG2RAD);class F_ extends Xn{constructor(e,t){super(),this.object=e,this.domElement=t,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new L,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:jn.ROTATE,MIDDLE:jn.DOLLY,RIGHT:jn.PAN},this.touches={ONE:qn.ROTATE,TWO:qn.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return o.phi},this.getAzimuthalAngle=function(){return o.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(R){R.addEventListener("keydown",x),this._domElementKeyEvents=R},this.stopListenToKeyEvents=function(){this._domElementKeyEvents.removeEventListener("keydown",x),this._domElementKeyEvents=null},this.saveState=function(){n.target0.copy(n.target),n.position0.copy(n.object.position),n.zoom0=n.object.zoom},this.reset=function(){n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),n.dispatchEvent(Ml),n.update(),r=s.NONE},this.update=function(){const R=new L,$=new Zt().setFromUnitVectors(e.up,new L(0,1,0)),Me=$.clone().invert(),fe=new L,xe=new Zt,Fe=new L,je=2*Math.PI;return function(_e=null){const H=n.object.position;R.copy(H).sub(n.target),R.applyQuaternion($),o.setFromVector3(R),n.autoRotate&&r===s.NONE&&Q(S(_e)),n.enableDamping?(o.theta+=l.theta*n.dampingFactor,o.phi+=l.phi*n.dampingFactor):(o.theta+=l.theta,o.phi+=l.phi);let ce=n.minAzimuthAngle,de=n.maxAzimuthAngle;isFinite(ce)&&isFinite(de)&&(ce<-Math.PI?ce+=je:ce>Math.PI&&(ce-=je),de<-Math.PI?de+=je:de>Math.PI&&(de-=je),ce<=de?o.theta=Math.max(ce,Math.min(de,o.theta)):o.theta=o.theta>(ce+de)/2?Math.max(ce,o.theta):Math.min(de,o.theta)),o.phi=Math.max(n.minPolarAngle,Math.min(n.maxPolarAngle,o.phi)),o.makeSafe(),n.enableDamping===!0?n.target.addScaledVector(h,n.dampingFactor):n.target.add(h),n.zoomToCursor&&C||n.object.isOrthographicCamera?o.radius=te(o.radius):o.radius=te(o.radius*c),R.setFromSpherical(o),R.applyQuaternion(Me),H.copy(n.target).add(R),n.object.lookAt(n.target),n.enableDamping===!0?(l.theta*=1-n.dampingFactor,l.phi*=1-n.dampingFactor,h.multiplyScalar(1-n.dampingFactor)):(l.set(0,0,0),h.set(0,0,0));let Ge=!1;if(n.zoomToCursor&&C){let Ke=null;if(n.object.isPerspectiveCamera){const Qe=R.length();Ke=te(Qe*c);const At=Qe-Ke;n.object.position.addScaledVector(T,At),n.object.updateMatrixWorld()}else if(n.object.isOrthographicCamera){const Qe=new L(w.x,w.y,0);Qe.unproject(n.object),n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/c)),n.object.updateProjectionMatrix(),Ge=!0;const At=new L(w.x,w.y,0);At.unproject(n.object),n.object.position.sub(At).add(Qe),n.object.updateMatrixWorld(),Ke=R.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),n.zoomToCursor=!1;Ke!==null&&(this.screenSpacePanning?n.target.set(0,0,-1).transformDirection(n.object.matrix).multiplyScalar(Ke).add(n.object.position):(Cs.origin.copy(n.object.position),Cs.direction.set(0,0,-1).transformDirection(n.object.matrix),Math.abs(n.object.up.dot(Cs.direction))a||8*(1-xe.dot(n.object.quaternion))>a||Fe.distanceToSquared(n.target)>0?(n.dispatchEvent(Ml),fe.copy(n.object.position),xe.copy(n.object.quaternion),Fe.copy(n.target),Ge=!1,!0):!1}}(),this.dispose=function(){n.domElement.removeEventListener("contextmenu",ee),n.domElement.removeEventListener("pointerdown",we),n.domElement.removeEventListener("pointercancel",be),n.domElement.removeEventListener("wheel",M),n.domElement.removeEventListener("pointermove",le),n.domElement.removeEventListener("pointerup",be),n._domElementKeyEvents!==null&&(n._domElementKeyEvents.removeEventListener("keydown",x),n._domElementKeyEvents=null)};const n=this,s={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let r=s.NONE;const a=1e-6,o=new ol,l=new ol;let c=1;const h=new L,u=new Ce,d=new Ce,p=new Ce,g=new Ce,_=new Ce,m=new Ce,f=new Ce,y=new Ce,v=new Ce,T=new L,w=new Ce;let C=!1;const b=[],O={};function S(R){return R!==null?2*Math.PI/60*n.autoRotateSpeed*R:2*Math.PI/60/60*n.autoRotateSpeed}function A(){return Math.pow(.95,n.zoomSpeed)}function Q(R){l.theta-=R}function re(R){l.phi-=R}const z=function(){const R=new L;return function(Me,fe){R.setFromMatrixColumn(fe,0),R.multiplyScalar(-Me),h.add(R)}}(),G=function(){const R=new L;return function(Me,fe){n.screenSpacePanning===!0?R.setFromMatrixColumn(fe,1):(R.setFromMatrixColumn(fe,0),R.crossVectors(n.object.up,R)),R.multiplyScalar(Me),h.add(R)}}(),k=function(){const R=new L;return function(Me,fe){const xe=n.domElement;if(n.object.isPerspectiveCamera){const Fe=n.object.position;R.copy(Fe).sub(n.target);let je=R.length();je*=Math.tan(n.object.fov/2*Math.PI/180),z(2*Me*je/xe.clientHeight,n.object.matrix),G(2*fe*je/xe.clientHeight,n.object.matrix)}else n.object.isOrthographicCamera?(z(Me*(n.object.right-n.object.left)/n.object.zoom/xe.clientWidth,n.object.matrix),G(fe*(n.object.top-n.object.bottom)/n.object.zoom/xe.clientHeight,n.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),n.enablePan=!1)}}();function ne(R){n.object.isPerspectiveCamera||n.object.isOrthographicCamera?c/=R:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function V(R){n.object.isPerspectiveCamera||n.object.isOrthographicCamera?c*=R:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function W(R){if(!n.zoomToCursor)return;C=!0;const $=n.domElement.getBoundingClientRect(),Me=R.clientX-$.left,fe=R.clientY-$.top,xe=$.width,Fe=$.height;w.x=Me/xe*2-1,w.y=-(fe/Fe)*2+1,T.set(w.x,w.y,1).unproject(n.object).sub(n.object.position).normalize()}function te(R){return Math.max(n.minDistance,Math.min(n.maxDistance,R))}function K(R){u.set(R.clientX,R.clientY)}function F(R){W(R),f.set(R.clientX,R.clientY)}function Y(R){g.set(R.clientX,R.clientY)}function me(R){d.set(R.clientX,R.clientY),p.subVectors(d,u).multiplyScalar(n.rotateSpeed);const $=n.domElement;Q(2*Math.PI*p.x/$.clientHeight),re(2*Math.PI*p.y/$.clientHeight),u.copy(d),n.update()}function ve(R){y.set(R.clientX,R.clientY),v.subVectors(y,f),v.y>0?ne(A()):v.y<0&&V(A()),f.copy(y),n.update()}function ye(R){_.set(R.clientX,R.clientY),m.subVectors(_,g).multiplyScalar(n.panSpeed),k(m.x,m.y),g.copy(_),n.update()}function Re(R){W(R),R.deltaY<0?V(A()):R.deltaY>0&&ne(A()),n.update()}function Ie(R){let $=!1;switch(R.code){case n.keys.UP:R.ctrlKey||R.metaKey||R.shiftKey?re(2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):k(0,n.keyPanSpeed),$=!0;break;case n.keys.BOTTOM:R.ctrlKey||R.metaKey||R.shiftKey?re(-2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):k(0,-n.keyPanSpeed),$=!0;break;case n.keys.LEFT:R.ctrlKey||R.metaKey||R.shiftKey?Q(2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):k(n.keyPanSpeed,0),$=!0;break;case n.keys.RIGHT:R.ctrlKey||R.metaKey||R.shiftKey?Q(-2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):k(-n.keyPanSpeed,0),$=!0;break}$&&(R.preventDefault(),n.update())}function q(){if(b.length===1)u.set(b[0].pageX,b[0].pageY);else{const R=.5*(b[0].pageX+b[1].pageX),$=.5*(b[0].pageY+b[1].pageY);u.set(R,$)}}function ge(){if(b.length===1)g.set(b[0].pageX,b[0].pageY);else{const R=.5*(b[0].pageX+b[1].pageX),$=.5*(b[0].pageY+b[1].pageY);g.set(R,$)}}function ue(){const R=b[0].pageX-b[1].pageX,$=b[0].pageY-b[1].pageY,Me=Math.sqrt(R*R+$*$);f.set(0,Me)}function ie(){n.enableZoom&&ue(),n.enablePan&&ge()}function P(){n.enableZoom&&ue(),n.enableRotate&&q()}function Se(R){if(b.length==1)d.set(R.pageX,R.pageY);else{const Me=B(R),fe=.5*(R.pageX+Me.x),xe=.5*(R.pageY+Me.y);d.set(fe,xe)}p.subVectors(d,u).multiplyScalar(n.rotateSpeed);const $=n.domElement;Q(2*Math.PI*p.x/$.clientHeight),re(2*Math.PI*p.y/$.clientHeight),u.copy(d)}function J(R){if(b.length===1)_.set(R.pageX,R.pageY);else{const $=B(R),Me=.5*(R.pageX+$.x),fe=.5*(R.pageY+$.y);_.set(Me,fe)}m.subVectors(_,g).multiplyScalar(n.panSpeed),k(m.x,m.y),g.copy(_)}function oe(R){const $=B(R),Me=R.pageX-$.x,fe=R.pageY-$.y,xe=Math.sqrt(Me*Me+fe*fe);y.set(0,xe),v.set(0,Math.pow(y.y/f.y,n.zoomSpeed)),ne(v.y),f.copy(y)}function he(R){n.enableZoom&&oe(R),n.enablePan&&J(R)}function Le(R){n.enableZoom&&oe(R),n.enableRotate&&Se(R)}function we(R){n.enabled!==!1&&(b.length===0&&(n.domElement.setPointerCapture(R.pointerId),n.domElement.addEventListener("pointermove",le),n.domElement.addEventListener("pointerup",be)),ae(R),R.pointerType==="touch"?D(R):We(R))}function le(R){n.enabled!==!1&&(R.pointerType==="touch"?Z(R):Ee(R))}function be(R){Te(R),b.length===0&&(n.domElement.releasePointerCapture(R.pointerId),n.domElement.removeEventListener("pointermove",le),n.domElement.removeEventListener("pointerup",be)),n.dispatchEvent(Sl),r=s.NONE}function We(R){let $;switch(R.button){case 0:$=n.mouseButtons.LEFT;break;case 1:$=n.mouseButtons.MIDDLE;break;case 2:$=n.mouseButtons.RIGHT;break;default:$=-1}switch($){case jn.DOLLY:if(n.enableZoom===!1)return;F(R),r=s.DOLLY;break;case jn.ROTATE:if(R.ctrlKey||R.metaKey||R.shiftKey){if(n.enablePan===!1)return;Y(R),r=s.PAN}else{if(n.enableRotate===!1)return;K(R),r=s.ROTATE}break;case jn.PAN:if(R.ctrlKey||R.metaKey||R.shiftKey){if(n.enableRotate===!1)return;K(R),r=s.ROTATE}else{if(n.enablePan===!1)return;Y(R),r=s.PAN}break;default:r=s.NONE}r!==s.NONE&&n.dispatchEvent(Dr)}function Ee(R){switch(r){case s.ROTATE:if(n.enableRotate===!1)return;me(R);break;case s.DOLLY:if(n.enableZoom===!1)return;ve(R);break;case s.PAN:if(n.enablePan===!1)return;ye(R);break}}function M(R){n.enabled===!1||n.enableZoom===!1||r!==s.NONE||(R.preventDefault(),n.dispatchEvent(Dr),Re(R),n.dispatchEvent(Sl))}function x(R){n.enabled===!1||n.enablePan===!1||Ie(R)}function D(R){switch(se(R),b.length){case 1:switch(n.touches.ONE){case qn.ROTATE:if(n.enableRotate===!1)return;q(),r=s.TOUCH_ROTATE;break;case qn.PAN:if(n.enablePan===!1)return;ge(),r=s.TOUCH_PAN;break;default:r=s.NONE}break;case 2:switch(n.touches.TWO){case qn.DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;ie(),r=s.TOUCH_DOLLY_PAN;break;case qn.DOLLY_ROTATE:if(n.enableZoom===!1&&n.enableRotate===!1)return;P(),r=s.TOUCH_DOLLY_ROTATE;break;default:r=s.NONE}break;default:r=s.NONE}r!==s.NONE&&n.dispatchEvent(Dr)}function Z(R){switch(se(R),r){case s.TOUCH_ROTATE:if(n.enableRotate===!1)return;Se(R),n.update();break;case s.TOUCH_PAN:if(n.enablePan===!1)return;J(R),n.update();break;case s.TOUCH_DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;he(R),n.update();break;case s.TOUCH_DOLLY_ROTATE:if(n.enableZoom===!1&&n.enableRotate===!1)return;Le(R),n.update();break;default:r=s.NONE}}function ee(R){n.enabled!==!1&&R.preventDefault()}function ae(R){b.push(R)}function Te(R){delete O[R.pointerId];for(let $=0;$t.update(),t}function z_(){const i=new Ql({antialias:!0});return i.physicallyCorrectLights=!0,i}const El="#dddddd",H_="#0055aa";class gc{constructor(e,t){this.PLATFORM_BORDER=5,this.PLATFORM_EDGE_FOR_UNKNOWNS=10,this.PLATFORM_SIZE=100,this.update=this.update.bind(this),this.vue=t,this.camera=Wg(),this.scene=jg(H_),this.renderer=z_(),this.renderer.outputColorSpace=Ye,this.light=null,this.lights=[],this.bushes=[],this.loop=new U_(this.camera,this.scene,this.renderer),e.append(this.renderer.domElement);const n=B_(this.camera,this.renderer.domElement),{light:s}=Xg(El),r=I_({color:El,height:this.PLATFORM_SIZE+this.PLATFORM_BORDER*2,width:this.PLATFORM_SIZE+this.PLATFORM_BORDER*2+this.PLATFORM_EDGE_FOR_UNKNOWNS*2});this.loop.updatables.push(n),this.loop.updatables.push(s),this.loop.updatables.push(r),this.scene.add(s,r),w_(t,this,this.scene,this.loop),requestAnimationFrame(this.update);const a=new N_(e,this.camera,this.renderer);a.onResize=()=>{this.render()}}update(e){Vg(e),this.lights.forEach(t=>{t.updateMatrixWorld(),t.target.updateMatrixWorld()}),this.lights.forEach(t=>{t.updateMatrixWorld()}),requestAnimationFrame(this.update)}render(){this.renderer.render(this.scene,this.camera)}start(){this.loop.start()}stop(){this.loop.stop()}setExposedWorldProperties(e,t){this.vue.setWorldProperty(e,t)}}var k_=Object.getOwnPropertyDescriptor,G_=(i,e,t,n)=>{for(var s=n>1?void 0:n?k_(e,t):e,r=i.length-1,a;r>=0;r--)(a=i[r])&&(s=a(s)||s);return s};let Kr=class extends Ac{constructor(){super(...arguments);Di(this,"$notify");Di(this,"$router");Di(this,"world");Di(this,"worldProperties",{})}mounted(){try{const t=document.querySelector("#scene-container"),n=new gc(t,this);n.start(),this.world=n}catch(t){const n=t;this.$notify({group:"alert",type:"danger",title:"Mounting Error",text:n.message},5e3)}}captureGraphics(){const t=new kg;t.setSize(window.innerWidth,window.innerHeight),t.render(this.world.scene,this.world.camera),V_(t,"test.svg")}setWorldProperty(t,n){this.worldProperties[t]=n}};Kr=G_([wc({components:{World:gc,QuickNav:Pc}})],Kr);function V_(i,e){const s=new XMLSerializer().serializeToString(i.domElement),r=`\r -`,a=new Blob([r,s],{type:"image/svg+xml;charset=utf-8"}),o=URL.createObjectURL(a),l=document.createElement("a");l.href=o,l.download=e,document.body.appendChild(l),l.click(),document.body.removeChild(l)}const W_={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},X_={class:"mb-8"},j_={class:"text-lg text-center font-light relative px-7"},q_={class:"mt-3"},Y_={key:0},K_={key:1};function Z_(i,e,t,n,s,r){const a=Ma("QuickNav"),o=Ma("font-awesome");return Ks(),js(Cc,null,[xa(a),vt("section",W_,[vt("div",X_,[vt("div",j_,[vt("h1",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:e[0]||(e[0]=l=>i.$router.back())},[xa(o,{icon:"chevron-left",class:"fa-fw"})])]),e[2]||(e[2]=vt("h1",{id:"ViewHeading",class:"text-4xl text-center font-light pt-4 mb-8"}," Achievements & Statistics ",-1))]),e[5]||(e[5]=vt("div",null,[qs(" Here is a view of the activity you can see. "),vt("ul",{class:"list-disc outside ml-4"},[vt("li",null,"Each identity and claim has a unique position."),vt("li",null," Each will show at their time of appearance relative to all others. "),vt("li",null," Note that the ones on the left and right edges are randomized because their data isn't all visible to you. ")])],-1)),vt("div",q_,[i.worldProperties.startTime?(Ks(),js("div",Y_,[e[3]||(e[3]=vt("label",null,"Time Range: ",-1)),qs(" "+Ys(i.worldProperties.startTime)+" - "+Ys(i.worldProperties.endTime),1)])):va("",!0),i.worldProperties.animationDurationSeconds?(Ks(),js("div",K_,[e[4]||(e[4]=vt("label",null,"Animation Time: ",-1)),qs(" "+Ys(i.worldProperties.animationDurationSeconds)+" seconds ",1)])):va("",!0)]),vt("button",{class:"float-right text-blue-600",onClick:e[1]||(e[1]=l=>i.captureGraphics())}," Screenshot "),e[6]||(e[6]=vt("div",{id:"scene-container",class:"h-screen"},null,-1))])],64)}const ax=Rc(Kr,[["render",Z_]]);export{ax as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/TestView-Dd6x8bkM.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/TestView-Dd6x8bkM.js deleted file mode 100644 index 2cd79af..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/TestView-Dd6x8bkM.js +++ /dev/null @@ -1 +0,0 @@ -var T=Object.defineProperty;var R=(e,t,o)=>t in e?T(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var r=(e,t,o)=>R(e,typeof t!="symbol"?t+"":t,o);import{aI as Z,r as f,aJ as I,aF as b,aK as C,aL as U,aM as N,aN as S,aO as E,aP as M,aQ as J,b as w}from"./index-ryzpKtgI.js";import{V as B,e as j,f as z,d as h,A as W,C as $,_ as Y,h as g,j as D,k as i,n as d,y as O,m as A,w as H,t as v,F as G,z as k,B as y}from"./main.common-DD7dqhZp.js";import{Q as P}from"./QuickNav-C8jPGtUY.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";import"./index-BGoTPXII.js";var Q=Object.getOwnPropertyDescriptor,X=(e,t,o,n)=>{for(var a=n>1?void 0:n?Q(t,o):t,l=e.length-1,p;l>=0;l--)(p=e[l])&&(a=p(a)||a);return a};const V=z(),F={vc:{credentialSubject:{"@context":"https://schema.org","@type":"GiveAction",description:"pizza"}}};let x=class extends B{constructor(){super(...arguments);r(this,"$notify");r(this,"$router");r(this,"encryptionTestResult");r(this,"fileName");r(this,"credIdHex");r(this,"activeDid");r(this,"jwt");r(this,"peerSetup");r(this,"userName");r(this,"cryptoLib",Z)}async mounted(){const t=await j();this.activeDid=t.activeDid||"",this.userName=t.firstName;const o=await f(this.activeDid);this.activeDid&&(o?this.credIdHex=o.passkeyCredIdHex:alert("No account found for DID "+this.activeDid))}async uploadFile(t){var a;const o=t.target;V.value=(a=o.files)==null?void 0:a[0];const n=V.value;if(n!=null){const l=new FileReader;l.onload=async p=>{var u;const m=(u=p.target)==null?void 0:u.result;if(m){const s=new Blob([new Uint8Array(m)],{type:n.type}),c=await I(s);this.fileName=n.name,await h.temp.get(b)?await h.temp.update(b,{blobB64:c}):await h.temp.add({id:b,blobB64:c})}},l.readAsArrayBuffer(n)}}showFileNextStep(){return!!V.value}async register(){const t=W.APP_NAME+" Tester";if(!this.userName){this.$notify({group:"modal",type:"confirm",title:"No Name",text:"You should have a name to attach to this passkey. Would you like to enter your own name first?",onNo:async()=>{this.userName=t},onYes:async()=>{this.$router.push({name:"new-edit-account"})},noText:"try again and use "+t},-1);return}const o=await C(W.APP_NAME+" - "+this.userName);this.activeDid=o.did,this.credIdHex=o.passkeyCredIdHex}async testEncryptionDecryption(){this.encryptionTestResult=await U()}async createJwtSimplewebauthn(){const t=await f(this.activeDid||"");if(!N(t)){alert(`The DID ${this.activeDid} is not passkey-enabled.`);return}this.peerSetup=new S,this.jwt=await this.peerSetup.createJwtSimplewebauthn(this.activeDid,F,this.credIdHex),console.log("simple jwt4url",this.jwt)}async createJwtNavigator(){const t=await f(this.activeDid||"");if(!N(t)){alert(`The DID ${this.activeDid} is not passkey-enabled.`);return}this.peerSetup=new S,this.jwt=await this.peerSetup.createJwtNavigator(this.activeDid,F,this.credIdHex),console.log("lower jwt4url",this.jwt)}async verifyP256(){var o,n,a,l;const t=await E(this.credIdHex,this.activeDid,(o=this.peerSetup)==null?void 0:o.authenticatorData,(n=this.peerSetup)==null?void 0:n.challenge,(a=this.peerSetup)==null?void 0:a.clientDataJsonBase64Url,(l=this.peerSetup)==null?void 0:l.signature);console.log("decoded",t)}async verifySimplewebauthn(){var o,n,a,l;const t=await M(this.credIdHex,this.activeDid,(o=this.peerSetup)==null?void 0:o.authenticatorData,(n=this.peerSetup)==null?void 0:n.challenge,(a=this.peerSetup)==null?void 0:a.clientDataJsonBase64Url,(l=this.peerSetup)==null?void 0:l.signature);console.log("decoded",t)}async verifyWebCrypto(){var o,n,a,l;const t=await J(this.credIdHex,this.activeDid,(o=this.peerSetup)==null?void 0:o.authenticatorData,(n=this.peerSetup)==null?void 0:n.challenge,(a=this.peerSetup)==null?void 0:a.clientDataJsonBase64Url,(l=this.peerSetup)==null?void 0:l.signature);console.log("decoded",t)}async verifyMyJwt(){const t="did:peer:0zKMFjvUgYrM1hXwDciYHiA9MxXtJPXnRLJvqoMNAKoDLX9pKMWLb3VDsgua1p2zW1xXRsjZSTNsfvMnNyMS7dB4k7NAhFwL3pXBrBXgyYJ9ri",n="eyJ0eXAiOiJKV0FOVCIsImFsZyI6IkVTMjU2In0.eyJBdXRoZW50aWNhdGlvbkRhdGFCNjRVUkwiOiJTWllONVlnT2pHaDBOQmNQWkhaZ1c0X2tycm1paGpMSG1Wenp1b01kbDJNRkFBQUFBQSIsIkNsaWVudERhdGFKU09OQjY0VVJMIjoiZXlKMGVYQmxJam9pZDJWaVlYVjBhRzR1WjJWMElpd2lZMmhoYkd4bGJtZGxJam9pWlhsS01sbDVTVFpsZVVwcVkyMVdhMXBYTlRCaFYwWnpWVE5XYVdGdFZtcGtRMGsyWlhsS1FWa3lPWFZrUjFZMFpFTkpOa2x0YURCa1NFSjZUMms0ZG1NeVRtOWFWekZvVEcwNWVWcDVTWE5KYTBJd1pWaENiRWxxYjJsU01td3lXbFZHYW1SSGJIWmlhVWx6U1cxU2JHTXlUbmxoV0VJd1lWYzVkVWxxYjJsalIydzJaVzFGYVdaWU1ITkpiV3hvWkVOSk5rMVVZM2hQUkZVMFRtcHJOVTFEZDJsaFdFNTZTV3B2YVZwSGJHdFBia0pzV2xoSk5rMUljRXhVVlZweFpHeFdibGRZU2s1TlYyaFpaREJTYW1GV2JFbGhWVVUxVkZob1dXUkZjRkZYUnpWVFZFVndNbU5YT1U1VWEwWk1ZakJTVFZkRWJIZFRNREZZVkVkSmVsWnJVbnBhTTFab1RWaEJlV1ZzWTNobFJtaFRZekp3WVZVeFVrOWpNbG95VkZjMVQyVlZNVlJPTWxKRFRrZHpNMVJyUm05U2JtUk5UVE5DV1ZGdVNrTlhSMlExVjFWdk5XTnRhMmxtVVNJc0ltOXlhV2RwYmlJNkltaDBkSEE2THk5c2IyTmhiR2h2YzNRNk9EQTRNQ0lzSW1OeWIzTnpUM0pwWjJsdUlqcG1ZV3h6WlgwIiwiaWF0IjoxNzE4NTg2OTkyLCJpc3MiOiJkaWQ6cGVlcjowektNRmp2VWdZck0xaFh3RGNpWUhpQTlNeFh0SlBYblJMSnZxb01OQUtvRExYOXBLTVdMYjNWRHNndWExcDJ6VzF4WFJzalpTVE5zZnZNbk55TVM3ZEI0azdOQWhGd0wzcFhCckJYZ3lZSjlyaSJ9.MEUCIQDJyCTbMPIFnuBoW3FYnlgtDEIHZ2OrkCEvqVnHU7kJDQIgVxjBjfW1TwQfcSOYwK8Z7AdCWGJlyxtLEsrnPif7caE".split("."),a=JSON.parse(w.Buffer.from(n[1],"base64").toString()),l=w.Buffer.from(a.AuthenticationDataB64URL,"base64"),p=w.Buffer.from(a.ClientDataJSONB64URL,"base64").toString(),u=JSON.parse(p).challenge,s=n[2],c=await J(this.credIdHex,t,l,u,a.ClientDataJSONB64URL,s);console.log("decoded",c)}};x=X([$({components:{QuickNav:P}})],x);const L={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},K={class:"mb-8"},q={class:"text-lg text-center font-light relative px-7"},_={class:"mt-8"},tt={class:"mt-8"},et={key:0},it={key:1},ot={class:"mt-8"};function st(e,t,o,n,a,l){const p=k("QuickNav"),m=k("font-awesome"),u=k("router-link");return y(),g(G,null,[D(p),i("section",L,[i("div",K,[i("div",q,[i("h1",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:t[0]||(t[0]=s=>e.$router.back())},[D(m,{icon:"chevron-left",class:"fa-fw"})])]),t[18]||(t[18]=i("h1",{id:"ViewHeading",class:"text-4xl text-center font-light pt-4 mb-8"}," Test ",-1))]),i("div",null,[t[19]||(t[19]=i("h2",{class:"text-xl font-bold mb-4"},"Notiwind Alerts",-1)),i("button",{class:"font-bold capitalize bg-slate-900 text-white px-3 py-2 rounded-md mr-2",onClick:t[1]||(t[1]=s=>e.$notify({group:"alert",type:"toast",title:"Toast",text:"I'm a toast. Without a timeout, I'm stuck."},5e3))}," Toast "),i("button",{class:"font-bold capitalize bg-slate-600 text-white px-3 py-2 rounded-md mr-2",onClick:t[2]||(t[2]=s=>e.$notify({group:"alert",type:"info",title:"Information Alert",text:"Just wanted you to know."},5e3))}," Info "),i("button",{class:"font-bold capitalize bg-emerald-600 text-white px-3 py-2 rounded-md mr-2",onClick:t[3]||(t[3]=s=>e.$notify({group:"alert",type:"success",title:"Success Alert",text:"Congratulations!"},5e3))}," Success "),i("button",{class:"font-bold capitalize bg-amber-600 text-white px-3 py-2 rounded-md mr-2",onClick:t[4]||(t[4]=s=>e.$notify({group:"alert",type:"warning",title:"Warning Alert",text:"You might wanna look at this."},5e3))}," Warning "),i("button",{class:"font-bold capitalize bg-rose-600 text-white px-3 py-2 rounded-md mr-2",onClick:t[5]||(t[5]=s=>e.$notify({group:"alert",type:"danger",title:"Danger Alert",text:"Something terrible has happened!"},5e3))}," Danger "),i("button",{class:"font-bold capitalize bg-slate-600 text-white px-3 py-2 rounded-md mr-2",onClick:t[6]||(t[6]=s=>e.$notify({group:"modal",type:"notification-permission",title:"Notification Permission",text:"Enable notifications?"},-1))}," Notif ON "),i("button",{class:"font-bold capitalize bg-slate-600 text-white px-3 py-2 rounded-md mr-2",onClick:t[7]||(t[7]=s=>e.$notify({group:"modal",type:"notification-mute",title:"Notification Settings",text:"Notifications muted"},-1))}," Notif MUTE "),i("button",{class:"font-bold capitalize bg-slate-600 text-white px-3 py-2 rounded-md mr-2",onClick:t[8]||(t[8]=s=>e.$notify({group:"modal",type:"notification-off",title:"Notifications",text:"Notifications turned off"},-1))}," Notif OFF ")]),i("div",_,[t[21]||(t[21]=i("h2",{class:"text-xl font-bold mb-4"},"Image Sharing",-1)),t[22]||(t[22]=d(' Populates the "shared-photo" view as if they used "share_target". ')),i("input",{type:"file","data-testId":"fileInput",onChange:t[9]||(t[9]=(...s)=>e.uploadFile&&e.uploadFile(...s))},null,32),e.showFileNextStep()?(y(),O(u,{key:0,to:{name:"shared-photo",query:{fileName:e.fileName}},class:"block w-full text-center text-md bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md mb-2 mt-2","data-testId":"fileUploadButton"},{default:H(()=>t[20]||(t[20]=[d(" Go to Shared Page ")])),_:1},8,["to"])):A("",!0)]),i("div",tt,[t[26]||(t[26]=i("h2",{class:"text-xl font-bold mb-4"},"Passkeys",-1)),t[27]||(t[27]=d(" See console for results. ")),t[28]||(t[28]=i("br",null,null,-1)),t[29]||(t[29]=d(" See existing passkeys in Chrome at: chrome://settings/passkeys ")),t[30]||(t[30]=i("br",null,null,-1)),d(" Active DID: "+v(e.activeDid||"nothing, which")+" "+v(e.credIdHex?"has a passkey ID":"has no passkey ID")+" ",1),i("div",null,[t[23]||(t[23]=d(" Register Passkey ")),i("button",{class:"font-bold capitalize bg-slate-500 text-white px-3 py-2 rounded-md mr-2",onClick:t[10]||(t[10]=s=>e.register())}," Simplewebauthn ")]),i("div",null,[t[24]||(t[24]=d(" Create JWT ")),i("button",{class:"font-bold capitalize bg-slate-500 text-white px-3 py-2 rounded-md mr-2",onClick:t[11]||(t[11]=s=>e.createJwtSimplewebauthn())}," Simplewebauthn "),i("button",{class:"font-bold capitalize bg-slate-500 text-white px-3 py-2 rounded-md mr-2",onClick:t[12]||(t[12]=s=>e.createJwtNavigator())}," Navigator ")]),e.jwt?(y(),g("div",et,[t[25]||(t[25]=d(" Verify New JWT ")),i("button",{class:"font-bold capitalize bg-slate-500 text-white px-3 py-2 rounded-md mr-2",onClick:t[13]||(t[13]=s=>e.verifySimplewebauthn())}," Simplewebauthn "),i("button",{class:"font-bold capitalize bg-slate-500 text-white px-3 py-2 rounded-md mr-2",onClick:t[14]||(t[14]=s=>e.verifyWebCrypto())}," WebCrypto "),i("button",{class:"font-bold capitalize bg-slate-500 text-white px-3 py-2 rounded-md mr-2",onClick:t[15]||(t[15]=s=>e.verifyP256())}," p256 - broken ")])):(y(),g("div",it,"Verify New JWT -- requires creation first")),i("button",{class:"font-bold capitalize bg-slate-500 text-white px-3 py-2 rounded-md mr-2",onClick:t[16]||(t[16]=s=>e.verifyMyJwt())}," Verify Hard-Coded JWT ")]),i("div",ot,[t[31]||(t[31]=i("h2",{class:"text-xl font-bold mb-4"},"Encryption & Decryption",-1)),t[32]||(t[32]=d(" See console for more output. ")),i("div",null,[i("button",{class:"font-bold capitalize bg-slate-500 text-white px-3 py-2 rounded-md mr-2",onClick:t[17]||(t[17]=s=>e.testEncryptionDecryption())}," Run Test "),d(" Result: "+v(e.encryptionTestResult),1)])])])],64)}const ct=Y(x,[["render",st]]);export{ct as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/TopMessage-ZWDDjman.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/TopMessage-ZWDDjman.js deleted file mode 100644 index 0ee1494..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/TopMessage-ZWDDjman.js +++ /dev/null @@ -1 +0,0 @@ -var _=Object.defineProperty;var u=(r,t,s)=>t in r?_(r,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[t]=s;var i=(r,t,s)=>u(r,typeof t!="symbol"?t+"":t,s);import{a1 as f,C as g,V as v,e as m,A as p,_ as h,z as x,h as S,B as P,k as l,t as D,j as E,w as R,n as w}from"./main.common-DD7dqhZp.js";var y=Object.defineProperty,O=Object.getOwnPropertyDescriptor,d=(r,t,s,o)=>{for(var e=o>1?void 0:o?O(t,s):t,a=r.length-1,n;a>=0;a--)(n=r[a])&&(e=(o?n(t,s,e):n(e))||e);return o&&e&&y(t,s,e),e};let c=class extends v{constructor(){super(...arguments);i(this,"$notify");i(this,"selected","");i(this,"message","")}async mounted(){var s,o;try{const e=await m();if(e.warnIfTestServer&&e.apiServer!==p.PROD_ENDORSER_API_SERVER){const a=(s=e.activeDid)==null?void 0:s.slice(11,15);this.message="You're linked to a non-prod server, user "+a}else if(e.warnIfProdServer&&e.apiServer===p.PROD_ENDORSER_API_SERVER){const a=(o=e.activeDid)==null?void 0:o.slice(11,15);this.message="You're linked to the production server, user "+a}}catch(e){this.$notify({group:"alert",type:"danger",title:"Error Detecting Server",text:JSON.stringify(e)},-1)}}};d([f],c.prototype,"selected",2);c=d([g],c);const b={class:"absolute right-5 top-3"},V={class:"align-center text-red-500 mr-2"},$={class:"ml-2"};function A(r,t,s,o,e,a){const n=x("router-link");return P(),S("div",b,[l("span",V,D(r.message),1),l("span",$,[E(n,{to:{name:"help"},class:"text-xs uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-1 rounded-md ml-1"},{default:R(()=>t[0]||(t[0]=[w(" Help ")])),_:1})])])}const B=h(c,[["render",A]]);export{B as T}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/UserNameDialog-BV49F4GW.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/UserNameDialog-BV49F4GW.js deleted file mode 100644 index f3a9d3b..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/UserNameDialog-BV49F4GW.js +++ /dev/null @@ -1 +0,0 @@ -var b=Object.defineProperty;var m=(t,e,s)=>e in t?b(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var n=(t,e,s)=>m(t,typeof e!="symbol"?e+"":e,s);import{a1 as p,C as v,V as g,e as u,d as h,M as f,_,h as x,m as C,B as N,k as i,n as k,o as y,t as w,s as S}from"./main.common-DD7dqhZp.js";var $=Object.defineProperty,D=Object.getOwnPropertyDescriptor,d=(t,e,s,l)=>{for(var a=l>1?void 0:l?D(e,s):e,c=t.length-1,o;c>=0;c--)(o=t[c])&&(a=(l?o(e,s,a):o(a))||a);return l&&a&&$(e,s,a),a};let r=class extends g{constructor(){super(...arguments);n(this,"$notify");n(this,"sharingExplanation");n(this,"callbackOnCancel");n(this,"callback",()=>{});n(this,"givenName","");n(this,"visible",!1)}async open(s){this.callback=s||this.callback;const l=await u();this.givenName=l.firstName||"",this.visible=!0}async onClickSaveChanges(){await h.settings.update(f,{firstName:this.givenName}),this.visible=!1,this.callback(this.givenName)}onClickCancel(){this.visible=!1,this.callbackOnCancel&&this.callback()}};d([p({default:"This is not sent to servers. It is only shared with people when you send it to them."})],r.prototype,"sharingExplanation",2);d([p({default:!1})],r.prototype,"callbackOnCancel",2);r=d([v],r);const E={key:0,class:"dialog-overlay"},O={class:"dialog"},T={class:"mt-8"},V={class:"grid grid-cols-1 sm:grid-cols-2 gap-2"};function U(t,e,s,l,a,c){return t.visible?(N(),x("div",E,[i("div",O,[e[3]||(e[3]=i("h1",{class:"text-xl font-bold text-center mb-4"},"Set Your Name",-1)),k(" "+w(t.sharingExplanation)+" ",1),y(i("input",{"onUpdate:modelValue":e[0]||(e[0]=o=>t.givenName=o),type:"text",placeholder:"Name",class:"block w-full rounded border border-slate-400 mb-4 px-3 py-2"},null,512),[[S,t.givenName]]),i("div",T,[i("div",V,[i("button",{type:"button",class:"block w-full text-center text-lg font-bold uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md mb-2",onClick:e[1]||(e[1]=o=>t.onClickSaveChanges())}," Save "),i("button",{type:"button",class:"block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md mb-2",onClick:e[2]||(e[2]=o=>t.onClickCancel())}," Cancel ")])])])])):C("",!0)}const M=_(r,[["render",U]]);export{M as U}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/UserProfileView-B0lMeHcj.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/UserProfileView-B0lMeHcj.js deleted file mode 100644 index 7d2af8a..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/UserProfileView-B0lMeHcj.js +++ /dev/null @@ -1 +0,0 @@ -var V=Object.defineProperty;var A=(e,t,o)=>t in e?V(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var r=(e,t,o)=>A(e,typeof t!="symbol"?t+"":t,o);/* empty css */import{V as S,b as T,d as $,C as E,_ as I,h as n,j as s,k as a,n as u,m as g,t as v,w as f,F as N,z as p,B as d}from"./main.common-DD7dqhZp.js";import{v as z,y as B,u as O,i as R}from"./vue-leaflet.es-DQekxOGR.js";import{Q as U}from"./QuickNav-C8jPGtUY.js";import{T as F}from"./TopMessage-ZWDDjman.js";import{i as Q,h as j,g as H}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var G=Object.getOwnPropertyDescriptor,q=(e,t,o,i)=>{for(var l=i>1?void 0:i?G(t,o):t,c=e.length-1,m;c>=0;c--)(m=e[c])&&(l=m(l)||l);return l};let y=class extends S{constructor(){super(...arguments);r(this,"$notify");r(this,"$router");r(this,"$route");r(this,"activeDid","");r(this,"allContacts",[]);r(this,"allMyDids",[]);r(this,"isLoading",!0);r(this,"partnerApiServer",T);r(this,"profile",null);r(this,"didInfo",Q)}async mounted(){var i,l;const o=await $.settings.toArray();this.activeDid=((i=o[0])==null?void 0:i.activeDid)||"",this.partnerApiServer=((l=o[0])==null?void 0:l.partnerApiServer)||this.partnerApiServer,this.allContacts=await $.contacts.toArray(),this.allMyDids=await j(),await this.loadProfile()}async loadProfile(){const o=this.$route.params.id;if(!o){this.isLoading=!1;return}try{const i=await fetch(`${this.partnerApiServer}/api/partner/userProfile/${encodeURIComponent(o)}`,{method:"GET",headers:await H(this.activeDid)});if(i.status===200){const l=await i.json();this.profile=l.data}else throw new Error("Failed to load profile")}catch(i){console.error("Error loading profile:",i),this.$notify({group:"alert",type:"danger",title:"Error",text:"There was a problem loading the profile."},5e3)}finally{this.isLoading=!1}}};y=q([E({components:{LMap:R,LMarker:O,LPopup:B,LTileLayer:z,QuickNav:U,TopMessage:F}})],y);const J={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},K={id:"ViewBreadcrumb",class:"mb-8"},W={id:"ViewHeading",class:"text-lg text-center font-light relative px-7"},X={key:0,class:"fixed left-6 mt-16 text-center text-4xl leading-none bg-slate-400 text-white w-14 py-2.5 rounded-full"},Y={key:1},Z={class:"mt-8"},x={class:"text-sm"},ee={key:0,class:"mt-4 text-slate-600"},te={key:0,class:"mt-4"},oe={class:"h-96 mt-2 w-full"},se={key:1,class:"mt-4"},ie={class:"h-96 mt-2 w-full"},re={key:2,class:"text-center mt-8"};function ae(e,t,o,i,l,c){var k,b,C,M;const m=p("QuickNav"),P=p("TopMessage"),h=p("font-awesome"),w=p("l-tile-layer"),L=p("l-popup"),_=p("l-marker"),D=p("l-map");return d(),n(N,null,[s(m,{selected:"Discover"}),s(P),a("section",J,[a("div",K,[a("h1",W,[a("button",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:t[0]||(t[0]=le=>e.$router.back())},[s(h,{icon:"chevron-left",class:"fa-fw"})]),t[1]||(t[1]=u(" Individual Profile "))])]),e.isLoading?(d(),n("div",X,[s(h,{icon:"spinner",class:"fa-spin-pulse"})])):e.profile?(d(),n("div",Y,[a("div",Z,[a("div",x,[s(h,{icon:"user",class:"fa-fw text-slate-400"}),u(" "+v(e.didInfo(e.profile.issuerDid,e.activeDid,e.allMyDids,e.allContacts)),1)]),e.profile.description?(d(),n("p",ee,v(e.profile.description),1)):g("",!0)]),(k=e.profile)!=null&&k.locLat&&((b=e.profile)!=null&&b.locLon)?(d(),n("div",te,[t[2]||(t[2]=a("h2",{class:"text-lg font-semibold"},"Location",-1)),a("div",oe,[s(D,{ref:"profileMap",center:[e.profile.locLat,e.profile.locLon],zoom:12},{default:f(()=>[s(w,{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png","layer-type":"base",name:"OpenStreetMap"}),s(_,{"lat-lng":[e.profile.locLat,e.profile.locLon]},{default:f(()=>[s(L,null,{default:f(()=>[u(v(e.didInfo(e.profile.issuerDid,e.activeDid,e.allMyDids,e.allContacts)),1)]),_:1})]),_:1},8,["lat-lng"])]),_:1},8,["center"])])])):g("",!0),(C=e.profile)!=null&&C.locLat2&&((M=e.profile)!=null&&M.locLon2)?(d(),n("div",se,[t[3]||(t[3]=a("h2",{class:"text-lg font-semibold"},"Second Location",-1)),a("div",ie,[s(D,{ref:"profileMap",center:[e.profile.locLat2,e.profile.locLon2],zoom:12},{default:f(()=>[s(w,{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png","layer-type":"base",name:"OpenStreetMap"}),s(_,{"lat-lng":[e.profile.locLat2,e.profile.locLon2]},{default:f(()=>[s(L,null,{default:f(()=>[u(v(e.didInfo(e.profile.issuerDid,e.activeDid,e.allMyDids,e.allContacts)),1)]),_:1})]),_:1},8,["lat-lng"])]),_:1},8,["center"])])])):g("",!0)])):(d(),n("div",re,t[4]||(t[4]=[a("p",{class:"text-lg text-slate-500"},"Profile not found.",-1)])))])],64)}const we=I(y,[["render",ae]]);export{we as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/_isString-B7bbuhPA.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/_isString-B7bbuhPA.js deleted file mode 100644 index 25e344c..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/_isString-B7bbuhPA.js +++ /dev/null @@ -1 +0,0 @@ -import{ap as m,a7 as g,a9 as l,aq as f}from"./main.common-DD7dqhZp.js";function S(e,r){switch(e){case 0:return function(){return r.apply(this,arguments)};case 1:return function(t){return r.apply(this,arguments)};case 2:return function(t,n){return r.apply(this,arguments)};case 3:return function(t,n,a){return r.apply(this,arguments)};case 4:return function(t,n,a,u){return r.apply(this,arguments)};case 5:return function(t,n,a,u,s){return r.apply(this,arguments)};case 6:return function(t,n,a,u,s,c){return r.apply(this,arguments)};case 7:return function(t,n,a,u,s,c,i){return r.apply(this,arguments)};case 8:return function(t,n,a,u,s,c,i,o){return r.apply(this,arguments)};case 9:return function(t,n,a,u,s,c,i,o,E){return r.apply(this,arguments)};case 10:return function(t,n,a,u,s,c,i,o,E,X){return r.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function j(e,r,t){return function(){for(var n=[],a=0,u=e,s=0,c=!1;s=arguments.length)?i=r[s]:(i=arguments[a],a+=1),n[s]=i,m(i)?c=!0:u-=1,s+=1}return!c&&u<=0?t.apply(this,n):S(Math.max(0,u),j(e,n,t))}}var I=g(function(r,t){return r===1?l(t):S(r,j(r,[],t))});const k=Array.isArray||function(r){return r!=null&&r.length>=0&&Object.prototype.toString.call(r)==="[object Array]"};function P(e){return e!=null&&typeof e["@@transducer/step"]=="function"}function F(e,r,t){return function(){if(arguments.length===0)return t();var n=arguments[arguments.length-1];if(!k(n)){for(var a=0;a=0;)t=O[n],f(t,r)&&!C(a,t)&&(a[a.length]=t),n-=1;return a}),q=l(function(r){return r===null?"Null":r===void 0?"Undefined":Object.prototype.toString.call(r).slice(8,-1)});function w(e,r,t,n){var a=d(e),u=d(r);function s(c,i){return h(c,i,t.slice(),n.slice())}return!A(function(c,i){return!A(s,i,c)},u,a)}function h(e,r,t,n){if(p(e,r))return!0;var a=q(e);if(a!==q(r))return!1;if(typeof e["fantasy-land/equals"]=="function"||typeof r["fantasy-land/equals"]=="function")return typeof e["fantasy-land/equals"]=="function"&&e["fantasy-land/equals"](r)&&typeof r["fantasy-land/equals"]=="function"&&r["fantasy-land/equals"](e);if(typeof e.equals=="function"||typeof r.equals=="function")return typeof e.equals=="function"&&e.equals(r)&&typeof r.equals=="function"&&r.equals(e);switch(a){case"Arguments":case"Array":case"Object":if(typeof e.constructor=="function"&&N(e.constructor)==="Promise")return e===r;break;case"Boolean":case"Number":case"String":if(!(typeof e==typeof r&&p(e.valueOf(),r.valueOf())))return!1;break;case"Date":if(!p(e.valueOf(),r.valueOf()))return!1;break;case"Error":return e.name===r.name&&e.message===r.message;case"RegExp":if(!(e.source===r.source&&e.global===r.global&&e.ignoreCase===r.ignoreCase&&e.multiline===r.multiline&&e.sticky===r.sticky&&e.unicode===r.unicode))return!1;break}for(var u=t.length-1;u>=0;){if(t[u]===e)return n[u]===r;u-=1}switch(a){case"Map":return e.size!==r.size?!1:w(e.entries(),r.entries(),t.concat([e]),n.concat([r]));case"Set":return e.size!==r.size?!1:w(e.values(),r.values(),t.concat([e]),n.concat([r]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var s=y(e);if(s.length!==y(r).length)return!1;var c=t.concat([e]),i=n.concat([r]);for(u=s.length-1;u>=0;){var o=s[u];if(!(f(o,r)&&h(r[o],e[o],c,i)))return!1;u-=1}return!0}var W=g(function(r,t){return h(r,t,[],[])});function M(e,r){for(var t=0,n=r.length,a=Array(n);t=0}function s(t){var e=t.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0");return'"'+e.replace(/"/g,'\\"')+'"'}var a=function(e){return(e<10?"0":"")+e},_=typeof Date.prototype.toISOString=="function"?function(e){return e.toISOString()}:function(e){return e.getUTCFullYear()+"-"+a(e.getUTCMonth()+1)+"-"+a(e.getUTCDate())+"T"+a(e.getUTCHours())+":"+a(e.getUTCMinutes())+":"+a(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};function S(t,e){var n=function(i){var c=e.concat([t]);return h(i,c)?"":S(i,c)},o=function(u,i){return f(function(c){return s(c)+": "+n(u[c])},i.slice().sort())};switch(Object.prototype.toString.call(t)){case"[object Arguments]":return"(function() { return arguments; }("+f(n,t).join(", ")+"))";case"[object Array]":return"["+f(n,t).concat(o(t,w(function(u){return/^\d+$/.test(u)},g(t)))).join(", ")+"]";case"[object Boolean]":return typeof t=="object"?"new Boolean("+n(t.valueOf())+")":t.toString();case"[object Date]":return"new Date("+(isNaN(t.valueOf())?n(NaN):s(_(t)))+")";case"[object Map]":return"new Map("+n(Array.from(t))+")";case"[object Null]":return"null";case"[object Number]":return typeof t=="object"?"new Number("+n(t.valueOf())+")":1/t===-1/0?"-0":t.toString(10);case"[object Set]":return"new Set("+n(Array.from(t).sort())+")";case"[object String]":return typeof t=="object"?"new String("+n(t.valueOf())+")":s(t);case"[object Undefined]":return"undefined";default:if(typeof t.toString=="function"){var r=t.toString();if(r!=="[object Object]")return r}return"{"+o(t,g(t)).join(", ")+"}"}}var l=b(function(e){return S(e,[])});function j(t){var e=Object.prototype.toString.call(t);return e==="[object Function]"||e==="[object AsyncFunction]"||e==="[object GeneratorFunction]"||e==="[object AsyncGeneratorFunction]"}var U=m(function(e,n){if(p(e)){if(p(n))return e.concat(n);throw new TypeError(l(n)+" is not an array")}if(y(e)){if(y(n))return e+n;throw new TypeError(l(n)+" is not a string")}if(e!=null&&j(e["fantasy-land/concat"]))return e["fantasy-land/concat"](n);if(e!=null&&j(e.concat))return e.concat(n);throw new TypeError(l(e)+' does not have a method named "concat" or "fantasy-land/concat"')});export{j as _,h as a,O as b,U as c,S as d,l as t}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/datetime-BDQ5ptpc.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/datetime-BDQ5ptpc.js deleted file mode 100644 index ab4b6bd..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/datetime-BDQ5ptpc.js +++ /dev/null @@ -1 +0,0 @@ -class P extends Error{}class qn extends P{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class Hn extends P{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class Yn extends P{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class K extends P{}class $t extends P{constructor(e){super(`Invalid unit ${e}`)}}class N extends P{}class Z extends P{constructor(){super("Zone is an abstract class")}}const c="numeric",W="short",M="long",De={year:c,month:c,day:c},Zt={year:c,month:W,day:c},Pn={year:c,month:W,day:c,weekday:W},At={year:c,month:M,day:c},Ut={year:c,month:M,day:c,weekday:M},zt={hour:c,minute:c},Rt={hour:c,minute:c,second:c},qt={hour:c,minute:c,second:c,timeZoneName:W},Ht={hour:c,minute:c,second:c,timeZoneName:M},Yt={hour:c,minute:c,hourCycle:"h23"},Pt={hour:c,minute:c,second:c,hourCycle:"h23"},Gt={hour:c,minute:c,second:c,hourCycle:"h23",timeZoneName:W},Jt={hour:c,minute:c,second:c,hourCycle:"h23",timeZoneName:M},_t={year:c,month:c,day:c,hour:c,minute:c},Bt={year:c,month:c,day:c,hour:c,minute:c,second:c},jt={year:c,month:W,day:c,hour:c,minute:c},Qt={year:c,month:W,day:c,hour:c,minute:c,second:c},Gn={year:c,month:W,day:c,weekday:W,hour:c,minute:c},Kt={year:c,month:M,day:c,hour:c,minute:c,timeZoneName:W},Xt={year:c,month:M,day:c,hour:c,minute:c,second:c,timeZoneName:W},en={year:c,month:M,day:c,weekday:M,hour:c,minute:c,timeZoneName:M},tn={year:c,month:M,day:c,weekday:M,hour:c,minute:c,second:c,timeZoneName:M};class me{get type(){throw new Z}get name(){throw new Z}get ianaName(){return this.name}get isUniversal(){throw new Z}offsetName(e,t){throw new Z}formatOffset(e,t){throw new Z}offset(e){throw new Z}equals(e){throw new Z}get isValid(){throw new Z}}let Ze=null;class Ve extends me{static get instance(){return Ze===null&&(Ze=new Ve),Ze}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:r}){return fn(e,t,r)}formatOffset(e,t){return de(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let Ne={};function Jn(n){return Ne[n]||(Ne[n]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),Ne[n]}const _n={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function Bn(n,e){const t=n.format(e).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,s,i,a,o,u,l,f]=r;return[a,s,i,o,u,l,f]}function jn(n,e){const t=n.formatToParts(e),r=[];for(let s=0;s=0?v:1e3+v,(O-m)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let ot={};function Qn(n,e={}){const t=JSON.stringify([n,e]);let r=ot[t];return r||(r=new Intl.ListFormat(n,e),ot[t]=r),r}let Pe={};function Ge(n,e={}){const t=JSON.stringify([n,e]);let r=Pe[t];return r||(r=new Intl.DateTimeFormat(n,e),Pe[t]=r),r}let Je={};function Kn(n,e={}){const t=JSON.stringify([n,e]);let r=Je[t];return r||(r=new Intl.NumberFormat(n,e),Je[t]=r),r}let _e={};function Xn(n,e={}){const{base:t,...r}=e,s=JSON.stringify([n,r]);let i=_e[s];return i||(i=new Intl.RelativeTimeFormat(n,e),_e[s]=i),i}let ce=null;function er(){return ce||(ce=new Intl.DateTimeFormat().resolvedOptions().locale,ce)}let ut={};function tr(n){let e=ut[n];if(!e){const t=new Intl.Locale(n);e="getWeekInfo"in t?t.getWeekInfo():t.weekInfo,ut[n]=e}return e}function nr(n){const e=n.indexOf("-x-");e!==-1&&(n=n.substring(0,e));const t=n.indexOf("-u-");if(t===-1)return[n];{let r,s;try{r=Ge(n).resolvedOptions(),s=n}catch{const u=n.substring(0,t);r=Ge(u).resolvedOptions(),s=u}const{numberingSystem:i,calendar:a}=r;return[s,i,a]}}function rr(n,e,t){return(t||e)&&(n.includes("-u-")||(n+="-u"),t&&(n+=`-ca-${t}`),e&&(n+=`-nu-${e}`)),n}function sr(n){const e=[];for(let t=1;t<=12;t++){const r=h.utc(2009,t,1);e.push(n(r))}return e}function ir(n){const e=[];for(let t=1;t<=7;t++){const r=h.utc(2016,11,13+t);e.push(n(r))}return e}function Te(n,e,t,r){const s=n.listingMode();return s==="error"?null:s==="en"?t(e):r(e)}function ar(n){return n.numberingSystem&&n.numberingSystem!=="latn"?!1:n.numberingSystem==="latn"||!n.locale||n.locale.startsWith("en")||new Intl.DateTimeFormat(n.intl).resolvedOptions().numberingSystem==="latn"}class or{constructor(e,t,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:s,floor:i,...a}=r;if(!t||Object.keys(a).length>0){const o={useGrouping:!1,...r};r.padTo>0&&(o.minimumIntegerDigits=r.padTo),this.inf=Kn(e,o)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{const t=this.floor?Math.floor(e):tt(e,3);return p(t,this.padTo)}}}class ur{constructor(e,t,r){this.opts=r,this.originalZone=void 0;let s;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const a=-1*(e.offset/60),o=a>=0?`Etc/GMT+${a}`:`Etc/GMT${a}`;e.offset!==0&&$.create(o).valid?(s=o,this.dt=e):(s="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,s=e.zone.name):(s="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const i={...this.opts};i.timeZone=i.timeZone||s,this.dtf=Ge(t,i)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(t=>{if(t.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...t,value:r}}else return t}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class lr{constructor(e,t,r){this.opts={style:"long",...r},!t&&ln()&&(this.rtf=Xn(e,r))}format(e,t){return this.rtf?this.rtf.format(e,t):Vr(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const cr={firstDay:1,minimalDays:4,weekend:[6,7]};class k{static fromOpts(e){return k.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,r,s,i=!1){const a=e||S.defaultLocale,o=a||(i?"en-US":er()),u=t||S.defaultNumberingSystem,l=r||S.defaultOutputCalendar,f=Be(s)||S.defaultWeekSettings;return new k(o,u,l,f,a)}static resetCache(){ce=null,Pe={},Je={},_e={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:r,weekSettings:s}={}){return k.create(e,t,r,s)}constructor(e,t,r,s,i){const[a,o,u]=nr(e);this.locale=a,this.numberingSystem=t||o||null,this.outputCalendar=r||u||null,this.weekSettings=s,this.intl=rr(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=ar(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:k.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Be(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return Te(this,e,mn,()=>{const r=t?{month:e,day:"numeric"}:{month:e},s=t?"format":"standalone";return this.monthsCache[s][e]||(this.monthsCache[s][e]=sr(i=>this.extract(i,r,"month"))),this.monthsCache[s][e]})}weekdays(e,t=!1){return Te(this,e,wn,()=>{const r=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},s=t?"format":"standalone";return this.weekdaysCache[s][e]||(this.weekdaysCache[s][e]=ir(i=>this.extract(i,r,"weekday"))),this.weekdaysCache[s][e]})}meridiems(){return Te(this,void 0,()=>kn,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[h.utc(2016,11,13,9),h.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return Te(this,e,Tn,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[h.utc(-40,1,1),h.utc(2017,1,1)].map(r=>this.extract(r,t,"era"))),this.eraCache[e]})}extract(e,t,r){const s=this.dtFormatter(e,t),i=s.formatToParts(),a=i.find(o=>o.type.toLowerCase()===r);return a?a.value:null}numberFormatter(e={}){return new or(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new ur(e,this.intl,t)}relFormatter(e={}){return new lr(this.intl,this.isEnglish(),e)}listFormatter(e={}){return Qn(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:cn()?tr(this.locale):cr}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let Ae=null;class E extends me{static get utcInstance(){return Ae===null&&(Ae=new E(0)),Ae}static instance(e){return e===0?E.utcInstance:new E(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new E(Le(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${de(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${de(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return de(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class fr extends me{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function z(n,e){if(d(n)||n===null)return e;if(n instanceof me)return n;if(wr(n)){const t=n.toLowerCase();return t==="default"?e:t==="local"||t==="system"?Ve.instance:t==="utc"||t==="gmt"?E.utcInstance:E.parseSpecifier(t)||$.create(n)}else return R(n)?E.instance(n):typeof n=="object"&&"offset"in n&&typeof n.offset=="function"?n:new fr(n)}const Qe={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},lt={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},dr=Qe.hanidec.replace(/[\[|\]]/g,"").split("");function hr(n){let e=parseInt(n,10);if(isNaN(e)){e="";for(let t=0;t=i&&r<=a&&(e+=r-i)}}return parseInt(e,10)}else return e}let Q={};function mr(){Q={}}function F({numberingSystem:n},e=""){const t=n||"latn";return Q[t]||(Q[t]={}),Q[t][e]||(Q[t][e]=new RegExp(`${Qe[t]}${e}`)),Q[t][e]}let ct=()=>Date.now(),ft="system",dt=null,ht=null,mt=null,yt=60,gt,wt=null;class S{static get now(){return ct}static set now(e){ct=e}static set defaultZone(e){ft=e}static get defaultZone(){return z(ft,Ve.instance)}static get defaultLocale(){return dt}static set defaultLocale(e){dt=e}static get defaultNumberingSystem(){return ht}static set defaultNumberingSystem(e){ht=e}static get defaultOutputCalendar(){return mt}static set defaultOutputCalendar(e){mt=e}static get defaultWeekSettings(){return wt}static set defaultWeekSettings(e){wt=Be(e)}static get twoDigitCutoffYear(){return yt}static set twoDigitCutoffYear(e){yt=e%100}static get throwOnInvalid(){return gt}static set throwOnInvalid(e){gt=e}static resetCaches(){k.resetCache(),$.resetCache(),h.resetCache(),mr()}}class C{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const nn=[0,31,59,90,120,151,181,212,243,273,304,334],rn=[0,31,60,91,121,152,182,213,244,274,305,335];function x(n,e){return new C("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${n}, which is invalid`)}function Ke(n,e,t){const r=new Date(Date.UTC(n,e-1,t));n<100&&n>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const s=r.getUTCDay();return s===0?7:s}function sn(n,e,t){return t+(ye(n)?rn:nn)[e-1]}function an(n,e){const t=ye(n)?rn:nn,r=t.findIndex(i=>ihe(r,e,t)?(l=r+1,u=1):l=r,{weekYear:l,weekNumber:u,weekday:o,...$e(n)}}function kt(n,e=4,t=1){const{weekYear:r,weekNumber:s,weekday:i}=n,a=Xe(Ke(r,1,e),t),o=X(r);let u=s*7+i-a-7+e,l;u<1?(l=r-1,u+=X(l)):u>o?(l=r+1,u-=X(r)):l=r;const{month:f,day:y}=an(l,u);return{year:l,month:f,day:y,...$e(n)}}function Ue(n){const{year:e,month:t,day:r}=n,s=sn(e,t,r);return{year:e,ordinal:s,...$e(n)}}function Tt(n){const{year:e,ordinal:t}=n,{month:r,day:s}=an(e,t);return{year:e,month:r,day:s,...$e(n)}}function St(n,e){if(!d(n.localWeekday)||!d(n.localWeekNumber)||!d(n.localWeekYear)){if(!d(n.weekday)||!d(n.weekNumber)||!d(n.weekYear))throw new K("Cannot mix locale-based week fields with ISO-based week fields");return d(n.localWeekday)||(n.weekday=n.localWeekday),d(n.localWeekNumber)||(n.weekNumber=n.localWeekNumber),d(n.localWeekYear)||(n.weekYear=n.localWeekYear),delete n.localWeekday,delete n.localWeekNumber,delete n.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function yr(n,e=4,t=1){const r=Ce(n.weekYear),s=b(n.weekNumber,1,he(n.weekYear,e,t)),i=b(n.weekday,1,7);return r?s?i?!1:x("weekday",n.weekday):x("week",n.weekNumber):x("weekYear",n.weekYear)}function gr(n){const e=Ce(n.year),t=b(n.ordinal,1,X(n.year));return e?t?!1:x("ordinal",n.ordinal):x("year",n.year)}function on(n){const e=Ce(n.year),t=b(n.month,1,12),r=b(n.day,1,be(n.year,n.month));return e?t?r?!1:x("day",n.day):x("month",n.month):x("year",n.year)}function un(n){const{hour:e,minute:t,second:r,millisecond:s}=n,i=b(e,0,23)||e===24&&t===0&&r===0&&s===0,a=b(t,0,59),o=b(r,0,59),u=b(s,0,999);return i?a?o?u?!1:x("millisecond",s):x("second",r):x("minute",t):x("hour",e)}function d(n){return typeof n>"u"}function R(n){return typeof n=="number"}function Ce(n){return typeof n=="number"&&n%1===0}function wr(n){return typeof n=="string"}function kr(n){return Object.prototype.toString.call(n)==="[object Date]"}function ln(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function cn(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function Tr(n){return Array.isArray(n)?n:[n]}function Ot(n,e,t){if(n.length!==0)return n.reduce((r,s)=>{const i=[e(s),s];return r&&t(r[0],i[0])===r[0]?r:i},null)[1]}function Sr(n,e){return e.reduce((t,r)=>(t[r]=n[r],t),{})}function te(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function Be(n){if(n==null)return null;if(typeof n!="object")throw new N("Week settings must be an object");if(!b(n.firstDay,1,7)||!b(n.minimalDays,1,7)||!Array.isArray(n.weekend)||n.weekend.some(e=>!b(e,1,7)))throw new N("Invalid week settings");return{firstDay:n.firstDay,minimalDays:n.minimalDays,weekend:Array.from(n.weekend)}}function b(n,e,t){return Ce(n)&&n>=e&&n<=t}function Or(n,e){return n-e*Math.floor(n/e)}function p(n,e=2){const t=n<0;let r;return t?r="-"+(""+-n).padStart(e,"0"):r=(""+n).padStart(e,"0"),r}function U(n){if(!(d(n)||n===null||n===""))return parseInt(n,10)}function q(n){if(!(d(n)||n===null||n===""))return parseFloat(n)}function et(n){if(!(d(n)||n===null||n==="")){const e=parseFloat("0."+n)*1e3;return Math.floor(e)}}function tt(n,e,t=!1){const r=10**e;return(t?Math.trunc:Math.round)(n*r)/r}function ye(n){return n%4===0&&(n%100!==0||n%400===0)}function X(n){return ye(n)?366:365}function be(n,e){const t=Or(e-1,12)+1,r=n+(e-t)/12;return t===2?ye(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function We(n){let e=Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond);return n.year<100&&n.year>=0&&(e=new Date(e),e.setUTCFullYear(n.year,n.month-1,n.day)),+e}function pt(n,e,t){return-Xe(Ke(n,1,e),t)+e-1}function he(n,e=4,t=1){const r=pt(n,e,t),s=pt(n+1,e,t);return(X(n)-r+s)/7}function je(n){return n>99?n:n>S.twoDigitCutoffYear?1900+n:2e3+n}function fn(n,e,t,r=null){const s=new Date(n),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(i.timeZone=r);const a={timeZoneName:e,...i},o=new Intl.DateTimeFormat(t,a).formatToParts(s).find(u=>u.type.toLowerCase()==="timezonename");return o?o.value:null}function Le(n,e){let t=parseInt(n,10);Number.isNaN(t)&&(t=0);const r=parseInt(e,10)||0,s=t<0||Object.is(t,-0)?-r:r;return t*60+s}function dn(n){const e=Number(n);if(typeof n=="boolean"||n===""||Number.isNaN(e))throw new N(`Invalid unit value ${n}`);return e}function Fe(n,e){const t={};for(const r in n)if(te(n,r)){const s=n[r];if(s==null)continue;t[e(r)]=dn(s)}return t}function de(n,e){const t=Math.trunc(Math.abs(n/60)),r=Math.trunc(Math.abs(n%60)),s=n>=0?"+":"-";switch(e){case"short":return`${s}${p(t,2)}:${p(r,2)}`;case"narrow":return`${s}${t}${r>0?`:${r}`:""}`;case"techie":return`${s}${p(t,2)}${p(r,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function $e(n){return Sr(n,["hour","minute","second","millisecond"])}const pr=["January","February","March","April","May","June","July","August","September","October","November","December"],hn=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],vr=["J","F","M","A","M","J","J","A","S","O","N","D"];function mn(n){switch(n){case"narrow":return[...vr];case"short":return[...hn];case"long":return[...pr];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const yn=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],gn=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Nr=["M","T","W","T","F","S","S"];function wn(n){switch(n){case"narrow":return[...Nr];case"short":return[...gn];case"long":return[...yn];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const kn=["AM","PM"],Ir=["Before Christ","Anno Domini"],Er=["BC","AD"],Mr=["B","A"];function Tn(n){switch(n){case"narrow":return[...Mr];case"short":return[...Er];case"long":return[...Ir];default:return null}}function Dr(n){return kn[n.hour<12?0:1]}function xr(n,e){return wn(e)[n.weekday-1]}function br(n,e){return mn(e)[n.month-1]}function Fr(n,e){return Tn(e)[n.year<0?0:1]}function Vr(n,e,t="always",r=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=["hours","minutes","seconds"].indexOf(n)===-1;if(t==="auto"&&i){const y=n==="days";switch(e){case 1:return y?"tomorrow":`next ${s[n][0]}`;case-1:return y?"yesterday":`last ${s[n][0]}`;case 0:return y?"today":`this ${s[n][0]}`}}const a=Object.is(e,-0)||e<0,o=Math.abs(e),u=o===1,l=s[n],f=r?u?l[1]:l[2]||l[1]:u?s[n][0]:n;return a?`${o} ${f} ago`:`in ${o} ${f}`}function vt(n,e){let t="";for(const r of n)r.literal?t+=r.val:t+=e(r.val);return t}const Cr={D:De,DD:Zt,DDD:At,DDDD:Ut,t:zt,tt:Rt,ttt:qt,tttt:Ht,T:Yt,TT:Pt,TTT:Gt,TTTT:Jt,f:_t,ff:jt,fff:Kt,ffff:en,F:Bt,FF:Qt,FFF:Xt,FFFF:tn};class I{static create(e,t={}){return new I(e,t)}static parseFormat(e){let t=null,r="",s=!1;const i=[];for(let a=0;a0&&i.push({literal:s||/^\s+$/.test(r),val:r}),t=null,r="",s=!s):s||o===t?r+=o:(r.length>0&&i.push({literal:/^\s+$/.test(r),val:r}),r=o,t=o)}return r.length>0&&i.push({literal:s||/^\s+$/.test(r),val:r}),i}static macroTokenToFormatOpts(e){return Cr[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple)return p(e,t);const r={...this.opts};return t>0&&(r.padTo=t),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(e,t){const r=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(m,v)=>this.loc.extract(e,m,v),a=m=>e.isOffsetFixed&&e.offset===0&&m.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,m.format):"",o=()=>r?Dr(e):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),u=(m,v)=>r?br(e,m):i(v?{month:m}:{month:m,day:"numeric"},"month"),l=(m,v)=>r?xr(e,m):i(v?{weekday:m}:{weekday:m,month:"long",day:"numeric"},"weekday"),f=m=>{const v=I.macroTokenToFormatOpts(m);return v?this.formatWithSystemDefault(e,v):m},y=m=>r?Fr(e,m):i({era:m},"era"),O=m=>{switch(m){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return o();case"d":return s?i({day:"numeric"},"day"):this.num(e.day);case"dd":return s?i({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return s?i({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return s?i({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return u("short",!0);case"LLLL":return u("long",!0);case"LLLLL":return u("narrow",!0);case"M":return s?i({month:"numeric"},"month"):this.num(e.month);case"MM":return s?i({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return u("short",!1);case"MMMM":return u("long",!1);case"MMMMM":return u("narrow",!1);case"y":return s?i({year:"numeric"},"year"):this.num(e.year);case"yy":return s?i({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return s?i({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return s?i({year:"numeric"},"year"):this.num(e.year,6);case"G":return y("short");case"GG":return y("long");case"GGGGG":return y("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return f(m)}};return vt(I.parseFormat(t),O)}formatDurationFromString(e,t){const r=u=>{switch(u[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},s=u=>l=>{const f=r(l);return f?this.num(u.get(f),l.length):l},i=I.parseFormat(t),a=i.reduce((u,{literal:l,val:f})=>l?u:u.concat(f),[]),o=e.shiftTo(...a.map(r).filter(u=>u));return vt(i,s(o))}}const Sn=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function ne(...n){const e=n.reduce((t,r)=>t+r.source,"");return RegExp(`^${e}$`)}function re(...n){return e=>n.reduce(([t,r,s],i)=>{const[a,o,u]=i(e,s);return[{...t,...a},o||r,u]},[{},null,1]).slice(0,2)}function se(n,...e){if(n==null)return[null,null];for(const[t,r]of e){const s=t.exec(n);if(s)return r(s)}return[null,null]}function On(...n){return(e,t)=>{const r={};let s;for(s=0;sm!==void 0&&(v||m&&f)?-m:m;return[{years:O(q(t)),months:O(q(r)),weeks:O(q(s)),days:O(q(i)),hours:O(q(a)),minutes:O(q(o)),seconds:O(q(u),u==="-0"),milliseconds:O(et(l),y)}]}const Gr={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function st(n,e,t,r,s,i,a){const o={year:e.length===2?je(U(e)):U(e),month:hn.indexOf(t)+1,day:U(r),hour:U(s),minute:U(i)};return a&&(o.second=U(a)),n&&(o.weekday=n.length>3?yn.indexOf(n)+1:gn.indexOf(n)+1),o}const Jr=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function _r(n){const[,e,t,r,s,i,a,o,u,l,f,y]=n,O=st(e,s,r,t,i,a,o);let m;return u?m=Gr[u]:l?m=0:m=Le(f,y),[O,new E(m)]}function Br(n){return n.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const jr=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Qr=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Kr=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Nt(n){const[,e,t,r,s,i,a,o]=n;return[st(e,s,r,t,i,a,o),E.utcInstance]}function Xr(n){const[,e,t,r,s,i,a,o]=n;return[st(e,o,t,r,s,i,a),E.utcInstance]}const es=ne(Lr,rt),ts=ne($r,rt),ns=ne(Zr,rt),rs=ne(vn),In=re(qr,ie,ge,we),ss=re(Ar,ie,ge,we),is=re(Ur,ie,ge,we),as=re(ie,ge,we);function os(n){return se(n,[es,In],[ts,ss],[ns,is],[rs,as])}function us(n){return se(Br(n),[Jr,_r])}function ls(n){return se(n,[jr,Nt],[Qr,Nt],[Kr,Xr])}function cs(n){return se(n,[Yr,Pr])}const fs=re(ie);function ds(n){return se(n,[Hr,fs])}const hs=ne(zr,Rr),ms=ne(Nn),ys=re(ie,ge,we);function gs(n){return se(n,[hs,In],[ms,ys])}const It="Invalid Duration",En={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},ws={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...En},D=146097/400,_=146097/4800,ks={years:{quarters:4,months:12,weeks:D/7,days:D,hours:D*24,minutes:D*24*60,seconds:D*24*60*60,milliseconds:D*24*60*60*1e3},quarters:{months:3,weeks:D/28,days:D/4,hours:D*24/4,minutes:D*24*60/4,seconds:D*24*60*60/4,milliseconds:D*24*60*60*1e3/4},months:{weeks:_/7,days:_,hours:_*24,minutes:_*24*60,seconds:_*24*60*60,milliseconds:_*24*60*60*1e3},...En},Y=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Ts=Y.slice(0).reverse();function A(n,e,t=!1){const r={values:t?e.values:{...n.values,...e.values||{}},loc:n.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||n.conversionAccuracy,matrix:e.matrix||n.matrix};return new g(r)}function Mn(n,e){let t=e.milliseconds??0;for(const r of Ts.slice(1))e[r]&&(t+=e[r]*n[r].milliseconds);return t}function Et(n,e){const t=Mn(n,e)<0?-1:1;Y.reduceRight((r,s)=>{if(d(e[s]))return r;if(r){const i=e[r]*t,a=n[s][r],o=Math.floor(i/a);e[s]+=o*t,e[r]-=o*a*t}return s},null),Y.reduce((r,s)=>{if(d(e[s]))return r;if(r){const i=e[r]%1;e[r]-=i,e[s]+=i*n[r][s]}return s},null)}function Ss(n){const e={};for(const[t,r]of Object.entries(n))r!==0&&(e[t]=r);return e}class g{constructor(e){const t=e.conversionAccuracy==="longterm"||!1;let r=t?ks:ws;e.matrix&&(r=e.matrix),this.values=e.values,this.loc=e.loc||k.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(e,t){return g.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new N(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new g({values:Fe(e,g.normalizeUnit),loc:k.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(R(e))return g.fromMillis(e);if(g.isDuration(e))return e;if(typeof e=="object")return g.fromObject(e);throw new N(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[r]=cs(e);return r?g.fromObject(r,t):g.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[r]=ds(e);return r?g.fromObject(r,t):g.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new N("need to specify a reason the Duration is invalid");const r=e instanceof C?e:new C(e,t);if(S.throwOnInvalid)throw new Yn(r);return new g({invalid:r})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!t)throw new $t(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const r={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?I.create(this.loc,r).formatDurationFromString(this,e):It}toHuman(e={}){if(!this.isValid)return It;const t=Y.map(r=>{const s=this.values[r];return d(s)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:r.slice(0,-1)}).format(s)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=tt(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},h.fromMillis(t,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?Mn(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=g.fromDurationLike(e),r={};for(const s of Y)(te(t.values,s)||te(this.values,s))&&(r[s]=t.get(s)+this.get(s));return A(this,{values:r},!0)}minus(e){if(!this.isValid)return this;const t=g.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const r of Object.keys(this.values))t[r]=dn(e(this.values[r],r));return A(this,{values:t},!0)}get(e){return this[g.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,...Fe(e,g.normalizeUnit)};return A(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:r,matrix:s}={}){const a={loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:s,conversionAccuracy:r};return A(this,a)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Et(this.matrix,e),A(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=Ss(this.normalize().shiftToAll().toObject());return A(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(a=>g.normalizeUnit(a));const t={},r={},s=this.toObject();let i;for(const a of Y)if(e.indexOf(a)>=0){i=a;let o=0;for(const l in r)o+=this.matrix[l][a]*r[l],r[l]=0;R(s[a])&&(o+=s[a]);const u=Math.trunc(o);t[a]=u,r[a]=(o*1e3-u*1e3)/1e3}else R(s[a])&&(r[a]=s[a]);for(const a in r)r[a]!==0&&(t[i]+=a===i?r[a]:r[a]/this.matrix[i][a]);return Et(this.matrix,t),A(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return A(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(r,s){return r===void 0||r===0?s===void 0||s===0:r===s}for(const r of Y)if(!t(this.values[r],e.values[r]))return!1;return!0}}const B="Invalid Interval";function Os(n,e){return!n||!n.isValid?T.invalid("missing or invalid start"):!e||!e.isValid?T.invalid("missing or invalid end"):ee:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:t}={}){return this.isValid?T.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(le).filter(a=>this.contains(a)).sort((a,o)=>a.toMillis()-o.toMillis()),r=[];let{s}=this,i=0;for(;s+this.e?this.e:a;r.push(T.fromDateTimes(s,o)),s=o,i+=1}return r}splitBy(e){const t=g.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s:r}=this,s=1,i;const a=[];for(;ru*s));i=+o>+this.e?this.e:o,a.push(T.fromDateTimes(r,i)),r=i,s+=1}return a}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,r=this.e=r?null:T.fromDateTimes(t,r)}union(e){if(!this.isValid)return this;const t=this.se.e?this.e:e.e;return T.fromDateTimes(t,r)}static merge(e){const[t,r]=e.sort((s,i)=>s.s-i.s).reduce(([s,i],a)=>i?i.overlaps(a)||i.abutsStart(a)?[s,i.union(a)]:[s.concat([i]),a]:[s,a],[[],null]);return r&&t.push(r),t}static xor(e){let t=null,r=0;const s=[],i=e.map(u=>[{time:u.s,type:"s"},{time:u.e,type:"e"}]),a=Array.prototype.concat(...i),o=a.sort((u,l)=>u.time-l.time);for(const u of o)r+=u.type==="s"?1:-1,r===1?t=u.time:(t&&+t!=+u.time&&s.push(T.fromDateTimes(t,u.time)),t=null);return T.merge(s)}difference(...e){return T.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:B}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=De,t={}){return this.isValid?I.create(this.s.loc.clone(t),e).formatInterval(this):B}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:B}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:B}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:B}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:B}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):g.invalid(this.invalidReason)}mapEndpoints(e){return T.fromDateTimes(e(this.s),e(this.e))}}class Se{static hasDST(e=S.defaultZone){const t=h.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return $.isValidZone(e)}static normalizeZone(e){return z(e,S.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||k.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||k.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||k.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:r=null,locObj:s=null,outputCalendar:i="gregory"}={}){return(s||k.create(t,r,i)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:r=null,locObj:s=null,outputCalendar:i="gregory"}={}){return(s||k.create(t,r,i)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:r=null,locObj:s=null}={}){return(s||k.create(t,r,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:r=null,locObj:s=null}={}){return(s||k.create(t,r,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return k.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return k.create(t,null,"gregory").eras(e)}static features(){return{relative:ln(),localeWeek:cn()}}}function Mt(n,e){const t=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=t(e)-t(n);return Math.floor(g.fromMillis(r).as("days"))}function ps(n,e,t){const r=[["years",(u,l)=>l.year-u.year],["quarters",(u,l)=>l.quarter-u.quarter+(l.year-u.year)*4],["months",(u,l)=>l.month-u.month+(l.year-u.year)*12],["weeks",(u,l)=>{const f=Mt(u,l);return(f-f%7)/7}],["days",Mt]],s={},i=n;let a,o;for(const[u,l]of r)t.indexOf(u)>=0&&(a=u,s[u]=l(n,e),o=i.plus(s),o>e?(s[u]--,n=i.plus(s),n>e&&(o=n,s[u]--,n=i.plus(s))):n=o);return[n,s,o,a]}function vs(n,e,t,r){let[s,i,a,o]=ps(n,e,t);const u=e-s,l=t.filter(y=>["hours","minutes","seconds","milliseconds"].indexOf(y)>=0);l.length===0&&(a0?g.fromMillis(u,r).shiftTo(...l).plus(f):f}const Ns="missing Intl.DateTimeFormat.formatToParts support";function w(n,e=t=>t){return{regex:n,deser:([t])=>e(hr(t))}}const Is=" ",Dn=`[ ${Is}]`,xn=new RegExp(Dn,"g");function Es(n){return n.replace(/\./g,"\\.?").replace(xn,Dn)}function Dt(n){return n.replace(/\./g,"").replace(xn," ").toLowerCase()}function V(n,e){return n===null?null:{regex:RegExp(n.map(Es).join("|")),deser:([t])=>n.findIndex(r=>Dt(t)===Dt(r))+e}}function xt(n,e){return{regex:n,deser:([,t,r])=>Le(t,r),groups:e}}function Oe(n){return{regex:n,deser:([e])=>e}}function Ms(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Ds(n,e){const t=F(e),r=F(e,"{2}"),s=F(e,"{3}"),i=F(e,"{4}"),a=F(e,"{6}"),o=F(e,"{1,2}"),u=F(e,"{1,3}"),l=F(e,"{1,6}"),f=F(e,"{1,9}"),y=F(e,"{2,4}"),O=F(e,"{4,6}"),m=L=>({regex:RegExp(Ms(L.val)),deser:([J])=>J,literal:!0}),G=(L=>{if(n.literal)return m(L);switch(L.val){case"G":return V(e.eras("short"),0);case"GG":return V(e.eras("long"),0);case"y":return w(l);case"yy":return w(y,je);case"yyyy":return w(i);case"yyyyy":return w(O);case"yyyyyy":return w(a);case"M":return w(o);case"MM":return w(r);case"MMM":return V(e.months("short",!0),1);case"MMMM":return V(e.months("long",!0),1);case"L":return w(o);case"LL":return w(r);case"LLL":return V(e.months("short",!1),1);case"LLLL":return V(e.months("long",!1),1);case"d":return w(o);case"dd":return w(r);case"o":return w(u);case"ooo":return w(s);case"HH":return w(r);case"H":return w(o);case"hh":return w(r);case"h":return w(o);case"mm":return w(r);case"m":return w(o);case"q":return w(o);case"qq":return w(r);case"s":return w(o);case"ss":return w(r);case"S":return w(u);case"SSS":return w(s);case"u":return Oe(f);case"uu":return Oe(o);case"uuu":return w(t);case"a":return V(e.meridiems(),0);case"kkkk":return w(i);case"kk":return w(y,je);case"W":return w(o);case"WW":return w(r);case"E":case"c":return w(t);case"EEE":return V(e.weekdays("short",!1),1);case"EEEE":return V(e.weekdays("long",!1),1);case"ccc":return V(e.weekdays("short",!0),1);case"cccc":return V(e.weekdays("long",!0),1);case"Z":case"ZZ":return xt(new RegExp(`([+-]${o.source})(?::(${r.source}))?`),2);case"ZZZ":return xt(new RegExp(`([+-]${o.source})(${r.source})?`),2);case"z":return Oe(/[a-z_+-/]{1,256}?/i);case" ":return Oe(/[^\S\n\r]/);default:return m(L)}})(n)||{invalidReason:Ns};return G.token=n,G}const xs={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function bs(n,e,t){const{type:r,value:s}=n;if(r==="literal"){const u=/^\s+$/.test(s);return{literal:!u,val:u?" ":s}}const i=e[r];let a=r;r==="hour"&&(e.hour12!=null?a=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?a="hour12":a="hour24":a=t.hour12?"hour12":"hour24");let o=xs[a];if(typeof o=="object"&&(o=o[i]),o)return{literal:!1,val:o}}function Fs(n){return[`^${n.map(t=>t.regex).reduce((t,r)=>`${t}(${r.source})`,"")}$`,n]}function Vs(n,e,t){const r=n.match(e);if(r){const s={};let i=1;for(const a in t)if(te(t,a)){const o=t[a],u=o.groups?o.groups+1:1;!o.literal&&o.token&&(s[o.token.val[0]]=o.deser(r.slice(i,i+u))),i+=u}return[r,s]}else return[r,{}]}function Cs(n){const e=i=>{switch(i){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let t=null,r;return d(n.z)||(t=$.create(n.z)),d(n.Z)||(t||(t=new E(n.Z)),r=n.Z),d(n.q)||(n.M=(n.q-1)*3+1),d(n.h)||(n.h<12&&n.a===1?n.h+=12:n.h===12&&n.a===0&&(n.h=0)),n.G===0&&n.y&&(n.y=-n.y),d(n.u)||(n.S=et(n.u)),[Object.keys(n).reduce((i,a)=>{const o=e(a);return o&&(i[o]=n[a]),i},{}),t,r]}let ze=null;function Ws(){return ze||(ze=h.fromMillis(1555555555555)),ze}function Ls(n,e){if(n.literal)return n;const t=I.macroTokenToFormatOpts(n.val),r=Cn(t,e);return r==null||r.includes(void 0)?n:r}function bn(n,e){return Array.prototype.concat(...n.map(t=>Ls(t,e)))}class Fn{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=bn(I.parseFormat(t),e),this.units=this.tokens.map(r=>Ds(r,e)),this.disqualifyingUnit=this.units.find(r=>r.invalidReason),!this.disqualifyingUnit){const[r,s]=Fs(this.units);this.regex=RegExp(r,"i"),this.handlers=s}}explainFromTokens(e){if(this.isValid){const[t,r]=Vs(e,this.regex,this.handlers),[s,i,a]=r?Cs(r):[null,null,void 0];if(te(r,"a")&&te(r,"H"))throw new K("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:r,result:s,zone:i,specificOffset:a}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function Vn(n,e,t){return new Fn(n,t).explainFromTokens(e)}function $s(n,e,t){const{result:r,zone:s,specificOffset:i,invalidReason:a}=Vn(n,e,t);return[r,s,i,a]}function Cn(n,e){if(!n)return null;const r=I.create(e,n).dtFormatter(Ws()),s=r.formatToParts(),i=r.resolvedOptions();return s.map(a=>bs(a,n,i))}const Re="Invalid DateTime",Zs=864e13;function fe(n){return new C("unsupported zone",`the zone "${n.name}" is not supported`)}function qe(n){return n.weekData===null&&(n.weekData=xe(n.c)),n.weekData}function He(n){return n.localWeekData===null&&(n.localWeekData=xe(n.c,n.loc.getMinDaysInFirstWeek(),n.loc.getStartOfWeek())),n.localWeekData}function H(n,e){const t={ts:n.ts,zone:n.zone,c:n.c,o:n.o,loc:n.loc,invalid:n.invalid};return new h({...t,...e,old:t})}function Wn(n,e,t){let r=n-e*60*1e3;const s=t.offset(r);if(e===s)return[r,e];r-=(s-e)*60*1e3;const i=t.offset(r);return s===i?[r,s]:[n-Math.min(s,i)*60*1e3,Math.max(s,i)]}function pe(n,e){n+=e*60*1e3;const t=new Date(n);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function Ie(n,e,t){return Wn(We(n),e,t)}function bt(n,e){const t=n.o,r=n.c.year+Math.trunc(e.years),s=n.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,i={...n.c,year:r,month:s,day:Math.min(n.c.day,be(r,s))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},a=g.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),o=We(i);let[u,l]=Wn(o,t,n.zone);return a!==0&&(u+=a,l=n.zone.offset(u)),{ts:u,o:l}}function j(n,e,t,r,s,i){const{setZone:a,zone:o}=t;if(n&&Object.keys(n).length!==0||e){const u=e||o,l=h.fromObject(n,{...t,zone:u,specificOffset:i});return a?l:l.setZone(o)}else return h.invalid(new C("unparsable",`the input "${s}" can't be parsed as ${r}`))}function ve(n,e,t=!0){return n.isValid?I.create(k.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(n,e):null}function Ye(n,e){const t=n.c.year>9999||n.c.year<0;let r="";return t&&n.c.year>=0&&(r+="+"),r+=p(n.c.year,t?6:4),e?(r+="-",r+=p(n.c.month),r+="-",r+=p(n.c.day)):(r+=p(n.c.month),r+=p(n.c.day)),r}function Ft(n,e,t,r,s,i){let a=p(n.c.hour);return e?(a+=":",a+=p(n.c.minute),(n.c.millisecond!==0||n.c.second!==0||!t)&&(a+=":")):a+=p(n.c.minute),(n.c.millisecond!==0||n.c.second!==0||!t)&&(a+=p(n.c.second),(n.c.millisecond!==0||!r)&&(a+=".",a+=p(n.c.millisecond,3))),s&&(n.isOffsetFixed&&n.offset===0&&!i?a+="Z":n.o<0?(a+="-",a+=p(Math.trunc(-n.o/60)),a+=":",a+=p(Math.trunc(-n.o%60))):(a+="+",a+=p(Math.trunc(n.o/60)),a+=":",a+=p(Math.trunc(n.o%60)))),i&&(a+="["+n.zone.ianaName+"]"),a}const Ln={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},As={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Us={ordinal:1,hour:0,minute:0,second:0,millisecond:0},$n=["year","month","day","hour","minute","second","millisecond"],zs=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Rs=["year","ordinal","hour","minute","second","millisecond"];function qs(n){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[n.toLowerCase()];if(!e)throw new $t(n);return e}function Vt(n){switch(n.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return qs(n)}}function Hs(n){return Me[n]||(Ee===void 0&&(Ee=S.now()),Me[n]=n.offset(Ee)),Me[n]}function Ct(n,e){const t=z(e.zone,S.defaultZone);if(!t.isValid)return h.invalid(fe(t));const r=k.fromObject(e);let s,i;if(d(n.year))s=S.now();else{for(const u of $n)d(n[u])&&(n[u]=Ln[u]);const a=on(n)||un(n);if(a)return h.invalid(a);const o=Hs(t);[s,i]=Ie(n,o,t)}return new h({ts:s,zone:t,loc:r,o:i})}function Wt(n,e,t){const r=d(t.round)?!0:t.round,s=(a,o)=>(a=tt(a,r||t.calendary?0:2,!0),e.loc.clone(t).relFormatter(t).format(a,o)),i=a=>t.calendary?e.hasSame(n,a)?0:e.startOf(a).diff(n.startOf(a),a).get(a):e.diff(n,a).get(a);if(t.unit)return s(i(t.unit),t.unit);for(const a of t.units){const o=i(a);if(Math.abs(o)>=1)return s(o,a)}return s(n>e?-0:0,t.units[t.units.length-1])}function Lt(n){let e={},t;return n.length>0&&typeof n[n.length-1]=="object"?(e=n[n.length-1],t=Array.from(n).slice(0,n.length-1)):t=Array.from(n),[e,t]}let Ee,Me={};class h{constructor(e){const t=e.zone||S.defaultZone;let r=e.invalid||(Number.isNaN(e.ts)?new C("invalid input"):null)||(t.isValid?null:fe(t));this.ts=d(e.ts)?S.now():e.ts;let s=null,i=null;if(!r)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[s,i]=[e.old.c,e.old.o];else{const o=R(e.o)&&!e.old?e.o:t.offset(this.ts);s=pe(this.ts,o),r=Number.isNaN(s.year)?new C("invalid input"):null,s=r?null:s,i=r?null:o}this._zone=t,this.loc=e.loc||k.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=s,this.o=i,this.isLuxonDateTime=!0}static now(){return new h({})}static local(){const[e,t]=Lt(arguments),[r,s,i,a,o,u,l]=t;return Ct({year:r,month:s,day:i,hour:a,minute:o,second:u,millisecond:l},e)}static utc(){const[e,t]=Lt(arguments),[r,s,i,a,o,u,l]=t;return e.zone=E.utcInstance,Ct({year:r,month:s,day:i,hour:a,minute:o,second:u,millisecond:l},e)}static fromJSDate(e,t={}){const r=kr(e)?e.valueOf():NaN;if(Number.isNaN(r))return h.invalid("invalid input");const s=z(t.zone,S.defaultZone);return s.isValid?new h({ts:r,zone:s,loc:k.fromObject(t)}):h.invalid(fe(s))}static fromMillis(e,t={}){if(R(e))return e<-864e13||e>Zs?h.invalid("Timestamp out of range"):new h({ts:e,zone:z(t.zone,S.defaultZone),loc:k.fromObject(t)});throw new N(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(R(e))return new h({ts:e*1e3,zone:z(t.zone,S.defaultZone),loc:k.fromObject(t)});throw new N("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const r=z(t.zone,S.defaultZone);if(!r.isValid)return h.invalid(fe(r));const s=k.fromObject(t),i=Fe(e,Vt),{minDaysInFirstWeek:a,startOfWeek:o}=St(i,s),u=S.now(),l=d(t.specificOffset)?r.offset(u):t.specificOffset,f=!d(i.ordinal),y=!d(i.year),O=!d(i.month)||!d(i.day),m=y||O,v=i.weekYear||i.weekNumber;if((m||f)&&v)throw new K("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(O&&f)throw new K("Can't mix ordinal dates with month/day");const G=v||i.weekday&&!m;let L,J,ae=pe(u,l);G?(L=zs,J=As,ae=xe(ae,a,o)):f?(L=Rs,J=Us,ae=Ue(ae)):(L=$n,J=Ln);let it=!1;for(const ue of L){const Rn=i[ue];d(Rn)?it?i[ue]=J[ue]:i[ue]=ae[ue]:it=!0}const Zn=G?yr(i,a,o):f?gr(i):on(i),at=Zn||un(i);if(at)return h.invalid(at);const An=G?kt(i,a,o):f?Tt(i):i,[Un,zn]=Ie(An,l,r),oe=new h({ts:Un,zone:r,o:zn,loc:s});return i.weekday&&m&&e.weekday!==oe.weekday?h.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${oe.toISO()}`):oe.isValid?oe:h.invalid(oe.invalid)}static fromISO(e,t={}){const[r,s]=os(e);return j(r,s,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[r,s]=us(e);return j(r,s,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[r,s]=ls(e);return j(r,s,t,"HTTP",t)}static fromFormat(e,t,r={}){if(d(e)||d(t))throw new N("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:i=null}=r,a=k.fromOpts({locale:s,numberingSystem:i,defaultToEN:!0}),[o,u,l,f]=$s(a,e,t);return f?h.invalid(f):j(o,u,r,`format ${t}`,e,l)}static fromString(e,t,r={}){return h.fromFormat(e,t,r)}static fromSQL(e,t={}){const[r,s]=gs(e);return j(r,s,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new N("need to specify a reason the DateTime is invalid");const r=e instanceof C?e:new C(e,t);if(S.throwOnInvalid)throw new qn(r);return new h({invalid:r})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const r=Cn(e,k.fromObject(t));return r?r.map(s=>s?s.val:null).join(""):null}static expandFormat(e,t={}){return bn(I.parseFormat(e),k.fromObject(t)).map(s=>s.val).join("")}static resetCache(){Ee=void 0,Me={}}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?qe(this).weekYear:NaN}get weekNumber(){return this.isValid?qe(this).weekNumber:NaN}get weekday(){return this.isValid?qe(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?He(this).weekday:NaN}get localWeekNumber(){return this.isValid?He(this).weekNumber:NaN}get localWeekYear(){return this.isValid?He(this).weekYear:NaN}get ordinal(){return this.isValid?Ue(this.c).ordinal:NaN}get monthShort(){return this.isValid?Se.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Se.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Se.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Se.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,t=6e4,r=We(this.c),s=this.zone.offset(r-e),i=this.zone.offset(r+e),a=this.zone.offset(r-s*t),o=this.zone.offset(r-i*t);if(a===o)return[this];const u=r-a*t,l=r-o*t,f=pe(u,a),y=pe(l,o);return f.hour===y.hour&&f.minute===y.minute&&f.second===y.second&&f.millisecond===y.millisecond?[H(this,{ts:u}),H(this,{ts:l})]:[this]}get isInLeapYear(){return ye(this.year)}get daysInMonth(){return be(this.year,this.month)}get daysInYear(){return this.isValid?X(this.year):NaN}get weeksInWeekYear(){return this.isValid?he(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?he(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:r,calendar:s}=I.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:r,outputCalendar:s}}toUTC(e=0,t={}){return this.setZone(E.instance(e),t)}toLocal(){return this.setZone(S.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:r=!1}={}){if(e=z(e,S.defaultZone),e.equals(this.zone))return this;if(e.isValid){let s=this.ts;if(t||r){const i=e.offset(this.ts),a=this.toObject();[s]=Ie(a,i,e)}return H(this,{ts:s,zone:e})}else return h.invalid(fe(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:r}={}){const s=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:r});return H(this,{loc:s})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=Fe(e,Vt),{minDaysInFirstWeek:r,startOfWeek:s}=St(t,this.loc),i=!d(t.weekYear)||!d(t.weekNumber)||!d(t.weekday),a=!d(t.ordinal),o=!d(t.year),u=!d(t.month)||!d(t.day),l=o||u,f=t.weekYear||t.weekNumber;if((l||a)&&f)throw new K("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&a)throw new K("Can't mix ordinal dates with month/day");let y;i?y=kt({...xe(this.c,r,s),...t},r,s):d(t.ordinal)?(y={...this.toObject(),...t},d(t.day)&&(y.day=Math.min(be(y.year,y.month),y.day))):y=Tt({...Ue(this.c),...t});const[O,m]=Ie(y,this.o,this.zone);return H(this,{ts:O,o:m})}plus(e){if(!this.isValid)return this;const t=g.fromDurationLike(e);return H(this,bt(this,t))}minus(e){if(!this.isValid)return this;const t=g.fromDurationLike(e).negate();return H(this,bt(this,t))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const r={},s=g.normalizeUnit(e);switch(s){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(s==="weeks")if(t){const i=this.loc.getStartOfWeek(),{weekday:a}=this;athis.valueOf(),o=a?this:e,u=a?e:this,l=vs(o,u,i,s);return a?l.negate():l}diffNow(e="milliseconds",t={}){return this.diff(h.now(),e,t)}until(e){return this.isValid?T.fromDateTimes(this,e):this}hasSame(e,t,r){if(!this.isValid)return!1;const s=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(t,r)<=s&&s<=i.endOf(t,r)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||h.fromObject({},{zone:this.zone}),r=e.padding?thist.valueOf(),Math.min)}static max(...e){if(!e.every(h.isDateTime))throw new N("max requires all arguments be DateTimes");return Ot(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,r={}){const{locale:s=null,numberingSystem:i=null}=r,a=k.fromOpts({locale:s,numberingSystem:i,defaultToEN:!0});return Vn(a,e,t)}static fromStringExplain(e,t,r={}){return h.fromFormatExplain(e,t,r)}static buildFormatParser(e,t={}){const{locale:r=null,numberingSystem:s=null}=t,i=k.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0});return new Fn(i,e)}static fromFormatParser(e,t,r={}){if(d(e)||d(t))throw new N("fromFormatParser requires an input string and a format parser");const{locale:s=null,numberingSystem:i=null}=r,a=k.fromOpts({locale:s,numberingSystem:i,defaultToEN:!0});if(!a.equals(t.locale))throw new N(`fromFormatParser called with a locale of ${a}, but the format parser was created for ${t.locale}`);const{result:o,zone:u,specificOffset:l,invalidReason:f}=t.explainFromTokens(e);return f?h.invalid(f):j(o,u,r,`format ${t.format}`,e,l)}static get DATE_SHORT(){return De}static get DATE_MED(){return Zt}static get DATE_MED_WITH_WEEKDAY(){return Pn}static get DATE_FULL(){return At}static get DATE_HUGE(){return Ut}static get TIME_SIMPLE(){return zt}static get TIME_WITH_SECONDS(){return Rt}static get TIME_WITH_SHORT_OFFSET(){return qt}static get TIME_WITH_LONG_OFFSET(){return Ht}static get TIME_24_SIMPLE(){return Yt}static get TIME_24_WITH_SECONDS(){return Pt}static get TIME_24_WITH_SHORT_OFFSET(){return Gt}static get TIME_24_WITH_LONG_OFFSET(){return Jt}static get DATETIME_SHORT(){return _t}static get DATETIME_SHORT_WITH_SECONDS(){return Bt}static get DATETIME_MED(){return jt}static get DATETIME_MED_WITH_SECONDS(){return Qt}static get DATETIME_MED_WITH_WEEKDAY(){return Gn}static get DATETIME_FULL(){return Kt}static get DATETIME_FULL_WITH_SECONDS(){return Xt}static get DATETIME_HUGE(){return en}static get DATETIME_HUGE_WITH_SECONDS(){return tn}}function le(n){if(h.isDateTime(n))return n;if(n&&n.valueOf&&R(n.valueOf()))return h.fromJSDate(n);if(n&&typeof n=="object")return h.fromObject(n);throw new N(`Unknown datetime argument: ${n}, of type ${typeof n}`)}export{h as D}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/dexie-export-import-aIN45iyB.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/dexie-export-import-aIN45iyB.js deleted file mode 100644 index 01e7a85..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/dexie-export-import-aIN45iyB.js +++ /dev/null @@ -1,28 +0,0 @@ -import{X as Re}from"./main.common-DD7dqhZp.js";var bt={};/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var ct=function(){return ct=Object.assign||function(d){for(var u,m=1,w=arguments.length;m0&&p[p.length-1])&&(s[0]===6||s[0]===2)){u=0;continue}if(s[0]===3&&(!p||s[1]>p[0]&&s[1]"u")throw new Error("FileReaderSync missing. Reading blobs synchronously requires code to run from within a web worker. Use TSON.encapsulateAsync() to do it from the main thread.");var u=new FileReaderSync,m=d==="binary"?u.readAsArrayBuffer(g):u.readAsText(g);return m}var vt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function dt(g,d){return d={exports:{}},g(d,d.exports),d.exports}var lt=dt(function(g,d){(function(u,m){g.exports=m()})(vt,function(){function u(l){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(y){return typeof y}:u=function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},u(l)}function m(l,y,h,v,A,G,H){try{var W=l[G](H),C=W.value}catch(Ae){h(Ae);return}W.done?y(C):Promise.resolve(C).then(v,A)}function w(l){return function(){var y=this,h=arguments;return new Promise(function(v,A){var G=l.apply(y,h);function H(C){m(G,v,A,H,W,"next",C)}function W(C){m(G,v,A,H,W,"throw",C)}H(void 0)})}}function p(l,y){if(!(l instanceof y))throw new TypeError("Cannot call a class as a function")}function o(l,y){for(var h=0;h-1){var v=l[he(y.slice(0,h))];return v===void 0?void 0:Se(v,y.slice(h+1))}return l[he(y)]}function Be(l,y,h){if(y==="")return h;var v=y.indexOf(".");if(v>-1){var A=l[he(y.slice(0,v))];return Be(A,y.slice(v+1),h)}return l[he(y)]=h,l}function _e(l){return l===null?"null":Array.isArray(l)?"array":u(l)}var ce=Object.keys,be=Array.isArray,Ce={}.hasOwnProperty,Me=["type","replaced","iterateIn","iterateUnsetNumeric"];function $(l,y){if(l.keypath==="")return-1;var h=l.keypath.match(/\./g)||0,v=y.keypath.match(/\./g)||0;return h&&(h=h.length),v&&(v=v.length),h>v?-1:hy.keypath}var ye=function(){function l(y){p(this,l),this.options=y,this.plainObjectReplacers=[],this.nonplainObjectReplacers=[],this.revivers={},this.types={}}return j(l,[{key:"stringify",value:function(h,v,A,G){G=_({},this.options,{},G,{stringification:!0});var H=this.encapsulate(h,null,G);return be(H)?JSON.stringify(H[0],v,A):H.then(function(W){return JSON.stringify(W,v,A)})}},{key:"stringifySync",value:function(h,v,A,G){return this.stringify(h,v,A,_({throwOnBadSyncType:!0},G,{sync:!0}))}},{key:"stringifyAsync",value:function(h,v,A,G){return this.stringify(h,v,A,_({throwOnBadSyncType:!0},G,{sync:!1}))}},{key:"parse",value:function(h,v,A){return A=_({},this.options,{},A,{parse:!0}),this.revive(JSON.parse(h,v),A)}},{key:"parseSync",value:function(h,v,A){return this.parse(h,v,_({throwOnBadSyncType:!0},A,{sync:!0}))}},{key:"parseAsync",value:function(h,v,A){return this.parse(h,v,_({throwOnBadSyncType:!0},A,{sync:!1}))}},{key:"specialTypeNames",value:function(h,v){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return A.returnTypeNames=!0,this.encapsulate(h,v,A)}},{key:"rootTypeName",value:function(h,v){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return A.iterateNone=!0,this.encapsulate(h,v,A)}},{key:"encapsulate",value:function(h,v,A){A=_({sync:!0},this.options,{},A);var G=A,H=G.sync,W=this,C={},Ae=[],Ue=[],xe=[],Ge="cyclic"in A?A.cyclic:!0,Ye=A,Xe=Ye.encapsulateObserver,Fe=se("",h,Ge,v||{},xe);function qe(I){var t=Object.values(C);if(A.iterateNone)return t.length?t[0]:l.getJSONType(I);if(t.length){if(A.returnTypeNames)return pe(new Set(t));!I||!f(I)||Ce.call(I,"$types")?I={$:I,$types:{$:C}}:I.$types=C}else M(I)&&Ce.call(I,"$types")&&(I={$:I,$types:!0});return A.returnTypeNames?!1:I}function ge(I,t){return oe.apply(this,arguments)}function oe(){return oe=w(regeneratorRuntime.mark(function I(t,e){var r;return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,Promise.all(e.map(function(O){return O[1].p}));case 2:return r=a.sent,a.next=5,Promise.all(r.map(function(){var O=w(regeneratorRuntime.mark(function T(B){var E,L,Y,q,ae,Q,X,fe,le,D,Te,P,S,U;return regeneratorRuntime.wrap(function(x){for(;;)switch(x.prev=x.next){case 0:if(E=[],L=e.splice(0,1),Y=F(L,1),q=Y[0],ae=F(q,7),Q=ae[0],X=ae[2],fe=ae[3],le=ae[4],D=ae[5],Te=ae[6],P=se(Q,B,X,fe,E,!0,Te),S=b(P,N),!(Q&&S)){x.next=11;break}return x.next=8,P.p;case 8:return U=x.sent,le[D]=U,x.abrupt("return",ge(t,E));case 11:return Q?le[D]=P:S?t=P.p:t=P,x.abrupt("return",ge(t,E));case 13:case"end":return x.stop()}},T)}));return function(T){return O.apply(this,arguments)}}()));case 5:return a.abrupt("return",t);case 6:case"end":return a.stop()}},I)})),oe.apply(this,arguments)}function te(I,t,e){Object.assign(I,t);var r=Me.map(function(i){var a=I[i];return delete I[i],a});e(),Me.forEach(function(i,a){I[i]=r[a]})}function se(I,t,e,r,i,a,O){var T,B={},E=u(t),L=Xe?function(S){var U=O||r.type||l.getJSONType(t);Xe(Object.assign(S||B,{keypath:I,value:t,cyclic:e,stateObj:r,promisesData:i,resolvingTypesonPromise:a,awaitingTypesonPromise:b(t,N)},{type:U}))}:null;if(["string","boolean","number","undefined"].includes(E))return t===void 0||E==="number"&&(isNaN(t)||t===-1/0||t===1/0)?(r.replaced?T=t:T=we(I,t,r,i,!1,a,L),T!==t&&(B={replaced:T})):T=t,L&&L(),T;if(t===null)return L&&L(),t;if(e&&!r.iterateIn&&!r.iterateUnsetNumeric&&t&&u(t)==="object"){var Y=Ae.indexOf(t);if(Y<0)e===!0&&(Ae.push(t),Ue.push(I));else return C[I]="#",L&&L({cyclicKeypath:Ue[Y]}),"#"+Ue[Y]}var q=f(t),ae=be(t),Q=(q||ae)&&(!W.plainObjectReplacers.length||r.replaced)||r.iterateIn?t:we(I,t,r,i,q||ae,null,L),X;if(Q!==t?(T=Q,B={replaced:Q}):I===""&&b(t,N)?(i.push([I,t,e,r,void 0,void 0,r.type]),T=t):ae&&r.iterateIn!=="object"||r.iterateIn==="array"?(X=new Array(t.length),B={clone:X}):!["function","symbol"].includes(u(t))&&!("toJSON"in t)&&!b(t,N)&&!b(t,Promise)&&!b(t,ArrayBuffer)||q||r.iterateIn==="object"?(X={},r.addLength&&(X.length=t.length),B={clone:X}):T=t,L&&L(),A.iterateNone)return X||T;if(!X)return T;if(r.iterateIn){var fe=function(U){var k={ownKeys:Ce.call(t,U)};te(r,k,function(){var x=I+(I?".":"")+ie(U),z=se(x,t[U],!!e,r,i,a);b(z,N)?i.push([x,z,!!e,r,X,U,r.type]):z!==void 0&&(X[U]=z)})};for(var le in t)fe(le);L&&L({endIterateIn:!0,end:!0})}else ce(t).forEach(function(S){var U=I+(I?".":"")+ie(S),k={ownKeys:!0};te(r,k,function(){var x=se(U,t[S],!!e,r,i,a);b(x,N)?i.push([U,x,!!e,r,X,S,r.type]):x!==void 0&&(X[S]=x)})}),L&&L({endIterateOwn:!0,end:!0});if(r.iterateUnsetNumeric){for(var D=t.length,Te=function(U){if(!(U in t)){var k=I+(I?".":"")+U,x={ownKeys:!1};te(r,x,function(){var z=se(k,void 0,!!e,r,i,a);b(z,N)?i.push([k,z,!!e,r,X,U,r.type]):z!==void 0&&(X[U]=z)})}},P=0;Pt.length)&&(e=t.length);for(var r=0,i=new Array(e);r"u"||!(Symbol.iterator in Object(i)))){var O=[],T=!0,B=!1,E=void 0;try{for(var L,Y=i[Symbol.iterator]();!(T=(L=Y.next()).done)&&(O.push(L.value),!a||O.length!==a);T=!0);}catch(q){B=!0,E=q}finally{try{T||Y.return==null||Y.return()}finally{if(B)throw E}}return O}}(t,e)||Ee(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ee(t){return function(r){if(Array.isArray(r))return me(r)}(t)||function(r){if(typeof Symbol<"u"&&Symbol.iterator in Object(r))return Array.from(r)}(t)||Ee(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Ee(t,e){if(t){if(typeof t=="string")return me(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?me(t,e):void 0}}function me(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);r-1){var i=t[M(e.slice(0,r))];return i===void 0?void 0:ie(i,e.slice(r+1))}return t[M(e)]}function he(t,e,r){if(e==="")return r;var i=e.indexOf(".");return i>-1?he(t[M(e.slice(0,i))],e.slice(i+1),r):(t[M(e)]=r,t)}function Se(t,e,r){return r?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}var Be=Object.keys,_e=Array.isArray,ce={}.hasOwnProperty,be=["type","replaced","iterateIn","iterateUnsetNumeric"];function Ce(t){return function(){for(var e=[],r=0;ri?-1:re.keypath}var $=function(){function t(e){_(this,t),this.options=e,this.plainObjectReplacers=[],this.nonplainObjectReplacers=[],this.revivers={},this.types={}}return function(r,i,a){return i&&F(r.prototype,i),r}(t,[{key:"stringify",value:function(r,i,a,O){O=J(J(J({},this.options),O),{},{stringification:!0});var T=this.encapsulate(r,null,O);return _e(T)?JSON.stringify(T[0],i,a):T.then(function(B){return JSON.stringify(B,i,a)})}},{key:"stringifySync",value:function(r,i,a,O){return this.stringify(r,i,a,J(J({throwOnBadSyncType:!0},O),{},{sync:!0}))}},{key:"stringifyAsync",value:function(r,i,a,O){return this.stringify(r,i,a,J(J({throwOnBadSyncType:!0},O),{},{sync:!1}))}},{key:"parse",value:function(r,i,a){return a=J(J(J({},this.options),a),{},{parse:!0}),this.revive(JSON.parse(r,i),a)}},{key:"parseSync",value:function(r,i,a){return this.parse(r,i,J(J({throwOnBadSyncType:!0},a),{},{sync:!0}))}},{key:"parseAsync",value:function(r,i,a){return this.parse(r,i,J(J({throwOnBadSyncType:!0},a),{},{sync:!1}))}},{key:"specialTypeNames",value:function(r,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return a.returnTypeNames=!0,this.encapsulate(r,i,a)}},{key:"rootTypeName",value:function(r,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return a.iterateNone=!0,this.encapsulate(r,i,a)}},{key:"encapsulate",value:function(r,i,a){var O=Ce(function(P,S){return Se(Promise.all(S.map(function(U){return U[1].p})),function(U){return Se(Promise.all(U.map(Ce(function(k){var x=!1,z=[],Ke=V(S.splice(0,1),1),Oe=V(Ke[0],7),Le=Oe[0],De=Oe[2],ue=Oe[3],Ve=Oe[4],ve=Oe[5],$e=Oe[6],je=D(Le,k,De,ue,z,!0,$e),ze=n(je,N);return function(pt,at){var rt=pt();return rt&&rt.then?rt.then(at):at(rt)}(function(){if(Le&&ze)return Se(je.p,function(He){return Ve[ve]=He,x=!0,O(P,z)})},function(He){return x?He:(Le?Ve[ve]=je:P=ze?je.p:je,O(P,z))})}))),function(){return P})})}),T=(a=J(J({sync:!0},this.options),a)).sync,B=this,E={},L=[],Y=[],q=[],ae=!("cyclic"in a)||a.cyclic,Q=a.encapsulateObserver,X=D("",r,ae,i||{},q);function fe(P){var S=Object.values(E);if(a.iterateNone)return S.length?S[0]:t.getJSONType(P);if(S.length){if(a.returnTypeNames)return ee(new Set(S));P&&b(P)&&!ce.call(P,"$types")?P.$types=E:P={$:P,$types:{$:E}}}else f(P)&&ce.call(P,"$types")&&(P={$:P,$types:!0});return!a.returnTypeNames&&P}function le(P,S,U){Object.assign(P,S);var k=be.map(function(x){var z=P[x];return delete P[x],z});U(),be.forEach(function(x,z){P[x]=k[z]})}function D(P,S,U,k,x,z,Ke){var Oe,Le={},De=s(S),ue=Q?function(Ze){var Ie=Ke||k.type||t.getJSONType(S);Q(Object.assign(Ze||Le,{keypath:P,value:S,cyclic:U,stateObj:k,promisesData:x,resolvingTypesonPromise:z,awaitingTypesonPromise:n(S,N)},{type:Ie}))}:null;if(["string","boolean","number","undefined"].includes(De))return S===void 0||Number.isNaN(S)||S===Number.NEGATIVE_INFINITY||S===Number.POSITIVE_INFINITY?(Oe=k.replaced?S:Te(P,S,k,x,!1,z,ue))!==S&&(Le={replaced:Oe}):Oe=S,ue&&ue(),Oe;if(S===null)return ue&&ue(),S;if(U&&!k.iterateIn&&!k.iterateUnsetNumeric&&S&&s(S)==="object"){var Ve=L.indexOf(S);if(!(Ve<0))return E[P]="#",ue&&ue({cyclicKeypath:Y[Ve]}),"#"+Y[Ve];U===!0&&(L.push(S),Y.push(P))}var ve,$e=b(S),je=_e(S),ze=($e||je)&&(!B.plainObjectReplacers.length||k.replaced)||k.iterateIn?S:Te(P,S,k,x,$e||je,null,ue);if(ze!==S?(Oe=ze,Le={replaced:ze}):P===""&&n(S,N)?(x.push([P,S,U,k,void 0,void 0,k.type]),Oe=S):je&&k.iterateIn!=="object"||k.iterateIn==="array"?(ve=new Array(S.length),Le={clone:ve}):(["function","symbol"].includes(s(S))||"toJSON"in S||n(S,N)||n(S,Promise)||n(S,ArrayBuffer))&&!$e&&k.iterateIn!=="object"?Oe=S:(ve={},k.addLength&&(ve.length=S.length),Le={clone:ve}),ue&&ue(),a.iterateNone)return ve||Oe;if(!ve)return Oe;if(k.iterateIn){var He=function(Ie){var Qe={ownKeys:ce.call(S,Ie)};le(k,Qe,function(){var tt=P+(P?".":"")+Z(Ie),ot=D(tt,S[Ie],!!U,k,x,z);n(ot,N)?x.push([tt,ot,!!U,k,ve,Ie,k.type]):ot!==void 0&&(ve[Ie]=ot)})};for(var pt in S)He(pt);ue&&ue({endIterateIn:!0,end:!0})}else Be(S).forEach(function(Ze){var Ie=P+(P?".":"")+Z(Ze);le(k,{ownKeys:!0},function(){var Qe=D(Ie,S[Ze],!!U,k,x,z);n(Qe,N)?x.push([Ie,Qe,!!U,k,ve,Ze,k.type]):Qe!==void 0&&(ve[Ze]=Qe)})}),ue&&ue({endIterateOwn:!0,end:!0});if(k.iterateUnsetNumeric){for(var at=S.length,rt=function(Ie){if(!(Ie in S)){var Qe=P+(P?".":"")+Ie;le(k,{ownKeys:!1},function(){var tt=D(Qe,void 0,!!U,k,x,z);n(tt,N)?x.push([Qe,tt,!!U,k,ve,Ie,k.type]):tt!==void 0&&(ve[Ie]=tt)})}},yt=0;yt>2],T+=C[(3&a[B])<<4|a[B+1]>>4],T+=C[(15&a[B+1])<<2|a[B+2]>>6],T+=C[63&a[B+2]];return O%3==2?T=T.slice(0,-1)+"=":O%3==1&&(T=T.slice(0,-2)+"=="),T},Ge=function(e){var r,i,a,O,T=e.length,B=.75*e.length,E=0;e[e.length-1]==="="&&(B--,e[e.length-2]==="="&&B--);for(var L=new ArrayBuffer(B),Y=new Uint8Array(L),q=0;q>4,Y[E++]=(15&i)<<4|a>>2,Y[E++]=(3&a)<<6|63&O;return L},Ye={arraybuffer:{test:function(e){return $.toStringTag(e)==="ArrayBuffer"},replace:function(e,r){r.buffers||(r.buffers=[]);var i=r.buffers.indexOf(e);return i>-1?{index:i}:(r.buffers.push(e),xe(e))},revive:function(e,r){if(r.buffers||(r.buffers=[]),u(e)==="object")return r.buffers[e.index];var i=Ge(e);return r.buffers.push(i),i}}},Xe=typeof self>"u"?vt:self,Fe={};["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"].forEach(function(t){var e=t,r=Xe[e];r&&(Fe[t.toLowerCase()]={test:function(a){return $.toStringTag(a)===e},replace:function(a,O){var T=a.buffer,B=a.byteOffset,E=a.length;O.buffers||(O.buffers=[]);var L=O.buffers.indexOf(T);return L>-1?{index:L,byteOffset:B,length:E}:(O.buffers.push(T),{encoded:xe(T),byteOffset:B,length:E})},revive:function(a,O){O.buffers||(O.buffers=[]);var T,B=a.byteOffset,E=a.length,L=a.encoded,Y=a.index;return"index"in a?T=O.buffers[Y]:(T=Ge(L),O.buffers.push(T)),new r(T,B,E)}})});var qe={dataview:{test:function(e){return $.toStringTag(e)==="DataView"},replace:function(e,r){var i=e.buffer,a=e.byteOffset,O=e.byteLength;r.buffers||(r.buffers=[]);var T=r.buffers.indexOf(i);return T>-1?{index:T,byteOffset:a,byteLength:O}:(r.buffers.push(i),{encoded:xe(i),byteOffset:a,byteLength:O})},revive:function(e,r){r.buffers||(r.buffers=[]);var i,a=e.byteOffset,O=e.byteLength,T=e.encoded,B=e.index;return"index"in e?i=r.buffers[B]:(i=Ge(T),r.buffers.push(i)),new DataView(i,a,O)}}},ge={IntlCollator:{test:function(e){return $.hasConstructorOf(e,Intl.Collator)},replace:function(e){return e.resolvedOptions()},revive:function(e){return new Intl.Collator(e.locale,e)}},IntlDateTimeFormat:{test:function(e){return $.hasConstructorOf(e,Intl.DateTimeFormat)},replace:function(e){return e.resolvedOptions()},revive:function(e){return new Intl.DateTimeFormat(e.locale,e)}},IntlNumberFormat:{test:function(e){return $.hasConstructorOf(e,Intl.NumberFormat)},replace:function(e){return e.resolvedOptions()},revive:function(e){return new Intl.NumberFormat(e.locale,e)}}};function oe(t){for(var e=new Uint8Array(t.length),r=0;r>2],o+=nt[(w[j]&3)<<4|w[j+1]>>4],o+=nt[(w[j+1]&15)<<2|w[j+2]>>6],o+=nt[w[j+2]&63];return p%3===2?o=o.slice(0,-1)+"=":p%3===1&&(o=o.slice(0,-2)+"=="),o},wt=function(d){var u=d.length,m=d.length*.75,w=0,p,o,j,R;d[d.length-1]==="="&&(m--,d[d.length-2]==="="&&m--);for(var s=new ArrayBuffer(m),_=new Uint8Array(s),F=0;F>4,_[w++]=(o&15)<<4|j>>2,_[w++]=(j&3)<<6|R&63;return s},Pt=typeof self>"u"?global:self,Ot={};["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"].forEach(function(g){var d=g,u=Pt[d];u&&(Ot[g.toLowerCase()+"2"]={test:function(m){return lt.toStringTag(m)===d},replace:function(m){var w=m.buffer,p=m.byteOffset,o=m.length;return{buffer:w,byteOffset:p,length:o}},revive:function(m){var w=m.buffer,p=m.byteOffset,o=m.length;return new u(w,p,o)}})});var jt={arraybuffer:{test:function(g){return lt.toStringTag(g)==="ArrayBuffer"},replace:function(g){return ht(g,0,g.byteLength)},revive:function(g){var d=wt(g);return d}}},Je=new lt().register(Nt),It="FileReaderSync"in self,ft=[],ut=0;Je.register([jt,Ot,{blob2:{test:function(g){return lt.toStringTag(g)==="Blob"},replace:function(g){if(g.isClosed)throw new Error("The Blob is closed");if(It){var d=gt(g,"binary"),u=ht(d,0,d.byteLength);return{type:g.type,data:u}}else{ft.push(g);var m={type:g.type,data:{start:ut,end:ut+g.size}};return ut+=g.size,m}},finalize:function(g,d){g.data=ht(d,0,d.byteLength)},revive:function(g){var d=g.type,u=g.data;return new Blob([wt(u)],{type:d})}}}]);Je.mustFinalize=function(){return ft.length>0};Je.finalize=function(g){return et(void 0,void 0,void 0,function(){var d,u,m,w,p,o,j,R,s,_,F,pe;return We(this,function(de){switch(de.label){case 0:return[4,mt(new Blob(ft),"binary")];case 1:if(d=de.sent(),g){for(u=0,m=g;u0&&(p.push(","),j&&p.push(` - `)),he=be.length===n,c?(Ce=V?be.filter(function(v){return V(re,v)}):be,Me=ee?Ce.map(function(v){return ee(re,v).value}):Ce,$=Me.map(function(v){return Je.encapsulate(v)}),Je.mustFinalize()?[4,Re.waitFor(Je.finalize($))]:[3,3]):[3,4]);case 2:h.sent(),h.label=3;case 3:return y=JSON.stringify($,void 0,j?2:void 0),j&&(y=y.split(` -`).join(` - `)),p.push(new Blob([y.substring(1,y.length-1)])),ie=Me.length,M=be.length>0?Re.getByKeyPath(be[be.length-1],Pe.keyPath):null,[3,8];case 4:return[4,ce.primaryKeys()];case 5:return ye=h.sent(),ke=ye.map(function(v,A){return[v,be[A]]}),V&&(ke=ke.filter(function(v){var A=v[0],G=v[1];return V(re,G,A)})),ee&&(ke=ke.map(function(v){var A=v[0],G=v[1],H=ee(re,G,A);return[H.key,H.value]})),l=ke.map(function(v){return Je.encapsulate(v)}),Je.mustFinalize()?[4,Re.waitFor(Je.finalize(l))]:[3,7];case 6:h.sent(),h.label=7;case 7:y=JSON.stringify(l,void 0,j?2:void 0),j&&(y=y.split(` -`).join(` - `)),p.push(new Blob([y.substring(1,y.length-1)])),ie=ke.length,M=ye.length>0?ye[ye.length-1]:null,h.label=8;case 8:return _.completedRows+=be.length,[2]}})},_e.label=1;case 1:return he?[5,Se()]:[3,3];case 2:return Be=_e.sent(),Be==="break"?[3,3]:[3,1];case 3:return p.push(f.substr(Z)),_.completedTables+=1,_.completedTables<_.totalTables&&p.push(","),[2]}})},me=0,N=o,K.label=2;case 2:return men)switch(f){case"text":closeText(c);break;default:K(c,"Max buffer length exceeded: "+f)}b=Math.max(b,Z)}c.bufferCheckPosition=u.MAX_BUFFER_LENGTH-b+c.position}function F(c){for(var n in w)c[n]=w[n]}var pe=/[\\"\n]/g;function de(c){if(!(this instanceof de))return new de(c);var n=this;F(n),n.bufferCheckPosition=u.MAX_BUFFER_LENGTH,n.q=n.c=n.p="",n.opt=c||{},n.closed=n.closedRoot=n.sawRoot=!1,n.tag=n.error=null,n.state=o.BEGIN,n.stack=new Array,n.position=n.column=0,n.line=1,n.slashed=!1,n.unicodeI=0,n.unicodeS=null,n.depth=0,ee(n,"onready")}de.prototype={end:function(){re(this)},write:Pe,resume:function(){return this.error=null,this},close:function(){return this.write(null)}};try{j=Ut.Stream}catch{j=function(){}}function J(c){return new V(c)}function V(c){if(!(this instanceof V))return new V(c);this._parser=new de(c),this.writable=!0,this.readable=!0,this.bytes_remaining=0,this.bytes_in_sequence=0,this.temp_buffs={2:new Buffer(2),3:new Buffer(3),4:new Buffer(4)},this.string="";var n=this;j.apply(n),this._parser.onend=function(){n.emit("end")},this._parser.onerror=function(b){n.emit("error",b),n._parser.error=null},p.forEach(function(b){Object.defineProperty(n,"on"+b,{get:function(){return n._parser["on"+b]},set:function(f){if(!f)return n.removeAllListeners(b),n._parser["on"+b]=f,f;n.on(b,f)},enumerable:!0,configurable:!1})})}V.prototype=Object.create(j.prototype,{constructor:{value:V}}),V.prototype.write=function(c){c=new Buffer(c);for(var n=0;n0){for(var f=0;f=128)if(b>=194&&b<=223&&(this.bytes_in_sequence=2),b>=224&&b<=239&&(this.bytes_in_sequence=3),b>=240&&b<=244&&(this.bytes_in_sequence=4),this.bytes_in_sequence+n>c.length){for(var Z=0;Z<=c.length-1-n;Z++)this.temp_buffs[this.bytes_in_sequence][Z]=c[n+Z];return this.bytes_remaining=n+this.bytes_in_sequence-c.length,!0}else{this.string=c.slice(n,n+this.bytes_in_sequence).toString(),n=n+this.bytes_in_sequence-1,this._parser.write(this.string),this.emit("data",this.string);continue}for(var M=n;M=128);M++);this.string=c.slice(n,M).toString(),this._parser.write(this.string),this.emit("data",this.string),n=M-1}},V.prototype.end=function(c){return c&&c.length&&this._parser.write(c.toString()),this._parser.end(),!0},V.prototype.on=function(c,n){var b=this;return!b._parser["on"+c]&&p.indexOf(c)!==-1&&(b._parser["on"+c]=function(){var f=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);f.splice(0,0,c),b.emit.apply(b,f)}),j.prototype.on.call(b,c,n)},V.prototype.destroy=function(){F(this._parser),this.emit("close")};function ee(c,n,b){u.INFO&&console.log("-- emit",n,b),c[n]&&c[n](b)}function Ee(c,n,b){me(c),ee(c,n,b)}function me(c,n){c.textNode=Ne(c.opt,c.textNode),c.textNode!==void 0&&ee(c,n||"onvalue",c.textNode),c.textNode=void 0}function N(c){c.numberNode&&ee(c,"onvalue",parseFloat(c.numberNode)),c.numberNode=""}function Ne(c,n){return n===void 0||(c.trim&&(n=n.trim()),c.normalize&&(n=n.replace(/\s+/g," "))),n}function K(c,n){return me(c),n+=` -Line: `+c.line+` -Column: `+c.column+` -Char: `+c.c,n=new Error(n),c.error=n,ee(c,"onerror",n),c}function re(c){return(c.state!==o.VALUE||c.depth!==0)&&K(c,"Unexpected end"),me(c),c.c="",c.closed=!0,ee(c,"onend"),de.call(c,c.opt),c}function ne(c){return c===s.carriageReturn||c===s.lineFeed||c===s.space||c===s.tab}function Pe(c){var n=this;if(this.error)throw this.error;if(n.closed)return K(n,"Cannot write after close. Assign an onready handler.");if(c===null)return re(n);var b=0,f=c.charCodeAt(0),Z=n.p;for(u.DEBUG&&console.log("write -> ["+c+"]");f&&(Z=f,n.c=f=c.charCodeAt(b++),Z!==f?n.p=Z:Z=n.p,!!f);)switch(u.DEBUG&&console.log(b,f,u.STATE[n.state]),n.position++,f===s.lineFeed?(n.line++,n.column=0):n.column++,n.state){case o.BEGIN:f===s.openBrace?n.state=o.OPEN_OBJECT:f===s.openBracket?n.state=o.OPEN_ARRAY:ne(f)||K(n,"Non-whitespace before {[.");continue;case o.OPEN_KEY:case o.OPEN_OBJECT:if(ne(f))continue;if(n.state===o.OPEN_KEY)n.stack.push(o.CLOSE_KEY);else if(f===s.closeBrace){ee(n,"onopenobject"),this.depth++,ee(n,"oncloseobject"),this.depth--,n.state=n.stack.pop()||o.VALUE;continue}else n.stack.push(o.CLOSE_OBJECT);f===s.doubleQuote?n.state=o.STRING:K(n,'Malformed object key should start with "');continue;case o.CLOSE_KEY:case o.CLOSE_OBJECT:if(ne(f))continue;n.state,o.CLOSE_KEY,f===s.colon?(n.state===o.CLOSE_OBJECT?(n.stack.push(o.CLOSE_OBJECT),me(n,"onopenobject"),this.depth++):me(n,"onkey"),n.state=o.VALUE):f===s.closeBrace?(Ee(n,"oncloseobject"),this.depth--,n.state=n.stack.pop()||o.VALUE):f===s.comma?(n.state===o.CLOSE_OBJECT&&n.stack.push(o.CLOSE_OBJECT),me(n),n.state=o.OPEN_KEY):K(n,"Bad object");continue;case o.OPEN_ARRAY:case o.VALUE:if(ne(f))continue;if(n.state===o.OPEN_ARRAY)if(ee(n,"onopenarray"),this.depth++,n.state=o.VALUE,f===s.closeBracket){ee(n,"onclosearray"),this.depth--,n.state=n.stack.pop()||o.VALUE;continue}else n.stack.push(o.CLOSE_ARRAY);f===s.doubleQuote?n.state=o.STRING:f===s.openBrace?n.state=o.OPEN_OBJECT:f===s.openBracket?n.state=o.OPEN_ARRAY:f===s.t?n.state=o.TRUE:f===s.f?n.state=o.FALSE:f===s.n?n.state=o.NULL:f===s.minus?n.numberNode+="-":s._0<=f&&f<=s._9?(n.numberNode+=String.fromCharCode(f),n.state=o.NUMBER_DIGIT):K(n,"Bad value");continue;case o.CLOSE_ARRAY:if(f===s.comma)n.stack.push(o.CLOSE_ARRAY),me(n,"onvalue"),n.state=o.VALUE;else if(f===s.closeBracket)Ee(n,"onclosearray"),this.depth--,n.state=n.stack.pop()||o.VALUE;else{if(ne(f))continue;K(n,"Bad array")}continue;case o.STRING:n.textNode===void 0&&(n.textNode="");var M=b-1,ie=n.slashed,he=n.unicodeI;e:for(;;){for(u.DEBUG&&console.log(b,f,u.STATE[n.state],ie);he>0;)if(n.unicodeS+=String.fromCharCode(f),f=c.charCodeAt(b++),n.position++,he===4?(n.textNode+=String.fromCharCode(parseInt(n.unicodeS,16)),he=0,M=b-1):he++,!f)break e;if(f===s.doubleQuote&&!ie){n.state=n.stack.pop()||o.VALUE,n.textNode+=c.substring(M,b-1),n.position+=b-1-M;break}if(f===s.backslash&&!ie&&(ie=!0,n.textNode+=c.substring(M,b-1),n.position+=b-1-M,f=c.charCodeAt(b++),n.position++,!f))break;if(ie){if(ie=!1,f===s.n?n.textNode+=` -`:f===s.r?n.textNode+="\r":f===s.t?n.textNode+=" ":f===s.f?n.textNode+="\f":f===s.b?n.textNode+="\b":f===s.u?(he=1,n.unicodeS=""):n.textNode+=String.fromCharCode(f),f=c.charCodeAt(b++),n.position++,M=b-1,f)continue;break}pe.lastIndex=b;var Se=pe.exec(c);if(Se===null){b=c.length+1,n.textNode+=c.substring(M,b-1),n.position+=b-1-M;break}if(b=Se.index+1,f=c.charCodeAt(Se.index),!f){n.textNode+=c.substring(M,b-1),n.position+=b-1-M;break}}n.slashed=ie,n.unicodeI=he;continue;case o.TRUE:f===s.r?n.state=o.TRUE2:K(n,"Invalid true started with t"+f);continue;case o.TRUE2:f===s.u?n.state=o.TRUE3:K(n,"Invalid true started with tr"+f);continue;case o.TRUE3:f===s.e?(ee(n,"onvalue",!0),n.state=n.stack.pop()||o.VALUE):K(n,"Invalid true started with tru"+f);continue;case o.FALSE:f===s.a?n.state=o.FALSE2:K(n,"Invalid false started with f"+f);continue;case o.FALSE2:f===s.l?n.state=o.FALSE3:K(n,"Invalid false started with fa"+f);continue;case o.FALSE3:f===s.s?n.state=o.FALSE4:K(n,"Invalid false started with fal"+f);continue;case o.FALSE4:f===s.e?(ee(n,"onvalue",!1),n.state=n.stack.pop()||o.VALUE):K(n,"Invalid false started with fals"+f);continue;case o.NULL:f===s.u?n.state=o.NULL2:K(n,"Invalid null started with n"+f);continue;case o.NULL2:f===s.l?n.state=o.NULL3:K(n,"Invalid null started with nu"+f);continue;case o.NULL3:f===s.l?(ee(n,"onvalue",null),n.state=n.stack.pop()||o.VALUE):K(n,"Invalid null started with nul"+f);continue;case o.NUMBER_DECIMAL_POINT:f===s.period?(n.numberNode+=".",n.state=o.NUMBER_DIGIT):K(n,"Leading zero not followed by .");continue;case o.NUMBER_DIGIT:s._0<=f&&f<=s._9?n.numberNode+=String.fromCharCode(f):f===s.period?(n.numberNode.indexOf(".")!==-1&&K(n,"Invalid number has two dots"),n.numberNode+="."):f===s.e||f===s.E?((n.numberNode.indexOf("e")!==-1||n.numberNode.indexOf("E")!==-1)&&K(n,"Invalid number has two exponential"),n.numberNode+="e"):f===s.plus||f===s.minus?(Z===s.e||Z===s.E||K(n,"Invalid symbol in number"),n.numberNode+=String.fromCharCode(f)):(N(n),b--,n.state=n.stack.pop()||o.VALUE);continue;default:K(n,"Unknown state: "+n.state)}return n.position>=n.bufferCheckPosition&&_(n),n}})(d)});function Rt(g){var d=0,u=xt(),m={pullAsync:function(w){return et(this,void 0,void 0,function(){var p,o,j;return We(this,function(R){switch(R.label){case 0:return p=g.slice(d,d+w),d+=w,[4,mt(p,"text")];case 1:return o=R.sent(),j=u.write(o),m.result=j||{},[2,j]}})})},pullSync:function(w){var p=g.slice(d,d+w);d+=w;var o=gt(p,"text"),j=u.write(o);return m.result=j||{},j},done:function(){return u.done()},eof:function(){return d>=g.size},result:{}};return m}function xt(g){var d=Lt.parser(),u=0,m,w=[],p,o,j=!1,R=!1;return d.onopenobject=function(s){var _={};_.incomplete=!0,m||(m=_),p&&(w.push([o,p,R]),R?p.push(_):p[o]=_),p=_,o=s,R=!1,++u},d.onkey=function(s){return o=s},d.onvalue=function(s){return R?p.push(s):p[o]=s},d.oncloseobject=function(){var s;delete p.incomplete,o=null,--u===0?j=!0:(s=w.pop(),o=s[0],p=s[1],R=s[2])},d.onopenarray=function(){var s=[];s.incomplete=!0,m||(m=s),p&&(w.push([o,p,R]),R?p.push(s):p[o]=s),p=s,R=!0,o=null,++u},d.onclosearray=function(){var s;delete p.incomplete,o=null,--u===0?j=!0:(s=w.pop(),o=s[0],p=s[1],R=s[2])},{write:function(s){return d.write(s),m},done:function(){return j}}}var St=1024;function Ft(g,d){return et(this,void 0,void 0,function(){var u,m,w,p;return We(this,function(o){switch(o.label){case 0:return d=d||{},u=d.chunkSizeBytes||St*1024,[4,Tt(g,u)];case 1:return m=o.sent(),w=m.result.data,p=new Re(d.name!==void 0?d.name:w.databaseName),p.version(w.databaseVersion).stores(_t(w)),[4,At(p,m,d.name!==void 0?ct(ct({},d),{acceptNameDiff:!0}):d)];case 2:return o.sent(),[2,p]}})})}function At(g,d,u){return et(this,void 0,void 0,function(){function m(){return et(this,void 0,void 0,function(){var V,ee,Ee,me,N;return We(this,function(Ne){switch(Ne.label){case 0:V=function(K){var re,ne,Pe,c,n,b,f,Z,M,ie,he,Se,Be;return We(this,function(_e){switch(_e.label){case 0:if(s.includes(K.tableName))return[2,"continue"];if(!K.rows)return[2,"break"];if(!K.rows.incomplete&&K.rows.length===0)return[2,"continue"];if(_&&Re.ignoreTransaction(function(){return _(F)}),re=K.tableName,ne=g.table(re),Pe=R.tables.filter(function(ce){return ce.name===re})[0].schema,!ne){if(u.acceptMissingTables)return[2,"continue"];throw new Error("Exported table ".concat(K.tableName," is missing in installed database"))}if(!u.acceptChangedPrimaryKey&&Pe.split(",")[0]!=ne.schema.primKey.src)throw new Error("Primary key differs for table ".concat(K.tableName,". "));for(c=K.rows,n=[],b=0;b0&&R.data[0].rows&&!R.data[0].rows.incomplete;)R.data.splice(0,1);return!p.done()&&!p.eof()?j?(p.pullSync(w),[3,7]):[3,5]:[3,8];case 5:return[4,Re.waitFor(p.pullAsync(w))];case 6:Ne.sent(),Ne.label=7;case 7:return[3,9];case 8:return[3,10];case 9:return[3,0];case 10:return[2]}})})}var w,p,o,j,R,s,_,F,pe,de,J;return We(this,function(V){switch(V.label){case 0:return u=u||{},w=u.chunkSizeBytes||St*1024,[4,Tt(d,w)];case 1:if(p=V.sent(),o=p.result,j="FileReaderSync"in self,R=o.data,s=u.skipTables?u.skipTables:[],!u.acceptNameDiff&&g.name!==R.databaseName)throw new Error("Name differs. Current database name is ".concat(g.name," but export is ").concat(R.databaseName));if(!u.acceptVersionDiff&&g.verno!==R.databaseVersion)throw new Error("Database version differs. Current database is in version ".concat(g.verno," but export is ").concat(R.databaseVersion));if(_=u.progressCallback,F={done:!1,completedRows:0,completedTables:0,totalRows:R.tables.reduce(function(ee,Ee){return ee+Ee.rowCount},0),totalTables:R.tables.length},_&&Re.ignoreTransaction(function(){return _(F)}),!u.clearTablesBeforeImport)return[3,5];pe=0,de=g.tables,V.label=2;case 2:return pekt)throw new Error("Format version ".concat(m.formatVersion," not supported"));if(!m.data)throw new Error("No data in export file");if(!m.data.databaseName)throw new Error("Missing databaseName in export file");if(!m.data.databaseVersion)throw new Error("Missing databaseVersion in export file");if(!m.data.tables)throw new Error("Missing tables in export file");return[2,u]}})})}Re.prototype.export=function(g){return Ct(this,g)};Re.prototype.import=function(g,d){return At(this,g,d)};Re.import=function(g,d){return Ft(g,d)}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/index-BGoTPXII.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/index-BGoTPXII.js deleted file mode 100644 index 0320793..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/index-BGoTPXII.js +++ /dev/null @@ -1,2 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/main.capacitor-CiEwp7dR.js","assets/main.common-DD7dqhZp.js","assets/main-D6gZ_dcu.css","assets/main.electron-BOHrDxsQ.js","assets/main.pywebview-BOHrDxsQ.js","assets/main.web-Bfhz1b5p.js"])))=>i.map(i=>d[i]); -(function(){const c=document.createElement("link").relList;if(c&&c.supports&&c.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))d(e);new MutationObserver(e=>{for(const r of e)if(r.type==="childList")for(const t of r.addedNodes)t.tagName==="LINK"&&t.rel==="modulepreload"&&d(t)}).observe(document,{childList:!0,subtree:!0});function l(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?r.credentials="include":e.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function d(e){if(e.ep)return;e.ep=!0;const r=l(e);fetch(e.href,r)}})();const h="modulepreload",y=function(s){return"/"+s},f={},u=function(c,l,d){let e=Promise.resolve();if(l&&l.length>0){document.getElementsByTagName("link");const t=document.querySelector("meta[property=csp-nonce]"),o=(t==null?void 0:t.nonce)||(t==null?void 0:t.getAttribute("nonce"));e=Promise.allSettled(l.map(n=>{if(n=y(n),n in f)return;f[n]=!0;const a=n.endsWith(".css"),m=a?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${n}"]${m}`))return;const i=document.createElement("link");if(i.rel=a?"stylesheet":h,a||(i.as="script"),i.crossOrigin="",i.href=n,o&&i.setAttribute("nonce",o),document.head.appendChild(i),a)return new Promise((p,_)=>{i.addEventListener("load",p),i.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${n}`)))})}))}function r(t){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=t,window.dispatchEvent(o),!o.defaultPrevented)throw t}return e.then(t=>{for(const o of t||[])o.status==="rejected"&&r(o.reason);return c().catch(r)})},E="capacitor";switch(E){case"capacitor":u(()=>import("./main.capacitor-CiEwp7dR.js").then(s=>s.m),__vite__mapDeps([0,1,2]));break;case"electron":u(()=>import("./main.electron-BOHrDxsQ.js"),__vite__mapDeps([3,1,2]));break;case"pywebview":u(()=>import("./main.pywebview-BOHrDxsQ.js"),__vite__mapDeps([4,1,2]));break;default:u(()=>import("./main.web-Bfhz1b5p.js"),__vite__mapDeps([5,1,2]))}export{u as _}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/index-BtEdi1q-.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/index-BtEdi1q-.js deleted file mode 100644 index 3ada417..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/index-BtEdi1q-.js +++ /dev/null @@ -1,2 +0,0 @@ -import{a7 as o,a9 as f,as as l,aq as _,a8 as Rr,at as sr,au as Xr,av as Pr}from"./main.common-DD7dqhZp.js";import{g as d,_ as h,a as v,m as W,c as y,d as fr,h as I,b as cr,k as E,i as Vt,j as lr,l as J,n as D,e as g,o as kr,p as Br,t as Ut}from"./_isString-B7bbuhPA.js";import{ai as k,aj as Nr,ak as Tr,al as qr,am as Ft,an as Dr,ao as hr,H as Mr,ap as Jt,aq as Ht,o as Kt}from"./index-ryzpKtgI.js";import{t as O,_ as H,a as nr,b as Gt,d as Qt,c as pr}from"./concat-Ro2w9qwP.js";import{p as B,n as N,_ as P,a as zr,i as M,b as vr,c as dr,d as Cr,e as Vr,l as Yt,o as Zt,s as bt}from"./set-BrilI7kO.js";import{s as jt}from"./sort-DzTCGCnH.js";var $t=function(){return!1},rn=function(){return!0};const tn={"@@functional/placeholder":!0};var K=o(function(r,t){return Number(r)+Number(t)});function w(e,r){e=e||[],r=r||[];var t,n=e.length,u=r.length,i=[];for(t=0;t=u||r<-u)return n;var i=(u+r)%u,a=w(n);return a[i]=t(n[i]),a}),un=function(){function e(r,t){this.xf=t,this.f=r,this.all=!0}return e.prototype["@@transducer/init"]=h.init,e.prototype["@@transducer/result"]=function(r){return this.all&&(r=this.xf["@@transducer/step"](r,!0)),this.xf["@@transducer/result"](r)},e.prototype["@@transducer/step"]=function(r,t){return this.f(t)||(this.all=!1,r=k(this.xf["@@transducer/step"](r,!1))),r},e}();function an(e){return function(r){return new un(e,r)}}var Fr=o(v(["all"],an,function(r,t){for(var n=0;np!=p>c)return p>c?p:c}var u=n(r,t);if(u!==void 0)return u;var i=n(typeof r,typeof t);if(i!==void 0)return i===typeof r?r:t;var a=O(r),s=n(a,O(t));return s!==void 0&&s===a?r:t}),z=o(function(r,t){return W(B(r),t)}),C=f(function(r){return y(r)?!0:!r||typeof r!="object"||fr(r)?!1:r.length===0?!0:r.length>0?r.hasOwnProperty(0)&&r.hasOwnProperty(r.length-1):!1}),Or=typeof Symbol<"u"?Symbol.iterator:"@@iterator";function Jr(e,r,t){return function(u,i,a){if(C(a))return e(u,i,a);if(a==null)return i;if(typeof a["fantasy-land/reduce"]=="function")return r(u,i,a,"fantasy-land/reduce");if(a[Or]!=null)return t(u,i,a[Or]());if(typeof a.next=="function")return t(u,i,a);if(typeof a.reduce=="function")return r(u,i,a,"reduce");throw new TypeError("reduce: list must be array or iterable")}}function Hr(e,r,t){for(var n=0,u=t.length;n=0?n:0);ti?1:0}),Y=o(function(r,t){switch(r){case 0:return function(){return t.call(this)};case 1:return function(n){return t.call(this,n)};case 2:return function(n,u){return t.call(this,n,u)};case 3:return function(n,u,i){return t.call(this,n,u,i)};case 4:return function(n,u,i,a){return t.call(this,n,u,i,a)};case 5:return function(n,u,i,a,s){return t.call(this,n,u,i,a,s)};case 6:return function(n,u,i,a,s,c){return t.call(this,n,u,i,a,s,c)};case 7:return function(n,u,i,a,s,c,p){return t.call(this,n,u,i,a,s,c,p)};case 8:return function(n,u,i,a,s,c,p,x){return t.call(this,n,u,i,a,s,c,p,x)};case 9:return function(n,u,i,a,s,c,p,x,X){return t.call(this,n,u,i,a,s,c,p,x,X)};case 10:return function(n,u,i,a,s,c,p,x,X,rr){return t.call(this,n,u,i,a,s,c,p,x,X,rr)};default:throw new Error("First argument to nAry must be a non-negative integer no greater than ten")}}),kn=f(function(r){return Y(2,r)}),Zr=o(function(r,t){var n=d(r,t);return d(r,function(){return cr(yr,W(n,arguments[0]),Array.prototype.slice.call(arguments,1))})}),Z=f(function(r){return Zr(r.length,r)}),On=o(function(r,t){return H(r)?function(){return r.apply(this,arguments)&&t.apply(this,arguments)}:Z(Gr)(r,t)}),Sn=f(function(r){return r.apply(this,Array.prototype.slice.call(arguments,1))});function br(e){return function r(t){for(var n,u,i,a=[],s=0,c=t.length;st)throw new Error("min must not be greater than max in clamp(min, max, value)");return nt?t:n}),Nn=o(function(r,t){var n=Q(function(a,s){var c=r(s);return a[c]===void 0&&(a[c]=[]),a[c].push(s),a},{},t),u=[];for(var i in n)u.push(n[i]);return u}),Tn=f(function(r){return function(t,n){return r(t,n)?-1:r(n,t)?1:0}}),tt=f(function(r){return!r}),qn=Z(tt);function Dn(e,r){return function(){return r.call(this,e.apply(this,arguments))}}function V(e,r){return function(){var t=arguments.length;if(t===0)return r();var n=arguments[t-1];return y(n)||typeof n[e]!="function"?r.apply(this,arguments):n[e].apply(n,Array.prototype.slice.call(arguments,0,t-1))}}var m=l(V("slice",function(r,t,n){return Array.prototype.slice.call(n,r,t)})),gr=f(V("tail",m(1,1/0)));function nt(){if(arguments.length===0)throw new Error("pipe requires at least one argument");return I(arguments[0].length,A(Dn,arguments[0],gr(arguments)))}var mr=f(function(r){return fr(r)?r.split("").reverse().join(""):Array.prototype.slice.call(r,0).reverse()});function et(){if(arguments.length===0)throw new Error("compose requires at least one argument");return nt.apply(this,mr(arguments))}var ut=N(0);function S(e){return e}var b=f(S),it=o(function(r,t){if(t.length<=0)return b;var n=ut(t),u=gr(t);return I(n.length,function(){return Q(function(i,a){return r.call(this,a,i)},n.apply(this,arguments),u)})}),Mn=o(function(r,t){return it.apply(this,[r,mr(t)])}),zn=f(function(r){var t=A(L,0,W(function(n){return n[0].length},r));return I(t,function(){for(var n=0;n10)throw new Error("Constructor with greater than ten arguments");return r===0?function(){return new t}:wr(Y(r,function(n,u,i,a,s,c,p,x,X,rr){switch(r){case 1:return new t(n);case 2:return new t(n,u);case 3:return new t(n,u,i);case 4:return new t(n,u,i,a);case 5:return new t(n,u,i,a,s);case 6:return new t(n,u,i,a,s,c);case 7:return new t(n,u,i,a,s,c,p);case 8:return new t(n,u,i,a,s,c,p,x);case 9:return new t(n,u,i,a,s,c,p,x,X);case 10:return new t(n,u,i,a,s,c,p,x,X,rr)}}))}),Cn=f(function(r){return at(r.length,r)}),ot=o(function(r,t){return d(A(L,0,z("length",t)),function(){var n=arguments,u=this;return r.apply(u,lr(function(i){return i.apply(u,n)},t))})}),Vn=wr(function(e,r){return Q(function(t,n){return e(n)?t+1:t},0,r)}),Un=function(){function e(r,t,n,u){this.valueFn=r,this.valueAcc=t,this.keyFn=n,this.xf=u,this.inputs={}}return e.prototype["@@transducer/init"]=h.init,e.prototype["@@transducer/result"]=function(r){var t;for(t in this.inputs)if(_(t,this.inputs)&&(r=this.xf["@@transducer/step"](r,this.inputs[t]),r["@@transducer/reduced"])){r=r["@@transducer/value"];break}return this.inputs=null,this.xf["@@transducer/result"](r)},e.prototype["@@transducer/step"]=function(r,t){var n=this.keyFn(t);return this.inputs[n]=this.inputs[n]||[n,Nr(this.valueAcc,!1)],this.inputs[n][1]=this.valueFn(this.inputs[n][1],t),r},e}();function Fn(e,r,t){return function(n){return new Un(e,r,t,n)}}var j=J(4,[],v([],Fn,function(r,t,n,u){var i=G(function(a,s){var c=n(s),p=r(_(c,a)?a[c]:Nr(t,!1),s);return p&&p["@@transducer/reduced"]?k(a):(a[c]=p,a)});return R(i,{},u)})),Jn=j(function(e,r){return e+1},0),Hn=K(-1),_r=o(function(r,t){return t==null||t!==t?r:t}),Kn=l(function(r,t,n){var u=r(t),i=r(n);return u>i?-1:u0?(this.n-=1,r):this.xf["@@transducer/step"](r,t)},e}();function jn(e){return function(r){return new bn(e,r)}}var ct=o(v(["drop"],jn,function(r,t){return m(Math.max(0,r),1/0,t)})),$n=function(){function e(r,t){this.xf=t,this.n=r,this.i=0}return e.prototype["@@transducer/init"]=h.init,e.prototype["@@transducer/result"]=h.result,e.prototype["@@transducer/step"]=function(r,t){this.i+=1;var n=this.n===0?r:this.xf["@@transducer/step"](r,t);return this.n>=0&&this.i>=this.n?k(n):n},e}();function re(e){return function(r){return new $n(e,r)}}var xr=o(v(["take"],re,function(r,t){return m(0,r<0?1/0:r,t)}));function te(e,r){return xr(e=0&&e(r[t]);)t-=1;return m(0,t+1,r)}var ae=function(){function e(r,t){this.f=r,this.retained=[],this.xf=t}return e.prototype["@@transducer/init"]=h.init,e.prototype["@@transducer/result"]=function(r){return this.retained=null,this.xf["@@transducer/result"](r)},e.prototype["@@transducer/step"]=function(r,t){return this.f(t)?this.retain(r,t):this.flush(r,t)},e.prototype.flush=function(r,t){return r=R(this.xf,r,this.retained),this.retained=[],this.xf["@@transducer/step"](r,t)},e.prototype.retain=function(r,t){return this.retained.push(t),r},e}();function oe(e){return function(r){return new ae(e,r)}}var se=o(v([],oe,ie)),fe=function(){function e(r,t){this.xf=t,this.pred=r,this.lastValue=void 0,this.seenFirstValue=!1}return e.prototype["@@transducer/init"]=h.init,e.prototype["@@transducer/result"]=h.result,e.prototype["@@transducer/step"]=function(r,t){var n=!1;return this.seenFirstValue?this.pred(this.lastValue,t)&&(n=!0):this.seenFirstValue=!0,this.lastValue=t,n?r:this.xf["@@transducer/step"](r,t)},e}();function Wr(e){return function(r){return new fe(e,r)}}var lt=N(-1),Ar=o(v([],Wr,function(r,t){var n=[],u=1,i=t.length;if(i!==0)for(n[0]=t[0];u=0?t.length-r:0,t)}),ye=o(function(e,r){return g(pt(e.length,r),e)}),ge=l(function(r,t,n){return g(t[r],n[r])}),me=o(function e(r,t){if(!Rr(t)&&!y(t))return t;var n=t instanceof Array?[]:{},u,i,a;for(i in t)u=r[i],a=typeof u,n[i]=a==="function"?u(t[i]):u&&a==="object"?e(u,t[i]):t[i];return n}),we=function(){function e(r,t){this.xf=t,this.f=r,this.idx=-1,this.found=!1}return e.prototype["@@transducer/init"]=h.init,e.prototype["@@transducer/result"]=function(r){return this.found||(r=this.xf["@@transducer/step"](r,-1)),this.xf["@@transducer/result"](r)},e.prototype["@@transducer/step"]=function(r,t){return this.idx+=1,this.f(t)&&(this.found=!0,r=k(this.xf["@@transducer/step"](r,this.idx))),r},e}();function _e(e){return function(r){return new we(e,r)}}var xe=o(v([],_e,function(r,t){for(var n=0,u=t.length;n=0;){if(r(t[n]))return t[n];n-=1}})),ke=function(){function e(r,t){this.xf=t,this.f=r,this.idx=-1,this.lastIdx=-1}return e.prototype["@@transducer/init"]=h.init,e.prototype["@@transducer/result"]=function(r){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](r,this.lastIdx))},e.prototype["@@transducer/step"]=function(r,t){return this.idx+=1,this.f(t)&&(this.lastIdx=this.idx),r},e}();function Oe(e){return function(r){return new ke(e,r)}}var Se=o(v([],Oe,function(r,t){for(var n=t.length-1;n>=0;){if(r(t[n]))return n;n-=1}return-1})),Ee=f(br(!0)),vt=f(function(r){return d(r.length,function(t,n){var u=Array.prototype.slice.call(arguments,0);return u[0]=n,u[1]=t,r.apply(this,u)})}),Le=o(V("forEach",function(r,t){for(var n=t.length,u=0;ut}),Te=o(function(r,t){return r>=t}),dt=o(function(r,t){if(r.length===0||M(t))return!1;for(var n=t,u=0;u=0?r:n.length;var u=Array.prototype.slice.call(n,0);return u.splice(r,0,t),u}),Ke=l(function(r,t,n){return r=r=0?r:n.length,[].concat(Array.prototype.slice.call(n,0,r),t,Array.prototype.slice.call(n,r))}),Ge=function(){function e(r,t){this.xf=t,this.f=r,this.set=new U}return e.prototype["@@transducer/init"]=h.init,e.prototype["@@transducer/result"]=h.result,e.prototype["@@transducer/step"]=function(r,t){return this.set.add(this.f(t))?this.xf["@@transducer/step"](r,t):r},e}();function Qe(e){return function(r){return new Ge(e,r)}}var gt=o(v([],Qe,function(e,r){for(var t=new U,n=[],u=0,i,a;u=0;){if(g(t[n],r))return n;n-=1}return-1});function or(e){return Object.prototype.toString.call(e)==="[object Number]"}var xt=f(function(r){return r!=null&&or(r.length)?r.length:NaN}),Wt=l(function(r,t,n){return Ur(r,vr(t),n)}),cu=f(function(r){return dr(N(r),Wt(r))}),At=o(function(r,t){return r.map(function(n){for(var u=t,i=0,a;i=0;)a=r(a[0],n[u]),i[u]=a[1],u-=1;return[a[0],i]}),yu=o(function(r,t){return cr(function(n,u){return n[u]=r(t[u],u,t),n},{},E(t))}),gu=o(function(r,t){return t.match(r)||[]}),mu=o(function(r,t){return P(r)?!P(t)||t<1?NaN:(r%t+t)%t:NaN}),wu=l(function(r,t,n){var u=r(n);return L(r(t),u)===u?n:t}),It=A(K,0),kt=f(function(r){return It(r)/r.length}),_u=f(function(r){var t=r.length;if(t===0)return NaN;var n=2-t%2,u=(t-n)/2;return kt(Array.prototype.slice.call(r,0).sort(function(i,a){return ia?1:0}).slice(u,u+n))}),xu=o(function(r,t){var n={};return I(t.length,function(){var u=r.apply(this,arguments);return _(u,n)||(n[u]=t.apply(this,arguments)),n[u]})}),Wu=f(function(r){return $.apply(null,[{}].concat(r))}),Au=o(function(r,t){return sr(function(n,u,i){return u},r,t)}),Iu=l(function(r,t,n){return sr(function(u,i,a){return r(i,a)},t,n)}),ku=o(function(r,t){return $({},t,r)}),Ou=o(function(r,t){return $({},r,t)}),Su=l(function(r,t,n){return Xr(function(u,i,a){return r(i,a)},t,n)}),Ot=o(function(r,t){if(r===t)return r;function n(c,p){if(c=t.length||a<0||a>=t.length?t:[].concat(u.slice(0,a)).concat(s).concat(u.slice(a,t.length))}),Et=o(function(r,t){return r*t}),Bu=o((e,r)=>t=>e.call(void 0,Pr(r,t))),Nu=f(function(r){return-r}),Tu=o(function(r,t){return Fr(Ft(r),t)}),qu=f(function(r){var t=r<0?1:r+1;return d(t,function(){return N(r,arguments)})}),Du=l(function(r,t,n){return r(t(n))}),Mu=o(function(r,t){return typeof r["fantasy-land/of"]=="function"?r["fantasy-land/of"](t):typeof r.of=="function"?r.of(t):[t]}),zu=J(4,[],function(r,t,n,u){return r(t(n),t(u))}),Cu=f(function(r){var t=!1,n;return I(r.length,function(){return t||(t=!0,n=r.apply(this,arguments)),n})});function Lt(e,r){if(r==null||!H(r.then))throw new TypeError("`"+e+"` expected a Promise, received "+Qt(r,[]))}var Vu=o(function(r,t){return Lt("otherwise",t),t.then(null,r)}),Uu=o(function(r,t){return[r,t]});function Rt(e){return o(function(r,t){return I(Math.max(0,r.length-t.length),function(){return r.apply(this,e(t,arguments))})})}var Fu=Rt(w),Ju=Rt(vt(w)),Hu=_t([Dr,hr]),Ku=l(function(r,t,n){return g(T(t,n),r)}),Gu=l(function(r,t,n){return _r(r,T(t,n))}),Qu=l(function(r,t,n){return r(T(t,n))}),Yu=o(function(r,t){for(var n={},u=0;u=0;){if(t=r(n[u],t),t&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}u-=1}return t}),si=J(4,[],function(r,t,n,u){var i=G(function(a,s){return r(a,s)?t(a,s):k(a)});return R(i,n,u)}),fi=f(k),qt=o(function(r,t){var n=Number(t),u=0,i;if(n<0||isNaN(n))throw new RangeError("n must be a non-negative number");for(i=[];ua?1:0})}),yi=o(function(r,t){return Array.prototype.slice.call(t,0).sort(function(n,u){for(var i=0,a=0;i===0&&a0&&(n.push(u),u=[]);return n}),Wi=o(function(e,r){return g(xr(e.length,r),e)}),Ai=o(function(r,t){return Number(r)-Number(t)}),Ii=function(e,r,t){var n=Mr(t),u=Object.getOwnPropertyNames(n);if(u.includes(e)&&u.includes(r)){var i=n[e];n[e]=n[r],n[r]=i}return n},Mt=function(e,r,t){var n=t.length,u=t.slice(),i=e<0?n+e:e,a=r<0?n+r:r,s=Math.min(i,a),c=Math.max(i,a);return i<0||i>n||a<0||a>n||i===a||(u=[].concat(u.slice(0,s)).concat([u[c]]).concat(u.slice(s+1,c)).concat([u[s]]).concat(u.slice(c+1,n))),u},ki=function(e,r,t){var n=Mt(e,r,t);return y(n)?n.join(""):n},Oi=l(function(e,r,t){return y(t)?Mt(e,r,t):fr(t)?ki(e,r,t):Ii(e,r,t)}),Si=o(function(r,t){return pr(ur(r,t),ur(t,r))}),Ei=l(function(r,t,n){return pr(ir(r,t,n),ir(r,n,t))}),Li=o(function(r,t){for(var n=t.length-1;n>=0&&r(t[n]);)n-=1;return m(n+1,1/0,t)}),Ri=function(){function e(r,t){this.xf=t,this.f=r}return e.prototype["@@transducer/init"]=h.init,e.prototype["@@transducer/result"]=h.result,e.prototype["@@transducer/step"]=function(r,t){return this.f(t)?this.xf["@@transducer/step"](r,t):k(r)},e}();function Xi(e){return function(r){return new Ri(e,r)}}var Pi=o(v(["takeWhile"],Xi,function(r,t){for(var n=0,u=t.length;n"u"&&(n[i]=[]),n[i].push(u[i]),i+=1;t+=1}return n}),Hi=l(function(r,t,n){var u=typeof r["fantasy-land/of"]=="function"?r["fantasy-land/of"]:typeof r.of=="function"?r.of:r,i={"fantasy-land/of":u};return typeof n["fantasy-land/traverse"]=="function"?n["fantasy-land/traverse"](i,t):typeof n.traverse=="function"?n.traverse(i,t):Dt(i,W(t,n))}),q=` -\v\f\r                 \u2028\u2029\uFEFF`,Ki="​",Gi=typeof String.prototype.trim=="function",Qi=!Gi||q.trim()||!Ki.trim()?f(function(r){var t=new RegExp("^["+q+"]["+q+"]*"),n=new RegExp("["+q+"]["+q+"]*$");return r.replace(t,"").replace(n,"")}):f(function(r){return r.trim()}),Yi=o(function(r,t){return I(r.length,function(){try{return r.apply(this,arguments)}catch(n){return t.apply(this,w([n],arguments))}})}),Zi=f(function(r){return function(){return r(Array.prototype.slice.call(arguments,0))}}),bi=f(function(r){return Y(1,r)}),ji=o(function(r,t){return d(r,function(){for(var n=1,u=t,i=0,a;n<=r&&typeof u=="function";)a=n===r?arguments.length:i+u.length,u=u.apply(this,Array.prototype.slice.call(arguments,i,a)),n+=1,i=a;return u})}),$i=o(function(r,t){for(var n=r(t),u=[];n&&n.length;)u[u.length]=n[0],n=r(n[1]);return u}),ra=o(et(Ir,w)),ta=function(){function e(r,t){this.xf=t,this.pred=r,this.items=[]}return e.prototype["@@transducer/init"]=h.init,e.prototype["@@transducer/result"]=h.result,e.prototype["@@transducer/step"]=function(r,t){return D(this.pred,t,this.items)?r:(this.items.push(t),this.xf["@@transducer/step"](r,t))},e}();function na(e){return function(r){return new ta(e,r)}}var zt=o(v([],na,function(e,r){for(var t=0,n=r.length,u=[],i;tB.call(e)==="[object Object]";function F(e){let t;function u(){return t||(t=e()),t}return u.reset=async()=>{const d=t;t=void 0,d&&await d},u}function S(e){return Array.isArray(e)?e:[e]}function N(e,t,u={}){const{immediate:d=!0,immediateCallback:f=!1}=u,r=m(!1);let s=null;function n(){s&&(clearTimeout(s),s=null)}function o(){r.value=!1,n()}function a(...i){f&&e(),n(),r.value=!0,s=setTimeout(()=>{r.value=!1,s=null,e(...i)},v(t))}return d&&(r.value=!0,C&&a()),E(o),{isPending:R(r),start:a,stop:o}}function V(e,t,u){return W(e,t,{...u,immediate:!0})}const $=C?window:void 0,M=C?window.navigator:void 0;function z(e){var t;const u=v(e);return(t=u==null?void 0:u.$el)!=null?t:u}function P(...e){const t=[],u=()=>{t.forEach(n=>n()),t.length=0},d=(n,o,a,i)=>(n.addEventListener(o,a,i),()=>n.removeEventListener(o,a,i)),f=w(()=>{const n=S(v(e[0])).filter(o=>o!=null);return n.every(o=>typeof o!="string")?n:void 0}),r=V(()=>{var n,o;return[(o=(n=f.value)==null?void 0:n.map(a=>z(a)))!=null?o:[$].filter(a=>a!=null),S(v(f.value?e[1]:e[0])),S(I(f.value?e[2]:e[1])),v(f.value?e[3]:e[2])]},([n,o,a,i])=>{if(u(),!(n!=null&&n.length)||!(o!=null&&o.length)||!(a!=null&&a.length))return;const p=D(i)?{...i}:i;t.push(...n.flatMap(y=>o.flatMap(g=>a.map(b=>d(y,g,b,p)))))},{flush:"post"}),s=()=>{r(),u()};return E(u),s}function H(){const e=m(!1),t=G();return t&&q(()=>{e.value=!0},t),e}function A(e){const t=H();return w(()=>(t.value,!!e()))}function x(e,t={}){const{controls:u=!1,navigator:d=M}=t,f=A(()=>d&&"permissions"in d),r=m(),s=typeof e=="string"?{name:e}:e,n=m(),o=()=>{var i,p;n.value=(p=(i=r.value)==null?void 0:i.state)!=null?p:"prompt"};P(r,"change",o,{passive:!0});const a=F(async()=>{if(f.value){if(!r.value)try{r.value=await d.permissions.query(s)}catch{r.value=void 0}finally{o()}if(u)return _(r.value)}});return a(),u?{state:n,isSupported:f,query:a}:n}function K(e={}){const{navigator:t=M,read:u=!1,source:d,copiedDuring:f=1500,legacy:r=!1}=e,s=A(()=>t&&"clipboard"in t),n=x("clipboard-read"),o=x("clipboard-write"),a=w(()=>s.value||r),i=m(""),p=m(!1),y=N(()=>p.value=!1,f,{immediate:!1});function g(){let l=!(s.value&&T(n.value));if(!l)try{t.clipboard.readText().then(c=>{i.value=c})}catch{l=!0}l&&(i.value=O())}a.value&&u&&P(["copy","cut"],g,{passive:!0});async function b(l=v(d)){if(a.value&&l!=null){let c=!(s.value&&T(o.value));if(!c)try{await t.clipboard.writeText(l)}catch{c=!0}c&&L(l),i.value=l,p.value=!0,y.start()}}function L(l){const c=document.createElement("textarea");c.value=l??"",c.style.position="absolute",c.style.opacity="0",document.body.appendChild(c),c.select(),document.execCommand("copy"),c.remove()}function O(){var l,c,h;return(h=(c=(l=document==null?void 0:document.getSelection)==null?void 0:l.call(document))==null?void 0:c.toString())!=null?h:""}function T(l){return l==="granted"||l==="prompt"}return{isSupported:a,text:i,copied:p,copy:b}}export{K as u}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/index-ryzpKtgI.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/index-ryzpKtgI.js deleted file mode 100644 index f981246..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/index-ryzpKtgI.js +++ /dev/null @@ -1,2248 +0,0 @@ -var Jy=Object.defineProperty;var hh=t=>{throw TypeError(t)};var Yy=(t,e,r)=>e in t?Jy(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var ze=(t,e,r)=>Yy(t,typeof e!="symbol"?e+"":e,r),Kc=(t,e,r)=>e.has(t)||hh("Cannot "+r);var U=(t,e,r)=>(Kc(t,e,"read from private field"),r?r.call(t):e.get(t)),Ue=(t,e,r)=>e.has(t)?hh("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),ye=(t,e,r,n)=>(Kc(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),he=(t,e,r)=>(Kc(t,e,"access private method"),r);var Hs=(t,e,r,n)=>({set _(i){ye(t,e,i,r)},get _(){return U(t,e,n)}});import{a7 as Pa,a8 as Wd,a9 as Jd,L as Fa,a0 as ao,A as dh,a5 as di,a6 as Yd,W as Qd,u as Zd,e as Xd,c as Qy,D as Zy,l as Xy,a as ew,H as tw}from"./main.common-DD7dqhZp.js";import{u as rw}from"./index-CZnn7ED5.js";import{_ as Bf,a as e0,b as nw,k as iw,t as ow,c as sw,d as aw,f as cw,e as t0,m as fw}from"./_isString-B7bbuhPA.js";function lw(t){return t&&t["@@transducer/reduced"]?t:{"@@transducer/value":t,"@@transducer/reduced":!0}}function uw(t){return function(){return!t.apply(this,arguments)}}function hw(t,e){for(var r=0,n=e.length,i=[];r0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function Bw(t){var e=i0(t),r=e[0],n=e[1];return(r+n)*3/4-n}function Dw(t,e,r){return(e+r)*3/4-r}function Cw(t){var e,r=i0(t),n=r[0],i=r[1],o=new Ew(Dw(t,n,i)),s=0,a=i>0?n-4:n,c;for(c=0;c>16&255,o[s++]=e>>8&255,o[s++]=e&255;return i===2&&(e=vr[t.charCodeAt(c)]<<2|vr[t.charCodeAt(c+1)]>>4,o[s++]=e&255),i===1&&(e=vr[t.charCodeAt(c)]<<10|vr[t.charCodeAt(c+1)]<<4|vr[t.charCodeAt(c+2)]>>2,o[s++]=e>>8&255,o[s++]=e&255),o}function Iw(t){return rn[t>>18&63]+rn[t>>12&63]+rn[t>>6&63]+rn[t&63]}function Mw(t,e,r){for(var n,i=[],o=e;oa?a:s+o));return n===1?(e=t[r-1],i.push(rn[e>>2]+rn[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],i.push(rn[e>>10]+rn[e>>4&63]+rn[e<<2&63]+"=")),i.join("")}var tu={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */tu.read=function(t,e,r,n,i){var o,s,a=i*8-n-1,c=(1<>1,y=-7,p=r?i-1:0,x=r?-1:1,S=t[e+p];for(p+=x,o=S&(1<<-y)-1,S>>=-y,y+=a;y>0;o=o*256+t[e+p],p+=x,y-=8);for(s=o&(1<<-y)-1,o>>=-y,y+=n;y>0;s=s*256+t[e+p],p+=x,y-=8);if(o===0)o=1-u;else{if(o===c)return s?NaN:(S?-1:1)*(1/0);s=s+Math.pow(2,n),o=o-u}return(S?-1:1)*s*Math.pow(2,o-n)};tu.write=function(t,e,r,n,i,o){var s,a,c,u=o*8-i-1,y=(1<>1,x=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=n?0:o-1,C=n?1:-1,B=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=y):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),s+p>=1?e+=x/c:e+=x*Math.pow(2,1-p),e*c>=2&&(s++,c/=2),s+p>=y?(a=0,s=y):s+p>=1?(a=(e*c-1)*Math.pow(2,i),s=s+p):(a=e*Math.pow(2,p-1)*Math.pow(2,i),s=0));i>=8;t[r+S]=a&255,S+=C,a/=256,i-=8);for(s=s<0;t[r+S]=s&255,S+=C,s/=256,u-=8);t[r+S-C]|=B*128};/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */(function(t){const e=La,r=tu,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=a,t.SlowBuffer=H,t.INSPECT_MAX_BYTES=50;const i=2147483647;t.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=o(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function o(){try{const A=new Uint8Array(1),d={foo:function(){return 42}};return Object.setPrototypeOf(d,Uint8Array.prototype),Object.setPrototypeOf(A,d),A.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function s(A){if(A>i)throw new RangeError('The value "'+A+'" is invalid for option "size"');const d=new Uint8Array(A);return Object.setPrototypeOf(d,a.prototype),d}function a(A,d,w){if(typeof A=="number"){if(typeof d=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(A)}return c(A,d,w)}a.poolSize=8192;function c(A,d,w){if(typeof A=="string")return x(A,d);if(ArrayBuffer.isView(A))return C(A);if(A==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof A);if(It(A,ArrayBuffer)||A&&It(A.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(It(A,SharedArrayBuffer)||A&&It(A.buffer,SharedArrayBuffer)))return B(A,d,w);if(typeof A=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const _=A.valueOf&&A.valueOf();if(_!=null&&_!==A)return a.from(_,d,w);const F=M(A);if(F)return F;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof A[Symbol.toPrimitive]=="function")return a.from(A[Symbol.toPrimitive]("string"),d,w);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof A)}a.from=function(A,d,w){return c(A,d,w)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function u(A){if(typeof A!="number")throw new TypeError('"size" argument must be of type number');if(A<0)throw new RangeError('The value "'+A+'" is invalid for option "size"')}function y(A,d,w){return u(A),A<=0?s(A):d!==void 0?typeof w=="string"?s(A).fill(d,w):s(A).fill(d):s(A)}a.alloc=function(A,d,w){return y(A,d,w)};function p(A){return u(A),s(A<0?0:N(A)|0)}a.allocUnsafe=function(A){return p(A)},a.allocUnsafeSlow=function(A){return p(A)};function x(A,d){if((typeof d!="string"||d==="")&&(d="utf8"),!a.isEncoding(d))throw new TypeError("Unknown encoding: "+d);const w=L(A,d)|0;let _=s(w);const F=_.write(A,d);return F!==w&&(_=_.slice(0,F)),_}function S(A){const d=A.length<0?0:N(A.length)|0,w=s(d);for(let _=0;_=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return A|0}function H(A){return+A!=A&&(A=0),a.alloc(+A)}a.isBuffer=function(d){return d!=null&&d._isBuffer===!0&&d!==a.prototype},a.compare=function(d,w){if(It(d,Uint8Array)&&(d=a.from(d,d.offset,d.byteLength)),It(w,Uint8Array)&&(w=a.from(w,w.offset,w.byteLength)),!a.isBuffer(d)||!a.isBuffer(w))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(d===w)return 0;let _=d.length,F=w.length;for(let V=0,W=Math.min(_,F);VF.length?(a.isBuffer(W)||(W=a.from(W)),W.copy(F,V)):Uint8Array.prototype.set.call(F,W,V);else if(a.isBuffer(W))W.copy(F,V);else throw new TypeError('"list" argument must be an Array of Buffers');V+=W.length}return F};function L(A,d){if(a.isBuffer(A))return A.length;if(ArrayBuffer.isView(A)||It(A,ArrayBuffer))return A.byteLength;if(typeof A!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof A);const w=A.length,_=arguments.length>2&&arguments[2]===!0;if(!_&&w===0)return 0;let F=!1;for(;;)switch(d){case"ascii":case"latin1":case"binary":return w;case"utf8":case"utf-8":return He(A).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w*2;case"hex":return w>>>1;case"base64":return je(A).length;default:if(F)return _?-1:He(A).length;d=(""+d).toLowerCase(),F=!0}}a.byteLength=L;function G(A,d,w){let _=!1;if((d===void 0||d<0)&&(d=0),d>this.length||((w===void 0||w>this.length)&&(w=this.length),w<=0)||(w>>>=0,d>>>=0,w<=d))return"";for(A||(A="utf8");;)switch(A){case"hex":return I(this,d,w);case"utf8":case"utf-8":return f(this,d,w);case"ascii":return m(this,d,w);case"latin1":case"binary":return E(this,d,w);case"base64":return b(this,d,w);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,d,w);default:if(_)throw new TypeError("Unknown encoding: "+A);A=(A+"").toLowerCase(),_=!0}}a.prototype._isBuffer=!0;function K(A,d,w){const _=A[d];A[d]=A[w],A[w]=_}a.prototype.swap16=function(){const d=this.length;if(d%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let w=0;ww&&(d+=" ... "),""},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(d,w,_,F,V){if(It(d,Uint8Array)&&(d=a.from(d,d.offset,d.byteLength)),!a.isBuffer(d))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof d);if(w===void 0&&(w=0),_===void 0&&(_=d?d.length:0),F===void 0&&(F=0),V===void 0&&(V=this.length),w<0||_>d.length||F<0||V>this.length)throw new RangeError("out of range index");if(F>=V&&w>=_)return 0;if(F>=V)return-1;if(w>=_)return 1;if(w>>>=0,_>>>=0,F>>>=0,V>>>=0,this===d)return 0;let W=V-F,Ae=_-w;const me=Math.min(W,Ae),we=this.slice(F,V),Le=d.slice(w,_);for(let pe=0;pe2147483647?w=2147483647:w<-2147483648&&(w=-2147483648),w=+w,$e(w)&&(w=F?0:A.length-1),w<0&&(w=A.length+w),w>=A.length){if(F)return-1;w=A.length-1}else if(w<0)if(F)w=0;else return-1;if(typeof d=="string"&&(d=a.from(d,_)),a.isBuffer(d))return d.length===0?-1:Q(A,d,w,_,F);if(typeof d=="number")return d=d&255,typeof Uint8Array.prototype.indexOf=="function"?F?Uint8Array.prototype.indexOf.call(A,d,w):Uint8Array.prototype.lastIndexOf.call(A,d,w):Q(A,[d],w,_,F);throw new TypeError("val must be string, number or Buffer")}function Q(A,d,w,_,F){let V=1,W=A.length,Ae=d.length;if(_!==void 0&&(_=String(_).toLowerCase(),_==="ucs2"||_==="ucs-2"||_==="utf16le"||_==="utf-16le")){if(A.length<2||d.length<2)return-1;V=2,W/=2,Ae/=2,w/=2}function me(Le,pe){return V===1?Le[pe]:Le.readUInt16BE(pe*V)}let we;if(F){let Le=-1;for(we=w;weW&&(w=W-Ae),we=w;we>=0;we--){let Le=!0;for(let pe=0;peF&&(_=F)):_=F;const V=d.length;_>V/2&&(_=V/2);let W;for(W=0;W<_;++W){const Ae=parseInt(d.substr(W*2,2),16);if($e(Ae))return W;A[w+W]=Ae}return W}function ee(A,d,w,_){return Fe(He(d,A.length-w),A,w,_)}function se(A,d,w,_){return Fe(Ke(d),A,w,_)}function ne(A,d,w,_){return Fe(je(d),A,w,_)}function ie(A,d,w,_){return Fe(bn(d,A.length-w),A,w,_)}a.prototype.write=function(d,w,_,F){if(w===void 0)F="utf8",_=this.length,w=0;else if(_===void 0&&typeof w=="string")F=w,_=this.length,w=0;else if(isFinite(w))w=w>>>0,isFinite(_)?(_=_>>>0,F===void 0&&(F="utf8")):(F=_,_=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const V=this.length-w;if((_===void 0||_>V)&&(_=V),d.length>0&&(_<0||w<0)||w>this.length)throw new RangeError("Attempt to write outside buffer bounds");F||(F="utf8");let W=!1;for(;;)switch(F){case"hex":return Z(this,d,w,_);case"utf8":case"utf-8":return ee(this,d,w,_);case"ascii":case"latin1":case"binary":return se(this,d,w,_);case"base64":return ne(this,d,w,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ie(this,d,w,_);default:if(W)throw new TypeError("Unknown encoding: "+F);F=(""+F).toLowerCase(),W=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function b(A,d,w){return d===0&&w===A.length?e.fromByteArray(A):e.fromByteArray(A.slice(d,w))}function f(A,d,w){w=Math.min(A.length,w);const _=[];let F=d;for(;F239?4:V>223?3:V>191?2:1;if(F+Ae<=w){let me,we,Le,pe;switch(Ae){case 1:V<128&&(W=V);break;case 2:me=A[F+1],(me&192)===128&&(pe=(V&31)<<6|me&63,pe>127&&(W=pe));break;case 3:me=A[F+1],we=A[F+2],(me&192)===128&&(we&192)===128&&(pe=(V&15)<<12|(me&63)<<6|we&63,pe>2047&&(pe<55296||pe>57343)&&(W=pe));break;case 4:me=A[F+1],we=A[F+2],Le=A[F+3],(me&192)===128&&(we&192)===128&&(Le&192)===128&&(pe=(V&15)<<18|(me&63)<<12|(we&63)<<6|Le&63,pe>65535&&pe<1114112&&(W=pe))}}W===null?(W=65533,Ae=1):W>65535&&(W-=65536,_.push(W>>>10&1023|55296),W=56320|W&1023),_.push(W),F+=Ae}return g(_)}const l=4096;function g(A){const d=A.length;if(d<=l)return String.fromCharCode.apply(String,A);let w="",_=0;for(;__)&&(w=_);let F="";for(let V=d;V_&&(d=_),w<0?(w+=_,w<0&&(w=0)):w>_&&(w=_),ww)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(d,w,_){d=d>>>0,w=w>>>0,_||D(d,w,this.length);let F=this[d],V=1,W=0;for(;++W>>0,w=w>>>0,_||D(d,w,this.length);let F=this[d+--w],V=1;for(;w>0&&(V*=256);)F+=this[d+--w]*V;return F},a.prototype.readUint8=a.prototype.readUInt8=function(d,w){return d=d>>>0,w||D(d,1,this.length),this[d]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(d,w){return d=d>>>0,w||D(d,2,this.length),this[d]|this[d+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(d,w){return d=d>>>0,w||D(d,2,this.length),this[d]<<8|this[d+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(d,w){return d=d>>>0,w||D(d,4,this.length),(this[d]|this[d+1]<<8|this[d+2]<<16)+this[d+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(d,w){return d=d>>>0,w||D(d,4,this.length),this[d]*16777216+(this[d+1]<<16|this[d+2]<<8|this[d+3])},a.prototype.readBigUInt64LE=Vt(function(d){d=d>>>0,Ie(d,"offset");const w=this[d],_=this[d+7];(w===void 0||_===void 0)&&ce(d,this.length-8);const F=w+this[++d]*2**8+this[++d]*2**16+this[++d]*2**24,V=this[++d]+this[++d]*2**8+this[++d]*2**16+_*2**24;return BigInt(F)+(BigInt(V)<>>0,Ie(d,"offset");const w=this[d],_=this[d+7];(w===void 0||_===void 0)&&ce(d,this.length-8);const F=w*2**24+this[++d]*2**16+this[++d]*2**8+this[++d],V=this[++d]*2**24+this[++d]*2**16+this[++d]*2**8+_;return(BigInt(F)<>>0,w=w>>>0,_||D(d,w,this.length);let F=this[d],V=1,W=0;for(;++W=V&&(F-=Math.pow(2,8*w)),F},a.prototype.readIntBE=function(d,w,_){d=d>>>0,w=w>>>0,_||D(d,w,this.length);let F=w,V=1,W=this[d+--F];for(;F>0&&(V*=256);)W+=this[d+--F]*V;return V*=128,W>=V&&(W-=Math.pow(2,8*w)),W},a.prototype.readInt8=function(d,w){return d=d>>>0,w||D(d,1,this.length),this[d]&128?(255-this[d]+1)*-1:this[d]},a.prototype.readInt16LE=function(d,w){d=d>>>0,w||D(d,2,this.length);const _=this[d]|this[d+1]<<8;return _&32768?_|4294901760:_},a.prototype.readInt16BE=function(d,w){d=d>>>0,w||D(d,2,this.length);const _=this[d+1]|this[d]<<8;return _&32768?_|4294901760:_},a.prototype.readInt32LE=function(d,w){return d=d>>>0,w||D(d,4,this.length),this[d]|this[d+1]<<8|this[d+2]<<16|this[d+3]<<24},a.prototype.readInt32BE=function(d,w){return d=d>>>0,w||D(d,4,this.length),this[d]<<24|this[d+1]<<16|this[d+2]<<8|this[d+3]},a.prototype.readBigInt64LE=Vt(function(d){d=d>>>0,Ie(d,"offset");const w=this[d],_=this[d+7];(w===void 0||_===void 0)&&ce(d,this.length-8);const F=this[d+4]+this[d+5]*2**8+this[d+6]*2**16+(_<<24);return(BigInt(F)<>>0,Ie(d,"offset");const w=this[d],_=this[d+7];(w===void 0||_===void 0)&&ce(d,this.length-8);const F=(w<<24)+this[++d]*2**16+this[++d]*2**8+this[++d];return(BigInt(F)<>>0,w||D(d,4,this.length),r.read(this,d,!0,23,4)},a.prototype.readFloatBE=function(d,w){return d=d>>>0,w||D(d,4,this.length),r.read(this,d,!1,23,4)},a.prototype.readDoubleLE=function(d,w){return d=d>>>0,w||D(d,8,this.length),r.read(this,d,!0,52,8)},a.prototype.readDoubleBE=function(d,w){return d=d>>>0,w||D(d,8,this.length),r.read(this,d,!1,52,8)};function h(A,d,w,_,F,V){if(!a.isBuffer(A))throw new TypeError('"buffer" argument must be a Buffer instance');if(d>F||dA.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(d,w,_,F){if(d=+d,w=w>>>0,_=_>>>0,!F){const Ae=Math.pow(2,8*_)-1;h(this,d,w,_,Ae,0)}let V=1,W=0;for(this[w]=d&255;++W<_&&(V*=256);)this[w+W]=d/V&255;return w+_},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(d,w,_,F){if(d=+d,w=w>>>0,_=_>>>0,!F){const Ae=Math.pow(2,8*_)-1;h(this,d,w,_,Ae,0)}let V=_-1,W=1;for(this[w+V]=d&255;--V>=0&&(W*=256);)this[w+V]=d/W&255;return w+_},a.prototype.writeUint8=a.prototype.writeUInt8=function(d,w,_){return d=+d,w=w>>>0,_||h(this,d,w,1,255,0),this[w]=d&255,w+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(d,w,_){return d=+d,w=w>>>0,_||h(this,d,w,2,65535,0),this[w]=d&255,this[w+1]=d>>>8,w+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(d,w,_){return d=+d,w=w>>>0,_||h(this,d,w,2,65535,0),this[w]=d>>>8,this[w+1]=d&255,w+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(d,w,_){return d=+d,w=w>>>0,_||h(this,d,w,4,4294967295,0),this[w+3]=d>>>24,this[w+2]=d>>>16,this[w+1]=d>>>8,this[w]=d&255,w+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(d,w,_){return d=+d,w=w>>>0,_||h(this,d,w,4,4294967295,0),this[w]=d>>>24,this[w+1]=d>>>16,this[w+2]=d>>>8,this[w+3]=d&255,w+4};function k(A,d,w,_,F){oe(d,_,F,A,w,7);let V=Number(d&BigInt(4294967295));A[w++]=V,V=V>>8,A[w++]=V,V=V>>8,A[w++]=V,V=V>>8,A[w++]=V;let W=Number(d>>BigInt(32)&BigInt(4294967295));return A[w++]=W,W=W>>8,A[w++]=W,W=W>>8,A[w++]=W,W=W>>8,A[w++]=W,w}function re(A,d,w,_,F){oe(d,_,F,A,w,7);let V=Number(d&BigInt(4294967295));A[w+7]=V,V=V>>8,A[w+6]=V,V=V>>8,A[w+5]=V,V=V>>8,A[w+4]=V;let W=Number(d>>BigInt(32)&BigInt(4294967295));return A[w+3]=W,W=W>>8,A[w+2]=W,W=W>>8,A[w+1]=W,W=W>>8,A[w]=W,w+8}a.prototype.writeBigUInt64LE=Vt(function(d,w=0){return k(this,d,w,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=Vt(function(d,w=0){return re(this,d,w,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(d,w,_,F){if(d=+d,w=w>>>0,!F){const me=Math.pow(2,8*_-1);h(this,d,w,_,me-1,-me)}let V=0,W=1,Ae=0;for(this[w]=d&255;++V<_&&(W*=256);)d<0&&Ae===0&&this[w+V-1]!==0&&(Ae=1),this[w+V]=(d/W>>0)-Ae&255;return w+_},a.prototype.writeIntBE=function(d,w,_,F){if(d=+d,w=w>>>0,!F){const me=Math.pow(2,8*_-1);h(this,d,w,_,me-1,-me)}let V=_-1,W=1,Ae=0;for(this[w+V]=d&255;--V>=0&&(W*=256);)d<0&&Ae===0&&this[w+V+1]!==0&&(Ae=1),this[w+V]=(d/W>>0)-Ae&255;return w+_},a.prototype.writeInt8=function(d,w,_){return d=+d,w=w>>>0,_||h(this,d,w,1,127,-128),d<0&&(d=255+d+1),this[w]=d&255,w+1},a.prototype.writeInt16LE=function(d,w,_){return d=+d,w=w>>>0,_||h(this,d,w,2,32767,-32768),this[w]=d&255,this[w+1]=d>>>8,w+2},a.prototype.writeInt16BE=function(d,w,_){return d=+d,w=w>>>0,_||h(this,d,w,2,32767,-32768),this[w]=d>>>8,this[w+1]=d&255,w+2},a.prototype.writeInt32LE=function(d,w,_){return d=+d,w=w>>>0,_||h(this,d,w,4,2147483647,-2147483648),this[w]=d&255,this[w+1]=d>>>8,this[w+2]=d>>>16,this[w+3]=d>>>24,w+4},a.prototype.writeInt32BE=function(d,w,_){return d=+d,w=w>>>0,_||h(this,d,w,4,2147483647,-2147483648),d<0&&(d=4294967295+d+1),this[w]=d>>>24,this[w+1]=d>>>16,this[w+2]=d>>>8,this[w+3]=d&255,w+4},a.prototype.writeBigInt64LE=Vt(function(d,w=0){return k(this,d,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=Vt(function(d,w=0){return re(this,d,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function v(A,d,w,_,F,V){if(w+_>A.length)throw new RangeError("Index out of range");if(w<0)throw new RangeError("Index out of range")}function $(A,d,w,_,F){return d=+d,w=w>>>0,F||v(A,d,w,4),r.write(A,d,w,_,23,4),w+4}a.prototype.writeFloatLE=function(d,w,_){return $(this,d,w,!0,_)},a.prototype.writeFloatBE=function(d,w,_){return $(this,d,w,!1,_)};function Y(A,d,w,_,F){return d=+d,w=w>>>0,F||v(A,d,w,8),r.write(A,d,w,_,52,8),w+8}a.prototype.writeDoubleLE=function(d,w,_){return Y(this,d,w,!0,_)},a.prototype.writeDoubleBE=function(d,w,_){return Y(this,d,w,!1,_)},a.prototype.copy=function(d,w,_,F){if(!a.isBuffer(d))throw new TypeError("argument should be a Buffer");if(_||(_=0),!F&&F!==0&&(F=this.length),w>=d.length&&(w=d.length),w||(w=0),F>0&&F<_&&(F=_),F===_||d.length===0||this.length===0)return 0;if(w<0)throw new RangeError("targetStart out of bounds");if(_<0||_>=this.length)throw new RangeError("Index out of range");if(F<0)throw new RangeError("sourceEnd out of bounds");F>this.length&&(F=this.length),d.length-w>>0,_=_===void 0?this.length:_>>>0,d||(d=0);let V;if(typeof d=="number")for(V=w;V<_;++V)this[V]=d;else{const W=a.isBuffer(d)?d:a.from(d,F),Ae=W.length;if(Ae===0)throw new TypeError('The value "'+d+'" is invalid for argument "value"');for(V=0;V<_-w;++V)this[V+w]=W[V%Ae]}return this};const J={};function te(A,d,w){J[A]=class extends w{constructor(){super(),Object.defineProperty(this,"message",{value:d.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${A}]`,this.stack,delete this.name}get code(){return A}set code(F){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:F,writable:!0})}toString(){return`${this.name} [${A}]: ${this.message}`}}}te("ERR_BUFFER_OUT_OF_BOUNDS",function(A){return A?`${A} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),te("ERR_INVALID_ARG_TYPE",function(A,d){return`The "${A}" argument must be of type number. Received type ${typeof d}`},TypeError),te("ERR_OUT_OF_RANGE",function(A,d,w){let _=`The value of "${A}" is out of range.`,F=w;return Number.isInteger(w)&&Math.abs(w)>2**32?F=ue(String(w)):typeof w=="bigint"&&(F=String(w),(w>BigInt(2)**BigInt(32)||w<-(BigInt(2)**BigInt(32)))&&(F=ue(F)),F+="n"),_+=` It must be ${d}. Received ${F}`,_},RangeError);function ue(A){let d="",w=A.length;const _=A[0]==="-"?1:0;for(;w>=_+4;w-=3)d=`_${A.slice(w-3,w)}${d}`;return`${A.slice(0,w)}${d}`}function fe(A,d,w){Ie(d,"offset"),(A[d]===void 0||A[d+w]===void 0)&&ce(d,A.length-(w+1))}function oe(A,d,w,_,F,V){if(A>w||A= 0${W} and < 2${W} ** ${(V+1)*8}${W}`:Ae=`>= -(2${W} ** ${(V+1)*8-1}${W}) and < 2 ** ${(V+1)*8-1}${W}`,new J.ERR_OUT_OF_RANGE("value",Ae,A)}fe(_,F,V)}function Ie(A,d){if(typeof A!="number")throw new J.ERR_INVALID_ARG_TYPE(d,"number",A)}function ce(A,d,w){throw Math.floor(A)!==A?(Ie(A,w),new J.ERR_OUT_OF_RANGE("offset","an integer",A)):d<0?new J.ERR_BUFFER_OUT_OF_BOUNDS:new J.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${d}`,A)}const ge=/[^+/0-9A-Za-z-_]/g;function mn(A){if(A=A.split("=")[0],A=A.trim().replace(ge,""),A.length<2)return"";for(;A.length%4!==0;)A=A+"=";return A}function He(A,d){d=d||1/0;let w;const _=A.length;let F=null;const V=[];for(let W=0;W<_;++W){if(w=A.charCodeAt(W),w>55295&&w<57344){if(!F){if(w>56319){(d-=3)>-1&&V.push(239,191,189);continue}else if(W+1===_){(d-=3)>-1&&V.push(239,191,189);continue}F=w;continue}if(w<56320){(d-=3)>-1&&V.push(239,191,189),F=w;continue}w=(F-55296<<10|w-56320)+65536}else F&&(d-=3)>-1&&V.push(239,191,189);if(F=null,w<128){if((d-=1)<0)break;V.push(w)}else if(w<2048){if((d-=2)<0)break;V.push(w>>6|192,w&63|128)}else if(w<65536){if((d-=3)<0)break;V.push(w>>12|224,w>>6&63|128,w&63|128)}else if(w<1114112){if((d-=4)<0)break;V.push(w>>18|240,w>>12&63|128,w>>6&63|128,w&63|128)}else throw new Error("Invalid code point")}return V}function Ke(A){const d=[];for(let w=0;w>8,F=w%256,V.push(F),V.push(_);return V}function je(A){return e.toByteArray(mn(A))}function Fe(A,d,w,_){let F;for(F=0;F<_&&!(F+w>=d.length||F>=A.length);++F)d[F+w]=A[F];return F}function It(A,d){return A instanceof d||A!=null&&A.constructor!=null&&A.constructor.name!=null&&A.constructor.name===d.name}function $e(A){return A!==A}const Ge=function(){const A="0123456789abcdef",d=new Array(256);for(let w=0;w<16;++w){const _=w*16;for(let F=0;F<16;++F)d[_+F]=A[w]+A[F]}return d}();function Vt(A){return typeof BigInt>"u"?qe:A}function qe(){throw new Error("BigInt not supported")}})(Pe);const qc=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;function Df(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`positive integer expected, not ${t}`)}function kw(t){if(typeof t!="boolean")throw new Error(`boolean expected, not ${t}`)}function Tw(t){return t instanceof Uint8Array||t!=null&&typeof t=="object"&&t.constructor.name==="Uint8Array"}function ru(t,...e){if(!Tw(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error(`Uint8Array expected of length ${e}, not of length=${t.length}`)}function Nw(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Df(t.outputLen),Df(t.blockLen)}function Cf(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function o0(t,e){ru(t);const r=e.outputLen;if(t.lengthnew DataView(t.buffer,t.byteOffset,t.byteLength),Yr=(t,e)=>t<<32-e|t>>>e;new Uint8Array(new Uint32Array([287454020]).buffer)[0];function Uw(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function s0(t){return typeof t=="string"&&(t=Uw(t)),ru(t),t}let Ow=class{clone(){return this._cloneInto()}};function Pw(t){const e=n=>t().update(s0(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function Fw(t=32){if(qc&&typeof qc.getRandomValues=="function")return qc.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}function a0(t){return Fw(t)}function Lw(t){return t instanceof Uint8Array||t!=null&&typeof t=="object"&&t.constructor.name==="Uint8Array"}function nu(t,...e){if(!Lw(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error(`Uint8Array expected of length ${e}, not of length=${t.length}`)}function gh(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function Hw(t,e){nu(t);const r=e.outputLen;if(t.lengthnew DataView(t.buffer,t.byteOffset,t.byteLength),Qr=(t,e)=>t<<32-e|t>>>e;new Uint8Array(new Uint32Array([287454020]).buffer)[0];function $w(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function c0(t){return typeof t=="string"&&(t=$w(t)),nu(t),t}let Vw=class{clone(){return this._cloneInto()}};function jw(t){const e=n=>t().update(c0(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function zw(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);const i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),a=Number(r&o),c=n?4:0,u=n?0:4;t.setUint32(e+c,s,n),t.setUint32(e+u,a,n)}const Kw=(t,e,r)=>t&e^~t&r,Gw=(t,e,r)=>t&e^t&r^e&r;let qw=class extends Vw{constructor(e,r,n,i){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=Jc(this.buffer)}update(e){gh(this);const{view:r,buffer:n,blockLen:i}=this;e=c0(e);const o=e.length;for(let s=0;si-s&&(this.process(n,0),s=0);for(let p=s;py.length)throw new Error("_sha2: outputLen bigger than state");for(let p=0;p>>3,B=Qr(S,17)^Qr(S,19)^S>>>10;Yn[p]=B+Yn[p-7]+C+Yn[p-16]|0}let{A:n,B:i,C:o,D:s,E:a,F:c,G:u,H:y}=this;for(let p=0;p<64;p++){const x=Qr(a,6)^Qr(a,11)^Qr(a,25),S=y+x+Kw(a,c,u)+Ww[p]+Yn[p]|0,B=(Qr(n,2)^Qr(n,13)^Qr(n,22))+Gw(n,i,o)|0;y=u,u=c,c=a,a=s+S|0,s=o,o=i,i=n,n=S+B|0}n=n+this.A|0,i=i+this.B|0,o=o+this.C|0,s=s+this.D|0,a=a+this.E|0,c=c+this.F|0,u=u+this.G|0,y=y+this.H|0,this.set(n,i,o,s,a,c,u,y)}roundClean(){Yn.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};const Yw=jw(()=>new Jw);/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */function oa(t){return t instanceof Uint8Array||t!=null&&typeof t=="object"&&t.constructor.name==="Uint8Array"}function Qw(...t){const e=o=>o,r=(o,s)=>a=>o(s(a)),n=t.map(o=>o.encode).reduceRight(r,e),i=t.map(o=>o.decode).reduce(r,e);return{encode:n,decode:i}}function Zw(t){return{encode:e=>{if(!Array.isArray(e)||e.length&&typeof e[0]!="number")throw new Error("alphabet.encode input should be an array of numbers");return e.map(r=>{if(r<0||r>=t.length)throw new Error(`Digit index outside alphabet: ${r} (alphabet: ${t.length})`);return t[r]})},decode:e=>{if(!Array.isArray(e)||e.length&&typeof e[0]!="string")throw new Error("alphabet.decode input should be array of strings");return e.map(r=>{if(typeof r!="string")throw new Error(`alphabet.decode: not string element=${r}`);const n=t.indexOf(r);if(n===-1)throw new Error(`Unknown letter: "${r}". Allowed: ${t}`);return n})}}}function Xw(t=""){if(typeof t!="string")throw new Error("join separator should be string");return{encode:e=>{if(!Array.isArray(e)||e.length&&typeof e[0]!="string")throw new Error("join.encode input should be array of strings");for(let r of e)if(typeof r!="string")throw new Error(`join.encode: non-string input=${r}`);return e.join(t)},decode:e=>{if(typeof e!="string")throw new Error("join.decode input should be string");return e.split(t)}}}function em(t,e="="){if(typeof e!="string")throw new Error("padding chr should be string");return{encode(r){if(!Array.isArray(r)||r.length&&typeof r[0]!="string")throw new Error("padding.encode input should be array of strings");for(let n of r)if(typeof n!="string")throw new Error(`padding.encode: non-string input=${n}`);for(;r.length*t%8;)r.push(e);return r},decode(r){if(!Array.isArray(r)||r.length&&typeof r[0]!="string")throw new Error("padding.encode input should be array of strings");for(let i of r)if(typeof i!="string")throw new Error(`padding.decode: non-string input=${i}`);let n=r.length;if(n*t%8)throw new Error("Invalid padding: string should have whole number of bytes");for(;n>0&&r[n-1]===e;n--)if(!((n-1)*t%8))throw new Error("Invalid padding: string has too much padding");return r.slice(0,n)}}}function If(t,e,r){if(e<2)throw new Error(`convertRadix: wrong from=${e}, base cannot be less than 2`);if(r<2)throw new Error(`convertRadix: wrong to=${r}, base cannot be less than 2`);if(!Array.isArray(t))throw new Error("convertRadix: data should be array");if(!t.length)return[];let n=0;const i=[],o=Array.from(t);for(o.forEach(s=>{if(s<0||s>=e)throw new Error(`Wrong integer: ${s}`)});;){let s=0,a=!0;for(let c=n;ce?f0(e,t%e):t,sa=(t,e)=>t+(e-f0(t,e));function Mf(t,e,r,n){if(!Array.isArray(t))throw new Error("convertRadix2: data should be array");if(e<=0||e>32)throw new Error(`convertRadix2: wrong from=${e}`);if(r<=0||r>32)throw new Error(`convertRadix2: wrong to=${r}`);if(sa(e,r)>32)throw new Error(`convertRadix2: carry overflow from=${e} to=${r} carryBits=${sa(e,r)}`);let i=0,o=0;const s=2**r-1,a=[];for(const c of t){if(c>=2**e)throw new Error(`convertRadix2: invalid data word=${c} from=${e}`);if(i=i<32)throw new Error(`convertRadix2: carry overflow pos=${o} from=${e}`);for(o+=e;o>=r;o-=r)a.push((i>>o-r&s)>>>0);i&=2**o-1}if(i=i<=e)throw new Error("Excess padding");if(!n&&i)throw new Error(`Non-zero padding: ${i}`);return n&&o>0&&a.push(i>>>0),a}function tm(t){return{encode:e=>{if(!oa(e))throw new Error("radix.encode input should be Uint8Array");return If(Array.from(e),2**8,t)},decode:e=>{if(!Array.isArray(e)||e.length&&typeof e[0]!="number")throw new Error("radix.decode input should be array of numbers");return Uint8Array.from(If(e,t,2**8))}}}function rm(t,e=!1){if(t<=0||t>32)throw new Error("radix2: bits should be in (0..32]");if(sa(8,t)>32||sa(t,8)>32)throw new Error("radix2: carry overflow");return{encode:r=>{if(!oa(r))throw new Error("radix2.encode input should be Uint8Array");return Mf(Array.from(r),8,t,!e)},decode:r=>{if(!Array.isArray(r)||r.length&&typeof r[0]!="number")throw new Error("radix2.decode input should be array of numbers");return Uint8Array.from(Mf(r,t,8,e))}}}function nm(t,e){if(typeof e!="function")throw new Error("checksum fn should be function");return{encode(r){if(!oa(r))throw new Error("checksum.encode: input should be Uint8Array");const n=e(r).slice(0,t),i=new Uint8Array(r.length+t);return i.set(r),i.set(n,r.length),i},decode(r){if(!oa(r))throw new Error("checksum.decode: input should be Uint8Array");const n=r.slice(0,-t),i=e(n).slice(0,t),o=r.slice(-t);for(let s=0;st[0]==="あいこくしん";function om(t){nu(t,16,20,24,28,32)}const sm=t=>{const e=8-t.length/4;return new Uint8Array([Yw(t)[0]>>e<{if(typeof e!="string")throw new Error(`Wordlist: non-string element: ${e}`)}),$s.chain($s.checksum(1,sm),$s.radix2(11,!0),$s.alphabet(t))}function cm(t,e){return om(t),am(e).encode(t).join(im(e)?" ":" ")}const fm=`abandon -ability -able -about -above -absent -absorb -abstract -absurd -abuse -access -accident -account -accuse -achieve -acid -acoustic -acquire -across -act -action -actor -actress -actual -adapt -add -addict -address -adjust -admit -adult -advance -advice -aerobic -affair -afford -afraid -again -age -agent -agree -ahead -aim -air -airport -aisle -alarm -album -alcohol -alert -alien -all -alley -allow -almost -alone -alpha -already -also -alter -always -amateur -amazing -among -amount -amused -analyst -anchor -ancient -anger -angle -angry -animal -ankle -announce -annual -another -answer -antenna -antique -anxiety -any -apart -apology -appear -apple -approve -april -arch -arctic -area -arena -argue -arm -armed -armor -army -around -arrange -arrest -arrive -arrow -art -artefact -artist -artwork -ask -aspect -assault -asset -assist -assume -asthma -athlete -atom -attack -attend -attitude -attract -auction -audit -august -aunt -author -auto -autumn -average -avocado -avoid -awake -aware -away -awesome -awful -awkward -axis -baby -bachelor -bacon -badge -bag -balance -balcony -ball -bamboo -banana -banner -bar -barely -bargain -barrel -base -basic -basket -battle -beach -bean -beauty -because -become -beef -before -begin -behave -behind -believe -below -belt -bench -benefit -best -betray -better -between -beyond -bicycle -bid -bike -bind -biology -bird -birth -bitter -black -blade -blame -blanket -blast -bleak -bless -blind -blood -blossom -blouse -blue -blur -blush -board -boat -body -boil -bomb -bone -bonus -book -boost -border -boring -borrow -boss -bottom -bounce -box -boy -bracket -brain -brand -brass -brave -bread -breeze -brick -bridge -brief -bright -bring -brisk -broccoli -broken -bronze -broom -brother -brown -brush -bubble -buddy -budget -buffalo -build -bulb -bulk -bullet -bundle -bunker -burden -burger -burst -bus -business -busy -butter -buyer -buzz -cabbage -cabin -cable -cactus -cage -cake -call -calm -camera -camp -can -canal -cancel -candy -cannon -canoe -canvas -canyon -capable -capital -captain -car -carbon -card -cargo -carpet -carry -cart -case -cash -casino -castle -casual -cat -catalog -catch -category -cattle -caught -cause -caution -cave -ceiling -celery -cement -census -century -cereal -certain -chair -chalk -champion -change -chaos -chapter -charge -chase -chat -cheap -check -cheese -chef -cherry -chest -chicken -chief -child -chimney -choice -choose -chronic -chuckle -chunk -churn -cigar -cinnamon -circle -citizen -city -civil -claim -clap -clarify -claw -clay -clean -clerk -clever -click -client -cliff -climb -clinic -clip -clock -clog -close -cloth -cloud -clown -club -clump -cluster -clutch -coach -coast -coconut -code -coffee -coil -coin -collect -color -column -combine -come -comfort -comic -common -company -concert -conduct -confirm -congress -connect -consider -control -convince -cook -cool -copper -copy -coral -core -corn -correct -cost -cotton -couch -country -couple -course -cousin -cover -coyote -crack -cradle -craft -cram -crane -crash -crater -crawl -crazy -cream -credit -creek -crew -cricket -crime -crisp -critic -crop -cross -crouch -crowd -crucial -cruel -cruise -crumble -crunch -crush -cry -crystal -cube -culture -cup -cupboard -curious -current -curtain -curve -cushion -custom -cute -cycle -dad -damage -damp -dance -danger -daring -dash -daughter -dawn -day -deal -debate -debris -decade -december -decide -decline -decorate -decrease -deer -defense -define -defy -degree -delay -deliver -demand -demise -denial -dentist -deny -depart -depend -deposit -depth -deputy -derive -describe -desert -design -desk -despair -destroy -detail -detect -develop -device -devote -diagram -dial -diamond -diary -dice -diesel -diet -differ -digital -dignity -dilemma -dinner -dinosaur -direct -dirt -disagree -discover -disease -dish -dismiss -disorder -display -distance -divert -divide -divorce -dizzy -doctor -document -dog -doll -dolphin -domain -donate -donkey -donor -door -dose -double -dove -draft -dragon -drama -drastic -draw -dream -dress -drift -drill -drink -drip -drive -drop -drum -dry -duck -dumb -dune -during -dust -dutch -duty -dwarf -dynamic -eager -eagle -early -earn -earth -easily -east -easy -echo -ecology -economy -edge -edit -educate -effort -egg -eight -either -elbow -elder -electric -elegant -element -elephant -elevator -elite -else -embark -embody -embrace -emerge -emotion -employ -empower -empty -enable -enact -end -endless -endorse -enemy -energy -enforce -engage -engine -enhance -enjoy -enlist -enough -enrich -enroll -ensure -enter -entire -entry -envelope -episode -equal -equip -era -erase -erode -erosion -error -erupt -escape -essay -essence -estate -eternal -ethics -evidence -evil -evoke -evolve -exact -example -excess -exchange -excite -exclude -excuse -execute -exercise -exhaust -exhibit -exile -exist -exit -exotic -expand -expect -expire -explain -expose -express -extend -extra -eye -eyebrow -fabric -face -faculty -fade -faint -faith -fall -false -fame -family -famous -fan -fancy -fantasy -farm -fashion -fat -fatal -father -fatigue -fault -favorite -feature -february -federal -fee -feed -feel -female -fence -festival -fetch -fever -few -fiber -fiction -field -figure -file -film -filter -final -find -fine -finger -finish -fire -firm -first -fiscal -fish -fit -fitness -fix -flag -flame -flash -flat -flavor -flee -flight -flip -float -flock -floor -flower -fluid -flush -fly -foam -focus -fog -foil -fold -follow -food -foot -force -forest -forget -fork -fortune -forum -forward -fossil -foster -found -fox -fragile -frame -frequent -fresh -friend -fringe -frog -front -frost -frown -frozen -fruit -fuel -fun -funny -furnace -fury -future -gadget -gain -galaxy -gallery -game -gap -garage -garbage -garden -garlic -garment -gas -gasp -gate -gather -gauge -gaze -general -genius -genre -gentle -genuine -gesture -ghost -giant -gift -giggle -ginger -giraffe -girl -give -glad -glance -glare -glass -glide -glimpse -globe -gloom -glory -glove -glow -glue -goat -goddess -gold -good -goose -gorilla -gospel -gossip -govern -gown -grab -grace -grain -grant -grape -grass -gravity -great -green -grid -grief -grit -grocery -group -grow -grunt -guard -guess -guide -guilt -guitar -gun -gym -habit -hair -half -hammer -hamster -hand -happy -harbor -hard -harsh -harvest -hat -have -hawk -hazard -head -health -heart -heavy -hedgehog -height -hello -helmet -help -hen -hero -hidden -high -hill -hint -hip -hire -history -hobby -hockey -hold -hole -holiday -hollow -home -honey -hood -hope -horn -horror -horse -hospital -host -hotel -hour -hover -hub -huge -human -humble -humor -hundred -hungry -hunt -hurdle -hurry -hurt -husband -hybrid -ice -icon -idea -identify -idle -ignore -ill -illegal -illness -image -imitate -immense -immune -impact -impose -improve -impulse -inch -include -income -increase -index -indicate -indoor -industry -infant -inflict -inform -inhale -inherit -initial -inject -injury -inmate -inner -innocent -input -inquiry -insane -insect -inside -inspire -install -intact -interest -into -invest -invite -involve -iron -island -isolate -issue -item -ivory -jacket -jaguar -jar -jazz -jealous -jeans -jelly -jewel -job -join -joke -journey -joy -judge -juice -jump -jungle -junior -junk -just -kangaroo -keen -keep -ketchup -key -kick -kid -kidney -kind -kingdom -kiss -kit -kitchen -kite -kitten -kiwi -knee -knife -knock -know -lab -label -labor -ladder -lady -lake -lamp -language -laptop -large -later -latin -laugh -laundry -lava -law -lawn -lawsuit -layer -lazy -leader -leaf -learn -leave -lecture -left -leg -legal -legend -leisure -lemon -lend -length -lens -leopard -lesson -letter -level -liar -liberty -library -license -life -lift -light -like -limb -limit -link -lion -liquid -list -little -live -lizard -load -loan -lobster -local -lock -logic -lonely -long -loop -lottery -loud -lounge -love -loyal -lucky -luggage -lumber -lunar -lunch -luxury -lyrics -machine -mad -magic -magnet -maid -mail -main -major -make -mammal -man -manage -mandate -mango -mansion -manual -maple -marble -march -margin -marine -market -marriage -mask -mass -master -match -material -math -matrix -matter -maximum -maze -meadow -mean -measure -meat -mechanic -medal -media -melody -melt -member -memory -mention -menu -mercy -merge -merit -merry -mesh -message -metal -method -middle -midnight -milk -million -mimic -mind -minimum -minor -minute -miracle -mirror -misery -miss -mistake -mix -mixed -mixture -mobile -model -modify -mom -moment -monitor -monkey -monster -month -moon -moral -more -morning -mosquito -mother -motion -motor -mountain -mouse -move -movie -much -muffin -mule -multiply -muscle -museum -mushroom -music -must -mutual -myself -mystery -myth -naive -name -napkin -narrow -nasty -nation -nature -near -neck -need -negative -neglect -neither -nephew -nerve -nest -net -network -neutral -never -news -next -nice -night -noble -noise -nominee -noodle -normal -north -nose -notable -note -nothing -notice -novel -now -nuclear -number -nurse -nut -oak -obey -object -oblige -obscure -observe -obtain -obvious -occur -ocean -october -odor -off -offer -office -often -oil -okay -old -olive -olympic -omit -once -one -onion -online -only -open -opera -opinion -oppose -option -orange -orbit -orchard -order -ordinary -organ -orient -original -orphan -ostrich -other -outdoor -outer -output -outside -oval -oven -over -own -owner -oxygen -oyster -ozone -pact -paddle -page -pair -palace -palm -panda -panel -panic -panther -paper -parade -parent -park -parrot -party -pass -patch -path -patient -patrol -pattern -pause -pave -payment -peace -peanut -pear -peasant -pelican -pen -penalty -pencil -people -pepper -perfect -permit -person -pet -phone -photo -phrase -physical -piano -picnic -picture -piece -pig -pigeon -pill -pilot -pink -pioneer -pipe -pistol -pitch -pizza -place -planet -plastic -plate -play -please -pledge -pluck -plug -plunge -poem -poet -point -polar -pole -police -pond -pony -pool -popular -portion -position -possible -post -potato -pottery -poverty -powder -power -practice -praise -predict -prefer -prepare -present -pretty -prevent -price -pride -primary -print -priority -prison -private -prize -problem -process -produce -profit -program -project -promote -proof -property -prosper -protect -proud -provide -public -pudding -pull -pulp -pulse -pumpkin -punch -pupil -puppy -purchase -purity -purpose -purse -push -put -puzzle -pyramid -quality -quantum -quarter -question -quick -quit -quiz -quote -rabbit -raccoon -race -rack -radar -radio -rail -rain -raise -rally -ramp -ranch -random -range -rapid -rare -rate -rather -raven -raw -razor -ready -real -reason -rebel -rebuild -recall -receive -recipe -record -recycle -reduce -reflect -reform -refuse -region -regret -regular -reject -relax -release -relief -rely -remain -remember -remind -remove -render -renew -rent -reopen -repair -repeat -replace -report -require -rescue -resemble -resist -resource -response -result -retire -retreat -return -reunion -reveal -review -reward -rhythm -rib -ribbon -rice -rich -ride -ridge -rifle -right -rigid -ring -riot -ripple -risk -ritual -rival -river -road -roast -robot -robust -rocket -romance -roof -rookie -room -rose -rotate -rough -round -route -royal -rubber -rude -rug -rule -run -runway -rural -sad -saddle -sadness -safe -sail -salad -salmon -salon -salt -salute -same -sample -sand -satisfy -satoshi -sauce -sausage -save -say -scale -scan -scare -scatter -scene -scheme -school -science -scissors -scorpion -scout -scrap -screen -script -scrub -sea -search -season -seat -second -secret -section -security -seed -seek -segment -select -sell -seminar -senior -sense -sentence -series -service -session -settle -setup -seven -shadow -shaft -shallow -share -shed -shell -sheriff -shield -shift -shine -ship -shiver -shock -shoe -shoot -shop -short -shoulder -shove -shrimp -shrug -shuffle -shy -sibling -sick -side -siege -sight -sign -silent -silk -silly -silver -similar -simple -since -sing -siren -sister -situate -six -size -skate -sketch -ski -skill -skin -skirt -skull -slab -slam -sleep -slender -slice -slide -slight -slim -slogan -slot -slow -slush -small -smart -smile -smoke -smooth -snack -snake -snap -sniff -snow -soap -soccer -social -sock -soda -soft -solar -soldier -solid -solution -solve -someone -song -soon -sorry -sort -soul -sound -soup -source -south -space -spare -spatial -spawn -speak -special -speed -spell -spend -sphere -spice -spider -spike -spin -spirit -split -spoil -sponsor -spoon -sport -spot -spray -spread -spring -spy -square -squeeze -squirrel -stable -stadium -staff -stage -stairs -stamp -stand -start -state -stay -steak -steel -stem -step -stereo -stick -still -sting -stock -stomach -stone -stool -story -stove -strategy -street -strike -strong -struggle -student -stuff -stumble -style -subject -submit -subway -success -such -sudden -suffer -sugar -suggest -suit -summer -sun -sunny -sunset -super -supply -supreme -sure -surface -surge -surprise -surround -survey -suspect -sustain -swallow -swamp -swap -swarm -swear -sweet -swift -swim -swing -switch -sword -symbol -symptom -syrup -system -table -tackle -tag -tail -talent -talk -tank -tape -target -task -taste -tattoo -taxi -teach -team -tell -ten -tenant -tennis -tent -term -test -text -thank -that -theme -then -theory -there -they -thing -this -thought -three -thrive -throw -thumb -thunder -ticket -tide -tiger -tilt -timber -time -tiny -tip -tired -tissue -title -toast -tobacco -today -toddler -toe -together -toilet -token -tomato -tomorrow -tone -tongue -tonight -tool -tooth -top -topic -topple -torch -tornado -tortoise -toss -total -tourist -toward -tower -town -toy -track -trade -traffic -tragic -train -transfer -trap -trash -travel -tray -treat -tree -trend -trial -tribe -trick -trigger -trim -trip -trophy -trouble -truck -true -truly -trumpet -trust -truth -try -tube -tuition -tumble -tuna -tunnel -turkey -turn -turtle -twelve -twenty -twice -twin -twist -two -type -typical -ugly -umbrella -unable -unaware -uncle -uncover -under -undo -unfair -unfold -unhappy -uniform -unique -unit -universe -unknown -unlock -until -unusual -unveil -update -upgrade -uphold -upon -upper -upset -urban -urge -usage -use -used -useful -useless -usual -utility -vacant -vacuum -vague -valid -valley -valve -van -vanish -vapor -various -vast -vault -vehicle -velvet -vendor -venture -venue -verb -verify -version -very -vessel -veteran -viable -vibrant -vicious -victory -video -view -village -vintage -violin -virtual -virus -visa -visit -visual -vital -vivid -vocal -voice -void -volcano -volume -vote -voyage -wage -wagon -wait -walk -wall -walnut -want -warfare -warm -warrior -wash -wasp -waste -water -wave -way -wealth -weapon -wear -weasel -weather -web -wedding -weekend -weird -welcome -west -wet -whale -what -wheat -wheel -when -where -whip -whisper -wide -width -wife -wild -will -win -window -wine -wing -wink -winner -winter -wire -wisdom -wise -wish -witness -wolf -woman -wonder -wood -wool -word -work -world -worry -worth -wrap -wreck -wrestle -wrist -write -wrong -yard -year -yellow -you -young -youth -zebra -zero -zone -zoo`.split(` -`),lm="logger/5.8.0";let yh=!1,wh=!1;const Js={debug:1,default:2,info:2,warning:3,error:4,off:5};let mh=Js.default,Yc=null;function um(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{t.push(e)}}),t.length)throw new Error("missing "+t.join(", "));if("é".normalize("NFD")!=="é")throw new Error("broken implementation")}catch(t){return t.message}return null}const bh=um();var _f;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"})(_f||(_f={}));var Rr;(function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"})(Rr||(Rr={}));const vh="0123456789abcdef";class Re{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,r){const n=e.toLowerCase();Js[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(mh>Js[n])&&console.log.apply(console,r)}debug(...e){this._log(Re.levels.DEBUG,e)}info(...e){this._log(Re.levels.INFO,e)}warn(...e){this._log(Re.levels.WARNING,e)}makeError(e,r,n){if(wh)return this.makeError("censored error",r,{});r||(r=Re.errors.UNKNOWN_ERROR),n||(n={});const i=[];Object.keys(n).forEach(c=>{const u=n[c];try{if(u instanceof Uint8Array){let y="";for(let p=0;p>4],y+=vh[u[p]&15];i.push(c+"=Uint8Array(0x"+y+")")}else i.push(c+"="+JSON.stringify(u))}catch{i.push(c+"="+JSON.stringify(n[c].toString()))}}),i.push(`code=${r}`),i.push(`version=${this.version}`);const o=e;let s="";switch(r){case Rr.NUMERIC_FAULT:{s="NUMERIC_FAULT";const c=e;switch(c){case"overflow":case"underflow":case"division-by-zero":s+="-"+c;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result";break}break}case Rr.CALL_EXCEPTION:case Rr.INSUFFICIENT_FUNDS:case Rr.MISSING_NEW:case Rr.NONCE_EXPIRED:case Rr.REPLACEMENT_UNDERPRICED:case Rr.TRANSACTION_REPLACED:case Rr.UNPREDICTABLE_GAS_LIMIT:s=r;break}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),i.length&&(e+=" ("+i.join(", ")+")");const a=new Error(e);return a.reason=o,a.code=r,Object.keys(n).forEach(function(c){a[c]=n[c]}),a}throwError(e,r,n){throw this.makeError(e,r,n)}throwArgumentError(e,r,n){return this.throwError(e,Re.errors.INVALID_ARGUMENT,{argument:r,value:n})}assert(e,r,n,i){e||this.throwError(r,n,i)}assertArgument(e,r,n,i){e||this.throwArgumentError(r,n,i)}checkNormalize(e){bh&&this.throwError("platform missing String.prototype.normalize",Re.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:bh})}checkSafeUint53(e,r){typeof e=="number"&&(r==null&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,Re.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,Re.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,r,n){n?n=": "+n:n="",er&&this.throwError("too many arguments"+n,Re.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})}checkNew(e,r){(e===Object||e==null)&&this.throwError("missing new",Re.errors.MISSING_NEW,{name:r.name})}checkAbstract(e,r){e===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",Re.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",Re.errors.MISSING_NEW,{name:r.name})}static globalLogger(){return Yc||(Yc=new Re(lm)),Yc}static setCensorship(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",Re.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),yh){if(!e)return;this.globalLogger().throwError("error censorship permanent",Re.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}wh=!!e,yh=!!r}static setLogLevel(e){const r=Js[e.toLowerCase()];if(r==null){Re.globalLogger().warn("invalid log level - "+e);return}mh=r}static from(e){return new Re(e)}}Re.errors=Rr;Re.levels=_f;const hm="bytes/5.8.0",bt=new Re(hm);function l0(t){return!!t.toHexString}function uo(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return uo(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function dm(t){return Sr(t)&&!(t.length%2)||Ha(t)}function xh(t){return typeof t=="number"&&t==t&&t%1===0}function Ha(t){if(t==null)return!1;if(t.constructor===Uint8Array)return!0;if(typeof t=="string"||!xh(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function ke(t,e){if(e||(e={}),typeof t=="number"){bt.checkSafeUint53(t,"invalid arrayify value");const r=[];for(;t;)r.unshift(t&255),t=parseInt(String(t/256));return r.length===0&&r.push(0),uo(new Uint8Array(r))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),l0(t)&&(t=t.toHexString()),Sr(t)){let r=t.substring(2);r.length%2&&(e.hexPad==="left"?r="0"+r:e.hexPad==="right"?r+="0":bt.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let i=0;ike(i)),r=e.reduce((i,o)=>i+o.length,0),n=new Uint8Array(r);return e.reduce((i,o)=>(n.set(o,i),i+o.length),0),uo(n)}function pm(t,e){t=ke(t),t.length>e&&bt.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),uo(r)}function Sr(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}const Qc="0123456789abcdef";function We(t,e){if(e||(e={}),typeof t=="number"){bt.checkSafeUint53(t,"invalid hexlify value");let r="";for(;t;)r=Qc[t&15]+r,t=Math.floor(t/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if(typeof t=="bigint")return t=t.toString(16),t.length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),l0(t))return t.toHexString();if(Sr(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":bt.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(Ha(t)){let r="0x";for(let n=0;n>4]+Qc[i&15]}return r}return bt.throwArgumentError("invalid hexlify value","value",t)}function gm(t){if(typeof t!="string")t=We(t);else if(!Sr(t)||t.length%2)return null;return(t.length-2)/2}function aa(t,e,r){return typeof t!="string"?t=We(t):(!Sr(t)||t.length%2)&&bt.throwArgumentError("invalid hexData","value",t),e=2+2*e,r!=null?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function fi(t,e){for(typeof t!="string"?t=We(t):Sr(t)||bt.throwArgumentError("invalid hex string","value",t),t.length>2*e+2&&bt.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function ym(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(dm(t)){let r=ke(t);r.length===64?(e.v=27+(r[32]>>7),r[32]&=127,e.r=We(r.slice(0,32)),e.s=We(r.slice(32,64))):r.length===65?(e.r=We(r.slice(0,32)),e.s=We(r.slice(32,64)),e.v=r[64]):bt.throwArgumentError("invalid signature string","signature",t),e.v<27&&(e.v===0||e.v===1?e.v+=27:bt.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=We(r.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,e._vs!=null){const i=pm(ke(e._vs),32);e._vs=We(i);const o=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=o:e.recoveryParam!==o&&bt.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),i[0]&=127;const s=We(i);e.s==null?e.s=s:e.s!==s&&bt.throwArgumentError("signature v mismatch _vs","signature",t)}if(e.recoveryParam==null)e.v==null?bt.throwArgumentError("signature missing v and recoveryParam","signature",t):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{const i=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==i&&bt.throwArgumentError("signature recoveryParam mismatch v","signature",t)}e.r==null||!Sr(e.r)?bt.throwArgumentError("signature missing or invalid r","signature",t):e.r=fi(e.r,32),e.s==null||!Sr(e.s)?bt.throwArgumentError("signature missing or invalid s","signature",t):e.s=fi(e.s,32);const r=ke(e.s);r[0]>=128&&bt.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const n=We(r);e._vs&&(Sr(e._vs)||bt.throwArgumentError("signature invalid _vs","signature",t),e._vs=fi(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&bt.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Je(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}class u0{constructor(e){Je(this,"alphabet",e),Je(this,"base",e.length),Je(this,"_alphabetMap",{}),Je(this,"_leader",e.charAt(0));for(let r=0;r0;)n.push(s%this.base),s=s/this.base|0}let i="";for(let o=0;r[o]===0&&o=0;--o)i+=this.alphabet[n[o]];return i}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let r=[];if(e.length===0)return new Uint8Array(r);r.push(0);for(let n=0;n>=8;for(;o>0;)r.push(o&255),o>>=8}for(let n=0;e[n]===this._leader&&n0?f:l},o.min=function(f,l){return f.cmp(l)<0?f:l},o.prototype._init=function(f,l,g){if(typeof f=="number")return this._initNumber(f,l,g);if(typeof f=="object")return this._initArray(f,l,g);l==="hex"&&(l=16),n(l===(l|0)&&l>=2&&l<=36),f=f.toString().replace(/\s+/g,"");var m=0;f[0]==="-"&&(m++,this.negative=1),m=0;m-=3)I=f[m]|f[m-1]<<8|f[m-2]<<16,this.words[E]|=I<>>26-T&67108863,T+=24,T>=26&&(T-=26,E++);else if(g==="le")for(m=0,E=0;m>>26-T&67108863,T+=24,T>=26&&(T-=26,E++);return this._strip()};function a(b,f){var l=b.charCodeAt(f);if(l>=48&&l<=57)return l-48;if(l>=65&&l<=70)return l-55;if(l>=97&&l<=102)return l-87;n(!1,"Invalid character in "+b)}function c(b,f,l){var g=a(b,l);return l-1>=f&&(g|=a(b,l-1)<<4),g}o.prototype._parseHex=function(f,l,g){this.length=Math.ceil((f.length-l)/6),this.words=new Array(this.length);for(var m=0;m=l;m-=2)T=c(f,l,m)<=18?(E-=18,I+=1,this.words[I]|=T>>>26):E+=8;else{var D=f.length-l;for(m=D%2===0?l+1:l;m=18?(E-=18,I+=1,this.words[I]|=T>>>26):E+=8}this._strip()};function u(b,f,l,g){for(var m=0,E=0,I=Math.min(b.length,l),T=f;T=49?E=D-49+10:D>=17?E=D-17+10:E=D,n(D>=0&&E1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},o.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=p}catch{o.prototype.inspect=p}else o.prototype.inspect=p;function p(){return(this.red?""}var x=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],S=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],C=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(f,l){f=f||10,l=l|0||1;var g;if(f===16||f==="hex"){g="";for(var m=0,E=0,I=0;I>>24-m&16777215,m+=2,m>=26&&(m-=26,I--),E!==0||I!==this.length-1?g=x[6-D.length]+D+g:g=D+g}for(E!==0&&(g=E.toString(16)+g);g.length%l!==0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}if(f===(f|0)&&f>=2&&f<=36){var h=S[f],k=C[f];g="";var re=this.clone();for(re.negative=0;!re.isZero();){var v=re.modrn(k).toString(f);re=re.idivn(k),re.isZero()?g=v+g:g=x[h-v.length]+v+g}for(this.isZero()&&(g="0"+g);g.length%l!==0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var f=this.words[0];return this.length===2?f+=this.words[1]*67108864:this.length===3&&this.words[2]===1?f+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-f:f},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(f,l){return this.toArrayLike(s,f,l)}),o.prototype.toArray=function(f,l){return this.toArrayLike(Array,f,l)};var B=function(f,l){return f.allocUnsafe?f.allocUnsafe(l):new f(l)};o.prototype.toArrayLike=function(f,l,g){this._strip();var m=this.byteLength(),E=g||Math.max(1,m);n(m<=E,"byte array longer than desired length"),n(E>0,"Requested array length <= 0");var I=B(f,E),T=l==="le"?"LE":"BE";return this["_toArrayLike"+T](I,m),I},o.prototype._toArrayLikeLE=function(f,l){for(var g=0,m=0,E=0,I=0;E>8&255),g>16&255),I===6?(g>24&255),m=0,I=0):(m=T>>>24,I+=2)}if(g=0&&(f[g--]=T>>8&255),g>=0&&(f[g--]=T>>16&255),I===6?(g>=0&&(f[g--]=T>>24&255),m=0,I=0):(m=T>>>24,I+=2)}if(g>=0)for(f[g--]=m;g>=0;)f[g--]=0},Math.clz32?o.prototype._countBits=function(f){return 32-Math.clz32(f)}:o.prototype._countBits=function(f){var l=f,g=0;return l>=4096&&(g+=13,l>>>=13),l>=64&&(g+=7,l>>>=7),l>=8&&(g+=4,l>>>=4),l>=2&&(g+=2,l>>>=2),g+l},o.prototype._zeroBits=function(f){if(f===0)return 26;var l=f,g=0;return l&8191||(g+=13,l>>>=13),l&127||(g+=7,l>>>=7),l&15||(g+=4,l>>>=4),l&3||(g+=2,l>>>=2),l&1||g++,g},o.prototype.bitLength=function(){var f=this.words[this.length-1],l=this._countBits(f);return(this.length-1)*26+l};function M(b){for(var f=new Array(b.bitLength()),l=0;l>>m&1}return f}o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var f=0,l=0;lf.length?this.clone().ior(f):f.clone().ior(this)},o.prototype.uor=function(f){return this.length>f.length?this.clone().iuor(f):f.clone().iuor(this)},o.prototype.iuand=function(f){var l;this.length>f.length?l=f:l=this;for(var g=0;gf.length?this.clone().iand(f):f.clone().iand(this)},o.prototype.uand=function(f){return this.length>f.length?this.clone().iuand(f):f.clone().iuand(this)},o.prototype.iuxor=function(f){var l,g;this.length>f.length?(l=this,g=f):(l=f,g=this);for(var m=0;mf.length?this.clone().ixor(f):f.clone().ixor(this)},o.prototype.uxor=function(f){return this.length>f.length?this.clone().iuxor(f):f.clone().iuxor(this)},o.prototype.inotn=function(f){n(typeof f=="number"&&f>=0);var l=Math.ceil(f/26)|0,g=f%26;this._expand(l),g>0&&l--;for(var m=0;m0&&(this.words[m]=~this.words[m]&67108863>>26-g),this._strip()},o.prototype.notn=function(f){return this.clone().inotn(f)},o.prototype.setn=function(f,l){n(typeof f=="number"&&f>=0);var g=f/26|0,m=f%26;return this._expand(g+1),l?this.words[g]=this.words[g]|1<f.length?(g=this,m=f):(g=f,m=this);for(var E=0,I=0;I>>26;for(;E!==0&&I>>26;if(this.length=g.length,E!==0)this.words[this.length]=E,this.length++;else if(g!==this)for(;If.length?this.clone().iadd(f):f.clone().iadd(this)},o.prototype.isub=function(f){if(f.negative!==0){f.negative=0;var l=this.iadd(f);return f.negative=1,l._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(f),this.negative=1,this._normSign();var g=this.cmp(f);if(g===0)return this.negative=0,this.length=1,this.words[0]=0,this;var m,E;g>0?(m=this,E=f):(m=f,E=this);for(var I=0,T=0;T>26,this.words[T]=l&67108863;for(;I!==0&&T>26,this.words[T]=l&67108863;if(I===0&&T>>26,re=D&67108863,v=Math.min(h,f.length-1),$=Math.max(0,h-b.length+1);$<=v;$++){var Y=h-$|0;m=b.words[Y]|0,E=f.words[$]|0,I=m*E+re,k+=I/67108864|0,re=I&67108863}l.words[h]=re|0,D=k|0}return D!==0?l.words[h]=D|0:l.length--,l._strip()}var H=function(f,l,g){var m=f.words,E=l.words,I=g.words,T=0,D,h,k,re=m[0]|0,v=re&8191,$=re>>>13,Y=m[1]|0,J=Y&8191,te=Y>>>13,ue=m[2]|0,fe=ue&8191,oe=ue>>>13,Ie=m[3]|0,ce=Ie&8191,ge=Ie>>>13,mn=m[4]|0,He=mn&8191,Ke=mn>>>13,bn=m[5]|0,je=bn&8191,Fe=bn>>>13,It=m[6]|0,$e=It&8191,Ge=It>>>13,Vt=m[7]|0,qe=Vt&8191,A=Vt>>>13,d=m[8]|0,w=d&8191,_=d>>>13,F=m[9]|0,V=F&8191,W=F>>>13,Ae=E[0]|0,me=Ae&8191,we=Ae>>>13,Le=E[1]|0,pe=Le&8191,Ye=Le>>>13,vi=E[2]|0,Qe=vi&8191,Ze=vi>>>13,xi=E[3]|0,Xe=xi&8191,et=xi>>>13,Ai=E[4]|0,tt=Ai&8191,rt=Ai>>>13,Ei=E[5]|0,nt=Ei&8191,it=Ei>>>13,Si=E[6]|0,ot=Si&8191,st=Si>>>13,Bi=E[7]|0,at=Bi&8191,ct=Bi>>>13,Di=E[8]|0,ft=Di&8191,lt=Di>>>13,Ci=E[9]|0,ut=Ci&8191,ht=Ci>>>13;g.negative=f.negative^l.negative,g.length=19,D=Math.imul(v,me),h=Math.imul(v,we),h=h+Math.imul($,me)|0,k=Math.imul($,we);var zn=(T+D|0)+((h&8191)<<13)|0;T=(k+(h>>>13)|0)+(zn>>>26)|0,zn&=67108863,D=Math.imul(J,me),h=Math.imul(J,we),h=h+Math.imul(te,me)|0,k=Math.imul(te,we),D=D+Math.imul(v,pe)|0,h=h+Math.imul(v,Ye)|0,h=h+Math.imul($,pe)|0,k=k+Math.imul($,Ye)|0;var Kn=(T+D|0)+((h&8191)<<13)|0;T=(k+(h>>>13)|0)+(Kn>>>26)|0,Kn&=67108863,D=Math.imul(fe,me),h=Math.imul(fe,we),h=h+Math.imul(oe,me)|0,k=Math.imul(oe,we),D=D+Math.imul(J,pe)|0,h=h+Math.imul(J,Ye)|0,h=h+Math.imul(te,pe)|0,k=k+Math.imul(te,Ye)|0,D=D+Math.imul(v,Qe)|0,h=h+Math.imul(v,Ze)|0,h=h+Math.imul($,Qe)|0,k=k+Math.imul($,Ze)|0;var Gn=(T+D|0)+((h&8191)<<13)|0;T=(k+(h>>>13)|0)+(Gn>>>26)|0,Gn&=67108863,D=Math.imul(ce,me),h=Math.imul(ce,we),h=h+Math.imul(ge,me)|0,k=Math.imul(ge,we),D=D+Math.imul(fe,pe)|0,h=h+Math.imul(fe,Ye)|0,h=h+Math.imul(oe,pe)|0,k=k+Math.imul(oe,Ye)|0,D=D+Math.imul(J,Qe)|0,h=h+Math.imul(J,Ze)|0,h=h+Math.imul(te,Qe)|0,k=k+Math.imul(te,Ze)|0,D=D+Math.imul(v,Xe)|0,h=h+Math.imul(v,et)|0,h=h+Math.imul($,Xe)|0,k=k+Math.imul($,et)|0;var qn=(T+D|0)+((h&8191)<<13)|0;T=(k+(h>>>13)|0)+(qn>>>26)|0,qn&=67108863,D=Math.imul(He,me),h=Math.imul(He,we),h=h+Math.imul(Ke,me)|0,k=Math.imul(Ke,we),D=D+Math.imul(ce,pe)|0,h=h+Math.imul(ce,Ye)|0,h=h+Math.imul(ge,pe)|0,k=k+Math.imul(ge,Ye)|0,D=D+Math.imul(fe,Qe)|0,h=h+Math.imul(fe,Ze)|0,h=h+Math.imul(oe,Qe)|0,k=k+Math.imul(oe,Ze)|0,D=D+Math.imul(J,Xe)|0,h=h+Math.imul(J,et)|0,h=h+Math.imul(te,Xe)|0,k=k+Math.imul(te,et)|0,D=D+Math.imul(v,tt)|0,h=h+Math.imul(v,rt)|0,h=h+Math.imul($,tt)|0,k=k+Math.imul($,rt)|0;var Wn=(T+D|0)+((h&8191)<<13)|0;T=(k+(h>>>13)|0)+(Wn>>>26)|0,Wn&=67108863,D=Math.imul(je,me),h=Math.imul(je,we),h=h+Math.imul(Fe,me)|0,k=Math.imul(Fe,we),D=D+Math.imul(He,pe)|0,h=h+Math.imul(He,Ye)|0,h=h+Math.imul(Ke,pe)|0,k=k+Math.imul(Ke,Ye)|0,D=D+Math.imul(ce,Qe)|0,h=h+Math.imul(ce,Ze)|0,h=h+Math.imul(ge,Qe)|0,k=k+Math.imul(ge,Ze)|0,D=D+Math.imul(fe,Xe)|0,h=h+Math.imul(fe,et)|0,h=h+Math.imul(oe,Xe)|0,k=k+Math.imul(oe,et)|0,D=D+Math.imul(J,tt)|0,h=h+Math.imul(J,rt)|0,h=h+Math.imul(te,tt)|0,k=k+Math.imul(te,rt)|0,D=D+Math.imul(v,nt)|0,h=h+Math.imul(v,it)|0,h=h+Math.imul($,nt)|0,k=k+Math.imul($,it)|0;var kc=(T+D|0)+((h&8191)<<13)|0;T=(k+(h>>>13)|0)+(kc>>>26)|0,kc&=67108863,D=Math.imul($e,me),h=Math.imul($e,we),h=h+Math.imul(Ge,me)|0,k=Math.imul(Ge,we),D=D+Math.imul(je,pe)|0,h=h+Math.imul(je,Ye)|0,h=h+Math.imul(Fe,pe)|0,k=k+Math.imul(Fe,Ye)|0,D=D+Math.imul(He,Qe)|0,h=h+Math.imul(He,Ze)|0,h=h+Math.imul(Ke,Qe)|0,k=k+Math.imul(Ke,Ze)|0,D=D+Math.imul(ce,Xe)|0,h=h+Math.imul(ce,et)|0,h=h+Math.imul(ge,Xe)|0,k=k+Math.imul(ge,et)|0,D=D+Math.imul(fe,tt)|0,h=h+Math.imul(fe,rt)|0,h=h+Math.imul(oe,tt)|0,k=k+Math.imul(oe,rt)|0,D=D+Math.imul(J,nt)|0,h=h+Math.imul(J,it)|0,h=h+Math.imul(te,nt)|0,k=k+Math.imul(te,it)|0,D=D+Math.imul(v,ot)|0,h=h+Math.imul(v,st)|0,h=h+Math.imul($,ot)|0,k=k+Math.imul($,st)|0;var Tc=(T+D|0)+((h&8191)<<13)|0;T=(k+(h>>>13)|0)+(Tc>>>26)|0,Tc&=67108863,D=Math.imul(qe,me),h=Math.imul(qe,we),h=h+Math.imul(A,me)|0,k=Math.imul(A,we),D=D+Math.imul($e,pe)|0,h=h+Math.imul($e,Ye)|0,h=h+Math.imul(Ge,pe)|0,k=k+Math.imul(Ge,Ye)|0,D=D+Math.imul(je,Qe)|0,h=h+Math.imul(je,Ze)|0,h=h+Math.imul(Fe,Qe)|0,k=k+Math.imul(Fe,Ze)|0,D=D+Math.imul(He,Xe)|0,h=h+Math.imul(He,et)|0,h=h+Math.imul(Ke,Xe)|0,k=k+Math.imul(Ke,et)|0,D=D+Math.imul(ce,tt)|0,h=h+Math.imul(ce,rt)|0,h=h+Math.imul(ge,tt)|0,k=k+Math.imul(ge,rt)|0,D=D+Math.imul(fe,nt)|0,h=h+Math.imul(fe,it)|0,h=h+Math.imul(oe,nt)|0,k=k+Math.imul(oe,it)|0,D=D+Math.imul(J,ot)|0,h=h+Math.imul(J,st)|0,h=h+Math.imul(te,ot)|0,k=k+Math.imul(te,st)|0,D=D+Math.imul(v,at)|0,h=h+Math.imul(v,ct)|0,h=h+Math.imul($,at)|0,k=k+Math.imul($,ct)|0;var Nc=(T+D|0)+((h&8191)<<13)|0;T=(k+(h>>>13)|0)+(Nc>>>26)|0,Nc&=67108863,D=Math.imul(w,me),h=Math.imul(w,we),h=h+Math.imul(_,me)|0,k=Math.imul(_,we),D=D+Math.imul(qe,pe)|0,h=h+Math.imul(qe,Ye)|0,h=h+Math.imul(A,pe)|0,k=k+Math.imul(A,Ye)|0,D=D+Math.imul($e,Qe)|0,h=h+Math.imul($e,Ze)|0,h=h+Math.imul(Ge,Qe)|0,k=k+Math.imul(Ge,Ze)|0,D=D+Math.imul(je,Xe)|0,h=h+Math.imul(je,et)|0,h=h+Math.imul(Fe,Xe)|0,k=k+Math.imul(Fe,et)|0,D=D+Math.imul(He,tt)|0,h=h+Math.imul(He,rt)|0,h=h+Math.imul(Ke,tt)|0,k=k+Math.imul(Ke,rt)|0,D=D+Math.imul(ce,nt)|0,h=h+Math.imul(ce,it)|0,h=h+Math.imul(ge,nt)|0,k=k+Math.imul(ge,it)|0,D=D+Math.imul(fe,ot)|0,h=h+Math.imul(fe,st)|0,h=h+Math.imul(oe,ot)|0,k=k+Math.imul(oe,st)|0,D=D+Math.imul(J,at)|0,h=h+Math.imul(J,ct)|0,h=h+Math.imul(te,at)|0,k=k+Math.imul(te,ct)|0,D=D+Math.imul(v,ft)|0,h=h+Math.imul(v,lt)|0,h=h+Math.imul($,ft)|0,k=k+Math.imul($,lt)|0;var Rc=(T+D|0)+((h&8191)<<13)|0;T=(k+(h>>>13)|0)+(Rc>>>26)|0,Rc&=67108863,D=Math.imul(V,me),h=Math.imul(V,we),h=h+Math.imul(W,me)|0,k=Math.imul(W,we),D=D+Math.imul(w,pe)|0,h=h+Math.imul(w,Ye)|0,h=h+Math.imul(_,pe)|0,k=k+Math.imul(_,Ye)|0,D=D+Math.imul(qe,Qe)|0,h=h+Math.imul(qe,Ze)|0,h=h+Math.imul(A,Qe)|0,k=k+Math.imul(A,Ze)|0,D=D+Math.imul($e,Xe)|0,h=h+Math.imul($e,et)|0,h=h+Math.imul(Ge,Xe)|0,k=k+Math.imul(Ge,et)|0,D=D+Math.imul(je,tt)|0,h=h+Math.imul(je,rt)|0,h=h+Math.imul(Fe,tt)|0,k=k+Math.imul(Fe,rt)|0,D=D+Math.imul(He,nt)|0,h=h+Math.imul(He,it)|0,h=h+Math.imul(Ke,nt)|0,k=k+Math.imul(Ke,it)|0,D=D+Math.imul(ce,ot)|0,h=h+Math.imul(ce,st)|0,h=h+Math.imul(ge,ot)|0,k=k+Math.imul(ge,st)|0,D=D+Math.imul(fe,at)|0,h=h+Math.imul(fe,ct)|0,h=h+Math.imul(oe,at)|0,k=k+Math.imul(oe,ct)|0,D=D+Math.imul(J,ft)|0,h=h+Math.imul(J,lt)|0,h=h+Math.imul(te,ft)|0,k=k+Math.imul(te,lt)|0,D=D+Math.imul(v,ut)|0,h=h+Math.imul(v,ht)|0,h=h+Math.imul($,ut)|0,k=k+Math.imul($,ht)|0;var Uc=(T+D|0)+((h&8191)<<13)|0;T=(k+(h>>>13)|0)+(Uc>>>26)|0,Uc&=67108863,D=Math.imul(V,pe),h=Math.imul(V,Ye),h=h+Math.imul(W,pe)|0,k=Math.imul(W,Ye),D=D+Math.imul(w,Qe)|0,h=h+Math.imul(w,Ze)|0,h=h+Math.imul(_,Qe)|0,k=k+Math.imul(_,Ze)|0,D=D+Math.imul(qe,Xe)|0,h=h+Math.imul(qe,et)|0,h=h+Math.imul(A,Xe)|0,k=k+Math.imul(A,et)|0,D=D+Math.imul($e,tt)|0,h=h+Math.imul($e,rt)|0,h=h+Math.imul(Ge,tt)|0,k=k+Math.imul(Ge,rt)|0,D=D+Math.imul(je,nt)|0,h=h+Math.imul(je,it)|0,h=h+Math.imul(Fe,nt)|0,k=k+Math.imul(Fe,it)|0,D=D+Math.imul(He,ot)|0,h=h+Math.imul(He,st)|0,h=h+Math.imul(Ke,ot)|0,k=k+Math.imul(Ke,st)|0,D=D+Math.imul(ce,at)|0,h=h+Math.imul(ce,ct)|0,h=h+Math.imul(ge,at)|0,k=k+Math.imul(ge,ct)|0,D=D+Math.imul(fe,ft)|0,h=h+Math.imul(fe,lt)|0,h=h+Math.imul(oe,ft)|0,k=k+Math.imul(oe,lt)|0,D=D+Math.imul(J,ut)|0,h=h+Math.imul(J,ht)|0,h=h+Math.imul(te,ut)|0,k=k+Math.imul(te,ht)|0;var Oc=(T+D|0)+((h&8191)<<13)|0;T=(k+(h>>>13)|0)+(Oc>>>26)|0,Oc&=67108863,D=Math.imul(V,Qe),h=Math.imul(V,Ze),h=h+Math.imul(W,Qe)|0,k=Math.imul(W,Ze),D=D+Math.imul(w,Xe)|0,h=h+Math.imul(w,et)|0,h=h+Math.imul(_,Xe)|0,k=k+Math.imul(_,et)|0,D=D+Math.imul(qe,tt)|0,h=h+Math.imul(qe,rt)|0,h=h+Math.imul(A,tt)|0,k=k+Math.imul(A,rt)|0,D=D+Math.imul($e,nt)|0,h=h+Math.imul($e,it)|0,h=h+Math.imul(Ge,nt)|0,k=k+Math.imul(Ge,it)|0,D=D+Math.imul(je,ot)|0,h=h+Math.imul(je,st)|0,h=h+Math.imul(Fe,ot)|0,k=k+Math.imul(Fe,st)|0,D=D+Math.imul(He,at)|0,h=h+Math.imul(He,ct)|0,h=h+Math.imul(Ke,at)|0,k=k+Math.imul(Ke,ct)|0,D=D+Math.imul(ce,ft)|0,h=h+Math.imul(ce,lt)|0,h=h+Math.imul(ge,ft)|0,k=k+Math.imul(ge,lt)|0,D=D+Math.imul(fe,ut)|0,h=h+Math.imul(fe,ht)|0,h=h+Math.imul(oe,ut)|0,k=k+Math.imul(oe,ht)|0;var Pc=(T+D|0)+((h&8191)<<13)|0;T=(k+(h>>>13)|0)+(Pc>>>26)|0,Pc&=67108863,D=Math.imul(V,Xe),h=Math.imul(V,et),h=h+Math.imul(W,Xe)|0,k=Math.imul(W,et),D=D+Math.imul(w,tt)|0,h=h+Math.imul(w,rt)|0,h=h+Math.imul(_,tt)|0,k=k+Math.imul(_,rt)|0,D=D+Math.imul(qe,nt)|0,h=h+Math.imul(qe,it)|0,h=h+Math.imul(A,nt)|0,k=k+Math.imul(A,it)|0,D=D+Math.imul($e,ot)|0,h=h+Math.imul($e,st)|0,h=h+Math.imul(Ge,ot)|0,k=k+Math.imul(Ge,st)|0,D=D+Math.imul(je,at)|0,h=h+Math.imul(je,ct)|0,h=h+Math.imul(Fe,at)|0,k=k+Math.imul(Fe,ct)|0,D=D+Math.imul(He,ft)|0,h=h+Math.imul(He,lt)|0,h=h+Math.imul(Ke,ft)|0,k=k+Math.imul(Ke,lt)|0,D=D+Math.imul(ce,ut)|0,h=h+Math.imul(ce,ht)|0,h=h+Math.imul(ge,ut)|0,k=k+Math.imul(ge,ht)|0;var Fc=(T+D|0)+((h&8191)<<13)|0;T=(k+(h>>>13)|0)+(Fc>>>26)|0,Fc&=67108863,D=Math.imul(V,tt),h=Math.imul(V,rt),h=h+Math.imul(W,tt)|0,k=Math.imul(W,rt),D=D+Math.imul(w,nt)|0,h=h+Math.imul(w,it)|0,h=h+Math.imul(_,nt)|0,k=k+Math.imul(_,it)|0,D=D+Math.imul(qe,ot)|0,h=h+Math.imul(qe,st)|0,h=h+Math.imul(A,ot)|0,k=k+Math.imul(A,st)|0,D=D+Math.imul($e,at)|0,h=h+Math.imul($e,ct)|0,h=h+Math.imul(Ge,at)|0,k=k+Math.imul(Ge,ct)|0,D=D+Math.imul(je,ft)|0,h=h+Math.imul(je,lt)|0,h=h+Math.imul(Fe,ft)|0,k=k+Math.imul(Fe,lt)|0,D=D+Math.imul(He,ut)|0,h=h+Math.imul(He,ht)|0,h=h+Math.imul(Ke,ut)|0,k=k+Math.imul(Ke,ht)|0;var Lc=(T+D|0)+((h&8191)<<13)|0;T=(k+(h>>>13)|0)+(Lc>>>26)|0,Lc&=67108863,D=Math.imul(V,nt),h=Math.imul(V,it),h=h+Math.imul(W,nt)|0,k=Math.imul(W,it),D=D+Math.imul(w,ot)|0,h=h+Math.imul(w,st)|0,h=h+Math.imul(_,ot)|0,k=k+Math.imul(_,st)|0,D=D+Math.imul(qe,at)|0,h=h+Math.imul(qe,ct)|0,h=h+Math.imul(A,at)|0,k=k+Math.imul(A,ct)|0,D=D+Math.imul($e,ft)|0,h=h+Math.imul($e,lt)|0,h=h+Math.imul(Ge,ft)|0,k=k+Math.imul(Ge,lt)|0,D=D+Math.imul(je,ut)|0,h=h+Math.imul(je,ht)|0,h=h+Math.imul(Fe,ut)|0,k=k+Math.imul(Fe,ht)|0;var Hc=(T+D|0)+((h&8191)<<13)|0;T=(k+(h>>>13)|0)+(Hc>>>26)|0,Hc&=67108863,D=Math.imul(V,ot),h=Math.imul(V,st),h=h+Math.imul(W,ot)|0,k=Math.imul(W,st),D=D+Math.imul(w,at)|0,h=h+Math.imul(w,ct)|0,h=h+Math.imul(_,at)|0,k=k+Math.imul(_,ct)|0,D=D+Math.imul(qe,ft)|0,h=h+Math.imul(qe,lt)|0,h=h+Math.imul(A,ft)|0,k=k+Math.imul(A,lt)|0,D=D+Math.imul($e,ut)|0,h=h+Math.imul($e,ht)|0,h=h+Math.imul(Ge,ut)|0,k=k+Math.imul(Ge,ht)|0;var $c=(T+D|0)+((h&8191)<<13)|0;T=(k+(h>>>13)|0)+($c>>>26)|0,$c&=67108863,D=Math.imul(V,at),h=Math.imul(V,ct),h=h+Math.imul(W,at)|0,k=Math.imul(W,ct),D=D+Math.imul(w,ft)|0,h=h+Math.imul(w,lt)|0,h=h+Math.imul(_,ft)|0,k=k+Math.imul(_,lt)|0,D=D+Math.imul(qe,ut)|0,h=h+Math.imul(qe,ht)|0,h=h+Math.imul(A,ut)|0,k=k+Math.imul(A,ht)|0;var Vc=(T+D|0)+((h&8191)<<13)|0;T=(k+(h>>>13)|0)+(Vc>>>26)|0,Vc&=67108863,D=Math.imul(V,ft),h=Math.imul(V,lt),h=h+Math.imul(W,ft)|0,k=Math.imul(W,lt),D=D+Math.imul(w,ut)|0,h=h+Math.imul(w,ht)|0,h=h+Math.imul(_,ut)|0,k=k+Math.imul(_,ht)|0;var jc=(T+D|0)+((h&8191)<<13)|0;T=(k+(h>>>13)|0)+(jc>>>26)|0,jc&=67108863,D=Math.imul(V,ut),h=Math.imul(V,ht),h=h+Math.imul(W,ut)|0,k=Math.imul(W,ht);var zc=(T+D|0)+((h&8191)<<13)|0;return T=(k+(h>>>13)|0)+(zc>>>26)|0,zc&=67108863,I[0]=zn,I[1]=Kn,I[2]=Gn,I[3]=qn,I[4]=Wn,I[5]=kc,I[6]=Tc,I[7]=Nc,I[8]=Rc,I[9]=Uc,I[10]=Oc,I[11]=Pc,I[12]=Fc,I[13]=Lc,I[14]=Hc,I[15]=$c,I[16]=Vc,I[17]=jc,I[18]=zc,T!==0&&(I[19]=T,g.length++),g};Math.imul||(H=N);function L(b,f,l){l.negative=f.negative^b.negative,l.length=b.length+f.length;for(var g=0,m=0,E=0;E>>26)|0,m+=I>>>26,I&=67108863}l.words[E]=T,g=I,I=m}return g!==0?l.words[E]=g:l.length--,l._strip()}function G(b,f,l){return L(b,f,l)}o.prototype.mulTo=function(f,l){var g,m=this.length+f.length;return this.length===10&&f.length===10?g=H(this,f,l):m<63?g=N(this,f,l):m<1024?g=L(this,f,l):g=G(this,f,l),g},o.prototype.mul=function(f){var l=new o(null);return l.words=new Array(this.length+f.length),this.mulTo(f,l)},o.prototype.mulf=function(f){var l=new o(null);return l.words=new Array(this.length+f.length),G(this,f,l)},o.prototype.imul=function(f){return this.clone().mulTo(f,this)},o.prototype.imuln=function(f){var l=f<0;l&&(f=-f),n(typeof f=="number"),n(f<67108864);for(var g=0,m=0;m>=26,g+=E/67108864|0,g+=I>>>26,this.words[m]=I&67108863}return g!==0&&(this.words[m]=g,this.length++),l?this.ineg():this},o.prototype.muln=function(f){return this.clone().imuln(f)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(f){var l=M(f);if(l.length===0)return new o(1);for(var g=this,m=0;m=0);var l=f%26,g=(f-l)/26,m=67108863>>>26-l<<26-l,E;if(l!==0){var I=0;for(E=0;E>>26-l}I&&(this.words[E]=I,this.length++)}if(g!==0){for(E=this.length-1;E>=0;E--)this.words[E+g]=this.words[E];for(E=0;E=0);var m;l?m=(l-l%26)/26:m=0;var E=f%26,I=Math.min((f-E)/26,this.length),T=67108863^67108863>>>E<I)for(this.length-=I,h=0;h=0&&(k!==0||h>=m);h--){var re=this.words[h]|0;this.words[h]=k<<26-E|re>>>E,k=re&T}return D&&k!==0&&(D.words[D.length++]=k),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(f,l,g){return n(this.negative===0),this.iushrn(f,l,g)},o.prototype.shln=function(f){return this.clone().ishln(f)},o.prototype.ushln=function(f){return this.clone().iushln(f)},o.prototype.shrn=function(f){return this.clone().ishrn(f)},o.prototype.ushrn=function(f){return this.clone().iushrn(f)},o.prototype.testn=function(f){n(typeof f=="number"&&f>=0);var l=f%26,g=(f-l)/26,m=1<=0);var l=f%26,g=(f-l)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=g)return this;if(l!==0&&g++,this.length=Math.min(g,this.length),l!==0){var m=67108863^67108863>>>l<=67108864;l++)this.words[l]-=67108864,l===this.length-1?this.words[l+1]=1:this.words[l+1]++;return this.length=Math.max(this.length,l+1),this},o.prototype.isubn=function(f){if(n(typeof f=="number"),n(f<67108864),f<0)return this.iaddn(-f);if(this.negative!==0)return this.negative=0,this.iaddn(f),this.negative=1,this;if(this.words[0]-=f,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var l=0;l>26)-(D/67108864|0),this.words[E+g]=I&67108863}for(;E>26,this.words[E+g]=I&67108863;if(T===0)return this._strip();for(n(T===-1),T=0,E=0;E>26,this.words[E]=I&67108863;return this.negative=1,this._strip()},o.prototype._wordDiv=function(f,l){var g=this.length-f.length,m=this.clone(),E=f,I=E.words[E.length-1]|0,T=this._countBits(I);g=26-T,g!==0&&(E=E.ushln(g),m.iushln(g),I=E.words[E.length-1]|0);var D=m.length-E.length,h;if(l!=="mod"){h=new o(null),h.length=D+1,h.words=new Array(h.length);for(var k=0;k=0;v--){var $=(m.words[E.length+v]|0)*67108864+(m.words[E.length+v-1]|0);for($=Math.min($/I|0,67108863),m._ishlnsubmul(E,$,v);m.negative!==0;)$--,m.negative=0,m._ishlnsubmul(E,1,v),m.isZero()||(m.negative^=1);h&&(h.words[v]=$)}return h&&h._strip(),m._strip(),l!=="div"&&g!==0&&m.iushrn(g),{div:h||null,mod:m}},o.prototype.divmod=function(f,l,g){if(n(!f.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var m,E,I;return this.negative!==0&&f.negative===0?(I=this.neg().divmod(f,l),l!=="mod"&&(m=I.div.neg()),l!=="div"&&(E=I.mod.neg(),g&&E.negative!==0&&E.iadd(f)),{div:m,mod:E}):this.negative===0&&f.negative!==0?(I=this.divmod(f.neg(),l),l!=="mod"&&(m=I.div.neg()),{div:m,mod:I.mod}):this.negative&f.negative?(I=this.neg().divmod(f.neg(),l),l!=="div"&&(E=I.mod.neg(),g&&E.negative!==0&&E.isub(f)),{div:I.div,mod:E}):f.length>this.length||this.cmp(f)<0?{div:new o(0),mod:this}:f.length===1?l==="div"?{div:this.divn(f.words[0]),mod:null}:l==="mod"?{div:null,mod:new o(this.modrn(f.words[0]))}:{div:this.divn(f.words[0]),mod:new o(this.modrn(f.words[0]))}:this._wordDiv(f,l)},o.prototype.div=function(f){return this.divmod(f,"div",!1).div},o.prototype.mod=function(f){return this.divmod(f,"mod",!1).mod},o.prototype.umod=function(f){return this.divmod(f,"mod",!0).mod},o.prototype.divRound=function(f){var l=this.divmod(f);if(l.mod.isZero())return l.div;var g=l.div.negative!==0?l.mod.isub(f):l.mod,m=f.ushrn(1),E=f.andln(1),I=g.cmp(m);return I<0||E===1&&I===0?l.div:l.div.negative!==0?l.div.isubn(1):l.div.iaddn(1)},o.prototype.modrn=function(f){var l=f<0;l&&(f=-f),n(f<=67108863);for(var g=(1<<26)%f,m=0,E=this.length-1;E>=0;E--)m=(g*m+(this.words[E]|0))%f;return l?-m:m},o.prototype.modn=function(f){return this.modrn(f)},o.prototype.idivn=function(f){var l=f<0;l&&(f=-f),n(f<=67108863);for(var g=0,m=this.length-1;m>=0;m--){var E=(this.words[m]|0)+g*67108864;this.words[m]=E/f|0,g=E%f}return this._strip(),l?this.ineg():this},o.prototype.divn=function(f){return this.clone().idivn(f)},o.prototype.egcd=function(f){n(f.negative===0),n(!f.isZero());var l=this,g=f.clone();l.negative!==0?l=l.umod(f):l=l.clone();for(var m=new o(1),E=new o(0),I=new o(0),T=new o(1),D=0;l.isEven()&&g.isEven();)l.iushrn(1),g.iushrn(1),++D;for(var h=g.clone(),k=l.clone();!l.isZero();){for(var re=0,v=1;!(l.words[0]&v)&&re<26;++re,v<<=1);if(re>0)for(l.iushrn(re);re-- >0;)(m.isOdd()||E.isOdd())&&(m.iadd(h),E.isub(k)),m.iushrn(1),E.iushrn(1);for(var $=0,Y=1;!(g.words[0]&Y)&&$<26;++$,Y<<=1);if($>0)for(g.iushrn($);$-- >0;)(I.isOdd()||T.isOdd())&&(I.iadd(h),T.isub(k)),I.iushrn(1),T.iushrn(1);l.cmp(g)>=0?(l.isub(g),m.isub(I),E.isub(T)):(g.isub(l),I.isub(m),T.isub(E))}return{a:I,b:T,gcd:g.iushln(D)}},o.prototype._invmp=function(f){n(f.negative===0),n(!f.isZero());var l=this,g=f.clone();l.negative!==0?l=l.umod(f):l=l.clone();for(var m=new o(1),E=new o(0),I=g.clone();l.cmpn(1)>0&&g.cmpn(1)>0;){for(var T=0,D=1;!(l.words[0]&D)&&T<26;++T,D<<=1);if(T>0)for(l.iushrn(T);T-- >0;)m.isOdd()&&m.iadd(I),m.iushrn(1);for(var h=0,k=1;!(g.words[0]&k)&&h<26;++h,k<<=1);if(h>0)for(g.iushrn(h);h-- >0;)E.isOdd()&&E.iadd(I),E.iushrn(1);l.cmp(g)>=0?(l.isub(g),m.isub(E)):(g.isub(l),E.isub(m))}var re;return l.cmpn(1)===0?re=m:re=E,re.cmpn(0)<0&&re.iadd(f),re},o.prototype.gcd=function(f){if(this.isZero())return f.abs();if(f.isZero())return this.abs();var l=this.clone(),g=f.clone();l.negative=0,g.negative=0;for(var m=0;l.isEven()&&g.isEven();m++)l.iushrn(1),g.iushrn(1);do{for(;l.isEven();)l.iushrn(1);for(;g.isEven();)g.iushrn(1);var E=l.cmp(g);if(E<0){var I=l;l=g,g=I}else if(E===0||g.cmpn(1)===0)break;l.isub(g)}while(!0);return g.iushln(m)},o.prototype.invm=function(f){return this.egcd(f).a.umod(f)},o.prototype.isEven=function(){return(this.words[0]&1)===0},o.prototype.isOdd=function(){return(this.words[0]&1)===1},o.prototype.andln=function(f){return this.words[0]&f},o.prototype.bincn=function(f){n(typeof f=="number");var l=f%26,g=(f-l)/26,m=1<>>26,T&=67108863,this.words[I]=T}return E!==0&&(this.words[I]=E,this.length++),this},o.prototype.isZero=function(){return this.length===1&&this.words[0]===0},o.prototype.cmpn=function(f){var l=f<0;if(this.negative!==0&&!l)return-1;if(this.negative===0&&l)return 1;this._strip();var g;if(this.length>1)g=1;else{l&&(f=-f),n(f<=67108863,"Number is too big");var m=this.words[0]|0;g=m===f?0:mf.length)return 1;if(this.length=0;g--){var m=this.words[g]|0,E=f.words[g]|0;if(m!==E){mE&&(l=1);break}}return l},o.prototype.gtn=function(f){return this.cmpn(f)===1},o.prototype.gt=function(f){return this.cmp(f)===1},o.prototype.gten=function(f){return this.cmpn(f)>=0},o.prototype.gte=function(f){return this.cmp(f)>=0},o.prototype.ltn=function(f){return this.cmpn(f)===-1},o.prototype.lt=function(f){return this.cmp(f)===-1},o.prototype.lten=function(f){return this.cmpn(f)<=0},o.prototype.lte=function(f){return this.cmp(f)<=0},o.prototype.eqn=function(f){return this.cmpn(f)===0},o.prototype.eq=function(f){return this.cmp(f)===0},o.red=function(f){return new ne(f)},o.prototype.toRed=function(f){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),f.convertTo(this)._forceRed(f)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(f){return this.red=f,this},o.prototype.forceRed=function(f){return n(!this.red,"Already a number in reduction context"),this._forceRed(f)},o.prototype.redAdd=function(f){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,f)},o.prototype.redIAdd=function(f){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,f)},o.prototype.redSub=function(f){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,f)},o.prototype.redISub=function(f){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,f)},o.prototype.redShl=function(f){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,f)},o.prototype.redMul=function(f){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.mul(this,f)},o.prototype.redIMul=function(f){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.imul(this,f)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(f){return n(this.red&&!f.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,f)};var K={k256:null,p224:null,p192:null,p25519:null};function q(b,f){this.name=b,this.p=new o(f,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}q.prototype._tmp=function(){var f=new o(null);return f.words=new Array(Math.ceil(this.n/13)),f},q.prototype.ireduce=function(f){var l=f,g;do this.split(l,this.tmp),l=this.imulK(l),l=l.iadd(this.tmp),g=l.bitLength();while(g>this.n);var m=g0?l.isub(this.p):l.strip!==void 0?l.strip():l._strip(),l},q.prototype.split=function(f,l){f.iushrn(this.n,0,l)},q.prototype.imulK=function(f){return f.imul(this.k)};function Q(){q.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(Q,q),Q.prototype.split=function(f,l){for(var g=4194303,m=Math.min(f.length,9),E=0;E>>22,I=T}I>>>=22,f.words[E-10]=I,I===0&&f.length>10?f.length-=10:f.length-=9},Q.prototype.imulK=function(f){f.words[f.length]=0,f.words[f.length+1]=0,f.length+=2;for(var l=0,g=0;g>>=26,f.words[g]=E,l=m}return l!==0&&(f.words[f.length++]=l),f},o._prime=function(f){if(K[f])return K[f];var l;if(f==="k256")l=new Q;else if(f==="p224")l=new Z;else if(f==="p192")l=new ee;else if(f==="p25519")l=new se;else throw new Error("Unknown prime "+f);return K[f]=l,l};function ne(b){if(typeof b=="string"){var f=o._prime(b);this.m=f.p,this.prime=f}else n(b.gtn(1),"modulus must be greater than 1"),this.m=b,this.prime=null}ne.prototype._verify1=function(f){n(f.negative===0,"red works only with positives"),n(f.red,"red works only with red numbers")},ne.prototype._verify2=function(f,l){n((f.negative|l.negative)===0,"red works only with positives"),n(f.red&&f.red===l.red,"red works only with red numbers")},ne.prototype.imod=function(f){return this.prime?this.prime.ireduce(f)._forceRed(this):(y(f,f.umod(this.m)._forceRed(this)),f)},ne.prototype.neg=function(f){return f.isZero()?f.clone():this.m.sub(f)._forceRed(this)},ne.prototype.add=function(f,l){this._verify2(f,l);var g=f.add(l);return g.cmp(this.m)>=0&&g.isub(this.m),g._forceRed(this)},ne.prototype.iadd=function(f,l){this._verify2(f,l);var g=f.iadd(l);return g.cmp(this.m)>=0&&g.isub(this.m),g},ne.prototype.sub=function(f,l){this._verify2(f,l);var g=f.sub(l);return g.cmpn(0)<0&&g.iadd(this.m),g._forceRed(this)},ne.prototype.isub=function(f,l){this._verify2(f,l);var g=f.isub(l);return g.cmpn(0)<0&&g.iadd(this.m),g},ne.prototype.shl=function(f,l){return this._verify1(f),this.imod(f.ushln(l))},ne.prototype.imul=function(f,l){return this._verify2(f,l),this.imod(f.imul(l))},ne.prototype.mul=function(f,l){return this._verify2(f,l),this.imod(f.mul(l))},ne.prototype.isqr=function(f){return this.imul(f,f.clone())},ne.prototype.sqr=function(f){return this.mul(f,f)},ne.prototype.sqrt=function(f){if(f.isZero())return f.clone();var l=this.m.andln(3);if(n(l%2===1),l===3){var g=this.m.add(new o(1)).iushrn(2);return this.pow(f,g)}for(var m=this.m.subn(1),E=0;!m.isZero()&&m.andln(1)===0;)E++,m.iushrn(1);n(!m.isZero());var I=new o(1).toRed(this),T=I.redNeg(),D=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);this.pow(h,D).cmp(T)!==0;)h.redIAdd(T);for(var k=this.pow(h,m),re=this.pow(f,m.addn(1).iushrn(1)),v=this.pow(f,m),$=E;v.cmp(I)!==0;){for(var Y=v,J=0;Y.cmp(I)!==0;J++)Y=Y.redSqr();n(J<$);var te=this.pow(k,new o(1).iushln($-J-1));re=re.redMul(te),k=te.redSqr(),v=v.redMul(k),$=J}return re},ne.prototype.invm=function(f){var l=f._invmp(this.m);return l.negative!==0?(l.negative=0,this.imod(l).redNeg()):this.imod(l)},ne.prototype.pow=function(f,l){if(l.isZero())return new o(1).toRed(this);if(l.cmpn(1)===0)return f.clone();var g=4,m=new Array(1<=0;E--){for(var k=l.words[E],re=h-1;re>=0;re--){var v=k>>re&1;if(I!==m[0]&&(I=this.sqr(I)),v===0&&T===0){D=0;continue}T<<=1,T|=v,D++,!(D!==g&&(E!==0||re!==0))&&(I=this.mul(I,m[T]),D=0,T=0)}h=26}return I},ne.prototype.convertTo=function(f){var l=f.umod(this.m);return l===f?l.clone():l},ne.prototype.convertFrom=function(f){var l=f.clone();return l.red=null,l},o.mont=function(f){return new ie(f)};function ie(b){ne.call(this,b),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(ie,ne),ie.prototype.convertTo=function(f){return this.imod(f.ushln(this.shift))},ie.prototype.convertFrom=function(f){var l=this.imod(f.mul(this.rinv));return l.red=null,l},ie.prototype.imul=function(f,l){if(f.isZero()||l.isZero())return f.words[0]=0,f.length=1,f;var g=f.imul(l),m=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=g.isub(m).iushrn(this.shift),I=E;return E.cmp(this.m)>=0?I=E.isub(this.m):E.cmpn(0)<0&&(I=E.iadd(this.m)),I._forceRed(this)},ie.prototype.mul=function(f,l){if(f.isZero()||l.isZero())return new o(0)._forceRed(this);var g=f.mul(l),m=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=g.isub(m).iushrn(this.shift),I=E;return E.cmp(this.m)>=0?I=E.isub(this.m):E.cmpn(0)<0&&(I=E.iadd(this.m)),I._forceRed(this)},ie.prototype.invm=function(f){var l=this.imod(f._invmp(this.m).mul(this.r2));return l._forceRed(this)}})(t,ao)})(iu);var wm=iu.exports;const ve=Fa(wm),mm="bignumber/5.8.0";var ca=ve.BN;const En=new Re(mm),Zc={},bm=9007199254740991;let Ah=!1;class Yt{constructor(e,r){e!==Zc&&En.throwError("cannot call constructor directly; use BigNumber.from",Re.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return tr(Me(this).fromTwos(e))}toTwos(e){return tr(Me(this).toTwos(e))}abs(){return this._hex[0]==="-"?Yt.from(this._hex.substring(1)):this}add(e){return tr(Me(this).add(Me(e)))}sub(e){return tr(Me(this).sub(Me(e)))}div(e){return Yt.from(e).isZero()&&mr("division-by-zero","div"),tr(Me(this).div(Me(e)))}mul(e){return tr(Me(this).mul(Me(e)))}mod(e){const r=Me(e);return r.isNeg()&&mr("division-by-zero","mod"),tr(Me(this).umod(r))}pow(e){const r=Me(e);return r.isNeg()&&mr("negative-power","pow"),tr(Me(this).pow(r))}and(e){const r=Me(e);return(this.isNegative()||r.isNeg())&&mr("unbound-bitwise-result","and"),tr(Me(this).and(r))}or(e){const r=Me(e);return(this.isNegative()||r.isNeg())&&mr("unbound-bitwise-result","or"),tr(Me(this).or(r))}xor(e){const r=Me(e);return(this.isNegative()||r.isNeg())&&mr("unbound-bitwise-result","xor"),tr(Me(this).xor(r))}mask(e){return(this.isNegative()||e<0)&&mr("negative-width","mask"),tr(Me(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&mr("negative-width","shl"),tr(Me(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&mr("negative-width","shr"),tr(Me(this).shrn(e))}eq(e){return Me(this).eq(Me(e))}lt(e){return Me(this).lt(Me(e))}lte(e){return Me(this).lte(Me(e))}gt(e){return Me(this).gt(Me(e))}gte(e){return Me(this).gte(Me(e))}isNegative(){return this._hex[0]==="-"}isZero(){return Me(this).isZero()}toNumber(){try{return Me(this).toNumber()}catch{mr("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return En.throwError("this platform does not support BigInt",Re.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?Ah||(Ah=!0,En.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?En.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",Re.errors.UNEXPECTED_ARGUMENT,{}):En.throwError("BigNumber.toString does not accept parameters",Re.errors.UNEXPECTED_ARGUMENT,{})),Me(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof Yt)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new Yt(Zc,ss(e)):e.match(/^-?[0-9]+$/)?new Yt(Zc,ss(new ca(e))):En.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&mr("underflow","BigNumber.from",e),(e>=bm||e<=-9007199254740991)&&mr("overflow","BigNumber.from",e),Yt.from(String(e));const r=e;if(typeof r=="bigint")return Yt.from(r.toString());if(Ha(r))return Yt.from(We(r));if(r)if(r.toHexString){const n=r.toHexString();if(typeof n=="string")return Yt.from(n)}else{let n=r._hex;if(n==null&&r.type==="BigNumber"&&(n=r.hex),typeof n=="string"&&(Sr(n)||n[0]==="-"&&Sr(n.substring(1))))return Yt.from(n)}return En.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function ss(t){if(typeof t!="string")return ss(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&En.throwArgumentError("invalid hex","value",t),t=ss(t),t==="0x00"?t:"-"+t;if(t.substring(0,2)!=="0x"&&(t="0x"+t),t==="0x")return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&t.substring(0,4)==="0x00";)t="0x"+t.substring(4);return t}function tr(t){return Yt.from(ss(t))}function Me(t){const e=Yt.from(t).toHexString();return e[0]==="-"?new ca("-"+e.substring(3),16):new ca(e.substring(2),16)}function mr(t,e,r){const n={fault:t,operation:e};return r!=null&&(n.value=r),En.throwError(t,Re.errors.NUMERIC_FAULT,n)}function vm(t){return new ca(t,36).toString(16)}const xm="strings/5.8.0",Am=new Re(xm);var mo;(function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD"})(mo||(mo={}));var Eh;(function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation"})(Eh||(Eh={}));function fa(t,e=mo.current){e!=mo.current&&(Am.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(i&63|128);else if((i&64512)==55296){n++;const o=t.charCodeAt(n);if(n>=t.length||(o&64512)!==56320)throw new Error("invalid utf-8 string");const s=65536+((i&1023)<<10)+(o&1023);r.push(s>>18|240),r.push(s>>12&63|128),r.push(s>>6&63|128),r.push(s&63|128)}else r.push(i>>12|224),r.push(i>>6&63|128),r.push(i&63|128)}return ke(r)}var d0={},Te={},Es=p0;function p0(t,e){if(!t)throw new Error(e||"Assertion failed")}p0.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)};var Tf={exports:{}};typeof Object.create=="function"?Tf.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Tf.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}};var Em=Tf.exports,Sm=Es,Bm=Em;Te.inherits=Bm;function Dm(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function Cm(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t=="string")if(e){if(e==="hex")for(t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t),i=0;i>6|192,r[n++]=o&63|128):Dm(t,i)?(o=65536+((o&1023)<<10)+(t.charCodeAt(++i)&1023),r[n++]=o>>18|240,r[n++]=o>>12&63|128,r[n++]=o>>6&63|128,r[n++]=o&63|128):(r[n++]=o>>12|224,r[n++]=o>>6&63|128,r[n++]=o&63|128)}else for(i=0;i>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}Te.htonl=g0;function Mm(t,e){for(var r="",n=0;n>>0}return o}Te.join32=_m;function km(t,e){for(var r=new Array(t.length*4),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=o&255):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=o&255)}return r}Te.split32=km;function Tm(t,e){return t>>>e|t<<32-e}Te.rotr32=Tm;function Nm(t,e){return t<>>32-e}Te.rotl32=Nm;function Rm(t,e){return t+e>>>0}Te.sum32=Rm;function Um(t,e,r){return t+e+r>>>0}Te.sum32_3=Um;function Om(t,e,r,n){return t+e+r+n>>>0}Te.sum32_4=Om;function Pm(t,e,r,n,i){return t+e+r+n+i>>>0}Te.sum32_5=Pm;function Fm(t,e,r,n){var i=t[e],o=t[e+1],s=n+o>>>0,a=(s>>0,t[e+1]=s}Te.sum64=Fm;function Lm(t,e,r,n){var i=e+n>>>0,o=(i>>0}Te.sum64_hi=Lm;function Hm(t,e,r,n){var i=e+n;return i>>>0}Te.sum64_lo=Hm;function $m(t,e,r,n,i,o,s,a){var c=0,u=e;u=u+n>>>0,c+=u>>0,c+=u>>0,c+=u>>0}Te.sum64_4_hi=$m;function Vm(t,e,r,n,i,o,s,a){var c=e+n+o+a;return c>>>0}Te.sum64_4_lo=Vm;function jm(t,e,r,n,i,o,s,a,c,u){var y=0,p=e;p=p+n>>>0,y+=p>>0,y+=p>>0,y+=p>>0,y+=p>>0}Te.sum64_5_hi=jm;function zm(t,e,r,n,i,o,s,a,c,u){var y=e+n+o+a+u;return y>>>0}Te.sum64_5_lo=zm;function Km(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}Te.rotr64_hi=Km;function Gm(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Te.rotr64_lo=Gm;function qm(t,e,r){return t>>>r}Te.shr64_hi=qm;function Wm(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Te.shr64_lo=Wm;var Ro={},Sh=Te,Jm=Es;function $a(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}Ro.BlockHash=$a;$a.prototype.update=function(e,r){if(e=Sh.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=Sh.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,i[o++]=e>>>16&255,i[o++]=e>>>8&255,i[o++]=e&255}else for(i[o++]=e&255,i[o++]=e>>>8&255,i[o++]=e>>>16&255,i[o++]=e>>>24&255,i[o++]=0,i[o++]=0,i[o++]=0,i[o++]=0,s=8;s>>3}gn.g0_256=eb;function tb(t){return sn(t,17)^sn(t,19)^t>>>10}gn.g1_256=tb;var bo=Te,rb=Ro,nb=gn,Xc=bo.rotl32,zo=bo.sum32,ib=bo.sum32_5,ob=nb.ft_1,x0=rb.BlockHash,sb=[1518500249,1859775393,2400959708,3395469782];function ln(){if(!(this instanceof ln))return new ln;x0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}bo.inherits(ln,x0);var ab=ln;ln.blockSize=512;ln.outSize=160;ln.hmacStrength=80;ln.padLength=64;ln.prototype._update=function(e,r){for(var n=this.W,i=0;i<16;i++)n[i]=e[r+i];for(;ithis.blockSize&&(e=new this.Hash().update(e).digest()),Wb(e.length<=this.blockSize);for(var r=e.length;r>24&255,c[e.length+1]=p>>16&255,c[e.length+2]=p>>8&255,c[e.length+3]=p&255;let x=ke(la(i,t,c));o||(o=x.length,y=new Uint8Array(o),s=Math.ceil(n/o),u=n-(s-1)*o),y.set(x);for(let B=1;B>8,x=y&255;p?c.push(p,x):c.push(x)}return c}r.toArray=n;function i(s){return s.length===1?"0"+s:s}r.zero2=i;function o(s){for(var a="",c=0;c(S>>1)-1?B=(S>>1)-M:B=M,C.isubn(B)):B=0,p[x]=B,C.iushrn(1)}return p}r.getNAF=n;function i(c,u){var y=[[],[]];c=c.clone(),u=u.clone();for(var p=0,x=0,S;c.cmpn(-p)>0||u.cmpn(-x)>0;){var C=c.andln(3)+p&3,B=u.andln(3)+x&3;C===3&&(C=-1),B===3&&(B=-1);var M;C&1?(S=c.andln(7)+p&7,(S===3||S===5)&&B===2?M=-C:M=C):M=0,y[0].push(M);var N;B&1?(S=u.andln(7)+x&7,(S===3||S===5)&&C===2?N=-B:N=B):N=0,y[1].push(N),2*p===M+1&&(p=1-p),2*x===N+1&&(x=1-x),c.iushrn(1),u.iushrn(1)}return y}r.getJSF=i;function o(c,u,y){var p="_"+u;c.prototype[u]=function(){return this[p]!==void 0?this[p]:this[p]=y.call(this)}}r.cachedProperty=o;function s(c){return typeof c=="string"?r.toArray(c,"hex"):c}r.parseBytes=s;function a(c){return new ve(c,"hex","le")}r.intFromLE=a}),ua=yr.getNAF,t1=yr.getJSF,ha=yr.assert;function pi(t,e){this.type=t,this.p=new ve(e.p,16),this.red=e.prime?ve.red(e.prime):ve.mont(this.p),this.zero=new ve(0).toRed(this.red),this.one=new ve(1).toRed(this.red),this.two=new ve(2).toRed(this.red),this.n=e.n&&new ve(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Zi=pi;pi.prototype.point=function(){throw new Error("Not implemented")};pi.prototype.validate=function(){throw new Error("Not implemented")};pi.prototype._fixedNafMul=function(e,r){ha(e.precomputed);var n=e._getDoubles(),i=ua(r,1,this._bitLength),o=(1<=a;u--)c=(c<<1)+i[u];s.push(c)}for(var y=this.jpoint(null,null,null),p=this.jpoint(null,null,null),x=o;x>0;x--){for(a=0;a=0;c--){for(var u=0;c>=0&&s[c]===0;c--)u++;if(c>=0&&u++,a=a.dblp(u),c<0)break;var y=s[c];ha(y!==0),e.type==="affine"?y>0?a=a.mixedAdd(o[y-1>>1]):a=a.mixedAdd(o[-y-1>>1].neg()):y>0?a=a.add(o[y-1>>1]):a=a.add(o[-y-1>>1].neg())}return e.type==="affine"?a.toP():a};pi.prototype._wnafMulAdd=function(e,r,n,i,o){var s=this._wnafT1,a=this._wnafT2,c=this._wnafT3,u=0,y,p,x;for(y=0;y=1;y-=2){var C=y-1,B=y;if(s[C]!==1||s[B]!==1){c[C]=ua(n[C],s[C],this._bitLength),c[B]=ua(n[B],s[B],this._bitLength),u=Math.max(c[C].length,u),u=Math.max(c[B].length,u);continue}var M=[r[C],null,null,r[B]];r[C].y.cmp(r[B].y)===0?(M[1]=r[C].add(r[B]),M[2]=r[C].toJ().mixedAdd(r[B].neg())):r[C].y.cmp(r[B].y.redNeg())===0?(M[1]=r[C].toJ().mixedAdd(r[B]),M[2]=r[C].add(r[B].neg())):(M[1]=r[C].toJ().mixedAdd(r[B]),M[2]=r[C].toJ().mixedAdd(r[B].neg()));var N=[-3,-1,-5,-7,0,7,5,1,3],H=t1(n[C],n[B]);for(u=Math.max(H[0].length,u),c[C]=new Array(u),c[B]=new Array(u),p=0;p=0;y--){for(var Q=0;y>=0;){var Z=!0;for(p=0;p=0&&Q++,K=K.dblp(Q),y<0)break;for(p=0;p0?x=a[p][ee-1>>1]:ee<0&&(x=a[p][-ee-1>>1].neg()),x.type==="affine"?K=K.mixedAdd(x):K=K.add(x))}}for(y=0;y=Math.ceil((e.bitLength()+1)/r.step):!1};Cr.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,o=0;o=0&&(S=u,C=y),p.negative&&(p=p.neg(),x=x.neg()),S.negative&&(S=S.neg(),C=C.neg()),[{a:p,b:x},{a:S,b:C}]};Ir.prototype._endoSplit=function(e){var r=this.endo.basis,n=r[0],i=r[1],o=i.b.mul(e).divRound(this.n),s=n.b.neg().mul(e).divRound(this.n),a=o.mul(n.a),c=s.mul(i.a),u=o.mul(n.b),y=s.mul(i.b),p=e.sub(a).sub(c),x=u.add(y).neg();return{k1:p,k2:x}};Ir.prototype.pointFromX=function(e,r){e=new ve(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var o=i.fromRed().isOdd();return(r&&!o||!r&&o)&&(i=i.redNeg()),this.point(e,i)};Ir.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,n=e.y,i=this.a.redMul(r),o=r.redSqr().redMul(r).redIAdd(i).redIAdd(this.b);return n.redSqr().redISub(o).cmpn(0)===0};Ir.prototype._endoWnafMulAdd=function(e,r,n){for(var i=this._endoWnafT1,o=this._endoWnafT2,s=0;s":""};Ut.prototype.isInfinity=function(){return this.inf};Ut.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(e.x),i=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)};Ut.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),o=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(i),s=o.redSqr().redISub(this.x.redAdd(this.x)),a=o.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,a)};Ut.prototype.getX=function(){return this.x.fromRed()};Ut.prototype.getY=function(){return this.y.fromRed()};Ut.prototype.mul=function(e){return e=new ve(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};Ut.prototype.mulAdd=function(e,r,n){var i=[this,r],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,o):this.curve._wnafMulAdd(1,i,o,2)};Ut.prototype.jmulAdd=function(e,r,n){var i=[this,r],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,o,!0):this.curve._wnafMulAdd(1,i,o,2,!0)};Ut.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};Ut.prototype.neg=function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(o){return o.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return r};Ut.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function Lt(t,e,r,n){Zi.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new ve(0)):(this.x=new ve(e,16),this.y=new ve(r,16),this.z=new ve(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}su(Lt,Zi.BasePoint);Ir.prototype.jpoint=function(e,r,n){return new Lt(this,e,r,n)};Lt.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),n=this.x.redMul(r),i=this.y.redMul(r).redMul(e);return this.curve.point(n,i)};Lt.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};Lt.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(r),o=e.x.redMul(n),s=this.y.redMul(r.redMul(e.z)),a=e.y.redMul(n.redMul(this.z)),c=i.redSub(o),u=s.redSub(a);if(c.cmpn(0)===0)return u.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var y=c.redSqr(),p=y.redMul(c),x=i.redMul(y),S=u.redSqr().redIAdd(p).redISub(x).redISub(x),C=u.redMul(x.redISub(S)).redISub(s.redMul(p)),B=this.z.redMul(e.z).redMul(c);return this.curve.jpoint(S,C,B)};Lt.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,i=e.x.redMul(r),o=this.y,s=e.y.redMul(r).redMul(this.z),a=n.redSub(i),c=o.redSub(s);if(a.cmpn(0)===0)return c.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),y=u.redMul(a),p=n.redMul(u),x=c.redSqr().redIAdd(y).redISub(p).redISub(p),S=c.redMul(p.redISub(x)).redISub(o.redMul(y)),C=this.z.redMul(a);return this.curve.jpoint(x,S,C)};Lt.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var n=this;for(r=0;r=0)return!1;if(n.redIAdd(o),this.x.cmp(n)===0)return!0}};Lt.prototype.inspect=function(){return this.isInfinity()?"":""};Lt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var Ys=Po(function(t,e){var r=e;r.base=Zi,r.short=n1,r.mont=null,r.edwards=null}),Qs=Po(function(t,e){var r=e,n=yr.assert;function i(a){a.type==="short"?this.curve=new Ys.short(a):a.type==="edwards"?this.curve=new Ys.edwards(a):this.curve=new Ys.mont(a),this.g=this.curve.g,this.n=this.curve.n,this.hash=a.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}r.PresetCurve=i;function o(a,c){Object.defineProperty(r,a,{configurable:!0,enumerable:!0,get:function(){var u=new i(c);return Object.defineProperty(r,a,{configurable:!0,enumerable:!0,value:u}),u}})}o("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:dr.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),o("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:dr.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),o("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:dr.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),o("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:dr.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),o("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:dr.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),o("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:dr.sha256,gRed:!1,g:["9"]}),o("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:dr.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var s;try{s=null.crash()}catch{s=void 0}o("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:dr.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",s]})});function ui(t){if(!(this instanceof ui))return new ui(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=zr.toArray(t.entropy,t.entropyEnc||"hex"),r=zr.toArray(t.nonce,t.nonceEnc||"hex"),n=zr.toArray(t.pers,t.persEnc||"hex");ou(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var N0=ui;ui.prototype._init=function(e,r,n){var i=e.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var o=0;o=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};ui.prototype.generate=function(e,r,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(i=n,n=r,r=null),n&&(n=zr.toArray(n,i||"hex"),this._update(n));for(var o=[];o.length"};var i1=yr.assert;function Va(t,e){if(t instanceof Va)return t;this._importDER(t,e)||(i1(t.r&&t.s,"Signature without r or s"),this.r=new ve(t.r,16),this.s=new ve(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var ja=Va;function o1(){this.place=0}function rf(t,e){var r=t[e.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4||t[e.place]===0)return!1;for(var i=0,o=0,s=e.place;o>>=0;return i<=127?!1:(e.place=s,i)}function Ih(t){for(var e=0,r=t.length-1;!t[e]&&!(t[e+1]&128)&&e>>3);for(t.push(r|128);--r;)t.push(e>>>(r<<3)&255);t.push(e)}Va.prototype.toDER=function(e){var r=this.r.toArray(),n=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),n[0]&128&&(n=[0].concat(n)),r=Ih(r),n=Ih(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];nf(i,r.length),i=i.concat(r),i.push(2),nf(i,n.length);var o=i.concat(n),s=[48];return nf(s,o.length),s=s.concat(o),yr.encode(s,e)};var s1=function(){throw new Error("unsupported")},_i=yr.assert;function Dr(t){if(!(this instanceof Dr))return new Dr(t);typeof t=="string"&&(_i(Object.prototype.hasOwnProperty.call(Qs,t),"Unknown curve "+t),t=Qs[t]),t instanceof Qs.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}var a1=Dr;Dr.prototype.keyPair=function(e){return new au(this,e)};Dr.prototype.keyFromPrivate=function(e,r){return au.fromPrivate(this,e,r)};Dr.prototype.keyFromPublic=function(e,r){return au.fromPublic(this,e,r)};Dr.prototype.genKeyPair=function(e){e||(e={});for(var r=new N0({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||s1(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new ve(2));;){var o=new ve(r.generate(n));if(!(o.cmp(i)>0))return o.iaddn(1),this.keyFromPrivate(o)}};Dr.prototype._truncateToN=function(e,r,n){var i;if(ve.isBN(e)||typeof e=="number")e=new ve(e,16),i=e.byteLength();else if(typeof e=="object")i=e.length,e=new ve(e,16);else{var o=e.toString();i=o.length+1>>>1,e=new ve(o,16)}typeof n!="number"&&(n=i*8);var s=n-this.n.bitLength();return s>0&&(e=e.ushrn(s)),!r&&e.cmp(this.n)>=0?e.sub(this.n):e};Dr.prototype.sign=function(e,r,n,i){if(typeof n=="object"&&(i=n,n=null),i||(i={}),typeof e!="string"&&typeof e!="number"&&!ve.isBN(e)){_i(typeof e=="object"&&e&&typeof e.length=="number","Expected message to be an array-like, a hex string, or a BN instance"),_i(e.length>>>0===e.length);for(var o=0;o=0)){var S=this.g.mul(x);if(!S.isInfinity()){var C=S.getX(),B=C.umod(this.n);if(B.cmpn(0)!==0){var M=x.invm(this.n).mul(B.mul(r.getPrivate()).iadd(e));if(M=M.umod(this.n),M.cmpn(0)!==0){var N=(S.getY().isOdd()?1:0)|(C.cmp(B)!==0?2:0);return i.canonical&&M.cmp(this.nh)>0&&(M=this.n.sub(M),N^=1),new ja({r:B,s:M,recoveryParam:N})}}}}}};Dr.prototype.verify=function(e,r,n,i,o){o||(o={}),e=this._truncateToN(e,!1,o.msgBitLength),n=this.keyFromPublic(n,i),r=new ja(r,"hex");var s=r.r,a=r.s;if(s.cmpn(1)<0||s.cmp(this.n)>=0||a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var c=a.invm(this.n),u=c.mul(e).umod(this.n),y=c.mul(s).umod(this.n),p;return this.curve._maxwellTrick?(p=this.g.jmulAdd(u,n.getPublic(),y),p.isInfinity()?!1:p.eqXToP(s)):(p=this.g.mulAdd(u,n.getPublic(),y),p.isInfinity()?!1:p.getX().umod(this.n).cmp(s)===0)};Dr.prototype.recoverPubKey=function(t,e,r,n){_i((3&r)===r,"The recovery param is more than two bits"),e=new ja(e,n);var i=this.n,o=new ve(t),s=e.r,a=e.s,c=r&1,u=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&u)throw new Error("Unable to find sencond key candinate");u?s=this.curve.pointFromX(s.add(this.curve.n),c):s=this.curve.pointFromX(s,c);var y=e.r.invm(i),p=i.sub(o).mul(y).umod(i),x=a.mul(y).umod(i);return this.g.mulAdd(p,s,x)};Dr.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new ja(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(t,e,i)}catch{continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var c1=Po(function(t,e){var r=e;r.version="6.6.1",r.utils=yr,r.rand=function(){throw new Error("unsupported")},r.curve=Ys,r.curves=Qs,r.ec=a1,r.eddsa=null}),f1=c1.ec;const l1="signing-key/5.8.0",Of=new Re(l1);let of=null;function Ii(){return of||(of=new f1("secp256k1")),of}class Pf{constructor(e){Je(this,"curve","secp256k1"),Je(this,"privateKey",We(e)),gm(this.privateKey)!==32&&Of.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const r=Ii().keyFromPrivate(ke(this.privateKey));Je(this,"publicKey","0x"+r.getPublic(!1,"hex")),Je(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),Je(this,"_isSigningKey",!0)}_addPoint(e){const r=Ii().keyFromPublic(ke(this.publicKey)),n=Ii().keyFromPublic(ke(e));return"0x"+r.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const r=Ii().keyFromPrivate(ke(this.privateKey)),n=ke(e);n.length!==32&&Of.throwArgumentError("bad digest length","digest",e);const i=r.sign(n,{canonical:!0});return ym({recoveryParam:i.recoveryParam,r:fi("0x"+i.r.toString(16),32),s:fi("0x"+i.s.toString(16),32)})}computeSharedSecret(e){const r=Ii().keyFromPrivate(ke(this.privateKey)),n=Ii().keyFromPublic(ke(R0(e)));return fi("0x"+r.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function R0(t,e){const r=ke(t);return r.length===32?new Pf(r).publicKey:r.length===33?"0x"+Ii().keyFromPublic(r).getPublic(!1,"hex"):r.length===65?We(r):Of.throwArgumentError("invalid public or private key","key","[REDACTED]")}var U0={exports:{}};/** - * [js-sha3]{@link https://github.com/emn178/js-sha3} - * - * @version 0.8.0 - * @author Chen, Yi-Cyuan [emn178@gmail.com] - * @copyright Chen, Yi-Cyuan 2015-2018 - * @license MIT - */(function(t){(function(){var e="input is invalid type",r="finalize already called",n=typeof window=="object",i=n?window:{};i.JS_SHA3_NO_WINDOW&&(n=!1);var o=!n&&typeof self=="object",s=!i.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;s?i=ao:o&&(i=self);var a=!i.JS_SHA3_NO_COMMON_JS&&!0&&t.exports,c=!i.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",u="0123456789abcdef".split(""),y=[31,7936,2031616,520093696],p=[4,1024,262144,67108864],x=[1,256,65536,16777216],S=[6,1536,393216,100663296],C=[0,8,16,24],B=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],M=[224,256,384,512],N=[128,256],H=["hex","buffer","arrayBuffer","array","digest"],L={128:168,256:136};(i.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(v){return Object.prototype.toString.call(v)==="[object Array]"}),c&&(i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(v){return typeof v=="object"&&v.buffer&&v.buffer.constructor===ArrayBuffer});for(var G=function(v,$,Y){return function(J){return new h(v,$,v).update(J)[Y]()}},K=function(v,$,Y){return function(J,te){return new h(v,$,te).update(J)[Y]()}},q=function(v,$,Y){return function(J,te,ue,fe){return f["cshake"+v].update(J,te,ue,fe)[Y]()}},Q=function(v,$,Y){return function(J,te,ue,fe){return f["kmac"+v].update(J,te,ue,fe)[Y]()}},Z=function(v,$,Y,J){for(var te=0;te>5,this.byteCount=this.blockCount<<2,this.outputBlocks=Y>>5,this.extraBytes=(Y&31)>>3;for(var J=0;J<50;++J)this.s[J]=0}h.prototype.update=function(v){if(this.finalized)throw new Error(r);var $,Y=typeof v;if(Y!=="string"){if(Y==="object"){if(v===null)throw new Error(e);if(c&&v.constructor===ArrayBuffer)v=new Uint8Array(v);else if(!Array.isArray(v)&&(!c||!ArrayBuffer.isView(v)))throw new Error(e)}else throw new Error(e);$=!0}for(var J=this.blocks,te=this.byteCount,ue=v.length,fe=this.blockCount,oe=0,Ie=this.s,ce,ge;oe>2]|=v[oe]<>2]|=ge<>2]|=(192|ge>>6)<>2]|=(128|ge&63)<=57344?(J[ce>>2]|=(224|ge>>12)<>2]|=(128|ge>>6&63)<>2]|=(128|ge&63)<>2]|=(240|ge>>18)<>2]|=(128|ge>>12&63)<>2]|=(128|ge>>6&63)<>2]|=(128|ge&63)<=te){for(this.start=ce-te,this.block=J[fe],ce=0;ce>8,Y=v&255;Y>0;)te.unshift(Y),v=v>>8,Y=v&255,++J;return $?te.push(J):te.unshift(J),this.update(te),te.length},h.prototype.encodeString=function(v){var $,Y=typeof v;if(Y!=="string"){if(Y==="object"){if(v===null)throw new Error(e);if(c&&v.constructor===ArrayBuffer)v=new Uint8Array(v);else if(!Array.isArray(v)&&(!c||!ArrayBuffer.isView(v)))throw new Error(e)}else throw new Error(e);$=!0}var J=0,te=v.length;if($)J=te;else for(var ue=0;ue=57344?J+=3:(fe=65536+((fe&1023)<<10|v.charCodeAt(++ue)&1023),J+=4)}return J+=this.encode(J*8),this.update(v),J},h.prototype.bytepad=function(v,$){for(var Y=this.encode($),J=0;J>2]|=this.padding[$&3],this.lastByteIndex===this.byteCount)for(v[0]=v[Y],$=1;$>4&15]+u[oe&15]+u[oe>>12&15]+u[oe>>8&15]+u[oe>>20&15]+u[oe>>16&15]+u[oe>>28&15]+u[oe>>24&15];ue%v===0&&(re($),te=0)}return J&&(oe=$[te],fe+=u[oe>>4&15]+u[oe&15],J>1&&(fe+=u[oe>>12&15]+u[oe>>8&15]),J>2&&(fe+=u[oe>>20&15]+u[oe>>16&15])),fe},h.prototype.arrayBuffer=function(){this.finalize();var v=this.blockCount,$=this.s,Y=this.outputBlocks,J=this.extraBytes,te=0,ue=0,fe=this.outputBits>>3,oe;J?oe=new ArrayBuffer(Y+1<<2):oe=new ArrayBuffer(fe);for(var Ie=new Uint32Array(oe);ue>8&255,fe[oe+2]=Ie>>16&255,fe[oe+3]=Ie>>24&255;ue%v===0&&re($)}return J&&(oe=ue<<2,Ie=$[te],fe[oe]=Ie&255,J>1&&(fe[oe+1]=Ie>>8&255),J>2&&(fe[oe+2]=Ie>>16&255)),fe};function k(v,$,Y){h.call(this,v,$,Y)}k.prototype=new h,k.prototype.finalize=function(){return this.encode(this.outputBits,!0),h.prototype.finalize.call(this)};var re=function(v){var $,Y,J,te,ue,fe,oe,Ie,ce,ge,mn,He,Ke,bn,je,Fe,It,$e,Ge,Vt,qe,A,d,w,_,F,V,W,Ae,me,we,Le,pe,Ye,vi,Qe,Ze,xi,Xe,et,Ai,tt,rt,Ei,nt,it,Si,ot,st,Bi,at,ct,Di,ft,lt,Ci,ut,ht,zn,Kn,Gn,qn,Wn;for(J=0;J<48;J+=2)te=v[0]^v[10]^v[20]^v[30]^v[40],ue=v[1]^v[11]^v[21]^v[31]^v[41],fe=v[2]^v[12]^v[22]^v[32]^v[42],oe=v[3]^v[13]^v[23]^v[33]^v[43],Ie=v[4]^v[14]^v[24]^v[34]^v[44],ce=v[5]^v[15]^v[25]^v[35]^v[45],ge=v[6]^v[16]^v[26]^v[36]^v[46],mn=v[7]^v[17]^v[27]^v[37]^v[47],He=v[8]^v[18]^v[28]^v[38]^v[48],Ke=v[9]^v[19]^v[29]^v[39]^v[49],$=He^(fe<<1|oe>>>31),Y=Ke^(oe<<1|fe>>>31),v[0]^=$,v[1]^=Y,v[10]^=$,v[11]^=Y,v[20]^=$,v[21]^=Y,v[30]^=$,v[31]^=Y,v[40]^=$,v[41]^=Y,$=te^(Ie<<1|ce>>>31),Y=ue^(ce<<1|Ie>>>31),v[2]^=$,v[3]^=Y,v[12]^=$,v[13]^=Y,v[22]^=$,v[23]^=Y,v[32]^=$,v[33]^=Y,v[42]^=$,v[43]^=Y,$=fe^(ge<<1|mn>>>31),Y=oe^(mn<<1|ge>>>31),v[4]^=$,v[5]^=Y,v[14]^=$,v[15]^=Y,v[24]^=$,v[25]^=Y,v[34]^=$,v[35]^=Y,v[44]^=$,v[45]^=Y,$=Ie^(He<<1|Ke>>>31),Y=ce^(Ke<<1|He>>>31),v[6]^=$,v[7]^=Y,v[16]^=$,v[17]^=Y,v[26]^=$,v[27]^=Y,v[36]^=$,v[37]^=Y,v[46]^=$,v[47]^=Y,$=ge^(te<<1|ue>>>31),Y=mn^(ue<<1|te>>>31),v[8]^=$,v[9]^=Y,v[18]^=$,v[19]^=Y,v[28]^=$,v[29]^=Y,v[38]^=$,v[39]^=Y,v[48]^=$,v[49]^=Y,bn=v[0],je=v[1],it=v[11]<<4|v[10]>>>28,Si=v[10]<<4|v[11]>>>28,W=v[20]<<3|v[21]>>>29,Ae=v[21]<<3|v[20]>>>29,Kn=v[31]<<9|v[30]>>>23,Gn=v[30]<<9|v[31]>>>23,tt=v[40]<<18|v[41]>>>14,rt=v[41]<<18|v[40]>>>14,Ye=v[2]<<1|v[3]>>>31,vi=v[3]<<1|v[2]>>>31,Fe=v[13]<<12|v[12]>>>20,It=v[12]<<12|v[13]>>>20,ot=v[22]<<10|v[23]>>>22,st=v[23]<<10|v[22]>>>22,me=v[33]<<13|v[32]>>>19,we=v[32]<<13|v[33]>>>19,qn=v[42]<<2|v[43]>>>30,Wn=v[43]<<2|v[42]>>>30,ft=v[5]<<30|v[4]>>>2,lt=v[4]<<30|v[5]>>>2,Qe=v[14]<<6|v[15]>>>26,Ze=v[15]<<6|v[14]>>>26,$e=v[25]<<11|v[24]>>>21,Ge=v[24]<<11|v[25]>>>21,Bi=v[34]<<15|v[35]>>>17,at=v[35]<<15|v[34]>>>17,Le=v[45]<<29|v[44]>>>3,pe=v[44]<<29|v[45]>>>3,w=v[6]<<28|v[7]>>>4,_=v[7]<<28|v[6]>>>4,Ci=v[17]<<23|v[16]>>>9,ut=v[16]<<23|v[17]>>>9,xi=v[26]<<25|v[27]>>>7,Xe=v[27]<<25|v[26]>>>7,Vt=v[36]<<21|v[37]>>>11,qe=v[37]<<21|v[36]>>>11,ct=v[47]<<24|v[46]>>>8,Di=v[46]<<24|v[47]>>>8,Ei=v[8]<<27|v[9]>>>5,nt=v[9]<<27|v[8]>>>5,F=v[18]<<20|v[19]>>>12,V=v[19]<<20|v[18]>>>12,ht=v[29]<<7|v[28]>>>25,zn=v[28]<<7|v[29]>>>25,et=v[38]<<8|v[39]>>>24,Ai=v[39]<<8|v[38]>>>24,A=v[48]<<14|v[49]>>>18,d=v[49]<<14|v[48]>>>18,v[0]=bn^~Fe&$e,v[1]=je^~It&Ge,v[10]=w^~F&W,v[11]=_^~V&Ae,v[20]=Ye^~Qe&xi,v[21]=vi^~Ze&Xe,v[30]=Ei^~it&ot,v[31]=nt^~Si&st,v[40]=ft^~Ci&ht,v[41]=lt^~ut&zn,v[2]=Fe^~$e&Vt,v[3]=It^~Ge&qe,v[12]=F^~W&me,v[13]=V^~Ae&we,v[22]=Qe^~xi&et,v[23]=Ze^~Xe&Ai,v[32]=it^~ot&Bi,v[33]=Si^~st&at,v[42]=Ci^~ht&Kn,v[43]=ut^~zn&Gn,v[4]=$e^~Vt&A,v[5]=Ge^~qe&d,v[14]=W^~me&Le,v[15]=Ae^~we&pe,v[24]=xi^~et&tt,v[25]=Xe^~Ai&rt,v[34]=ot^~Bi&ct,v[35]=st^~at&Di,v[44]=ht^~Kn&qn,v[45]=zn^~Gn&Wn,v[6]=Vt^~A&bn,v[7]=qe^~d&je,v[16]=me^~Le&w,v[17]=we^~pe&_,v[26]=et^~tt&Ye,v[27]=Ai^~rt&vi,v[36]=Bi^~ct&Ei,v[37]=at^~Di&nt,v[46]=Kn^~qn&ft,v[47]=Gn^~Wn<,v[8]=A^~bn&Fe,v[9]=d^~je&It,v[18]=Le^~w&F,v[19]=pe^~_&V,v[28]=tt^~Ye&Qe,v[29]=rt^~vi&Ze,v[38]=ct^~Ei&it,v[39]=Di^~nt&Si,v[48]=qn^~ft&Ci,v[49]=Wn^~lt&ut,v[0]^=B[J],v[1]^=B[J+1]};if(a)t.exports=f;else for(g=0;g>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const p1=9007199254740991;function g1(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}const fu={};for(let t=0;t<10;t++)fu[String(t)]=String(t);for(let t=0;t<26;t++)fu[String.fromCharCode(65+t)]=String(10+t);const _h=Math.floor(g1(p1));function y1(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>fu[n]).join("");for(;e.length>=_h;){let n=e.substring(0,_h);e=parseInt(n,10)%97+e.substring(n.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}function w1(t){let e=null;if(typeof t!="string"&&Jo.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=Mh(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&Jo.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==y1(t)&&Jo.throwArgumentError("bad icap checksum","address",t),e=vm(t.substring(4));e.length<40;)e="0"+e;e=Mh("0x"+e)}else Jo.throwArgumentError("invalid address","address",t);return e}var kh;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})(kh||(kh={}));function m1(t){const e=R0(t);return w1(aa(cu(aa(e,1)),12))}function b1(t){return cu(fa(t))}const v1="wordlists/5.8.0",x1=new Re(v1);class Ss{constructor(e){x1.checkAbstract(new.target,Ss),Je(this,"locale",e)}split(e){return e.toLowerCase().split(/ +/g)}join(e){return e.join(" ")}static check(e){const r=[];for(let n=0;n<2048;n++){const i=e.getWord(n);if(n!==e.getWordIndex(i))return"0x";r.push(i)}return b1(r.join(` -`)+` -`)}static register(e,r){r||(r=e.locale)}}const A1="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo";let es=null;function Th(t){if(es==null&&(es=A1.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),Ss.check(t)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw es=null,new Error("BIP39 Wordlist for en (English) FAILED")}class E1 extends Ss{constructor(){super("en")}getWord(e){return Th(this),es[e]}getWordIndex(e){return Th(this),es.indexOf(e)}}const O0=new E1;Ss.register(O0);const Nh={en:O0},S1="hdnode/5.8.0",da=new Re(S1),B1=Yt.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),D1=fa("Bitcoin seed"),js=2147483648;function P0(t){return(1<=256)throw new Error("Depth too large!");return Rh(kf([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",We(this.depth),this.parentFingerprint,fi(We(this.index),4),this.chainCode,this.privateKey!=null?kf(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new Sn(to,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let r=this.path;r&&(r+="/"+(e&2147483647));const n=new Uint8Array(37);if(e&js){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(ke(this.privateKey),1),r&&(r+="'")}else n.set(ke(this.publicKey));for(let p=24;p>=0;p-=8)n[33+(p>>3)]=e>>24-p&255;const i=ke(la(as.sha512,this.chainCode,n)),o=i.slice(0,32),s=i.slice(32);let a=null,c=null;this.privateKey?a=zs(Yt.from(o).add(this.privateKey).mod(B1)):c=new Pf(We(o))._addPoint(this.publicKey);let u=r;const y=this.mnemonic;return y&&(u=Object.freeze({phrase:y.phrase,path:r,locale:y.locale||"en"})),new Sn(to,a,c,this.fingerprint,zs(s),e,this.depth+1,u)}derivePath(e){const r=e.split("/");if(r.length===0||r[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);r[0]==="m"&&r.shift();let n=this;for(let i=0;i=js)throw new Error("invalid path index - "+o);n=n._derive(js+s)}else if(o.match(/^[0-9]+$/)){const s=parseInt(o);if(s>=js)throw new Error("invalid path index - "+o);n=n._derive(s)}else throw new Error("invalid path component - "+o)}return n}static _fromSeed(e,r){const n=ke(e);if(n.length<16||n.length>64)throw new Error("invalid seed");const i=ke(la(as.sha512,D1,n));return new Sn(to,zs(i.slice(0,32)),null,"0x00000000",zs(i.slice(32)),0,0,r)}static fromMnemonic(e,r,n){return n=lu(n),e=_1(M1(e,n),n),Sn._fromSeed(I1(e,r),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return Sn._fromSeed(e,null)}static fromExtendedKey(e){const r=h0.decode(e);(r.length!==82||Rh(r.slice(0,78))!==e)&&da.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const n=r[4],i=We(r.slice(5,9)),o=parseInt(We(r.slice(9,13)).substring(2),16),s=We(r.slice(13,45)),a=r.slice(45,78);switch(We(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new Sn(to,null,We(a),i,s,o,n,null);case"0x0488ade4":case"0x04358394 ":if(a[0]!==0)break;return new Sn(to,We(a.slice(1)),null,i,s,o,n,null)}return da.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function I1(t,e){e||(e="");const r=fa("mnemonic"+e,mo.NFKD);return Xb(fa(t,mo.NFKD),r,2048,64,"sha512")}function M1(t,e){e=lu(e),da.checkNormalize();const r=e.split(t);if(r.length%3!==0)throw new Error("invalid mnemonic");const n=ke(new Uint8Array(Math.ceil(11*r.length/8)));let i=0;for(let u=0;u>3]|=1<<7-i%8),i++}const o=32*r.length/3,s=r.length/3,a=P0(s);if((ke(cs(n.slice(0,o/8)))[0]&a)!==(n[n.length-1]&a))throw new Error("invalid checksum");return We(n.slice(0,o/8))}function _1(t,e){if(e=lu(e),t=ke(t),t.length%4!==0||t.length<16||t.length>32)throw new Error("invalid entropy");const r=[0];let n=11;for(let s=0;s8?(r[r.length-1]<<=8,r[r.length-1]|=t[s],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=t[s]>>8-n,r.push(t[s]&C1(8-n)),n+=3);const i=t.length/4,o=ke(cs(t))[0]&P0(i);return r[r.length-1]<<=i,r[r.length-1]|=o>>8-i,e.join(r.map(s=>e.getWord(s)))}function k1(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);const i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),a=Number(r&o),c=n?4:0,u=n?0:4;t.setUint32(e+c,s,n),t.setUint32(e+u,a,n)}const T1=(t,e,r)=>t&e^~t&r,N1=(t,e,r)=>t&e^t&r^e&r;let R1=class extends Ow{constructor(e,r,n,i){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=Wc(this.buffer)}update(e){Cf(this);const{view:r,buffer:n,blockLen:i}=this;e=s0(e);const o=e.length;for(let s=0;si-s&&(this.process(n,0),s=0);for(let p=s;py.length)throw new Error("_sha2: outputLen bigger than state");for(let p=0;p>>3,B=Yr(S,17)^Yr(S,19)^S>>>10;Xn[p]=B+Xn[p-7]+C+Xn[p-16]|0}let{A:n,B:i,C:o,D:s,E:a,F:c,G:u,H:y}=this;for(let p=0;p<64;p++){const x=Yr(a,6)^Yr(a,11)^Yr(a,25),S=y+x+T1(a,c,u)+U1[p]+Xn[p]|0,B=(Yr(n,2)^Yr(n,13)^Yr(n,22))+N1(n,i,o)|0;y=u,u=c,c=a,a=s+S|0,s=o,o=i,i=n,n=S+B|0}n=n+this.A|0,i=i+this.B|0,o=o+this.C|0,s=s+this.D|0,a=a+this.E|0,c=c+this.F|0,u=u+this.G|0,y=y+this.H|0,this.set(n,i,o,s,a,c,u,y)}roundClean(){Xn.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};const P1=Pw(()=>new O1);function F1(t){return e=>(Rw.bytes(e),t(e))}(()=>{const t=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0,e=typeof module<"u"&&typeof module.require=="function"&&module.require.bind(module);return{node:e&&!t?e("crypto"):void 0,web:t}})();const uu=F1(P1),ro=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,F0=new Set,Ff=typeof process=="object"&&process?process:{},L0=(t,e,r,n)=>{typeof Ff.emitWarning=="function"?Ff.emitWarning(t,e,r,n):console.error(`[${r}] ${e}: ${t}`)};let pa=globalThis.AbortController,Uh=globalThis.AbortSignal;var Kd;if(typeof pa>"u"){Uh=class{constructor(){ze(this,"onabort");ze(this,"_onabort",[]);ze(this,"reason");ze(this,"aborted",!1)}addEventListener(n,i){this._onabort.push(i)}},pa=class{constructor(){ze(this,"signal",new Uh);e()}abort(n){var i,o;if(!this.signal.aborted){this.signal.reason=n,this.signal.aborted=!0;for(const s of this.signal._onabort)s(n);(o=(i=this.signal).onabort)==null||o.call(i,n)}}};let t=((Kd=Ff.env)==null?void 0:Kd.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{t&&(t=!1,L0("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}const L1=t=>!F0.has(t),ni=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),H0=t=>ni(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?Zs:null:null;class Zs extends Array{constructor(e){super(e),this.fill(0)}}var po;const Ti=class Ti{constructor(e,r){ze(this,"heap");ze(this,"length");if(!U(Ti,po))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}static create(e){const r=H0(e);if(!r)return[];ye(Ti,po,!0);const n=new Ti(e,r);return ye(Ti,po,!1),n}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};po=new WeakMap,Ue(Ti,po,!1);let Lf=Ti;var Gd,qd,Or,fr,Pr,Fr,go,yo,Et,Lr,xt,pt,Ee,Wt,lr,jt,_t,Hr,kt,$r,Vr,ur,jr,ci,Jt,ae,$f,Ri,Dn,xs,hr,$0,Ui,wo,As,ii,oi,Vf,Xs,ea,dt,jf,Yo,si,zf;const uh=class uh{constructor(e){Ue(this,ae);Ue(this,Or);Ue(this,fr);Ue(this,Pr);Ue(this,Fr);Ue(this,go);Ue(this,yo);ze(this,"ttl");ze(this,"ttlResolution");ze(this,"ttlAutopurge");ze(this,"updateAgeOnGet");ze(this,"updateAgeOnHas");ze(this,"allowStale");ze(this,"noDisposeOnSet");ze(this,"noUpdateTTL");ze(this,"maxEntrySize");ze(this,"sizeCalculation");ze(this,"noDeleteOnFetchRejection");ze(this,"noDeleteOnStaleGet");ze(this,"allowStaleOnFetchAbort");ze(this,"allowStaleOnFetchRejection");ze(this,"ignoreFetchAbort");Ue(this,Et);Ue(this,Lr);Ue(this,xt);Ue(this,pt);Ue(this,Ee);Ue(this,Wt);Ue(this,lr);Ue(this,jt);Ue(this,_t);Ue(this,Hr);Ue(this,kt);Ue(this,$r);Ue(this,Vr);Ue(this,ur);Ue(this,jr);Ue(this,ci);Ue(this,Jt);Ue(this,Ri,()=>{});Ue(this,Dn,()=>{});Ue(this,xs,()=>{});Ue(this,hr,()=>!1);Ue(this,Ui,e=>{});Ue(this,wo,(e,r,n)=>{});Ue(this,As,(e,r,n,i)=>{if(n||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});ze(this,Gd,"LRUCache");const{max:r=0,ttl:n,ttlResolution:i=1,ttlAutopurge:o,updateAgeOnGet:s,updateAgeOnHas:a,allowStale:c,dispose:u,disposeAfter:y,noDisposeOnSet:p,noUpdateTTL:x,maxSize:S=0,maxEntrySize:C=0,sizeCalculation:B,fetchMethod:M,memoMethod:N,noDeleteOnFetchRejection:H,noDeleteOnStaleGet:L,allowStaleOnFetchRejection:G,allowStaleOnFetchAbort:K,ignoreFetchAbort:q}=e;if(r!==0&&!ni(r))throw new TypeError("max option must be a nonnegative integer");const Q=r?H0(r):Array;if(!Q)throw new Error("invalid max value: "+r);if(ye(this,Or,r),ye(this,fr,S),this.maxEntrySize=C||U(this,fr),this.sizeCalculation=B,this.sizeCalculation){if(!U(this,fr)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(N!==void 0&&typeof N!="function")throw new TypeError("memoMethod must be a function if defined");if(ye(this,yo,N),M!==void 0&&typeof M!="function")throw new TypeError("fetchMethod must be a function if specified");if(ye(this,go,M),ye(this,ci,!!M),ye(this,xt,new Map),ye(this,pt,new Array(r).fill(void 0)),ye(this,Ee,new Array(r).fill(void 0)),ye(this,Wt,new Q(r)),ye(this,lr,new Q(r)),ye(this,jt,0),ye(this,_t,0),ye(this,Hr,Lf.create(r)),ye(this,Et,0),ye(this,Lr,0),typeof u=="function"&&ye(this,Pr,u),typeof y=="function"?(ye(this,Fr,y),ye(this,kt,[])):(ye(this,Fr,void 0),ye(this,kt,void 0)),ye(this,jr,!!U(this,Pr)),ye(this,Jt,!!U(this,Fr)),this.noDisposeOnSet=!!p,this.noUpdateTTL=!!x,this.noDeleteOnFetchRejection=!!H,this.allowStaleOnFetchRejection=!!G,this.allowStaleOnFetchAbort=!!K,this.ignoreFetchAbort=!!q,this.maxEntrySize!==0){if(U(this,fr)!==0&&!ni(U(this,fr)))throw new TypeError("maxSize must be a positive integer if specified");if(!ni(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");he(this,ae,$0).call(this)}if(this.allowStale=!!c,this.noDeleteOnStaleGet=!!L,this.updateAgeOnGet=!!s,this.updateAgeOnHas=!!a,this.ttlResolution=ni(i)||i===0?i:1,this.ttlAutopurge=!!o,this.ttl=n||0,this.ttl){if(!ni(this.ttl))throw new TypeError("ttl must be a positive integer if specified");he(this,ae,$f).call(this)}if(U(this,Or)===0&&this.ttl===0&&U(this,fr)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!U(this,Or)&&!U(this,fr)){const Z="LRU_CACHE_UNBOUNDED";L1(Z)&&(F0.add(Z),L0("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",Z,uh))}}static unsafeExposeInternals(e){return{starts:U(e,Vr),ttls:U(e,ur),sizes:U(e,$r),keyMap:U(e,xt),keyList:U(e,pt),valList:U(e,Ee),next:U(e,Wt),prev:U(e,lr),get head(){return U(e,jt)},get tail(){return U(e,_t)},free:U(e,Hr),isBackgroundFetch:r=>{var n;return he(n=e,ae,dt).call(n,r)},backgroundFetch:(r,n,i,o)=>{var s;return he(s=e,ae,ea).call(s,r,n,i,o)},moveToTail:r=>{var n;return he(n=e,ae,Yo).call(n,r)},indexes:r=>{var n;return he(n=e,ae,ii).call(n,r)},rindexes:r=>{var n;return he(n=e,ae,oi).call(n,r)},isStale:r=>{var n;return U(n=e,hr).call(n,r)}}}get max(){return U(this,Or)}get maxSize(){return U(this,fr)}get calculatedSize(){return U(this,Lr)}get size(){return U(this,Et)}get fetchMethod(){return U(this,go)}get memoMethod(){return U(this,yo)}get dispose(){return U(this,Pr)}get disposeAfter(){return U(this,Fr)}getRemainingTTL(e){return U(this,xt).has(e)?1/0:0}*entries(){for(const e of he(this,ae,ii).call(this))U(this,Ee)[e]!==void 0&&U(this,pt)[e]!==void 0&&!he(this,ae,dt).call(this,U(this,Ee)[e])&&(yield[U(this,pt)[e],U(this,Ee)[e]])}*rentries(){for(const e of he(this,ae,oi).call(this))U(this,Ee)[e]!==void 0&&U(this,pt)[e]!==void 0&&!he(this,ae,dt).call(this,U(this,Ee)[e])&&(yield[U(this,pt)[e],U(this,Ee)[e]])}*keys(){for(const e of he(this,ae,ii).call(this)){const r=U(this,pt)[e];r!==void 0&&!he(this,ae,dt).call(this,U(this,Ee)[e])&&(yield r)}}*rkeys(){for(const e of he(this,ae,oi).call(this)){const r=U(this,pt)[e];r!==void 0&&!he(this,ae,dt).call(this,U(this,Ee)[e])&&(yield r)}}*values(){for(const e of he(this,ae,ii).call(this))U(this,Ee)[e]!==void 0&&!he(this,ae,dt).call(this,U(this,Ee)[e])&&(yield U(this,Ee)[e])}*rvalues(){for(const e of he(this,ae,oi).call(this))U(this,Ee)[e]!==void 0&&!he(this,ae,dt).call(this,U(this,Ee)[e])&&(yield U(this,Ee)[e])}[(qd=Symbol.iterator,Gd=Symbol.toStringTag,qd)](){return this.entries()}find(e,r={}){for(const n of he(this,ae,ii).call(this)){const i=U(this,Ee)[n],o=he(this,ae,dt).call(this,i)?i.__staleWhileFetching:i;if(o!==void 0&&e(o,U(this,pt)[n],this))return this.get(U(this,pt)[n],r)}}forEach(e,r=this){for(const n of he(this,ae,ii).call(this)){const i=U(this,Ee)[n],o=he(this,ae,dt).call(this,i)?i.__staleWhileFetching:i;o!==void 0&&e.call(r,o,U(this,pt)[n],this)}}rforEach(e,r=this){for(const n of he(this,ae,oi).call(this)){const i=U(this,Ee)[n],o=he(this,ae,dt).call(this,i)?i.__staleWhileFetching:i;o!==void 0&&e.call(r,o,U(this,pt)[n],this)}}purgeStale(){let e=!1;for(const r of he(this,ae,oi).call(this,{allowStale:!0}))U(this,hr).call(this,r)&&(he(this,ae,si).call(this,U(this,pt)[r],"expire"),e=!0);return e}info(e){const r=U(this,xt).get(e);if(r===void 0)return;const n=U(this,Ee)[r],i=he(this,ae,dt).call(this,n)?n.__staleWhileFetching:n;if(i===void 0)return;const o={value:i};if(U(this,ur)&&U(this,Vr)){const s=U(this,ur)[r],a=U(this,Vr)[r];if(s&&a){const c=s-(ro.now()-a);o.ttl=c,o.start=Date.now()}}return U(this,$r)&&(o.size=U(this,$r)[r]),o}dump(){const e=[];for(const r of he(this,ae,ii).call(this,{allowStale:!0})){const n=U(this,pt)[r],i=U(this,Ee)[r],o=he(this,ae,dt).call(this,i)?i.__staleWhileFetching:i;if(o===void 0||n===void 0)continue;const s={value:o};if(U(this,ur)&&U(this,Vr)){s.ttl=U(this,ur)[r];const a=ro.now()-U(this,Vr)[r];s.start=Math.floor(Date.now()-a)}U(this,$r)&&(s.size=U(this,$r)[r]),e.unshift([n,s])}return e}load(e){this.clear();for(const[r,n]of e){if(n.start){const i=Date.now()-n.start;n.start=ro.now()-i}this.set(r,n.value,n)}}set(e,r,n={}){var x,S,C,B,M;if(r===void 0)return this.delete(e),this;const{ttl:i=this.ttl,start:o,noDisposeOnSet:s=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:c}=n;let{noUpdateTTL:u=this.noUpdateTTL}=n;const y=U(this,As).call(this,e,r,n.size||0,a);if(this.maxEntrySize&&y>this.maxEntrySize)return c&&(c.set="miss",c.maxEntrySizeExceeded=!0),he(this,ae,si).call(this,e,"set"),this;let p=U(this,Et)===0?void 0:U(this,xt).get(e);if(p===void 0)p=U(this,Et)===0?U(this,_t):U(this,Hr).length!==0?U(this,Hr).pop():U(this,Et)===U(this,Or)?he(this,ae,Xs).call(this,!1):U(this,Et),U(this,pt)[p]=e,U(this,Ee)[p]=r,U(this,xt).set(e,p),U(this,Wt)[U(this,_t)]=p,U(this,lr)[p]=U(this,_t),ye(this,_t,p),Hs(this,Et)._++,U(this,wo).call(this,p,y,c),c&&(c.set="add"),u=!1;else{he(this,ae,Yo).call(this,p);const N=U(this,Ee)[p];if(r!==N){if(U(this,ci)&&he(this,ae,dt).call(this,N)){N.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:H}=N;H!==void 0&&!s&&(U(this,jr)&&((x=U(this,Pr))==null||x.call(this,H,e,"set")),U(this,Jt)&&((S=U(this,kt))==null||S.push([H,e,"set"])))}else s||(U(this,jr)&&((C=U(this,Pr))==null||C.call(this,N,e,"set")),U(this,Jt)&&((B=U(this,kt))==null||B.push([N,e,"set"])));if(U(this,Ui).call(this,p),U(this,wo).call(this,p,y,c),U(this,Ee)[p]=r,c){c.set="replace";const H=N&&he(this,ae,dt).call(this,N)?N.__staleWhileFetching:N;H!==void 0&&(c.oldValue=H)}}else c&&(c.set="update")}if(i!==0&&!U(this,ur)&&he(this,ae,$f).call(this),U(this,ur)&&(u||U(this,xs).call(this,p,i,o),c&&U(this,Dn).call(this,c,p)),!s&&U(this,Jt)&&U(this,kt)){const N=U(this,kt);let H;for(;H=N==null?void 0:N.shift();)(M=U(this,Fr))==null||M.call(this,...H)}return this}pop(){var e;try{for(;U(this,Et);){const r=U(this,Ee)[U(this,jt)];if(he(this,ae,Xs).call(this,!0),he(this,ae,dt).call(this,r)){if(r.__staleWhileFetching)return r.__staleWhileFetching}else if(r!==void 0)return r}}finally{if(U(this,Jt)&&U(this,kt)){const r=U(this,kt);let n;for(;n=r==null?void 0:r.shift();)(e=U(this,Fr))==null||e.call(this,...n)}}}has(e,r={}){const{updateAgeOnHas:n=this.updateAgeOnHas,status:i}=r,o=U(this,xt).get(e);if(o!==void 0){const s=U(this,Ee)[o];if(he(this,ae,dt).call(this,s)&&s.__staleWhileFetching===void 0)return!1;if(U(this,hr).call(this,o))i&&(i.has="stale",U(this,Dn).call(this,i,o));else return n&&U(this,Ri).call(this,o),i&&(i.has="hit",U(this,Dn).call(this,i,o)),!0}else i&&(i.has="miss");return!1}peek(e,r={}){const{allowStale:n=this.allowStale}=r,i=U(this,xt).get(e);if(i===void 0||!n&&U(this,hr).call(this,i))return;const o=U(this,Ee)[i];return he(this,ae,dt).call(this,o)?o.__staleWhileFetching:o}async fetch(e,r={}){const{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:s=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:c=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:y=this.noUpdateTTL,noDeleteOnFetchRejection:p=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:x=this.allowStaleOnFetchRejection,ignoreFetchAbort:S=this.ignoreFetchAbort,allowStaleOnFetchAbort:C=this.allowStaleOnFetchAbort,context:B,forceRefresh:M=!1,status:N,signal:H}=r;if(!U(this,ci))return N&&(N.fetch="get"),this.get(e,{allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:o,status:N});const L={allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:o,ttl:s,noDisposeOnSet:a,size:c,sizeCalculation:u,noUpdateTTL:y,noDeleteOnFetchRejection:p,allowStaleOnFetchRejection:x,allowStaleOnFetchAbort:C,ignoreFetchAbort:S,status:N,signal:H};let G=U(this,xt).get(e);if(G===void 0){N&&(N.fetch="miss");const K=he(this,ae,ea).call(this,e,G,L,B);return K.__returned=K}else{const K=U(this,Ee)[G];if(he(this,ae,dt).call(this,K)){const se=n&&K.__staleWhileFetching!==void 0;return N&&(N.fetch="inflight",se&&(N.returnedStale=!0)),se?K.__staleWhileFetching:K.__returned=K}const q=U(this,hr).call(this,G);if(!M&&!q)return N&&(N.fetch="hit"),he(this,ae,Yo).call(this,G),i&&U(this,Ri).call(this,G),N&&U(this,Dn).call(this,N,G),K;const Q=he(this,ae,ea).call(this,e,G,L,B),ee=Q.__staleWhileFetching!==void 0&&n;return N&&(N.fetch=q?"stale":"refresh",ee&&q&&(N.returnedStale=!0)),ee?Q.__staleWhileFetching:Q.__returned=Q}}async forceFetch(e,r={}){const n=await this.fetch(e,r);if(n===void 0)throw new Error("fetch() returned undefined");return n}memo(e,r={}){const n=U(this,yo);if(!n)throw new Error("no memoMethod provided to constructor");const{context:i,forceRefresh:o,...s}=r,a=this.get(e,s);if(!o&&a!==void 0)return a;const c=n(e,a,{options:s,context:i});return this.set(e,c,s),c}get(e,r={}){const{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,status:s}=r,a=U(this,xt).get(e);if(a!==void 0){const c=U(this,Ee)[a],u=he(this,ae,dt).call(this,c);return s&&U(this,Dn).call(this,s,a),U(this,hr).call(this,a)?(s&&(s.get="stale"),u?(s&&n&&c.__staleWhileFetching!==void 0&&(s.returnedStale=!0),n?c.__staleWhileFetching:void 0):(o||he(this,ae,si).call(this,e,"expire"),s&&n&&(s.returnedStale=!0),n?c:void 0)):(s&&(s.get="hit"),u?c.__staleWhileFetching:(he(this,ae,Yo).call(this,a),i&&U(this,Ri).call(this,a),c))}else s&&(s.get="miss")}delete(e){return he(this,ae,si).call(this,e,"delete")}clear(){return he(this,ae,zf).call(this,"delete")}};Or=new WeakMap,fr=new WeakMap,Pr=new WeakMap,Fr=new WeakMap,go=new WeakMap,yo=new WeakMap,Et=new WeakMap,Lr=new WeakMap,xt=new WeakMap,pt=new WeakMap,Ee=new WeakMap,Wt=new WeakMap,lr=new WeakMap,jt=new WeakMap,_t=new WeakMap,Hr=new WeakMap,kt=new WeakMap,$r=new WeakMap,Vr=new WeakMap,ur=new WeakMap,jr=new WeakMap,ci=new WeakMap,Jt=new WeakMap,ae=new WeakSet,$f=function(){const e=new Zs(U(this,Or)),r=new Zs(U(this,Or));ye(this,ur,e),ye(this,Vr,r),ye(this,xs,(o,s,a=ro.now())=>{if(r[o]=s!==0?a:0,e[o]=s,s!==0&&this.ttlAutopurge){const c=setTimeout(()=>{U(this,hr).call(this,o)&&he(this,ae,si).call(this,U(this,pt)[o],"expire")},s+1);c.unref&&c.unref()}}),ye(this,Ri,o=>{r[o]=e[o]!==0?ro.now():0}),ye(this,Dn,(o,s)=>{if(e[s]){const a=e[s],c=r[s];if(!a||!c)return;o.ttl=a,o.start=c,o.now=n||i();const u=o.now-c;o.remainingTTL=a-u}});let n=0;const i=()=>{const o=ro.now();if(this.ttlResolution>0){n=o;const s=setTimeout(()=>n=0,this.ttlResolution);s.unref&&s.unref()}return o};this.getRemainingTTL=o=>{const s=U(this,xt).get(o);if(s===void 0)return 0;const a=e[s],c=r[s];if(!a||!c)return 1/0;const u=(n||i())-c;return a-u},ye(this,hr,o=>{const s=r[o],a=e[o];return!!a&&!!s&&(n||i())-s>a})},Ri=new WeakMap,Dn=new WeakMap,xs=new WeakMap,hr=new WeakMap,$0=function(){const e=new Zs(U(this,Or));ye(this,Lr,0),ye(this,$r,e),ye(this,Ui,r=>{ye(this,Lr,U(this,Lr)-e[r]),e[r]=0}),ye(this,As,(r,n,i,o)=>{if(he(this,ae,dt).call(this,n))return 0;if(!ni(i))if(o){if(typeof o!="function")throw new TypeError("sizeCalculation must be a function");if(i=o(n,r),!ni(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i}),ye(this,wo,(r,n,i)=>{if(e[r]=n,U(this,fr)){const o=U(this,fr)-e[r];for(;U(this,Lr)>o;)he(this,ae,Xs).call(this,!0)}ye(this,Lr,U(this,Lr)+e[r]),i&&(i.entrySize=n,i.totalCalculatedSize=U(this,Lr))})},Ui=new WeakMap,wo=new WeakMap,As=new WeakMap,ii=function*({allowStale:e=this.allowStale}={}){if(U(this,Et))for(let r=U(this,_t);!(!he(this,ae,Vf).call(this,r)||((e||!U(this,hr).call(this,r))&&(yield r),r===U(this,jt)));)r=U(this,lr)[r]},oi=function*({allowStale:e=this.allowStale}={}){if(U(this,Et))for(let r=U(this,jt);!(!he(this,ae,Vf).call(this,r)||((e||!U(this,hr).call(this,r))&&(yield r),r===U(this,_t)));)r=U(this,Wt)[r]},Vf=function(e){return e!==void 0&&U(this,xt).get(U(this,pt)[e])===e},Xs=function(e){var o,s;const r=U(this,jt),n=U(this,pt)[r],i=U(this,Ee)[r];return U(this,ci)&&he(this,ae,dt).call(this,i)?i.__abortController.abort(new Error("evicted")):(U(this,jr)||U(this,Jt))&&(U(this,jr)&&((o=U(this,Pr))==null||o.call(this,i,n,"evict")),U(this,Jt)&&((s=U(this,kt))==null||s.push([i,n,"evict"]))),U(this,Ui).call(this,r),e&&(U(this,pt)[r]=void 0,U(this,Ee)[r]=void 0,U(this,Hr).push(r)),U(this,Et)===1?(ye(this,jt,ye(this,_t,0)),U(this,Hr).length=0):ye(this,jt,U(this,Wt)[r]),U(this,xt).delete(n),Hs(this,Et)._--,r},ea=function(e,r,n,i){const o=r===void 0?void 0:U(this,Ee)[r];if(he(this,ae,dt).call(this,o))return o;const s=new pa,{signal:a}=n;a==null||a.addEventListener("abort",()=>s.abort(a.reason),{signal:s.signal});const c={signal:s.signal,options:n,context:i},u=(B,M=!1)=>{const{aborted:N}=s.signal,H=n.ignoreFetchAbort&&B!==void 0;if(n.status&&(N&&!M?(n.status.fetchAborted=!0,n.status.fetchError=s.signal.reason,H&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),N&&!H&&!M)return p(s.signal.reason);const L=S;return U(this,Ee)[r]===S&&(B===void 0?L.__staleWhileFetching?U(this,Ee)[r]=L.__staleWhileFetching:he(this,ae,si).call(this,e,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.set(e,B,c.options))),B},y=B=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=B),p(B)),p=B=>{const{aborted:M}=s.signal,N=M&&n.allowStaleOnFetchAbort,H=N||n.allowStaleOnFetchRejection,L=H||n.noDeleteOnFetchRejection,G=S;if(U(this,Ee)[r]===S&&(!L||G.__staleWhileFetching===void 0?he(this,ae,si).call(this,e,"fetch"):N||(U(this,Ee)[r]=G.__staleWhileFetching)),H)return n.status&&G.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),G.__staleWhileFetching;if(G.__returned===G)throw B},x=(B,M)=>{var H;const N=(H=U(this,go))==null?void 0:H.call(this,e,o,c);N&&N instanceof Promise&&N.then(L=>B(L===void 0?void 0:L),M),s.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(B(void 0),n.allowStaleOnFetchAbort&&(B=L=>u(L,!0)))})};n.status&&(n.status.fetchDispatched=!0);const S=new Promise(x).then(u,y),C=Object.assign(S,{__abortController:s,__staleWhileFetching:o,__returned:void 0});return r===void 0?(this.set(e,C,{...c.options,status:void 0}),r=U(this,xt).get(e)):U(this,Ee)[r]=C,C},dt=function(e){if(!U(this,ci))return!1;const r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof pa},jf=function(e,r){U(this,lr)[r]=e,U(this,Wt)[e]=r},Yo=function(e){e!==U(this,_t)&&(e===U(this,jt)?ye(this,jt,U(this,Wt)[e]):he(this,ae,jf).call(this,U(this,lr)[e],U(this,Wt)[e]),he(this,ae,jf).call(this,U(this,_t),e),ye(this,_t,e))},si=function(e,r){var i,o,s,a;let n=!1;if(U(this,Et)!==0){const c=U(this,xt).get(e);if(c!==void 0)if(n=!0,U(this,Et)===1)he(this,ae,zf).call(this,r);else{U(this,Ui).call(this,c);const u=U(this,Ee)[c];if(he(this,ae,dt).call(this,u)?u.__abortController.abort(new Error("deleted")):(U(this,jr)||U(this,Jt))&&(U(this,jr)&&((i=U(this,Pr))==null||i.call(this,u,e,r)),U(this,Jt)&&((o=U(this,kt))==null||o.push([u,e,r]))),U(this,xt).delete(e),U(this,pt)[c]=void 0,U(this,Ee)[c]=void 0,c===U(this,_t))ye(this,_t,U(this,lr)[c]);else if(c===U(this,jt))ye(this,jt,U(this,Wt)[c]);else{const y=U(this,lr)[c];U(this,Wt)[y]=U(this,Wt)[c];const p=U(this,Wt)[c];U(this,lr)[p]=U(this,lr)[c]}Hs(this,Et)._--,U(this,Hr).push(c)}}if(U(this,Jt)&&((s=U(this,kt))!=null&&s.length)){const c=U(this,kt);let u;for(;u=c==null?void 0:c.shift();)(a=U(this,Fr))==null||a.call(this,...u)}return n},zf=function(e){var r,n,i;for(const o of he(this,ae,oi).call(this,{allowStale:!0})){const s=U(this,Ee)[o];if(he(this,ae,dt).call(this,s))s.__abortController.abort(new Error("deleted"));else{const a=U(this,pt)[o];U(this,jr)&&((r=U(this,Pr))==null||r.call(this,s,a,e)),U(this,Jt)&&((n=U(this,kt))==null||n.push([s,a,e]))}}if(U(this,xt).clear(),U(this,Ee).fill(void 0),U(this,pt).fill(void 0),U(this,ur)&&U(this,Vr)&&(U(this,ur).fill(0),U(this,Vr).fill(0)),U(this,$r)&&U(this,$r).fill(0),ye(this,jt,0),ye(this,_t,0),U(this,Hr).length=0,ye(this,Lr,0),ye(this,Et,0),U(this,Jt)&&U(this,kt)){const o=U(this,kt);let s;for(;s=o==null?void 0:o.shift();)(i=U(this,Fr))==null||i.call(this,...s)}};let Hf=uh,Kf;try{Kf=new TextDecoder}catch{}let de,Oi,X=0;const H1=105,$1=57342,V1=57343,Oh=57337,Ph=6,no={};let Go=11281e4,vn=1681e4,_e={},wt,ga,ya=0,fs=0,Bt,xr,At=[],Gf=[],ir,Qt,Qo,Fh={useRecords:!1,mapsAsObjects:!0},ls=!1,V0=2;try{new Function("")}catch{V0=1/0}let j0=class qf{constructor(e){if(e&&((e.keyMap||e._keyMap)&&!e.useRecords&&(e.useRecords=!1,e.mapsAsObjects=!0),e.useRecords===!1&&e.mapsAsObjects===void 0&&(e.mapsAsObjects=!0),e.getStructures&&(e.getShared=e.getStructures),e.getShared&&!e.structures&&((e.structures=[]).uninitialized=!0),e.keyMap)){this.mapKey=new Map;for(let[r,n]of Object.entries(e.keyMap))this.mapKey.set(n,r)}Object.assign(this,e)}decodeKey(e){return this.keyMap&&this.mapKey.get(e)||e}encodeKey(e){return this.keyMap&&this.keyMap.hasOwnProperty(e)?this.keyMap[e]:e}encodeKeys(e){if(!this._keyMap)return e;let r=new Map;for(let[n,i]of Object.entries(e))r.set(this._keyMap.hasOwnProperty(n)?this._keyMap[n]:n,i);return r}decodeKeys(e){if(!this._keyMap||e.constructor.name!="Map")return e;if(!this._mapKey){this._mapKey=new Map;for(let[n,i]of Object.entries(this._keyMap))this._mapKey.set(i,n)}let r={};return e.forEach((n,i)=>r[Ar(this._mapKey.has(i)?this._mapKey.get(i):i)]=n),r}mapDecode(e,r){let n=this.decode(e);if(this._keyMap)switch(n.constructor.name){case"Array":return n.map(i=>this.decodeKeys(i))}return n}decode(e,r){if(de)return q0(()=>(Qf(),this?this.decode(e,r):qf.prototype.decode.call(Fh,e,r)));Oi=r>-1?r:e.length,X=0,fs=0,ga=null,Bt=null,de=e;try{Qt=e.dataView||(e.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength))}catch(n){throw de=null,e instanceof Uint8Array?n:new Error("Source must be a Uint8Array or Buffer but was a "+(e&&typeof e=="object"?e.constructor.name:typeof e))}if(this instanceof qf){if(_e=this,ir=this.sharedValues&&(this.pack?new Array(this.maxPrivatePackedValues||16).concat(this.sharedValues):this.sharedValues),this.structures)return wt=this.structures,Ks();(!wt||wt.length>0)&&(wt=[])}else _e=Fh,(!wt||wt.length>0)&&(wt=[]),ir=null;return Ks()}decodeMultiple(e,r){let n,i=0;try{let o=e.length;ls=!0;let s=this?this.decode(e,o):pu.decode(e,o);if(r){if(r(s)===!1)return;for(;X=Bt.postBundlePosition){let e=new Error("Unexpected bundle position");throw e.incomplete=!0,e}X=Bt.postBundlePosition,Bt=null}if(X==Oi)wt=null,de=null,xr&&(xr=null);else if(X>Oi){let e=new Error("Unexpected end of CBOR data");throw e.incomplete=!0,e}else if(!ls)throw new Error("Data read, but end of buffer not reached");return t}catch(t){throw Qf(),(t instanceof RangeError||t.message.startsWith("Unexpected end of buffer"))&&(t.incomplete=!0),t}}function Ne(){let t=de[X++],e=t>>5;if(t=t&31,t>23)switch(t){case 24:t=de[X++];break;case 25:if(e==7)return G1();t=Qt.getUint16(X),X+=2;break;case 26:if(e==7){let r=Qt.getFloat32(X);if(_e.useFloat32>2){let n=du[(de[X]&127)<<1|de[X+1]>>7];return X+=4,(n*r+(r>0?.5:-.5)>>0)/n}return X+=4,r}t=Qt.getUint32(X),X+=4;break;case 27:if(e==7){let r=Qt.getFloat64(X);return X+=8,r}if(e>1){if(Qt.getUint32(X)>0)throw new Error("JavaScript does not support arrays, maps, or strings with length over 4294967295");t=Qt.getUint32(X+4)}else _e.int64AsNumber?(t=Qt.getUint32(X)*4294967296,t+=Qt.getUint32(X+4)):t=Qt.getBigUint64(X);X+=8;break;case 31:switch(e){case 2:case 3:throw new Error("Indefinite length not supported for byte or text strings");case 4:let r=[],n,i=0;for(;(n=Ne())!=no;){if(i>=Go)throw new Error(`Array length exceeds ${Go}`);r[i++]=n}return e==4?r:e==3?r.join(""):Buffer.concat(r);case 5:let o;if(_e.mapsAsObjects){let s={},a=0;if(_e.keyMap)for(;(o=Ne())!=no;){if(a++>=vn)throw new Error(`Property count exceeds ${vn}`);s[Ar(_e.decodeKey(o))]=Ne()}else for(;(o=Ne())!=no;){if(a++>=vn)throw new Error(`Property count exceeds ${vn}`);s[Ar(o)]=Ne()}return s}else{Qo&&(_e.mapsAsObjects=!0,Qo=!1);let s=new Map;if(_e.keyMap){let a=0;for(;(o=Ne())!=no;){if(a++>=vn)throw new Error(`Map size exceeds ${vn}`);s.set(_e.decodeKey(o),Ne())}}else{let a=0;for(;(o=Ne())!=no;){if(a++>=vn)throw new Error(`Map size exceeds ${vn}`);s.set(o,Ne())}}return s}case 7:return no;default:throw new Error("Invalid major type for indefinite length "+e)}default:throw new Error("Unknown token "+t)}switch(e){case 0:return t;case 1:return~t;case 2:return K1(t);case 3:if(fs>=X)return ga.slice(X-ya,(X+=t)-ya);if(fs==0&&Oi<140&&t<32){let i=t<16?z0(t):z1(t);if(i!=null)return i}return j1(t);case 4:if(t>=Go)throw new Error(`Array length exceeds ${Go}`);let r=new Array(t);for(let i=0;i=vn)throw new Error(`Map size exceeds ${Go}`);if(_e.mapsAsObjects){let i={};if(_e.keyMap)for(let o=0;o=Oh){let i=wt[t&8191];if(i)return i.read||(i.read=Wf(i)),i.read();if(t<65536){if(t==V1){let o=co(),s=Ne(),a=Ne();Yf(s,a);let c={};if(_e.keyMap)for(let u=2;u23)switch(r){case 24:r=de[X++];break;case 25:r=Qt.getUint16(X),X+=2;break;case 26:r=Qt.getUint32(X),X+=4;break;default:throw new Error("Expected array header, but got "+de[X-1])}let n=this.compiledReader;for(;n;){if(n.propertyCount===r)return n(Ne);n=n.next}if(this.slowReads++>=V0){let o=this.length==r?this:this.slice(0,r);return n=_e.keyMap?new Function("r","return {"+o.map(s=>_e.decodeKey(s)).map(s=>Lh.test(s)?Ar(s)+":r()":"["+JSON.stringify(s)+"]:r()").join(",")+"}"):new Function("r","return {"+o.map(s=>Lh.test(s)?Ar(s)+":r()":"["+JSON.stringify(s)+"]:r()").join(",")+"}"),this.compiledReader&&(n.next=this.compiledReader),n.propertyCount=r,this.compiledReader=n,n(Ne)}let i={};if(_e.keyMap)for(let o=0;o64&&Kf)return Kf.decode(de.subarray(X,X+=t));const r=X+t,n=[];for(e="";X65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|c&1023),n.push(c)}else n.push(i);n.length>=4096&&(e+=Mt.apply(String,n),n.length=0)}return n.length>0&&(e+=Mt.apply(String,n)),e}let Mt=String.fromCharCode;function z1(t){let e=X,r=new Array(t);for(let n=0;n0){X=e;return}r[n]=i}return Mt.apply(String,r)}function z0(t){if(t<4)if(t<2){if(t===0)return"";{let e=de[X++];if((e&128)>1){X-=1;return}return Mt(e)}}else{let e=de[X++],r=de[X++];if((e&128)>0||(r&128)>0){X-=2;return}if(t<3)return Mt(e,r);let n=de[X++];if((n&128)>0){X-=3;return}return Mt(e,r,n)}else{let e=de[X++],r=de[X++],n=de[X++],i=de[X++];if((e&128)>0||(r&128)>0||(n&128)>0||(i&128)>0){X-=4;return}if(t<6){if(t===4)return Mt(e,r,n,i);{let o=de[X++];if((o&128)>0){X-=5;return}return Mt(e,r,n,i,o)}}else if(t<8){let o=de[X++],s=de[X++];if((o&128)>0||(s&128)>0){X-=6;return}if(t<7)return Mt(e,r,n,i,o,s);let a=de[X++];if((a&128)>0){X-=7;return}return Mt(e,r,n,i,o,s,a)}else{let o=de[X++],s=de[X++],a=de[X++],c=de[X++];if((o&128)>0||(s&128)>0||(a&128)>0||(c&128)>0){X-=8;return}if(t<10){if(t===8)return Mt(e,r,n,i,o,s,a,c);{let u=de[X++];if((u&128)>0){X-=9;return}return Mt(e,r,n,i,o,s,a,c,u)}}else if(t<12){let u=de[X++],y=de[X++];if((u&128)>0||(y&128)>0){X-=10;return}if(t<11)return Mt(e,r,n,i,o,s,a,c,u,y);let p=de[X++];if((p&128)>0){X-=11;return}return Mt(e,r,n,i,o,s,a,c,u,y,p)}else{let u=de[X++],y=de[X++],p=de[X++],x=de[X++];if((u&128)>0||(y&128)>0||(p&128)>0||(x&128)>0){X-=12;return}if(t<14){if(t===12)return Mt(e,r,n,i,o,s,a,c,u,y,p,x);{let S=de[X++];if((S&128)>0){X-=13;return}return Mt(e,r,n,i,o,s,a,c,u,y,p,x,S)}}else{let S=de[X++],C=de[X++];if((S&128)>0||(C&128)>0){X-=14;return}if(t<15)return Mt(e,r,n,i,o,s,a,c,u,y,p,x,S,C);let B=de[X++];if((B&128)>0){X-=15;return}return Mt(e,r,n,i,o,s,a,c,u,y,p,x,S,C,B)}}}}}function K1(t){return _e.copyBuffers?Uint8Array.prototype.slice.call(de,X,X+=t):de.subarray(X,X+=t)}let K0=new Float32Array(1),Gs=new Uint8Array(K0.buffer,0,4);function G1(){let t=de[X++],e=de[X++],r=(t&127)>>2;if(r===31)return e||t&3?NaN:t&128?-1/0:1/0;if(r===0){let n=((t&3)<<8|e)/16777216;return t&128?-n:n}return Gs[3]=t&128|(r>>1)+56,Gs[2]=(t&7)<<5|e>>3,Gs[1]=e<<5,Gs[0]=0,K0[0]}new Array(4096);class ji{constructor(e,r){this.value=e,this.tag=r}}At[0]=t=>new Date(t);At[1]=t=>new Date(Math.round(t*1e3));At[2]=t=>{let e=BigInt(0);for(let r=0,n=t.byteLength;rBigInt(-1)-At[2](t);At[4]=t=>+(t[1]+"e"+t[0]);At[5]=t=>t[1]*Math.exp(t[0]*Math.log(2));const Yf=(t,e)=>{t=t-57344;let r=wt[t];r&&r.isShared&&((wt.restoreStructures||(wt.restoreStructures=[]))[t]=r),wt[t]=e,e.read=Wf(e)};At[H1]=t=>{let e=t.length,r=t[1];Yf(t[0],r);let n={};for(let i=2;iBt?Bt[0].slice(Bt.position0,Bt.position0+=t):new ji(t,14);At[15]=t=>Bt?Bt[1].slice(Bt.position1,Bt.position1+=t):new ji(t,15);let q1={Error,RegExp};At[27]=t=>(q1[t[0]]||Error)(t[1],t[2]);const G0=t=>{if(de[X++]!=132){let r=new Error("Packed values structure must be followed by a 4 element array");throw de.length{if(!ir)if(_e.getShared)hu();else return new ji(t,Ph);if(typeof t=="number")return ir[16+(t>=0?2*t:-2*t-1)];let e=new Error("No support for non-integer packed references yet");throw t===void 0&&(e.incomplete=!0),e};At[28]=t=>{xr||(xr=new Map,xr.id=0);let e=xr.id++,r=X,n=de[X],i;n>>5==4?i=[]:i={};let o={target:i};xr.set(e,o);let s=t();return o.used?(Object.getPrototypeOf(i)!==Object.getPrototypeOf(s)&&(X=r,i=s,xr.set(e,{target:i}),s=t()),Object.assign(i,s)):(o.target=s,s)};At[28].handlesRead=!0;At[29]=t=>{let e=xr.get(t);return e.used=!0,e.target};At[258]=t=>new Set(t);(At[259]=t=>(_e.mapsAsObjects&&(_e.mapsAsObjects=!1,Qo=!0),t())).handlesRead=!0;function io(t,e){return typeof t=="string"?t+e:t instanceof Array?t.concat(e):Object.assign({},t,e)}function Mi(){if(!ir)if(_e.getShared)hu();else throw new Error("No packed values available");return ir}const W1=1399353956;Gf.push((t,e)=>{if(t>=225&&t<=255)return io(Mi().prefixes[t-224],e);if(t>=28704&&t<=32767)return io(Mi().prefixes[t-28672],e);if(t>=1879052288&&t<=2147483647)return io(Mi().prefixes[t-1879048192],e);if(t>=216&&t<=223)return io(e,Mi().suffixes[t-216]);if(t>=27647&&t<=28671)return io(e,Mi().suffixes[t-27639]);if(t>=1811940352&&t<=1879048191)return io(e,Mi().suffixes[t-1811939328]);if(t==W1)return{packedValues:ir,structures:wt.slice(0),version:e};if(t==55799)return e});const J1=new Uint8Array(new Uint16Array([1]).buffer)[0]==1,Hh=[Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,typeof BigUint64Array>"u"?{name:"BigUint64Array"}:BigUint64Array,Int8Array,Int16Array,Int32Array,typeof BigInt64Array>"u"?{name:"BigInt64Array"}:BigInt64Array,Float32Array,Float64Array],Y1=[64,68,69,70,71,72,77,78,79,85,86];for(let t=0;t{if(!t)throw new Error("Could not find typed array for code "+e);return!_e.copyBuffers&&(n===1||n===2&&!(s.byteOffset&1)||n===4&&!(s.byteOffset&3)||n===8&&!(s.byteOffset&7))?new t(s.buffer,s.byteOffset,s.byteLength>>o):new t(Uint8Array.prototype.slice.call(s,0).buffer)}:s=>{if(!t)throw new Error("Could not find typed array for code "+e);let a=new DataView(s.buffer,s.byteOffset,s.byteLength),c=s.length>>o,u=new t(c),y=a[r];for(let p=0;p23)switch(t){case 24:t=de[X++];break;case 25:t=Qt.getUint16(X),X+=2;break;case 26:t=Qt.getUint32(X),X+=4;break}return t}function hu(){if(_e.getShared){let t=q0(()=>(de=null,_e.getShared()))||{},e=t.structures||[];_e.sharedVersion=t.version,ir=_e.sharedValues=t.packedValues,wt===!0?_e.structures=wt=e:wt.splice.apply(wt,[0,e.length].concat(e))}}function q0(t){let e=Oi,r=X,n=ya,i=fs,o=ga,s=xr,a=Bt,c=new Uint8Array(de.slice(0,Oi)),u=wt,y=_e,p=ls,x=t();return Oi=e,X=r,ya=n,fs=i,ga=o,xr=s,Bt=a,de=c,ls=p,wt=u,_e=y,Qt=new DataView(de.buffer,de.byteOffset,de.byteLength),x}function Qf(){de=null,xr=null,wt=null}const du=new Array(147);for(let t=0;t<256;t++)du[t]=+("1e"+Math.floor(45.15-t*.30103));let pu=new j0({useRecords:!1});const X1=pu.decode;pu.decodeMultiple;let ta;try{ta=new TextEncoder}catch{}let Zf,W0;const za=typeof globalThis=="object"&&globalThis.Buffer,Bs=typeof za<"u",sf=Bs?za.allocUnsafeSlow:Uint8Array,$h=Bs?za:Uint8Array,Vh=256,jh=Bs?4294967296:2144337920;let af,z,gt,P=0,ei,St=null;const ev=61440,tv=/[\u0080-\uFFFF]/,ar=Symbol("record-id");let rv=class extends j0{constructor(e){super(e),this.offset=0;let r,n,i,o,s;e=e||{};let a=$h.prototype.utf8Write?function(b,f,l){return z.utf8Write(b,f,l)}:ta&&ta.encodeInto?function(b,f){return ta.encodeInto(b,z.subarray(f)).written}:!1,c=this,u=e.structures||e.saveStructures,y=e.maxSharedStructures;if(y==null&&(y=u?128:0),y>8190)throw new Error("Maximum maxSharedStructure is 8190");let p=e.sequential;p&&(y=0),this.structures||(this.structures=[]),this.saveStructures&&(this.saveShared=this.saveStructures);let x,S,C=e.sharedValues,B;if(C){B=Object.create(null);for(let b=0,f=C.length;bthis.encodeKeys(l));break}return this.encode(b,f)},this.encode=function(b,f){if(z||(z=new sf(8192),gt=new DataView(z.buffer,0,8192),P=0),ei=z.length-10,ei-P<2048?(z=new sf(z.length),gt=new DataView(z.buffer,0,z.length),ei=z.length-10,P=0):f===Gh&&(P=P+7&2147483640),r=P,c.useSelfDescribedHeader&&(gt.setUint32(P,3654940416),P+=3),s=c.structuredClone?new Map:null,c.bundleStrings&&typeof b!="string"?(St=[],St.size=1/0):St=null,n=c.structures,n){if(n.uninitialized){let g=c.getShared()||{};c.structures=n=g.structures||[],c.sharedVersion=g.version;let m=c.sharedValues=g.packedValues;if(m){B={};for(let E=0,I=m.length;Ey&&!p&&(l=y),!n.transitions){n.transitions=Object.create(null);for(let g=0;g0){z[P++]=216,z[P++]=51,tn(4);let g=l.values;L(g),tn(0),tn(0),S=Object.create(B||null);for(let m=0,E=g.length;mei&&K(P),c.offset=P;let l=ov(z.subarray(r,P),s.idsToInsert);return s=null,l}return f&Gh?(z.start=r,z.end=P,z):z.subarray(r,P)}finally{if(n){if(H<10&&H++,n.length>y&&(n.length=y),N>1e4)n.transitions=null,H=0,N=0,M.length>0&&(M=[]);else if(M.length>0&&!p){for(let l=0,g=M.length;ly&&(c.structures=c.structures.slice(0,y));let l=z.subarray(r,P);return c.updateSharedData()===!1?c.encode(b):l}f&sv&&(P=r)}},this.findCommonStringsToPack=()=>(x=new Map,B||(B=Object.create(null)),b=>{let f=b&&b.threshold||4,l=this.pack?b.maxPrivatePackedValues||16:0;C||(C=this.sharedValues=[]);for(let[g,m]of x)m.count>f&&(B[g]=l++,C.push(g),i=!0);for(;this.saveShared&&this.updateSharedData()===!1;);x=null});const L=b=>{P>ei&&(z=K(P));var f=typeof b,l;if(f==="string"){if(S){let I=S[b];if(I>=0){I<16?z[P++]=I+224:(z[P++]=198,I&1?L(15-I>>1):L(I-16>>1));return}else if(x&&!e.pack){let T=x.get(b);T?T.count++:x.set(b,{count:1})}}let g=b.length;if(St&&g>=4&&g<1024){if((St.size+=g)>ev){let T,D=(St[0]?St[0].length*3+St[1].length:0)+10;P+D>ei&&(z=K(P+D)),z[P++]=217,z[P++]=223,z[P++]=249,z[P++]=St.position?132:130,z[P++]=26,T=P-r,P+=4,St.position&&Kh(r,L),St=["",""],St.size=0,St.position=T}let I=tv.test(b);St[I?0:1]+=b,z[P++]=I?206:207,L(g);return}let m;g<32?m=1:g<256?m=2:g<65536?m=3:m=5;let E=g*3;if(P+E>ei&&(z=K(P+E)),g<64||!a){let I,T,D,h=P+m;for(I=0;I>6|192,z[h++]=T&63|128):(T&64512)===55296&&((D=b.charCodeAt(I+1))&64512)===56320?(T=65536+((T&1023)<<10)+(D&1023),I++,z[h++]=T>>18|240,z[h++]=T>>12&63|128,z[h++]=T>>6&63|128,z[h++]=T&63|128):(z[h++]=T>>12|224,z[h++]=T>>6&63|128,z[h++]=T&63|128);l=h-P-m}else l=a(b,P+m,E);l<24?z[P++]=96|l:l<256?(m<2&&z.copyWithin(P+2,P+1,P+1+l),z[P++]=120,z[P++]=l):l<65536?(m<3&&z.copyWithin(P+3,P+2,P+2+l),z[P++]=121,z[P++]=l>>8,z[P++]=l&255):(m<5&&z.copyWithin(P+5,P+3,P+3+l),z[P++]=122,gt.setUint32(P,l),P+=4),P+=l}else if(f==="number")if(!this.alwaysUseFloat&&b>>>0===b)b<24?z[P++]=b:b<256?(z[P++]=24,z[P++]=b):b<65536?(z[P++]=25,z[P++]=b>>8,z[P++]=b&255):(z[P++]=26,gt.setUint32(P,b),P+=4);else if(!this.alwaysUseFloat&&b>>0===b)b>=-24?z[P++]=31-b:b>=-256?(z[P++]=56,z[P++]=~b):b>=-65536?(z[P++]=57,gt.setUint16(P,~b),P+=2):(z[P++]=58,gt.setUint32(P,~b),P+=4);else{let g;if((g=this.useFloat32)>0&&b<4294967296&&b>=-2147483648){z[P++]=250,gt.setFloat32(P,b);let m;if(g<4||(m=b*du[(z[P]&127)<<1|z[P+1]>>7])>>0===m){P+=4;return}else P--}z[P++]=251,gt.setFloat64(P,b),P+=8}else if(f==="object")if(!b)z[P++]=246;else{if(s){let m=s.get(b);if(m){if(z[P++]=216,z[P++]=29,z[P++]=25,!m.references){let E=s.idsToInsert||(s.idsToInsert=[]);m.references=[],E.push(m)}m.references.push(P-r),P+=2;return}else s.set(b,{offset:P-r})}let g=b.constructor;if(g===Object)G(b);else if(g===Array){l=b.length,l<24?z[P++]=128|l:tn(l);for(let m=0;m>8,z[P++]=l&255):(z[P++]=186,gt.setUint32(P,l),P+=4),c.keyMap)for(let[m,E]of b)L(c.encodeKey(m)),L(E);else for(let[m,E]of b)L(m),L(E);else{for(let m=0,E=Zf.length;m>8,z[P++]=D&255):D>-1&&(z[P++]=218,gt.setUint32(P,D),P+=4),T.encode.call(this,b,L,K);return}}if(b[Symbol.iterator]){if(af){let m=new Error("Iterable should be serialized as iterator");throw m.iteratorNotHandled=!0,m}z[P++]=159;for(let m of b)L(m);z[P++]=255;return}if(b[Symbol.asyncIterator]||cf(b)){let m=new Error("Iterable/blob should be serialized as iterator");throw m.iteratorNotHandled=!0,m}if(this.useToJSON&&b.toJSON){const m=b.toJSON();if(m!==b)return L(m)}G(b)}}else if(f==="boolean")z[P++]=b?245:244;else if(f==="bigint"){if(b=0)z[P++]=27,gt.setBigUint64(P,b);else if(b>-(BigInt(1)<=BigInt(0)?z[P++]=194:(z[P++]=195,b=BigInt(-1)-b);let g=[];for(;b;)g.push(Number(b&BigInt(255))),b>>=BigInt(8);Xf(new Uint8Array(g.reverse()),K);return}P+=8}else if(f==="undefined")z[P++]=247;else throw new Error("Unknown type: "+f)},G=this.useRecords===!1?this.variableMapSize?b=>{let f=Object.keys(b),l=Object.values(b),g=f.length;if(g<24?z[P++]=160|g:g<256?(z[P++]=184,z[P++]=g):g<65536?(z[P++]=185,z[P++]=g>>8,z[P++]=g&255):(z[P++]=186,gt.setUint32(P,g),P+=4),c.keyMap)for(let m=0;m{z[P++]=185;let f=P-r;P+=2;let l=0;if(c.keyMap)for(let g in b)(typeof b.hasOwnProperty!="function"||b.hasOwnProperty(g))&&(L(c.encodeKey(g)),L(b[g]),l++);else for(let g in b)(typeof b.hasOwnProperty!="function"||b.hasOwnProperty(g))&&(L(g),L(b[g]),l++);z[f+++r]=l>>8,z[f+r]=l&255}:(b,f)=>{let l,g=o.transitions||(o.transitions=Object.create(null)),m=0,E=0,I,T;if(this.keyMap){T=Object.keys(b).map(h=>this.encodeKey(h)),E=T.length;for(let h=0;h>8|224,z[P++]=D&255;else if(T||(T=g.__keys__||(g.__keys__=Object.keys(b))),I===void 0?(D=o.nextId++,D||(D=0,o.nextId=1),D>=Vh&&(o.nextId=(D=y)+1)):D=I,o[D]=T,D>8|224,z[P++]=D&255,g=o.transitions;for(let h=0;h=Vh-y&&(M.shift()[ar]=void 0),M.push(g),tn(E+2),L(57344+D),L(T),f)return;for(let h in b)(typeof b.hasOwnProperty!="function"||b.hasOwnProperty(h))&&L(b[h]);return}if(E<24?z[P++]=128|E:tn(E),!f)for(let h in b)(typeof b.hasOwnProperty!="function"||b.hasOwnProperty(h))&&L(b[h])},K=b=>{let f;if(b>16777216){if(b-r>jh)throw new Error("Encoded buffer would be larger than maximum buffer size");f=Math.min(jh,Math.round(Math.max((b-r)*(b>67108864?1.25:2),4194304)/4096)*4096)}else f=(Math.max(b-r<<2,z.length-1)>>12)+1<<12;let l=new sf(f);return gt=new DataView(l.buffer,0,f),z.copy?z.copy(l,0,r,b):l.set(z.slice(r,b)),P-=r,r=0,ei=l.length-10,z=l};let q=100,Q=1e3;this.encodeAsIterable=function(b,f){return ne(b,f,Z)},this.encodeAsAsyncIterable=function(b,f){return ne(b,f,ie)};function*Z(b,f,l){let g=b.constructor;if(g===Object){let m=c.useRecords!==!1;m?G(b,!0):zh(Object.keys(b).length,160);for(let E in b){let I=b[E];m||L(E),I&&typeof I=="object"?f[E]?yield*Z(I,f[E]):yield*ee(I,f,E):L(I)}}else if(g===Array){let m=b.length;tn(m);for(let E=0;Eq)?f.element?yield*Z(I,f.element):yield*ee(I,f,"element"):L(I)}}else if(b[Symbol.iterator]&&!b.buffer){z[P++]=159;for(let m of b)m&&(typeof m=="object"||P-r>q)?f.element?yield*Z(m,f.element):yield*ee(m,f,"element"):L(m);z[P++]=255}else cf(b)?(zh(b.size,64),yield z.subarray(r,P),yield b,se()):b[Symbol.asyncIterator]?(z[P++]=159,yield z.subarray(r,P),yield b,se(),z[P++]=255):L(b);l&&P>r?yield z.subarray(r,P):P-r>q&&(yield z.subarray(r,P),se())}function*ee(b,f,l){let g=P-r;try{L(b),P-r>q&&(yield z.subarray(r,P),se())}catch(m){if(m.iteratorNotHandled)f[l]={},P=r+g,yield*Z.call(this,b,f[l]);else throw m}}function se(){q=Q,c.encode(null,ff)}function ne(b,f,l){return f&&f.chunkThreshold?q=Q=f.chunkThreshold:q=100,b&&typeof b=="object"?(c.encode(null,ff),l(b,c.iterateProperties||(c.iterateProperties={}),!0)):[c.encode(b)]}async function*ie(b,f){for(let l of Z(b,f,!0)){let g=l.constructor;if(g===$h||g===Uint8Array)yield l;else if(cf(l)){let m=l.stream().getReader(),E;for(;!(E=await m.read()).done;)yield E.value}else if(l[Symbol.asyncIterator])for await(let m of l)se(),m?yield*ie(m,f.async||(f.async={})):yield c.encode(m);else yield l}}}useBuffer(e){z=e,gt=new DataView(z.buffer,z.byteOffset,z.byteLength),P=0}clearSharedData(){this.structures&&(this.structures=[]),this.sharedValues&&(this.sharedValues=void 0)}updateSharedData(){let e=this.sharedVersion||0;this.sharedVersion=e+1;let r=this.structures.slice(0),n=new J0(r,this.sharedValues,this.sharedVersion),i=this.saveShared(n,o=>(o&&o.version||0)==e);return i===!1?(n=this.getShared()||{},this.structures=n.structures||[],this.sharedValues=n.packedValues,this.sharedVersion=n.version,this.structures.nextId=this.structures.length):r.forEach((o,s)=>this.structures[s]=o),i}};function zh(t,e){t<24?z[P++]=e|t:t<256?(z[P++]=e|24,z[P++]=t):t<65536?(z[P++]=e|25,z[P++]=t>>8,z[P++]=t&255):(z[P++]=e|26,gt.setUint32(P,t),P+=4)}class J0{constructor(e,r,n){this.structures=e,this.packedValues=r,this.version=n}}function tn(t){t<24?z[P++]=128|t:t<256?(z[P++]=152,z[P++]=t):t<65536?(z[P++]=153,z[P++]=t>>8,z[P++]=t&255):(z[P++]=154,gt.setUint32(P,t),P+=4)}const nv=typeof Blob>"u"?function(){}:Blob;function cf(t){if(t instanceof nv)return!0;let e=t[Symbol.toStringTag];return e==="Blob"||e==="File"}function ra(t,e){switch(typeof t){case"string":if(t.length>3){if(e.objectMap[t]>-1||e.values.length>=e.maxValues)return;let n=e.get(t);if(n)++n.count==2&&e.values.push(t);else if(e.set(t,{count:1}),e.samplingPackedValues){let i=e.samplingPackedValues.get(t);i?i.count++:e.samplingPackedValues.set(t,{count:1})}}break;case"object":if(t)if(t instanceof Array)for(let n=0,i=t.length;n"u"?function(){}:BigUint64Array,Int8Array,Int16Array,Int32Array,typeof BigInt64Array>"u"?function(){}:BigInt64Array,Float32Array,Float64Array,J0];Zf=[{tag:1,encode(t,e){let r=t.getTime()/1e3;(this.useTimestamp32||t.getMilliseconds()===0)&&r>=0&&r<4294967296?(z[P++]=26,gt.setUint32(P,r),P+=4):(z[P++]=251,gt.setFloat64(P,r),P+=8)}},{tag:258,encode(t,e){let r=Array.from(t);e(r)}},{tag:27,encode(t,e){e([t.name,t.message])}},{tag:27,encode(t,e){e(["RegExp",t.source,t.flags])}},{getTag(t){return t.tag},encode(t,e){e(t.value)}},{encode(t,e,r){Xf(t,r)}},{getTag(t){if(t.constructor===Uint8Array&&(this.tagUint8Array||Bs&&this.tagUint8Array!==!1))return 64},encode(t,e,r){Xf(t,r)}},Zr(68,1),Zr(69,2),Zr(70,4),Zr(71,8),Zr(72,1),Zr(77,2),Zr(78,4),Zr(79,8),Zr(85,4),Zr(86,8),{encode(t,e){let r=t.packedValues||[],n=t.structures||[];if(r.values.length>0){z[P++]=216,z[P++]=51,tn(4);let i=r.values;e(i),tn(0),tn(0),packedObjectMap=Object.create(sharedPackedObjectMap||null);for(let o=0,s=i.length;o1&&(t-=4),{tag:t,encode:function(n,i){let o=n.byteLength,s=n.byteOffset||0,a=n.buffer||n;i(Bs?za.from(a,s,o):new Uint8Array(a,s,o))}}}function Xf(t,e){let r=t.byteLength;r<24?z[P++]=64+r:r<256?(z[P++]=88,z[P++]=r):r<65536?(z[P++]=89,z[P++]=r>>8,z[P++]=r&255):(z[P++]=90,gt.setUint32(P,r),P+=4),P+r>=z.length&&e(P+r),z.set(t.buffer?t:new Uint8Array(t),P),P+=r}function ov(t,e){let r,n=e.length*2,i=t.length-n;e.sort((o,s)=>o.offset>s.offset?1:-1);for(let o=0;o>8,t[a]=o&255}for(;r=e.pop();){let o=r.offset;t.copyWithin(o+n,o,i),n-=2;let s=o+n;t[s++]=216,t[s++]=28,i=o}return t}function Kh(t,e){gt.setUint32(St.position+t,P-St.position-t+1);let r=St;St=null,e(r[0]),e(r[1])}let gu=new rv({useRecords:!1});gu.encode;gu.encodeAsIterable;gu.encodeAsAsyncIterable;const Gh=512,sv=1024,ff=2048;function yu(t){return globalThis.Buffer!=null?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function Y0(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?yu(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}function av(t,e){e||(e=t.reduce((i,o)=>i+o.length,0));const r=Y0(e);let n=0;for(const i of t)r.set(i,n),n+=i.length;return yu(r)}function cv(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n>>0,G=new Uint8Array(L);N!==H;){for(var K=C[N],q=0,Q=L-1;(K!==0||q>>0,G[Q]=K%a>>>0,K=K/a>>>0;if(K!==0)throw new Error("Non-zero carry");M=q,N++}for(var Z=L-M;Z!==L&&G[Z]===0;)Z++;for(var ee=c.repeat(B);Z>>0,L=new Uint8Array(H);C[B];){var G=r[C.charCodeAt(B)];if(G===255)return;for(var K=0,q=H-1;(G!==0||K>>0,L[q]=G%256>>>0,G=G/256>>>0;if(G!==0)throw new Error("Non-zero carry");N=K,B++}if(C[B]!==" "){for(var Q=H-N;Q!==H&&L[Q]===0;)Q++;for(var Z=new Uint8Array(M+(H-Q)),ee=M;Q!==H;)Z[ee++]=L[Q++];return Z}}}function S(C){var B=x(C);if(B)return B;throw new Error(`Non-${e} character`)}return{encode:p,decodeUnsafe:x,decode:S}}var fv=cv,lv=fv;const uv=t=>{if(t instanceof Uint8Array&&t.constructor.name==="Uint8Array")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")},hv=t=>new TextEncoder().encode(t),dv=t=>new TextDecoder().decode(t);let pv=class{constructor(e,r,n){this.name=e,this.prefix=r,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}},gv=class{constructor(e,r,n){if(this.name=e,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return Q0(this,e)}},yv=class{constructor(e){this.decoders=e}or(e){return Q0(this,e)}decode(e){const r=e[0],n=this.decoders[r];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}};const Q0=(t,e)=>new yv({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});let wv=class{constructor(e,r,n,i){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new pv(e,r,n),this.decoder=new gv(e,r,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}};const Ka=({name:t,prefix:e,encode:r,decode:n})=>new wv(t,e,r,n),Ds=({prefix:t,name:e,alphabet:r})=>{const{encode:n,decode:i}=lv(r,e);return Ka({prefix:t,name:e,encode:n,decode:o=>uv(i(o))})},mv=(t,e,r,n)=>{const i={};for(let y=0;y=8&&(a-=8,s[u++]=255&c>>a)}if(a>=r||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return s},bv=(t,e,r)=>{const n=e[e.length-1]==="=",i=(1<r;)s-=r,o+=e[i&a>>s];if(s&&(o+=e[i&a<Ka({prefix:e,name:t,encode(i){return bv(i,n,r)},decode(i){return mv(i,n,r,t)}}),vv=Ka({prefix:"\0",name:"identity",encode:t=>dv(t),decode:t=>hv(t)}),xv=Object.freeze(Object.defineProperty({__proto__:null,identity:vv},Symbol.toStringTag,{value:"Module"})),Av=Ht({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),Ev=Object.freeze(Object.defineProperty({__proto__:null,base2:Av},Symbol.toStringTag,{value:"Module"})),Sv=Ht({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),Bv=Object.freeze(Object.defineProperty({__proto__:null,base8:Sv},Symbol.toStringTag,{value:"Module"})),Dv=Ds({prefix:"9",name:"base10",alphabet:"0123456789"}),Cv=Object.freeze(Object.defineProperty({__proto__:null,base10:Dv},Symbol.toStringTag,{value:"Module"})),Iv=Ht({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Mv=Ht({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),_v=Object.freeze(Object.defineProperty({__proto__:null,base16:Iv,base16upper:Mv},Symbol.toStringTag,{value:"Module"})),kv=Ht({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Tv=Ht({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Nv=Ht({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Rv=Ht({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Uv=Ht({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Ov=Ht({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Pv=Ht({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Fv=Ht({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Lv=Ht({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),Hv=Object.freeze(Object.defineProperty({__proto__:null,base32:kv,base32hex:Uv,base32hexpad:Pv,base32hexpadupper:Fv,base32hexupper:Ov,base32pad:Nv,base32padupper:Rv,base32upper:Tv,base32z:Lv},Symbol.toStringTag,{value:"Module"})),$v=Ds({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Vv=Ds({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),jv=Object.freeze(Object.defineProperty({__proto__:null,base36:$v,base36upper:Vv},Symbol.toStringTag,{value:"Module"})),zv=Ds({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Kv=Ds({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),Gv=Object.freeze(Object.defineProperty({__proto__:null,base58btc:zv,base58flickr:Kv},Symbol.toStringTag,{value:"Module"})),qv=Ht({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Wv=Ht({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Jv=Ht({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Yv=Ht({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),Qv=Object.freeze(Object.defineProperty({__proto__:null,base64:qv,base64pad:Wv,base64url:Jv,base64urlpad:Yv},Symbol.toStringTag,{value:"Module"})),Z0=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),Zv=Z0.reduce((t,e,r)=>(t[r]=e,t),[]),Xv=Z0.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);function ex(t){return t.reduce((e,r)=>(e+=Zv[r],e),"")}function tx(t){const e=[];for(const r of t){const n=Xv[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}const rx=Ka({prefix:"🚀",name:"base256emoji",encode:ex,decode:tx}),nx=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:rx},Symbol.toStringTag,{value:"Module"}));var ix=X0,qh=128,ox=-128,sx=Math.pow(2,31);function X0(t,e,r){e=e||[],r=r||0;for(var n=r;t>=sx;)e[r++]=t&255|qh,t/=128;for(;t&ox;)e[r++]=t&255|qh,t>>>=7;return e[r]=t|0,X0.bytes=r-n+1,e}var ax=el,cx=128,Wh=127;function el(t,n){var r=0,n=n||0,i=0,o=n,s,a=t.length;do{if(o>=a)throw el.bytes=0,new RangeError("Could not decode varint");s=t[o++],r+=i<28?(s&Wh)<=cx);return el.bytes=o-n,r}var fx=Math.pow(2,7),lx=Math.pow(2,14),ux=Math.pow(2,21),hx=Math.pow(2,28),dx=Math.pow(2,35),px=Math.pow(2,42),gx=Math.pow(2,49),yx=Math.pow(2,56),wx=Math.pow(2,63),mx=function(t){return t[wa.decode(t,e),wa.decode.bytes],xx=(t,e,r=0)=>(wa.encode(t,e,r),e),Ax=t=>wa.encodingLength(t);new TextEncoder;new TextDecoder;const Jh={...xv,...Ev,...Bv,...Cv,..._v,...Hv,...jv,...Gv,...Qv,...nx};function ep(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const Yh=ep("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),lf=ep("ascii","a",t=>{let e="a";for(let r=0;r{t=t.substring(1);const e=Y0(t.length);for(let r=0;r0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function Bx(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Qh(t.outputLen),Qh(t.blockLen)}function ma(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function Dx(t,e){Ga(t);const r=e.outputLen;if(t.length>>e}function Cx(t){if(typeof t!="string")throw new Error("utf8ToBytes expected string, got "+typeof t);return new Uint8Array(new TextEncoder().encode(t))}function wu(t){return typeof t=="string"&&(t=Cx(t)),Ga(t),t}function Ix(...t){let e=0;for(let n=0;nt().update(wu(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function _x(t=32){if(oo&&typeof oo.getRandomValues=="function")return oo.getRandomValues(new Uint8Array(t));if(oo&&typeof oo.randomBytes=="function")return oo.randomBytes(t);throw new Error("crypto.getRandomValues must be defined")}function kx(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);const i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),a=Number(r&o),c=n?4:0,u=n?0:4;t.setUint32(e+c,s,n),t.setUint32(e+u,a,n)}function Tx(t,e,r){return t&e^~t&r}function Nx(t,e,r){return t&e^t&r^e&r}class Rx extends np{constructor(e,r,n,i){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=uf(this.buffer)}update(e){ma(this);const{view:r,buffer:n,blockLen:i}=this;e=wu(e);const o=e.length;for(let s=0;si-s&&(this.process(n,0),s=0);for(let p=s;py.length)throw new Error("_sha2: outputLen bigger than state");for(let p=0;pe.toString(16).padStart(2,"0"));function Eo(t){Cs(t);let e="";for(let r=0;r=xn._0&&t<=xn._9)return t-xn._0;if(t>=xn.A&&t<=xn.F)return t-(xn.A-10);if(t>=xn.a&&t<=xn.f)return t-(xn.a-10)}function So(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);const e=t.length,r=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);const n=new Uint8Array(r);for(let i=0,o=0;itypeof t=="bigint"&&qa<=t;function Ja(t,e,r){return hf(t)&&hf(e)&&hf(r)&&e<=t&&tqa;t>>=Wa,e+=1);return e}function Hx(t,e){return t>>BigInt(e)&Wa}function $x(t,e,r){return t|(r?Wa:qa)<(Ux<new Uint8Array(t),Xh=t=>Uint8Array.from(t);function op(t,e,r){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let n=df(t),i=df(t),o=0;const s=()=>{n.fill(1),i.fill(0),o=0},a=(...p)=>r(i,n,...p),c=(p=df())=>{i=a(Xh([0]),p),n=a(),p.length!==0&&(i=a(Xh([1]),p),n=a())},u=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let p=0;const x=[];for(;p{s(),c(p);let S;for(;!(S=x(u()));)c();return s(),S}}const Vx={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",stringOrUint8Array:t=>typeof t=="string"||zi(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function Is(t,e,r={}){const n=(i,o,s)=>{const a=Vx[o];if(typeof a!="function")throw new Error("invalid validator function");const c=t[i];if(!(s&&c===void 0)&&!a(c,t))throw new Error("param "+String(i)+" is invalid. Expected "+o+", got "+c)};for(const[i,o]of Object.entries(e))n(i,o,!1);for(const[i,o]of Object.entries(r))n(i,o,!0);return t}const jx=()=>{throw new Error("not implemented")};function tl(t){const e=new WeakMap;return(r,...n)=>{const i=e.get(r);if(i!==void 0)return i;const o=t(r,...n);return e.set(r,o),o}}const zx=Object.freeze(Object.defineProperty({__proto__:null,aInRange:Fi,abool:Ao,abytes:Cs,bitGet:Hx,bitLen:ip,bitMask:xu,bitSet:$x,bytesToHex:Eo,bytesToNumberBE:Pi,bytesToNumberLE:bu,concatBytes:us,createHmacDrbg:op,ensureBytes:Ur,equalBytes:Fx,hexToBytes:So,hexToNumber:mu,inRange:Ja,isBytes:zi,memoized:tl,notImplemented:jx,numberToBytesBE:Bo,numberToBytesLE:vu,numberToHexUnpadded:fo,numberToVarBytesBE:Px,utf8ToBytes:Lx,validateObject:Is},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Nt=BigInt(0),vt=BigInt(1),ki=BigInt(2),Kx=BigInt(3),rl=BigInt(4),ed=BigInt(5),td=BigInt(8);function rr(t,e){const r=t%e;return r>=Nt?r:e+r}function Gx(t,e,r){if(eNt;)e&vt&&(n=n*t%r),t=t*t%r,e>>=vt;return n}function br(t,e,r){let n=t;for(;e-- >Nt;)n*=n,n%=r;return n}function nl(t,e){if(t===Nt)throw new Error("invert: expected non-zero number");if(e<=Nt)throw new Error("invert: expected positive modulus, got "+e);let r=rr(t,e),n=e,i=Nt,o=vt;for(;r!==Nt;){const a=n/r,c=n%r,u=i-o*a;n=r,r=c,i=o,o=u}if(n!==vt)throw new Error("invert: does not exist");return rr(i,e)}function qx(t){const e=(t-vt)/ki;let r,n,i;for(r=t-vt,n=0;r%ki===Nt;r/=ki,n++);for(i=ki;i1e3)throw new Error("Cannot find square root: likely non-prime P");if(n===1){const s=(t+vt)/rl;return function(c,u){const y=c.pow(u,s);if(!c.eql(c.sqr(y),u))throw new Error("Cannot find square root");return y}}const o=(r+vt)/ki;return function(a,c){if(a.pow(c,e)===a.neg(a.ONE))throw new Error("Cannot find square root");let u=n,y=a.pow(a.mul(a.ONE,i),r),p=a.pow(c,o),x=a.pow(c,r);for(;!a.eql(x,a.ONE);){if(a.eql(x,a.ZERO))return a.ZERO;let S=1;for(let B=a.sqr(x);S(n[i]="function",n),e);return Is(t,r)}function Qx(t,e,r){if(rNt;)r&vt&&(n=t.mul(n,i)),i=t.sqr(i),r>>=vt;return n}function Zx(t,e){const r=new Array(e.length),n=e.reduce((o,s,a)=>t.is0(s)?o:(r[a]=o,t.mul(o,s)),t.ONE),i=t.inv(n);return e.reduceRight((o,s,a)=>t.is0(s)?o:(r[a]=t.mul(o,r[a]),t.mul(o,s)),i),r}function sp(t,e){const r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function ap(t,e,r=!1,n={}){if(t<=Nt)throw new Error("invalid field: expected ORDER > 0, got "+t);const{nBitLength:i,nByteLength:o}=sp(t,e);if(o>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let s;const a=Object.freeze({ORDER:t,isLE:r,BITS:i,BYTES:o,MASK:xu(i),ZERO:Nt,ONE:vt,create:c=>rr(c,t),isValid:c=>{if(typeof c!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof c);return Nt<=c&&cc===Nt,isOdd:c=>(c&vt)===vt,neg:c=>rr(-c,t),eql:(c,u)=>c===u,sqr:c=>rr(c*c,t),add:(c,u)=>rr(c+u,t),sub:(c,u)=>rr(c-u,t),mul:(c,u)=>rr(c*u,t),pow:(c,u)=>Qx(a,c,u),div:(c,u)=>rr(c*nl(u,t),t),sqrN:c=>c*c,addN:(c,u)=>c+u,subN:(c,u)=>c-u,mulN:(c,u)=>c*u,inv:c=>nl(c,t),sqrt:n.sqrt||(c=>(s||(s=Wx(t)),s(a,c))),invertBatch:c=>Zx(a,c),cmov:(c,u,y)=>y?u:c,toBytes:c=>r?vu(c,o):Bo(c,o),fromBytes:c=>{if(c.length!==o)throw new Error("Field.fromBytes: expected "+o+" bytes, got "+c.length);return r?bu(c):Pi(c)}});return Object.freeze(a)}function cp(t){if(typeof t!="bigint")throw new Error("field order must be bigint");const e=t.toString(2).length;return Math.ceil(e/8)}function fp(t){const e=cp(t);return e+Math.ceil(e/2)}function Xx(t,e,r=!1){const n=t.length,i=cp(e),o=fp(e);if(n<16||n1024)throw new Error("expected "+o+"-1024 bytes of input, got "+n);const s=r?bu(t):Pi(t),a=rr(s,e-vt)+vt;return r?vu(a,i):Bo(a,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const rd=BigInt(0),qs=BigInt(1);function pf(t,e){const r=e.negate();return t?r:e}function lp(t,e){if(!Number.isSafeInteger(t)||t<=0||t>e)throw new Error("invalid window size, expected [1.."+e+"], got W="+t)}function gf(t,e){lp(t,e);const r=Math.ceil(e/t)+1,n=2**(t-1);return{windows:r,windowSize:n}}function e2(t,e){if(!Array.isArray(t))throw new Error("array expected");t.forEach((r,n)=>{if(!(r instanceof e))throw new Error("invalid point at index "+n)})}function t2(t,e){if(!Array.isArray(t))throw new Error("array of scalars expected");t.forEach((r,n)=>{if(!e.isValid(r))throw new Error("invalid scalar at index "+n)})}const yf=new WeakMap,up=new WeakMap;function wf(t){return up.get(t)||1}function r2(t,e){return{constTimeNegate:pf,hasPrecomputes(r){return wf(r)!==1},unsafeLadder(r,n,i=t.ZERO){let o=r;for(;n>rd;)n&qs&&(i=i.add(o)),o=o.double(),n>>=qs;return i},precomputeWindow(r,n){const{windows:i,windowSize:o}=gf(n,e),s=[];let a=r,c=a;for(let u=0;u>=p,C>s&&(C-=y,i+=qs);const B=S,M=S+Math.abs(C)-1,N=x%2!==0,H=C<0;C===0?c=c.add(pf(N,n[B])):a=a.add(pf(H,n[M]))}return{p:a,f:c}},wNAFUnsafe(r,n,i,o=t.ZERO){const{windows:s,windowSize:a}=gf(r,e),c=BigInt(2**r-1),u=2**r,y=BigInt(r);for(let p=0;p>=y,S>a&&(S-=u,i+=qs),S===0)continue;let C=n[x+Math.abs(S)-1];S<0&&(C=C.negate()),o=o.add(C)}return o},getPrecomputes(r,n,i){let o=yf.get(n);return o||(o=this.precomputeWindow(n,r),r!==1&&yf.set(n,i(o))),o},wNAFCached(r,n,i){const o=wf(r);return this.wNAF(o,this.getPrecomputes(o,r,i),n)},wNAFCachedUnsafe(r,n,i,o){const s=wf(r);return s===1?this.unsafeLadder(r,n,o):this.wNAFUnsafe(s,this.getPrecomputes(s,r,i),n,o)},setWindowSize(r,n){lp(n,e),up.set(r,n),yf.delete(r)}}}function n2(t,e,r,n){if(e2(r,t),t2(n,e),r.length!==n.length)throw new Error("arrays of points and scalars must have equal length");const i=t.ZERO,o=ip(BigInt(r.length)),s=o>12?o-3:o>4?o-2:o?2:1,a=(1<=0;p-=s){c.fill(i);for(let S=0;S>BigInt(p)&BigInt(a));c[B]=c[B].add(r[S])}let x=i;for(let S=c.length-1,C=i;S>0;S--)C=C.add(c[S]),x=x.add(C);if(y=y.add(x),p!==0)for(let S=0;S=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r>>0,L=new Uint8Array(H);M!==N;){for(var G=S[M],K=0,q=H-1;(G!==0||K>>0,L[q]=G%s>>>0,G=G/s>>>0;if(G!==0)throw new Error("Non-zero carry");B=K,M++}for(var Q=H-B;Q!==H&&L[Q]===0;)Q++;for(var Z=a.repeat(C);Q>>0,H=new Uint8Array(N);S[C];){var L=e[S.charCodeAt(C)];if(L===255)return;for(var G=0,K=N-1;(L!==0||G>>0,H[K]=L%256>>>0,L=L/256>>>0;if(L!==0)throw new Error("Non-zero carry");M=G,C++}if(S[C]!==" "){for(var q=N-M;q!==N&&H[q]===0;)q++;for(var Q=new Uint8Array(B+(N-q)),Z=B;q!==N;)Q[Z++]=H[q++];return Q}}}function x(S){var C=p(S);if(C)return C;throw new Error("Non-base"+s+" character")}return{encode:y,decodeUnsafe:p,decode:x}}var o2=i2;const s2=new TextDecoder,a2=t=>s2.decode(t),c2=new TextEncoder,f2=t=>c2.encode(t);function l2(t,e){const r=new Uint8Array(e);let n=0;for(const i of t)r.set(i,n),n+=i.length;return r}var Au={decodeText:a2,encodeText:f2,concat:l2};const{encodeText:u2}=Au;let h2=class{constructor(e,r,n,i){this.name=e,this.code=r,this.codeBuf=u2(this.code),this.alphabet=i,this.codec=n(i)}encode(e){return this.codec.encode(e)}decode(e){for(const r of e)if(this.alphabet&&this.alphabet.indexOf(r)<0)throw new Error(`invalid character '${r}' in '${e}'`);return this.codec.decode(e)}};var d2=h2;const p2=(t,e,r)=>{const n={};for(let u=0;u=8&&(s-=8,o[c++]=255&a>>s)}if(s>=r||255&a<<8-s)throw new SyntaxError("Unexpected end of data");return o},g2=(t,e,r)=>{const n=e[e.length-1]==="=",i=(1<r;)s-=r,o+=e[i&a>>s];if(s&&(o+=e[i&a<e=>({encode(r){return g2(r,e,t)},decode(r){return p2(r,e,t)}});var w2={rfc4648:y2};const qo=o2,m2=d2,{rfc4648:Ot}=w2,{decodeText:b2,encodeText:v2}=Au,x2=()=>({encode:b2,decode:v2}),dp=[["identity","\0",x2,""],["base2","0",Ot(1),"01"],["base8","7",Ot(3),"01234567"],["base10","9",qo,"0123456789"],["base16","f",Ot(4),"0123456789abcdef"],["base16upper","F",Ot(4),"0123456789ABCDEF"],["base32hex","v",Ot(5),"0123456789abcdefghijklmnopqrstuv"],["base32hexupper","V",Ot(5),"0123456789ABCDEFGHIJKLMNOPQRSTUV"],["base32hexpad","t",Ot(5),"0123456789abcdefghijklmnopqrstuv="],["base32hexpadupper","T",Ot(5),"0123456789ABCDEFGHIJKLMNOPQRSTUV="],["base32","b",Ot(5),"abcdefghijklmnopqrstuvwxyz234567"],["base32upper","B",Ot(5),"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"],["base32pad","c",Ot(5),"abcdefghijklmnopqrstuvwxyz234567="],["base32padupper","C",Ot(5),"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567="],["base32z","h",Ot(5),"ybndrfg8ejkmcpqxot1uwisza345h769"],["base36","k",qo,"0123456789abcdefghijklmnopqrstuvwxyz"],["base36upper","K",qo,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"],["base58btc","z",qo,"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],["base58flickr","Z",qo,"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],["base64","m",Ot(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],["base64pad","M",Ot(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],["base64url","u",Ot(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"],["base64urlpad","U",Ot(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_="]],pp=dp.reduce((t,e)=>(t[e[0]]=new m2(e[0],e[1],e[2],e[3]),t),{}),A2=dp.reduce((t,e)=>(t[e[1]]=pp[e[0]],t),{});var E2={names:pp,codes:A2};(function(t,e){const r=E2,{encodeText:n,decodeText:i,concat:o}=Au;function s(B,M){if(!M)throw new Error("requires an encoded Uint8Array");const{name:N,codeBuf:H}=p(B);return y(N,M),o([H,M],H.length+M.length)}function a(B,M){const N=p(B),H=n(N.encode(M));return o([N.codeBuf,H],N.codeBuf.length+H.length)}function c(B){B instanceof Uint8Array&&(B=i(B));const M=B[0];return["f","F","v","V","t","T","b","B","c","C","h","k","K"].includes(M)&&(B=B.toLowerCase()),p(B[0]).decode(B.substring(1))}function u(B){if(B instanceof Uint8Array&&(B=i(B)),Object.prototype.toString.call(B)!=="[object String]")return!1;try{return p(B[0]).name}catch{return!1}}function y(B,M){p(B).decode(i(M))}function p(B){if(Object.prototype.hasOwnProperty.call(r.names,B))return r.names[B];if(Object.prototype.hasOwnProperty.call(r.codes,B))return r.codes[B];throw new Error(`Unsupported encoding: ${B}`)}function x(B){return B instanceof Uint8Array&&(B=i(B)),p(B[0])}e=t.exports=s,e.encode=a,e.decode=c,e.isEncoded=u,e.encoding=p,e.encodingFromData=x;const S=Object.freeze(r.names),C=Object.freeze(r.codes);e.names=S,e.codes=C})(il,il.exports);var gp=il.exports;const S2=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),ti=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ri=new Uint32Array(64);class B2 extends Rx{constructor(){super(64,32,8,!1),this.A=ti[0]|0,this.B=ti[1]|0,this.C=ti[2]|0,this.D=ti[3]|0,this.E=ti[4]|0,this.F=ti[5]|0,this.G=ti[6]|0,this.H=ti[7]|0}get(){const{A:e,B:r,C:n,D:i,E:o,F:s,G:a,H:c}=this;return[e,r,n,i,o,s,a,c]}set(e,r,n,i,o,s,a,c){this.A=e|0,this.B=r|0,this.C=n|0,this.D=i|0,this.E=o|0,this.F=s|0,this.G=a|0,this.H=c|0}process(e,r){for(let p=0;p<16;p++,r+=4)ri[p]=e.getUint32(r,!1);for(let p=16;p<64;p++){const x=ri[p-15],S=ri[p-2],C=Xr(x,7)^Xr(x,18)^x>>>3,B=Xr(S,17)^Xr(S,19)^S>>>10;ri[p]=B+ri[p-7]+C+ri[p-16]|0}let{A:n,B:i,C:o,D:s,E:a,F:c,G:u,H:y}=this;for(let p=0;p<64;p++){const x=Xr(a,6)^Xr(a,11)^Xr(a,25),S=y+x+Tx(a,c,u)+S2[p]+ri[p]|0,B=(Xr(n,2)^Xr(n,13)^Xr(n,22))+Nx(n,i,o)|0;y=u,u=c,c=a,a=s+S|0,s=o,o=i,i=n,n=S+B|0}n=n+this.A|0,i=i+this.B|0,o=o+this.C|0,s=s+this.D|0,a=a+this.E|0,c=c+this.F|0,u=u+this.G|0,y=y+this.H|0,this.set(n,i,o,s,a,c,u,y)}roundClean(){ri.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const yp=Mx(()=>new B2);class wp extends np{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,Bx(e);const n=wu(r);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,o=new Uint8Array(i);o.set(n.length>i?e.create().update(n).digest():n);for(let s=0;snew wp(t,e).update(r).digest();mp.create=(t,e)=>new wp(t,e);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function nd(t){t.lowS!==void 0&&Ao("lowS",t.lowS),t.prehash!==void 0&&Ao("prehash",t.prehash)}function D2(t){const e=hp(t);Is(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:n,a:i}=e;if(r){if(!n.eql(i,n.ZERO))throw new Error("invalid endomorphism, can only be defined for Koblitz curves that have a=0");if(typeof r!="object"||typeof r.beta!="bigint"||typeof r.splitScalar!="function")throw new Error("invalid endomorphism, expected beta: bigint and splitScalar: function")}return Object.freeze({...e})}const{bytesToNumberBE:C2,hexToBytes:I2}=zx;class M2 extends Error{constructor(e=""){super(e)}}const Bn={Err:M2,_tlv:{encode:(t,e)=>{const{Err:r}=Bn;if(t<0||t>256)throw new r("tlv.encode: wrong tag");if(e.length&1)throw new r("tlv.encode: unpadded data");const n=e.length/2,i=fo(n);if(i.length/2&128)throw new r("tlv.encode: long form length too big");const o=n>127?fo(i.length/2|128):"";return fo(t)+o+i+e},decode(t,e){const{Err:r}=Bn;let n=0;if(t<0||t>256)throw new r("tlv.encode: wrong tag");if(e.length<2||e[n++]!==t)throw new r("tlv.decode: wrong tlv");const i=e[n++],o=!!(i&128);let s=0;if(!o)s=i;else{const c=i&127;if(!c)throw new r("tlv.decode(long): indefinite length not supported");if(c>4)throw new r("tlv.decode(long): byte length is too big");const u=e.subarray(n,n+c);if(u.length!==c)throw new r("tlv.decode: length bytes not complete");if(u[0]===0)throw new r("tlv.decode(long): zero leftmost byte");for(const y of u)s=s<<8|y;if(n+=c,s<128)throw new r("tlv.decode(long): not minimal encoding")}const a=e.subarray(n,n+s);if(a.length!==s)throw new r("tlv.decode: wrong value length");return{v:a,l:e.subarray(n+s)}}},_int:{encode(t){const{Err:e}=Bn;if(t{const H=M.toAffine();return us(Uint8Array.from([4]),r.toBytes(H.x),r.toBytes(H.y))}),o=e.fromBytes||(B=>{const M=B.subarray(1),N=r.fromBytes(M.subarray(0,r.BYTES)),H=r.fromBytes(M.subarray(r.BYTES,2*r.BYTES));return{x:N,y:H}});function s(B){const{a:M,b:N}=e,H=r.sqr(B),L=r.mul(H,B);return r.add(r.add(L,r.mul(B,M)),N)}if(!r.eql(r.sqr(e.Gy),s(e.Gx)))throw new Error("bad generator point: equation left != right");function a(B){return Ja(B,Tt,e.n)}function c(B){const{allowedPrivateKeyLengths:M,nByteLength:N,wrapPrivateKey:H,n:L}=e;if(M&&typeof B!="bigint"){if(zi(B)&&(B=Eo(B)),typeof B!="string"||!M.includes(B.length))throw new Error("invalid private key");B=B.padStart(N*2,"0")}let G;try{G=typeof B=="bigint"?B:Pi(Ur("private key",B,N))}catch{throw new Error("invalid private key, expected hex or "+N+" bytes, got "+typeof B)}return H&&(G=rr(G,L)),Fi("private key",G,Tt,L),G}function u(B){if(!(B instanceof x))throw new Error("ProjectivePoint expected")}const y=tl((B,M)=>{const{px:N,py:H,pz:L}=B;if(r.eql(L,r.ONE))return{x:N,y:H};const G=B.is0();M==null&&(M=G?r.ONE:r.inv(L));const K=r.mul(N,M),q=r.mul(H,M),Q=r.mul(L,M);if(G)return{x:r.ZERO,y:r.ZERO};if(!r.eql(Q,r.ONE))throw new Error("invZ was invalid");return{x:K,y:q}}),p=tl(B=>{if(B.is0()){if(e.allowInfinityPoint&&!r.is0(B.py))return;throw new Error("bad point: ZERO")}const{x:M,y:N}=B.toAffine();if(!r.isValid(M)||!r.isValid(N))throw new Error("bad point: x or y not FE");const H=r.sqr(N),L=s(M);if(!r.eql(H,L))throw new Error("bad point: equation left != right");if(!B.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class x{constructor(M,N,H){if(this.px=M,this.py=N,this.pz=H,M==null||!r.isValid(M))throw new Error("x required");if(N==null||!r.isValid(N))throw new Error("y required");if(H==null||!r.isValid(H))throw new Error("z required");Object.freeze(this)}static fromAffine(M){const{x:N,y:H}=M||{};if(!M||!r.isValid(N)||!r.isValid(H))throw new Error("invalid affine point");if(M instanceof x)throw new Error("projective point not allowed");const L=G=>r.eql(G,r.ZERO);return L(N)&&L(H)?x.ZERO:new x(N,H,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(M){const N=r.invertBatch(M.map(H=>H.pz));return M.map((H,L)=>H.toAffine(N[L])).map(x.fromAffine)}static fromHex(M){const N=x.fromAffine(o(Ur("pointHex",M)));return N.assertValidity(),N}static fromPrivateKey(M){return x.BASE.multiply(c(M))}static msm(M,N){return n2(x,n,M,N)}_setWindowSize(M){C.setWindowSize(this,M)}assertValidity(){p(this)}hasEvenY(){const{y:M}=this.toAffine();if(r.isOdd)return!r.isOdd(M);throw new Error("Field doesn't support isOdd")}equals(M){u(M);const{px:N,py:H,pz:L}=this,{px:G,py:K,pz:q}=M,Q=r.eql(r.mul(N,q),r.mul(G,L)),Z=r.eql(r.mul(H,q),r.mul(K,L));return Q&&Z}negate(){return new x(this.px,r.neg(this.py),this.pz)}double(){const{a:M,b:N}=e,H=r.mul(N,id),{px:L,py:G,pz:K}=this;let q=r.ZERO,Q=r.ZERO,Z=r.ZERO,ee=r.mul(L,L),se=r.mul(G,G),ne=r.mul(K,K),ie=r.mul(L,G);return ie=r.add(ie,ie),Z=r.mul(L,K),Z=r.add(Z,Z),q=r.mul(M,Z),Q=r.mul(H,ne),Q=r.add(q,Q),q=r.sub(se,Q),Q=r.add(se,Q),Q=r.mul(q,Q),q=r.mul(ie,q),Z=r.mul(H,Z),ne=r.mul(M,ne),ie=r.sub(ee,ne),ie=r.mul(M,ie),ie=r.add(ie,Z),Z=r.add(ee,ee),ee=r.add(Z,ee),ee=r.add(ee,ne),ee=r.mul(ee,ie),Q=r.add(Q,ee),ne=r.mul(G,K),ne=r.add(ne,ne),ee=r.mul(ne,ie),q=r.sub(q,ee),Z=r.mul(ne,se),Z=r.add(Z,Z),Z=r.add(Z,Z),new x(q,Q,Z)}add(M){u(M);const{px:N,py:H,pz:L}=this,{px:G,py:K,pz:q}=M;let Q=r.ZERO,Z=r.ZERO,ee=r.ZERO;const se=e.a,ne=r.mul(e.b,id);let ie=r.mul(N,G),b=r.mul(H,K),f=r.mul(L,q),l=r.add(N,H),g=r.add(G,K);l=r.mul(l,g),g=r.add(ie,b),l=r.sub(l,g),g=r.add(N,L);let m=r.add(G,q);return g=r.mul(g,m),m=r.add(ie,f),g=r.sub(g,m),m=r.add(H,L),Q=r.add(K,q),m=r.mul(m,Q),Q=r.add(b,f),m=r.sub(m,Q),ee=r.mul(se,g),Q=r.mul(ne,f),ee=r.add(Q,ee),Q=r.sub(b,ee),ee=r.add(b,ee),Z=r.mul(Q,ee),b=r.add(ie,ie),b=r.add(b,ie),f=r.mul(se,f),g=r.mul(ne,g),b=r.add(b,f),f=r.sub(ie,f),f=r.mul(se,f),g=r.add(g,f),ie=r.mul(b,g),Z=r.add(Z,ie),ie=r.mul(m,g),Q=r.mul(l,Q),Q=r.sub(Q,ie),ie=r.mul(l,b),ee=r.mul(m,ee),ee=r.add(ee,ie),new x(Q,Z,ee)}subtract(M){return this.add(M.negate())}is0(){return this.equals(x.ZERO)}wNAF(M){return C.wNAFCached(this,M,x.normalizeZ)}multiplyUnsafe(M){const{endo:N,n:H}=e;Fi("scalar",M,Cn,H);const L=x.ZERO;if(M===Cn)return L;if(this.is0()||M===Tt)return this;if(!N||C.hasPrecomputes(this))return C.wNAFCachedUnsafe(this,M,x.normalizeZ);let{k1neg:G,k1:K,k2neg:q,k2:Q}=N.splitScalar(M),Z=L,ee=L,se=this;for(;K>Cn||Q>Cn;)K&Tt&&(Z=Z.add(se)),Q&Tt&&(ee=ee.add(se)),se=se.double(),K>>=Tt,Q>>=Tt;return G&&(Z=Z.negate()),q&&(ee=ee.negate()),ee=new x(r.mul(ee.px,N.beta),ee.py,ee.pz),Z.add(ee)}multiply(M){const{endo:N,n:H}=e;Fi("scalar",M,Tt,H);let L,G;if(N){const{k1neg:K,k1:q,k2neg:Q,k2:Z}=N.splitScalar(M);let{p:ee,f:se}=this.wNAF(q),{p:ne,f:ie}=this.wNAF(Z);ee=C.constTimeNegate(K,ee),ne=C.constTimeNegate(Q,ne),ne=new x(r.mul(ne.px,N.beta),ne.py,ne.pz),L=ee.add(ne),G=se.add(ie)}else{const{p:K,f:q}=this.wNAF(M);L=K,G=q}return x.normalizeZ([L,G])[0]}multiplyAndAddUnsafe(M,N,H){const L=x.BASE,G=(q,Q)=>Q===Cn||Q===Tt||!q.equals(L)?q.multiplyUnsafe(Q):q.multiply(Q),K=G(this,N).add(G(M,H));return K.is0()?void 0:K}toAffine(M){return y(this,M)}isTorsionFree(){const{h:M,isTorsionFree:N}=e;if(M===Tt)return!0;if(N)return N(x,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:M,clearCofactor:N}=e;return M===Tt?this:N?N(x,this):this.multiplyUnsafe(e.h)}toRawBytes(M=!0){return Ao("isCompressed",M),this.assertValidity(),i(x,this,M)}toHex(M=!0){return Ao("isCompressed",M),Eo(this.toRawBytes(M))}}x.BASE=new x(e.Gx,e.Gy,r.ONE),x.ZERO=new x(r.ZERO,r.ONE,r.ZERO);const S=e.nBitLength,C=r2(x,e.endo?Math.ceil(S/2):S);return{CURVE:e,ProjectivePoint:x,normPrivateKeyToScalar:c,weierstrassEquation:s,isWithinCurveOrder:a}}function k2(t){const e=hp(t);return Is(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function T2(t){const e=k2(t),{Fp:r,n}=e,i=r.BYTES+1,o=2*r.BYTES+1;function s(f){return rr(f,n)}function a(f){return nl(f,n)}const{ProjectivePoint:c,normPrivateKeyToScalar:u,weierstrassEquation:y,isWithinCurveOrder:p}=_2({...e,toBytes(f,l,g){const m=l.toAffine(),E=r.toBytes(m.x),I=us;return Ao("isCompressed",g),g?I(Uint8Array.from([l.hasEvenY()?2:3]),E):I(Uint8Array.from([4]),E,r.toBytes(m.y))},fromBytes(f){const l=f.length,g=f[0],m=f.subarray(1);if(l===i&&(g===2||g===3)){const E=Pi(m);if(!Ja(E,Tt,r.ORDER))throw new Error("Point is not on curve");const I=y(E);let T;try{T=r.sqrt(I)}catch(k){const re=k instanceof Error?": "+k.message:"";throw new Error("Point is not on curve"+re)}const D=(T&Tt)===Tt;return(g&1)===1!==D&&(T=r.neg(T)),{x:E,y:T}}else if(l===o&&g===4){const E=r.fromBytes(m.subarray(0,r.BYTES)),I=r.fromBytes(m.subarray(r.BYTES,2*r.BYTES));return{x:E,y:I}}else{const E=i,I=o;throw new Error("invalid Point, expected length of "+E+", or uncompressed "+I+", got "+l)}}}),x=f=>Eo(Bo(f,e.nByteLength));function S(f){const l=n>>Tt;return f>l}function C(f){return S(f)?s(-f):f}const B=(f,l,g)=>Pi(f.slice(l,g));class M{constructor(l,g,m){this.r=l,this.s=g,this.recovery=m,this.assertValidity()}static fromCompact(l){const g=e.nByteLength;return l=Ur("compactSignature",l,g*2),new M(B(l,0,g),B(l,g,2*g))}static fromDER(l){const{r:g,s:m}=Bn.toSig(Ur("DER",l));return new M(g,m)}assertValidity(){Fi("r",this.r,Tt,n),Fi("s",this.s,Tt,n)}addRecoveryBit(l){return new M(this.r,this.s,l)}recoverPublicKey(l){const{r:g,s:m,recovery:E}=this,I=q(Ur("msgHash",l));if(E==null||![0,1,2,3].includes(E))throw new Error("recovery id invalid");const T=E===2||E===3?g+e.n:g;if(T>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const D=E&1?"03":"02",h=c.fromHex(D+x(T)),k=a(T),re=s(-I*k),v=s(m*k),$=c.BASE.multiplyAndAddUnsafe(h,re,v);if(!$)throw new Error("point at infinify");return $.assertValidity(),$}hasHighS(){return S(this.s)}normalizeS(){return this.hasHighS()?new M(this.r,s(-this.s),this.recovery):this}toDERRawBytes(){return So(this.toDERHex())}toDERHex(){return Bn.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return So(this.toCompactHex())}toCompactHex(){return x(this.r)+x(this.s)}}const N={isValidPrivateKey(f){try{return u(f),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const f=fp(e.n);return Xx(e.randomBytes(f),e.n)},precompute(f=8,l=c.BASE){return l._setWindowSize(f),l.multiply(BigInt(3)),l}};function H(f,l=!0){return c.fromPrivateKey(f).toRawBytes(l)}function L(f){const l=zi(f),g=typeof f=="string",m=(l||g)&&f.length;return l?m===i||m===o:g?m===2*i||m===2*o:f instanceof c}function G(f,l,g=!0){if(L(f))throw new Error("first arg must be private key");if(!L(l))throw new Error("second arg must be public key");return c.fromHex(l).multiply(u(f)).toRawBytes(g)}const K=e.bits2int||function(f){if(f.length>8192)throw new Error("input is too large");const l=Pi(f),g=f.length*8-e.nBitLength;return g>0?l>>BigInt(g):l},q=e.bits2int_modN||function(f){return s(K(f))},Q=xu(e.nBitLength);function Z(f){return Fi("num < 2^"+e.nBitLength,f,Cn,Q),Bo(f,e.nByteLength)}function ee(f,l,g=se){if(["recovered","canonical"].some(J=>J in g))throw new Error("sign() legacy options not supported");const{hash:m,randomBytes:E}=e;let{lowS:I,prehash:T,extraEntropy:D}=g;I==null&&(I=!0),f=Ur("msgHash",f),nd(g),T&&(f=Ur("prehashed msgHash",m(f)));const h=q(f),k=u(l),re=[Z(k),Z(h)];if(D!=null&&D!==!1){const J=D===!0?E(r.BYTES):D;re.push(Ur("extraEntropy",J))}const v=us(...re),$=h;function Y(J){const te=K(J);if(!p(te))return;const ue=a(te),fe=c.BASE.multiply(te).toAffine(),oe=s(fe.x);if(oe===Cn)return;const Ie=s(ue*s($+oe*k));if(Ie===Cn)return;let ce=(fe.x===oe?0:2)|Number(fe.y&Tt),ge=Ie;return I&&S(Ie)&&(ge=C(Ie),ce^=1),new M(oe,ge,ce)}return{seed:v,k2sig:Y}}const se={lowS:e.lowS,prehash:!1},ne={lowS:e.lowS,prehash:!1};function ie(f,l,g=se){const{seed:m,k2sig:E}=ee(f,l,g),I=e;return op(I.hash.outputLen,I.nByteLength,I.hmac)(m,E)}c.BASE._setWindowSize(8);function b(f,l,g,m=ne){var ce;const E=f;l=Ur("msgHash",l),g=Ur("publicKey",g);const{lowS:I,prehash:T,format:D}=m;if(nd(m),"strict"in m)throw new Error("options.strict was renamed to lowS");if(D!==void 0&&D!=="compact"&&D!=="der")throw new Error("format must be compact or der");const h=typeof E=="string"||zi(E),k=!h&&!D&&typeof E=="object"&&E!==null&&typeof E.r=="bigint"&&typeof E.s=="bigint";if(!h&&!k)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let re,v;try{if(k&&(re=new M(E.r,E.s)),h){try{D!=="compact"&&(re=M.fromDER(E))}catch(ge){if(!(ge instanceof Bn.Err))throw ge}!re&&D!=="der"&&(re=M.fromCompact(E))}v=c.fromHex(g)}catch{return!1}if(!re||I&&re.hasHighS())return!1;T&&(l=e.hash(l));const{r:$,s:Y}=re,J=q(l),te=a(Y),ue=s(J*te),fe=s($*te),oe=(ce=c.BASE.multiplyAndAddUnsafe(v,ue,fe))==null?void 0:ce.toAffine();return oe?s(oe.x)===$:!1}return{CURVE:e,getPublicKey:H,getSharedSecret:G,sign:ie,verify:b,ProjectivePoint:c,Signature:M,utils:N}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function N2(t){return{hash:t,hmac:(e,...r)=>mp(t,e,Ix(...r)),randomBytes:_x}}function R2(t,e){const r=n=>T2({...t,...N2(n)});return{...r(e),create:r}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const bp=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),od=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),U2=BigInt(1),ol=BigInt(2),sd=(t,e)=>(t+e/ol)/e;function O2(t){const e=bp,r=BigInt(3),n=BigInt(6),i=BigInt(11),o=BigInt(22),s=BigInt(23),a=BigInt(44),c=BigInt(88),u=t*t*t%e,y=u*u*t%e,p=br(y,r,e)*y%e,x=br(p,r,e)*y%e,S=br(x,ol,e)*u%e,C=br(S,i,e)*S%e,B=br(C,o,e)*C%e,M=br(B,a,e)*B%e,N=br(M,c,e)*M%e,H=br(N,a,e)*B%e,L=br(H,r,e)*y%e,G=br(L,s,e)*C%e,K=br(G,n,e)*u%e,q=br(K,ol,e);if(!sl.eql(sl.sqr(q),t))throw new Error("Cannot find square root");return q}const sl=ap(bp,void 0,void 0,{sqrt:O2}),vp=R2({a:BigInt(0),b:BigInt(7),Fp:sl,n:od,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=od,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-U2*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=r,s=BigInt("0x100000000000000000000000000000000"),a=sd(o*t,e),c=sd(-n*t,e);let u=rr(t-a*r-c*i,e),y=rr(-a*n-c*o,e);const p=u>s,x=y>s;if(p&&(u=e-u),x&&(y=e-y),u>s||y>s)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:p,k1:u,k2neg:x,k2:y}}}},yp);BigInt(0);vp.ProjectivePoint;var P2=function t(e){if(typeof e=="number"&&isNaN(e))throw new Error("NaN is not allowed");if(typeof e=="number"&&!isFinite(e))throw new Error("Infinity is not allowed");return e===null||typeof e!="object"?JSON.stringify(e):e.toJSON instanceof Function?t(e.toJSON()):Array.isArray(e)?`[${e.reduce((i,o,s)=>`${i}${s===0?"":","}${t(o===void 0||typeof o=="symbol"?null:o)}`,"")}]`:`{${Object.keys(e).sort().reduce((n,i)=>{if(e[i]===void 0||typeof e[i]=="symbol")return n;const o=n.length===0?"":",";return`${n}${o}${t(i)}:${t(e[i])}`},"")}}`};const F2=Fa(P2);function L2(t,e){try{var r=t()}catch(n){return e(n)}return r&&r.then?r.then(void 0,e):r}function H2(){const t=new Map;return function(e,r){try{let i=function(s){if(n)return s;const a=t.get(e.didUrl);return a!==void 0?a:Promise.resolve(r()).then(function(c){var u;return((u=c.didResolutionMetadata)==null?void 0:u.error)!=="notFound"&&t.set(e.didUrl,c),c})},n;const o=function(){if(e.params&&e.params["no-cache"]==="true")return Promise.resolve(r()).then(function(s){return n=1,s})}();return Promise.resolve(o&&o.then?o.then(i):i(o))}catch(n){return Promise.reject(n)}}}function $2(t,e){return e()}const V2="(?:%[0-9a-fA-F]{2})",ad=`(?:[a-zA-Z0-9._-]|${V2})`,j2="([a-z0-9]+)",z2=`((?:${ad}*:)*(${ad}+))`,cd="[a-zA-Z0-9_.:%-]",K2=`;${cd}+=${cd}*`,G2=`((${K2})*)`,q2="(/[^#?]*)?",W2="([?][^#]*)?",J2="(#.*)?",Y2=new RegExp(`^did:${j2}:${z2}${G2}${q2}${W2}${J2}$`);function Q2(t){if(t===""||!t)return null;const e=t.match(Y2);if(e){const r={did:`did:${e[1]}:${e[2]}`,method:e[1],id:e[2],didUrl:t};if(e[4]){const n=e[4].slice(1).split(";");r.params={};for(const i of n){const o=i.split("=");r.params[o[0]]=o[1]}}return e[6]&&(r.path=e[6]),e[7]&&(r.query=e[7].slice(1)),e[8]&&(r.fragment=e[8].slice(1)),r}return null}const ba={didResolutionMetadata:{},didDocument:null,didDocumentMetadata:{}};function Z2(t){return function(e,r,n){try{return Promise.resolve(L2(function(){return Promise.resolve(t(e,r,n)).then(function(i){return{...ba,didResolutionMetadata:{contentType:"application/did+ld+json"},didDocument:i}})},function(i){return{...ba,didResolutionMetadata:{error:"notFound",message:i.toString()}}}))}catch(i){return Promise.reject(i)}}}class X2{constructor(e={},r={}){this.registry=void 0,this.cache=void 0,this.registry=e,this.cache=r.cache===!0?H2():r.cache||$2,r.legacyResolvers&&Object.keys(r.legacyResolvers).map(n=>{this.registry[n]||(this.registry[n]=Z2(r.legacyResolvers[n]))})}resolve(e,r={}){try{const n=this,i=Q2(e);if(i===null)return Promise.resolve({...ba,didResolutionMetadata:{error:"invalidDid"}});const o=n.registry[i.method];return o?Promise.resolve(n.cache(i,()=>o(i.did,i,n,r))):Promise.resolve({...ba,didResolutionMetadata:{error:"unsupportedDidMethod"}})}catch(n){return Promise.reject(n)}}}/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */const xp=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4));function Ap(t){return t instanceof Uint8Array||t!=null&&typeof t=="object"&&t.constructor.name==="Uint8Array"}const eA=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!eA)throw new Error("Non little-endian hardware is not supported");function Eu(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function al(t){if(typeof t=="string")t=Eu(t);else if(Ap(t))t=t.slice();else throw new Error(`expected Uint8Array, got ${typeof t}`);return t}function tA(t,e){if(!Ap(t))throw new Error("Uint8Array expected");if(t.length!==e)throw new Error(`Uint8Array length ${e} expected`)}function rA(t){return t!=null&&typeof t=="object"&&(t instanceof Uint8Array||t.constructor.name==="Uint8Array")}function nA(t,...e){if(!rA(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error(`Uint8Array expected of length ${e}, not of length=${t.length}`)}function fd(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function iA(t,e){nA(t);const r=e.outputLen;if(t.lengtht[e++]&255|(t[e++]&255)<<8;class oA{constructor(e){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,e=al(e),tA(e,32);const r=Pt(e,0),n=Pt(e,2),i=Pt(e,4),o=Pt(e,6),s=Pt(e,8),a=Pt(e,10),c=Pt(e,12),u=Pt(e,14);this.r[0]=r&8191,this.r[1]=(r>>>13|n<<3)&8191,this.r[2]=(n>>>10|i<<6)&7939,this.r[3]=(i>>>7|o<<9)&8191,this.r[4]=(o>>>4|s<<12)&255,this.r[5]=s>>>1&8190,this.r[6]=(s>>>14|a<<2)&8191,this.r[7]=(a>>>11|c<<5)&8065,this.r[8]=(c>>>8|u<<8)&8191,this.r[9]=u>>>5&127;for(let y=0;y<8;y++)this.pad[y]=Pt(e,16+2*y)}process(e,r,n=!1){const i=n?0:2048,{h:o,r:s}=this,a=s[0],c=s[1],u=s[2],y=s[3],p=s[4],x=s[5],S=s[6],C=s[7],B=s[8],M=s[9],N=Pt(e,r+0),H=Pt(e,r+2),L=Pt(e,r+4),G=Pt(e,r+6),K=Pt(e,r+8),q=Pt(e,r+10),Q=Pt(e,r+12),Z=Pt(e,r+14);let ee=o[0]+(N&8191),se=o[1]+((N>>>13|H<<3)&8191),ne=o[2]+((H>>>10|L<<6)&8191),ie=o[3]+((L>>>7|G<<9)&8191),b=o[4]+((G>>>4|K<<12)&8191),f=o[5]+(K>>>1&8191),l=o[6]+((K>>>14|q<<2)&8191),g=o[7]+((q>>>11|Q<<5)&8191),m=o[8]+((Q>>>8|Z<<8)&8191),E=o[9]+(Z>>>5|i),I=0,T=I+ee*a+se*(5*M)+ne*(5*B)+ie*(5*C)+b*(5*S);I=T>>>13,T&=8191,T+=f*(5*x)+l*(5*p)+g*(5*y)+m*(5*u)+E*(5*c),I+=T>>>13,T&=8191;let D=I+ee*c+se*a+ne*(5*M)+ie*(5*B)+b*(5*C);I=D>>>13,D&=8191,D+=f*(5*S)+l*(5*x)+g*(5*p)+m*(5*y)+E*(5*u),I+=D>>>13,D&=8191;let h=I+ee*u+se*c+ne*a+ie*(5*M)+b*(5*B);I=h>>>13,h&=8191,h+=f*(5*C)+l*(5*S)+g*(5*x)+m*(5*p)+E*(5*y),I+=h>>>13,h&=8191;let k=I+ee*y+se*u+ne*c+ie*a+b*(5*M);I=k>>>13,k&=8191,k+=f*(5*B)+l*(5*C)+g*(5*S)+m*(5*x)+E*(5*p),I+=k>>>13,k&=8191;let re=I+ee*p+se*y+ne*u+ie*c+b*a;I=re>>>13,re&=8191,re+=f*(5*M)+l*(5*B)+g*(5*C)+m*(5*S)+E*(5*x),I+=re>>>13,re&=8191;let v=I+ee*x+se*p+ne*y+ie*u+b*c;I=v>>>13,v&=8191,v+=f*a+l*(5*M)+g*(5*B)+m*(5*C)+E*(5*S),I+=v>>>13,v&=8191;let $=I+ee*S+se*x+ne*p+ie*y+b*u;I=$>>>13,$&=8191,$+=f*c+l*a+g*(5*M)+m*(5*B)+E*(5*C),I+=$>>>13,$&=8191;let Y=I+ee*C+se*S+ne*x+ie*p+b*y;I=Y>>>13,Y&=8191,Y+=f*u+l*c+g*a+m*(5*M)+E*(5*B),I+=Y>>>13,Y&=8191;let J=I+ee*B+se*C+ne*S+ie*x+b*p;I=J>>>13,J&=8191,J+=f*y+l*u+g*c+m*a+E*(5*M),I+=J>>>13,J&=8191;let te=I+ee*M+se*B+ne*C+ie*S+b*x;I=te>>>13,te&=8191,te+=f*p+l*y+g*u+m*c+E*a,I+=te>>>13,te&=8191,I=(I<<2)+I|0,I=I+T|0,T=I&8191,I=I>>>13,D+=I,o[0]=T,o[1]=D,o[2]=h,o[3]=k,o[4]=re,o[5]=v,o[6]=$,o[7]=Y,o[8]=J,o[9]=te}finalize(){const{h:e,pad:r}=this,n=new Uint16Array(10);let i=e[1]>>>13;e[1]&=8191;for(let a=2;a<10;a++)e[a]+=i,i=e[a]>>>13,e[a]&=8191;e[0]+=i*5,i=e[0]>>>13,e[0]&=8191,e[1]+=i,i=e[1]>>>13,e[1]&=8191,e[2]+=i,n[0]=e[0]+5,i=n[0]>>>13,n[0]&=8191;for(let a=1;a<10;a++)n[a]=e[a]+i,i=n[a]>>>13,n[a]&=8191;n[9]-=8192;let o=(i^1)-1;for(let a=0;a<10;a++)n[a]&=o;o=~o;for(let a=0;a<10;a++)e[a]=e[a]&o|n[a];e[0]=(e[0]|e[1]<<13)&65535,e[1]=(e[1]>>>3|e[2]<<10)&65535,e[2]=(e[2]>>>6|e[3]<<7)&65535,e[3]=(e[3]>>>9|e[4]<<4)&65535,e[4]=(e[4]>>>12|e[5]<<1|e[6]<<14)&65535,e[5]=(e[6]>>>2|e[7]<<11)&65535,e[6]=(e[7]>>>5|e[8]<<8)&65535,e[7]=(e[8]>>>8|e[9]<<5)&65535;let s=e[0]+r[0];e[0]=s&65535;for(let a=1;a<8;a++)s=(e[a]+r[a]|0)+(s>>>16)|0,e[a]=s&65535}update(e){fd(this);const{buffer:r,blockLen:n}=this;e=al(e);const i=e.length;for(let o=0;o>>0,e[o++]=n[s]>>>8;return e}digest(){const{buffer:e,outputLen:r}=this;this.digestInto(e);const n=e.slice(0,r);return this.destroy(),n}}function sA(t){const e=(n,i)=>t(i).update(al(n)).digest(),r=t(new Uint8Array(32));return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=n=>t(n),e}sA(t=>new oA(t));const aA=Eu("expand 16-byte k"),cA=Eu("expand 32-byte k");xp(aA);xp(cA);const Un={toString:Ex,fromString:rp,concat:av};function Ep(t){return Un.toString(t,"base64url")}function Su(t){const e=t.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"");return Un.fromString(e,"base64url")}const fA={"ed25519-pub":237,"x25519-pub":236,"secp256k1-pub":231,"bls12_381-g1-pub":234,"bls12_381-g2-pub":235,"p256-pub":4608};function lA(t,e="base58btc",r){{const n=fA[r],i=Ax(n),o=new Uint8Array(i+t.length);return xx(n,o),o.set(t,i),Un.toString(gp.encode(e,o),"utf-8")}}function uA(t){const e=gp.decode(t);if([32,33,48,64,65,96].includes(e.length))return e;try{const[r,n]=vx(e);return e.slice(n)}catch{return e}}function hA(t,e){let r=t.startsWith("0x")?t.substring(2):t;return r.length%2!==0&&(r=`0${r}`),Un.fromString(r.toLowerCase(),"base16")}function ld(t){return Ep(Un.fromString(t))}function Sp(t){return Un.toString(Su(t))}function ud(t){return Un.toString(t,"base16")}function Bu({r:t,s:e,recoveryParam:r},n){const i=new Uint8Array(n?65:64);if(i.set(Un.fromString(t,"base16"),0),i.set(Un.fromString(e,"base16"),32),n){if(typeof r>"u")throw new Error("Signer did not return a recoveryParam");i[64]=r}return Ep(i)}function dA(t){const e=Su(t);if(e.length<64||e.length>65)throw new TypeError(`Wrong size for signature. Expected 64 or 65 bytes, but got ${e.length}`);const r=ud(e.slice(0,32)),n=ud(e.slice(32,64)),i=e.length===65?e[64]:void 0;return{r,s:n,recoveryParam:i}}function hd(t,e=64){return t.length===e?t:"0".repeat(e-t.length)+t}function pA(t){const e=typeof t=="string"?rp(t):t;return yp(e)}function gA(t,e=!1){const r=t;if(r.length!==32)throw new Error(`bad_key: Invalid private key format. Expecting 32 bytes, but got ${r.length}`);return function(n){try{const i=vp.sign(pA(n),r);return Promise.resolve(Bu({r:hd(i.r.toString(16)),s:hd(i.s.toString(16)),recoveryParam:i.recovery},e))}catch(i){return Promise.reject(i)}}}function Du(t){return typeof t=="object"&&"r"in t&&"s"in t}function yA(){return function(e,r){try{return Promise.resolve(r(e)).then(function(n){return Du(n)?Bu(n):n})}catch(n){return Promise.reject(n)}}}function dd(t){return function(r,n){try{return Promise.resolve(n(r)).then(function(i){if(Du(i))return Bu(i,t);if(t&&typeof dA(i).recoveryParam>"u")throw new Error("not_supported: ES256K-R not supported when signer doesn't provide a recovery param");return i})}catch(i){return Promise.reject(i)}}}function pd(){return function(e,r){try{return Promise.resolve(r(e)).then(function(n){if(Du(n))throw new Error("invalid_config: expected a signer function that returns a string instead of signature object");return n})}catch(n){return Promise.reject(n)}}}const wA={ES256:yA(),ES256K:dd(),"ES256K-R":dd(!0),Ed25519:pd(),EdDSA:pd()};function mA(t){const e=wA[t];if(!e)throw new Error(`not_supported: Unsupported algorithm ${t}`);return e}const bA={INVALID_JWT:"invalid_jwt",INVALID_AUDIENCE:"invalid_config",INVALID_SIGNATURE:"invalid_signature",NO_SUITABLE_KEYS:"no_suitable_keys",NOT_SUPPORTED:"not_supported",RESOLVER_ERROR:"resolver_error"};typeof Symbol<"u"&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")));const vA=function(t,{issuer:e,signer:r,alg:n,expiresIn:i,canonicalize:o},s={}){try{if(!r)throw new Error("missing_signer: No Signer functionality has been configured");if(!e)throw new Error("missing_issuer: No issuing DID has been configured");s.typ||(s.typ="JWT"),s.alg||(s.alg=n);const a={iat:Math.floor(Date.now()/1e3),exp:void 0};if(i)if(typeof i=="number")a.exp=(t.nbf||a.iat)+Math.floor(i);else throw new Error("invalid_argument: JWT expiresIn is not a number");const c={...a,...t,iss:e};return xA(c,r,s,{canonicalize:o})}catch(a){return Promise.reject(a)}},xA=function(t,e,r={},n={}){try{r.alg||(r.alg=AA);const i=typeof t=="string"?t:gd(t,n.canonicalize),o=[gd(r,n.canonicalize),i].join("."),s=mA(r.alg);return Promise.resolve(s(o,e)).then(function(a){return[o,a].join(".")})}catch(i){return Promise.reject(i)}},AA="ES256K";function gd(t,e=!1){return ld(e?F2(t):JSON.stringify(t))}function EA(t){const e=t.match(/^([a-zA-Z0-9_-]+)\.([a-zA-Z0-9_-]+)\.([a-zA-Z0-9_-]+)$/);if(e)return{header:JSON.parse(Sp(e[1])),payload:e[2],signature:e[3],data:`${e[1]}.${e[2]}`};throw new Error("invalid_argument: Incorrect format JWS")}function Bp(t,e=!0){if(!t)throw new Error("invalid_argument: no JWT passed into decodeJWT");try{const r=EA(t),n=Object.assign(r,{payload:JSON.parse(Sp(r.payload))}),i=n.payload.iss;if(n.header.cty==="JWT"&&e){const o=Bp(n.payload.jwt);if(o.payload.iss!==i)throw new Error(`${bA.INVALID_JWT}: multiple issuers`);return o}return n}catch{throw new Error("invalid_argument: Incorrect format JWT")}}typeof Symbol<"u"&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")));/*! - * MIT License - * - * Copyright (c) 2017-2024 Peculiar Ventures, LLC - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - */const SA="[object ArrayBuffer]";class De{static isArrayBuffer(e){return Object.prototype.toString.call(e)===SA}static toArrayBuffer(e){return this.isArrayBuffer(e)?e:e.byteLength===e.buffer.byteLength||e.byteOffset===0&&e.byteLength===e.buffer.byteLength?e.buffer:this.toUint8Array(e.buffer).slice(e.byteOffset,e.byteOffset+e.byteLength).buffer}static toUint8Array(e){return this.toView(e,Uint8Array)}static toView(e,r){if(e.constructor===r)return e;if(this.isArrayBuffer(e))return new r(e);if(this.isArrayBufferView(e))return new r(e.buffer,e.byteOffset,e.byteLength);throw new TypeError("The provided value is not of type '(ArrayBuffer or ArrayBufferView)'")}static isBufferSource(e){return this.isArrayBufferView(e)||this.isArrayBuffer(e)}static isArrayBufferView(e){return ArrayBuffer.isView(e)||e&&this.isArrayBuffer(e.buffer)}static isEqual(e,r){const n=De.toUint8Array(e),i=De.toUint8Array(r);if(n.length!==i.byteLength)return!1;for(let o=0;o=0;n--)r+=t[t.length-1-n]*Math.pow(2,e*n);return r}function Ki(t,e,r=-1){const n=r;let i=t,o=0,s=Math.pow(2,e);for(let a=1;a<8;a++){if(t=0;y--){const p=Math.pow(2,y*e);u[o-y-1]=Math.floor(i/p),i-=u[o-y-1]*p}return c}s*=Math.pow(2,e)}return new ArrayBuffer(0)}function cl(...t){let e=0,r=0;for(const o of t)e+=o.length;const n=new ArrayBuffer(e),i=new Uint8Array(n);for(const o of t)i.set(o,r),r+=o.length;return i}function Dp(){const t=new Uint8Array(this.valueHex);if(this.valueHex.byteLength>=2){const a=t[0]===255&&t[1]&128,c=t[0]===0&&(t[1]&128)===0;(a||c)&&this.warnings.push("Needlessly long format")}const e=new ArrayBuffer(this.valueHex.byteLength),r=new Uint8Array(e);for(let a=0;a"u")throw new Error("BigInt is not defined. Your environment doesn't implement BigInt.")}function Cu(t){let e=0,r=0;for(let i=0;i=o.length)return this.error="End of input reached before message was fully decoded",-1;if(c===y){y+=255;const x=new Uint8Array(y);for(let S=0;S8)return this.error="Too big integer",-1;if(s+1>o.length)return this.error="End of input reached before message was fully decoded",-1;const a=r+1,c=i.subarray(a,a+s);return c[s-1]===0&&this.warnings.push("Needlessly long encoded length"),this.length=Do(c,8),this.longFormUsed&&this.length<=127&&this.warnings.push("Unnecessary usage of long length form"),this.blockLength=s+1,r+this.blockLength}toBER(e=!1){let r,n;if(this.length>127&&(this.longFormUsed=!0),this.isIndefiniteForm)return r=new ArrayBuffer(1),e===!1&&(n=new Uint8Array(r),n[0]=128),r;if(this.longFormUsed){const i=Ki(this.length,8);if(i.byteLength>127)return this.error="Too big length",Jr;if(r=new ArrayBuffer(i.byteLength+1),e)return r;const o=new Uint8Array(i);n=new Uint8Array(r),n[0]=i.byteLength|128;for(let s=0;s=37&&i.idBlock.isHexOnly===!1)return i.error="UNIVERSAL 37 and upper tags are reserved by ASN.1 standard",{offset:-1,result:i};switch(i.idBlock.tagNumber){case 0:if(i.idBlock.isConstructed&&i.lenBlock.length>0)return i.error="Type [UNIVERSAL 0] is reserved",{offset:-1,result:i};c=le.EndOfContent;break;case 1:c=le.Boolean;break;case 2:c=le.Integer;break;case 3:c=le.BitString;break;case 4:c=le.OctetString;break;case 5:c=le.Null;break;case 6:c=le.ObjectIdentifier;break;case 10:c=le.Enumerated;break;case 12:c=le.Utf8String;break;case 13:c=le.RelativeObjectIdentifier;break;case 14:c=le.TIME;break;case 15:return i.error="[UNIVERSAL 15] is reserved by ASN.1 standard",{offset:-1,result:i};case 16:c=le.Sequence;break;case 17:c=le.Set;break;case 18:c=le.NumericString;break;case 19:c=le.PrintableString;break;case 20:c=le.TeletexString;break;case 21:c=le.VideotexString;break;case 22:c=le.IA5String;break;case 23:c=le.UTCTime;break;case 24:c=le.GeneralizedTime;break;case 25:c=le.GraphicString;break;case 26:c=le.VisibleString;break;case 27:c=le.GeneralString;break;case 28:c=le.UniversalString;break;case 29:c=le.CharacterString;break;case 30:c=le.BmpString;break;case 31:c=le.DATE;break;case 32:c=le.TimeOfDay;break;case 33:c=le.DateTime;break;case 34:c=le.Duration;break;default:{const u=i.idBlock.isConstructed?new le.Constructed:new le.Primitive;u.idBlock=i.idBlock,u.lenBlock=i.lenBlock,u.warnings=i.warnings,i=u}}break;case 2:case 3:case 4:default:c=i.idBlock.isConstructed?le.Constructed:le.Primitive}return i=LA(i,c),a=i.fromBER(t,e,i.lenBlock.isIndefiniteForm?r:i.lenBlock.length),i.valueBeforeDecodeView=t.subarray(n,n+i.blockLength),{offset:a,result:i}}function ho(t){if(!t.byteLength){const e=new Ft({},Xt);return e.error="Input buffer has zero length",{offset:-1,result:e}}return Fo(De.toUint8Array(t).slice(),0,t.byteLength)}function HA(t,e){return t?1:e}class li extends Xt{constructor({value:e=[],isIndefiniteForm:r=!1,...n}={}){super(n),this.value=e,this.isIndefiniteForm=r}fromBER(e,r,n){const i=De.toUint8Array(e);if(!Ln(this,i,r,n))return-1;if(this.valueBeforeDecodeView=i.subarray(r,r+n),this.valueBeforeDecodeView.length===0)return this.warnings.push("Zero buffer length"),r;let o=r;for(;HA(this.isIndefiniteForm,n)>0;){const s=Fo(i,o,n);if(s.offset===-1)return this.error=s.result.error,this.warnings.concat(s.result.warnings),-1;if(o=s.offset,this.blockLength+=s.result.blockLength,n-=s.result.blockLength,this.value.push(s.result),this.isIndefiniteForm&&s.result.constructor.NAME===hs)break}return this.isIndefiniteForm&&(this.value[this.value.length-1].constructor.NAME===hs?this.value.pop():this.warnings.push("No EndOfContent block encoded")),o}toBER(e,r){const n=r||new Ya;for(let i=0;i` ${i}`).join(` -`));const r=this.idBlock.tagClass===3?`[${this.idBlock.tagNumber}]`:this.constructor.NAME;return e.length?`${r} : -${e.join(` -`)}`:`${r} :`}}Rp=or;le.Constructed=Rp;or.NAME="CONSTRUCTED";class Up extends Xt{fromBER(e,r,n){return r}toBER(e){return Jr}}Up.override="EndOfContentValueBlock";var Op;class Mu extends Ft{constructor(e={}){super(e,Up),this.idBlock.tagClass=1,this.idBlock.tagNumber=0}}Op=Mu;le.EndOfContent=Op;Mu.NAME=hs;var Pp;class Gi extends Ft{constructor(e={}){super(e,Xt),this.idBlock.tagClass=1,this.idBlock.tagNumber=5}fromBER(e,r,n){return this.lenBlock.length>0&&this.warnings.push("Non-zero length of value block for Null type"),this.idBlock.error.length||(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length||(this.blockLength+=this.lenBlock.blockLength),this.blockLength+=n,r+n>e.byteLength?(this.error="End of input reached before message was fully decoded (inconsistent offset and length values)",-1):r+n}toBER(e,r){const n=new ArrayBuffer(2);if(!e){const i=new Uint8Array(n);i[0]=5,i[1]=0}return r&&r.write(n),n}onAsciiEncoding(){return`${this.constructor.NAME}`}}Pp=Gi;le.Null=Pp;Gi.NAME="NULL";class Fp extends yn(Xt){constructor({value:e,...r}={}){super(r),r.valueHex?this.valueHexView=De.toUint8Array(r.valueHex):this.valueHexView=new Uint8Array(1),e&&(this.value=e)}get value(){for(const e of this.valueHexView)if(e>0)return!0;return!1}set value(e){this.valueHexView[0]=e?255:0}fromBER(e,r,n){const i=De.toUint8Array(e);return Ln(this,i,r,n)?(this.valueHexView=i.subarray(r,r+n),n>1&&this.warnings.push("Boolean value encoded in more then 1 octet"),this.isHexOnly=!0,Dp.call(this),this.blockLength=n,r+n):-1}toBER(){return this.valueHexView.slice()}toJSON(){return{...super.toJSON(),value:this.value}}}Fp.NAME="BooleanValueBlock";var Lp;class Za extends Ft{constructor(e={}){super(e,Fp),this.idBlock.tagClass=1,this.idBlock.tagNumber=1}getValue(){return this.valueBlock.value}setValue(e){this.valueBlock.value=e}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.getValue}`}}Lp=Za;le.Boolean=Lp;Za.NAME="BOOLEAN";class Hp extends yn(li){constructor({isConstructed:e=!1,...r}={}){super(r),this.isConstructed=e}fromBER(e,r,n){let i=0;if(this.isConstructed){if(this.isHexOnly=!1,i=li.prototype.fromBER.call(this,e,r,n),i===-1)return i;for(let o=0;o0&&u.unusedBits>0)return this.error='Using of "unused bits" inside constructive BIT STRING allowed for least one only',-1;this.unusedBits=u.unusedBits}return i}const o=De.toUint8Array(e);if(!Ln(this,o,r,n))return-1;const s=o.subarray(r,r+n);if(this.unusedBits=s[0],this.unusedBits>7)return this.error="Unused bits for BitString must be in range 0-7",-1;if(!this.unusedBits){const a=s.subarray(1);try{if(a.byteLength){const c=Fo(a,0,a.byteLength);c.offset!==-1&&c.offset===n-1&&(this.value=[c.result])}}catch{}}return this.valueHexView=s.subarray(1),this.blockLength=s.length,r+n}toBER(e,r){if(this.isConstructed)return li.prototype.toBER.call(this,e,r);if(e)return new ArrayBuffer(this.valueHexView.byteLength+1);if(!this.valueHexView.byteLength)return Jr;const n=new Uint8Array(this.valueHexView.length+1);return n[0]=this.unusedBits,n.set(this.valueHexView,1),n.buffer}toJSON(){return{...super.toJSON(),unusedBits:this.unusedBits,isConstructed:this.isConstructed}}}jp.NAME="BitStringValueBlock";var zp;let Hi=class extends Ft{constructor({idBlock:e={},lenBlock:r={},...n}={}){var i,o;(i=n.isConstructed)!==null&&i!==void 0||(n.isConstructed=!!(!((o=n.value)===null||o===void 0)&&o.length)),super({idBlock:{isConstructed:n.isConstructed,...e},lenBlock:{...r,isIndefiniteForm:!!n.isIndefiniteForm},...n},jp),this.idBlock.tagClass=1,this.idBlock.tagNumber=3}fromBER(e,r,n){return this.valueBlock.isConstructed=this.idBlock.isConstructed,this.valueBlock.isIndefiniteForm=this.lenBlock.isIndefiniteForm,super.fromBER(e,r,n)}onAsciiEncoding(){if(this.valueBlock.isConstructed||this.valueBlock.value&&this.valueBlock.value.length)return or.prototype.onAsciiEncoding.call(this);{const e=[],r=this.valueBlock.valueHexView;for(const i of r)e.push(i.toString(2).padStart(8,"0"));const n=e.join("");return`${this.constructor.NAME} : ${n.substring(0,n.length-this.valueBlock.unusedBits)}`}}};zp=Hi;le.BitString=zp;Hi.NAME=Ip;var Kp;function $A(t,e){const r=new Uint8Array([0]),n=new Uint8Array(t),i=new Uint8Array(e);let o=n.slice(0);const s=o.length-1,a=i.slice(0),c=a.length-1;let u=0;const y=c=0;x--,p++){switch(!0){case p=o.length:o=cl(new Uint8Array([u%10]),o);break;default:o[s-p]=u%10}}return r[0]>0&&(o=cl(r,o)),o}function bd(t){if(t>=Wo.length)for(let e=Wo.length;e<=t;e++){const r=new Uint8Array([0]);let n=Wo[e-1].slice(0);for(let i=n.length-1;i>=0;i--){const o=new Uint8Array([(n[i]<<1)+r[0]]);r[0]=o[0]/10,n[i]=o[0]%10}r[0]>0&&(n=cl(r,n)),Wo.push(n)}return Wo[t]}function VA(t,e){let r=0;const n=new Uint8Array(t),i=new Uint8Array(e),o=n.slice(0),s=o.length-1,a=i.slice(0),c=a.length-1;let u,y=0;for(let p=c;p>=0;p--,y++)switch(u=o[s-y]-a[c-y]-r,!0){case u<0:r=1,o[s-y]=u+10;break;default:r=0,o[s-y]=u}if(r>0)for(let p=s-c+1;p>=0;p--,y++)if(u=o[s-y]-r,u<0)r=1,o[s-y]=u+10;else{r=0,o[s-y]=u;break}return o.slice()}class _u extends yn(Xt){constructor({value:e,...r}={}){super(r),this._valueDec=0,r.valueHex&&this.setValueHex(),e!==void 0&&(this.valueDec=e)}setValueHex(){this.valueHexView.length>=4?(this.warnings.push("Too big Integer for decoding, hex only"),this.isHexOnly=!0,this._valueDec=0):(this.isHexOnly=!1,this.valueHexView.length>0&&(this._valueDec=Dp.call(this)))}set valueDec(e){this._valueDec=e,this.isHexOnly=!1,this.valueHexView=new Uint8Array(MA(e))}get valueDec(){return this._valueDec}fromDER(e,r,n,i=0){const o=this.fromBER(e,r,n);if(o===-1)return o;const s=this.valueHexView;return s[0]===0&&s[1]&128?this.valueHexView=s.subarray(1):i!==0&&s.length1&&(i=s.length+1),this.valueHexView=s.subarray(i-s.length)),o}toDER(e=!1){const r=this.valueHexView;switch(!0){case(r[0]&128)!==0:{const n=new Uint8Array(this.valueHexView.length+1);n[0]=0,n.set(r,1),this.valueHexView=n}break;case(r[0]===0&&(r[1]&128)===0):this.valueHexView=this.valueHexView.subarray(1);break}return this.toBER(e)}fromBER(e,r,n){const i=super.fromBER(e,r,n);return i===-1||this.setValueHex(),i}toBER(e){return e?new ArrayBuffer(this.valueHexView.length):this.valueHexView.slice().buffer}toJSON(){return{...super.toJSON(),valueDec:this.valueDec}}toString(){const e=this.valueHexView.length*8-1;let r=new Uint8Array(this.valueHexView.length*8/3),n=0,i;const o=this.valueHexView;let s="",a=!1;for(let c=o.byteLength-1;c>=0;c--){i=o[c];for(let u=0;u<8;u++){if((i&1)===1)switch(n){case e:r=VA(bd(n),r),s="-";break;default:r=$A(r,bd(n))}n++,i>>=1}}for(let c=0;c0;){const o=new fl;if(i=o.fromBER(e,i,n),i===-1)return this.blockLength=0,this.error=o.error,i;this.value.length===0&&(o.isFirstSid=!0),this.blockLength+=o.blockLength,n-=o.blockLength,this.value.push(o)}return i}toBER(e){const r=[];for(let n=0;nNumber.MAX_SAFE_INTEGER){va();const a=BigInt(i);s.valueBigInt=a}else if(s.valueDec=parseInt(i,10),isNaN(s.valueDec))return;this.value.length||(s.isFirstSid=!0,o=!0),this.value.push(s)}while(n!==-1)}toString(){let e="",r=!1;for(let n=0;n0;){const o=new ll;if(i=o.fromBER(e,i,n),i===-1)return this.blockLength=0,this.error=o.error,i;this.blockLength+=o.blockLength,n-=o.blockLength,this.value.push(o)}return i}toBER(e,r){const n=[];for(let i=0;i4)continue;const a=4-s.length;for(let c=s.length-1;c>=0;c--)n[i*4+c+a]=s[c]}this.valueBlock.value=e}}sg.NAME="UniversalStringValueBlock";var ag;class rc extends sg{constructor({...e}={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=28}}ag=rc;le.UniversalString=ag;rc.NAME="UniversalString";var cg;class nc extends wr{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=18}}cg=nc;le.NumericString=cg;nc.NAME="NumericString";var fg;class ic extends wr{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=19}}fg=ic;le.PrintableString=fg;ic.NAME="PrintableString";var lg;class oc extends wr{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=20}}lg=oc;le.TeletexString=lg;oc.NAME="TeletexString";var ug;class sc extends wr{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=21}}ug=sc;le.VideotexString=ug;sc.NAME="VideotexString";var hg;class ac extends wr{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=22}}hg=ac;le.IA5String=hg;ac.NAME="IA5String";var dg;class cc extends wr{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=25}}dg=cc;le.GraphicString=dg;cc.NAME="GraphicString";var pg;class _s extends wr{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=26}}pg=_s;le.VisibleString=pg;_s.NAME="VisibleString";var gg;class fc extends wr{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=27}}gg=fc;le.GeneralString=gg;fc.NAME="GeneralString";var yg;class lc extends wr{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=29}}yg=lc;le.CharacterString=yg;lc.NAME="CharacterString";var wg;class ks extends _s{constructor({value:e,valueDate:r,...n}={}){if(super(n),this.year=0,this.month=0,this.day=0,this.hour=0,this.minute=0,this.second=0,e){this.fromString(e),this.valueBlock.valueHexView=new Uint8Array(e.length);for(let i=0;i=50?this.year=1900+i:this.year=2e3+i,this.month=parseInt(n[2],10),this.day=parseInt(n[3],10),this.hour=parseInt(n[4],10),this.minute=parseInt(n[5],10),this.second=parseInt(n[6],10)}toString(e="iso"){if(e==="iso"){const r=new Array(7);return r[0]=pr(this.year<2e3?this.year-1900:this.year-2e3,2),r[1]=pr(this.month,2),r[2]=pr(this.day,2),r[3]=pr(this.hour,2),r[4]=pr(this.minute,2),r[5]=pr(this.second,2),r[6]="Z",r.join("")}return super.toString(e)}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.toDate().toISOString()}`}toJSON(){return{...super.toJSON(),year:this.year,month:this.month,day:this.day,hour:this.hour,minute:this.minute,second:this.second}}}wg=ks;le.UTCTime=wg;ks.NAME="UTCTime";var mg;class uc extends ks{constructor(e={}){var r;super(e),(r=this.millisecond)!==null&&r!==void 0||(this.millisecond=0),this.idBlock.tagClass=1,this.idBlock.tagNumber=24}fromDate(e){super.fromDate(e),this.millisecond=e.getUTCMilliseconds()}toDate(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond))}fromString(e){let r=!1,n="",i="",o=0,s,a=0,c=0;if(e[e.length-1]==="Z")n=e.substring(0,e.length-1),r=!0;else{const p=new Number(e[e.length-1]);if(isNaN(p.valueOf()))throw new Error("Wrong input string for conversion");n=e}if(r){if(n.indexOf("+")!==-1)throw new Error("Wrong input string for conversion");if(n.indexOf("-")!==-1)throw new Error("Wrong input string for conversion")}else{let p=1,x=n.indexOf("+"),S="";if(x===-1&&(x=n.indexOf("-"),p=-1),x!==-1){if(S=n.substring(x+1),n=n.substring(0,x),S.length!==2&&S.length!==4)throw new Error("Wrong input string for conversion");let C=parseInt(S.substring(0,2),10);if(isNaN(C.valueOf()))throw new Error("Wrong input string for conversion");if(a=p*C,S.length===4){if(C=parseInt(S.substring(2,4),10),isNaN(C.valueOf()))throw new Error("Wrong input string for conversion");c=p*C}}}let u=n.indexOf(".");if(u===-1&&(u=n.indexOf(",")),u!==-1){const p=new Number(`0${n.substring(u)}`);if(isNaN(p.valueOf()))throw new Error("Wrong input string for conversion");o=p.valueOf(),i=n.substring(0,u)}else i=n;switch(!0){case i.length===8:if(s=/(\d{4})(\d{2})(\d{2})/ig,u!==-1)throw new Error("Wrong input string for conversion");break;case i.length===10:if(s=/(\d{4})(\d{2})(\d{2})(\d{2})/ig,u!==-1){let p=60*o;this.minute=Math.floor(p),p=60*(p-this.minute),this.second=Math.floor(p),p=1e3*(p-this.second),this.millisecond=Math.floor(p)}break;case i.length===12:if(s=/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})/ig,u!==-1){let p=60*o;this.second=Math.floor(p),p=1e3*(p-this.second),this.millisecond=Math.floor(p)}break;case i.length===14:if(s=/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/ig,u!==-1){const p=1e3*o;this.millisecond=Math.floor(p)}break;default:throw new Error("Wrong input string for conversion")}const y=s.exec(i);if(y===null)throw new Error("Wrong input string for conversion");for(let p=1;p0&&r.valueBlock.value[0]instanceof xa&&(a=e.valueBlock.value.length),a===0)return{verified:!0,result:t};if(e.valueBlock.value.length===0&&r.valueBlock.value.length!==0){let c=!0;for(let u=0;u=e.valueBlock.value.length){if(r.valueBlock.value[c].optional===!1){const u={verified:!1,result:t};return t.error="Inconsistent length between ASN.1 data and schema",r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,nr),r.name&&(delete t[r.name],u.name=r.name)),u}}else if(r.valueBlock.value[0]instanceof xa){if(s=Ni(t,e.valueBlock.value[c],r.valueBlock.value[0].value),s.verified===!1)if(r.valueBlock.value[0].optional)o++;else return r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,nr),r.name&&delete t[r.name]),s;if(bf in r.valueBlock.value[0]&&r.valueBlock.value[0].name.length>0){let u={};FA in r.valueBlock.value[0]&&r.valueBlock.value[0].local?u=e:u=t,typeof u[r.valueBlock.value[0].name]>"u"&&(u[r.valueBlock.value[0].name]=[]),u[r.valueBlock.value[0].name].push(e.valueBlock.value[c])}}else if(s=Ni(t,e.valueBlock.value[c-o],r.valueBlock.value[c]),s.verified===!1)if(r.valueBlock.value[c].optional)o++;else return r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,nr),r.name&&delete t[r.name]),s;if(s.verified===!1){const c={verified:!1,result:t};return r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,nr),r.name&&(delete t[r.name],c.name=r.name)),c}return{verified:!0,result:t}}if(r.primitiveSchema&&md in e.valueBlock){const o=Fo(e.valueBlock.valueHexView);if(o.offset===-1){const s={verified:!1,result:o.result};return r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,nr),r.name&&(delete t[r.name],s.name=r.name)),s}return Ni(t,o.result,r.primitiveSchema)}return{verified:!0,result:t}}function zA(t,e){if(!(e instanceof Object))return{verified:!1,result:{error:"Wrong ASN.1 schema type"}};const r=Fo(De.toUint8Array(t));return r.offset===-1?{verified:!1,result:r.result}:Ni(r.result,r.result,e)}const Sg=Object.freeze(Object.defineProperty({__proto__:null,Any:qi,BaseBlock:Ft,BaseStringBlock:Iu,BitString:Hi,BmpString:tc,Boolean:Za,CharacterString:lc,Choice:Pu,Constructed:or,DATE:Tu,DateTime:Ru,Duration:Uu,EndOfContent:Mu,Enumerated:Xa,GeneralString:fc,GeneralizedTime:uc,GraphicString:cc,HexBlock:yn,IA5String:ac,Integer:fn,Null:Gi,NumericString:nc,ObjectIdentifier:ec,OctetString:Li,Primitive:Ms,PrintableString:ic,RawData:jA,RelativeObjectIdentifier:ku,Repeated:xa,Sequence:_n,Set:kn,TIME:Ou,TeletexString:oc,TimeOfDay:Nu,UTCTime:ks,UniversalString:rc,Utf8String:Hn,ValueBlock:Xt,VideotexString:sc,ViewWriter:Ya,VisibleString:_s,compareSchema:Ni,fromBER:ho,verifySchema:zA},Symbol.toStringTag,{value:"Module"}));var be;(function(t){t[t.Sequence=0]="Sequence",t[t.Set=1]="Set",t[t.Choice=2]="Choice"})(be||(be={}));var j;(function(t){t[t.Any=1]="Any",t[t.Boolean=2]="Boolean",t[t.OctetString=3]="OctetString",t[t.BitString=4]="BitString",t[t.Integer=5]="Integer",t[t.Enumerated=6]="Enumerated",t[t.ObjectIdentifier=7]="ObjectIdentifier",t[t.Utf8String=8]="Utf8String",t[t.BmpString=9]="BmpString",t[t.UniversalString=10]="UniversalString",t[t.NumericString=11]="NumericString",t[t.PrintableString=12]="PrintableString",t[t.TeletexString=13]="TeletexString",t[t.VideotexString=14]="VideotexString",t[t.IA5String=15]="IA5String",t[t.GraphicString=16]="GraphicString",t[t.VisibleString=17]="VisibleString",t[t.GeneralString=18]="GeneralString",t[t.CharacterString=19]="CharacterString",t[t.UTCTime=20]="UTCTime",t[t.GeneralizedTime=21]="GeneralizedTime",t[t.DATE=22]="DATE",t[t.TimeOfDay=23]="TimeOfDay",t[t.DateTime=24]="DateTime",t[t.Duration=25]="Duration",t[t.TIME=26]="TIME",t[t.Null=27]="Null"})(j||(j={}));class Bg{constructor(e,r=0){if(this.unusedBits=0,this.value=new ArrayBuffer(0),e)if(typeof e=="number")this.fromNumber(e);else if(De.isBufferSource(e))this.unusedBits=r,this.value=De.toArrayBuffer(e);else throw TypeError("Unsupported type of 'params' argument for BitString")}fromASN(e){if(!(e instanceof Hi))throw new TypeError("Argument 'asn' is not instance of ASN.1 BitString");return this.unusedBits=e.valueBlock.unusedBits,this.value=e.valueBlock.valueHex,this}toASN(){return new Hi({unusedBits:this.unusedBits,valueHex:this.value})}toSchema(e){return new Hi({name:e})}toNumber(){let e="";const r=new Uint8Array(this.value);for(const n of r)e+=n.toString(2).padStart(8,"0");return e=e.split("").reverse().join(""),this.unusedBits&&(e=e.slice(this.unusedBits).padStart(this.unusedBits,"0")),parseInt(e,2)}fromNumber(e){let r=e.toString(2);const n=r.length+7>>3;this.unusedBits=(n<<3)-r.length;const i=new Uint8Array(n);r=r.padStart(n<<3,"0").split("").reverse().join("");let o=0;for(;ot instanceof Gi?null:t.valueBeforeDecodeView,toASN:t=>{if(t===null)return new Gi;const e=ho(t);if(e.result.error)throw new Error(e.result.error);return e.result}},GA={fromASN:t=>t.valueBlock.valueHexView.byteLength>=4?t.valueBlock.toString():t.valueBlock.valueDec,toASN:t=>new fn({value:+t})},qA={fromASN:t=>t.valueBlock.valueDec,toASN:t=>new Xa({value:t})},mt={fromASN:t=>t.valueBlock.valueHexView,toASN:t=>new fn({valueHex:t})},WA={fromASN:t=>t.valueBlock.valueHexView,toASN:t=>new Hi({valueHex:t})},JA={fromASN:t=>t.valueBlock.toString(),toASN:t=>new ec({value:t})},YA={fromASN:t=>t.valueBlock.value,toASN:t=>new Za({value:t})},Aa={fromASN:t=>t.valueBlock.valueHexView,toASN:t=>new Li({valueHex:t})};function Mr(t){return{fromASN:e=>e.valueBlock.value,toASN:e=>new t({value:e})}}const QA=Mr(Hn),ZA=Mr(tc),XA=Mr(rc),eE=Mr(nc),tE=Mr(ic),rE=Mr(oc),nE=Mr(sc),iE=Mr(ac),oE=Mr(cc),sE=Mr(_s),aE=Mr(fc),cE=Mr(lc),fE={fromASN:t=>t.toDate(),toASN:t=>new ks({valueDate:t})},lE={fromASN:t=>t.toDate(),toASN:t=>new uc({valueDate:t})},uE={fromASN:()=>null,toASN:()=>new Gi};function Fu(t){switch(t){case j.Any:return KA;case j.BitString:return WA;case j.BmpString:return ZA;case j.Boolean:return YA;case j.CharacterString:return cE;case j.Enumerated:return qA;case j.GeneralString:return aE;case j.GeneralizedTime:return lE;case j.GraphicString:return oE;case j.IA5String:return iE;case j.Integer:return GA;case j.Null:return uE;case j.NumericString:return eE;case j.ObjectIdentifier:return JA;case j.OctetString:return Aa;case j.PrintableString:return tE;case j.TeletexString:return rE;case j.UTCTime:return fE;case j.UniversalString:return XA;case j.Utf8String:return QA;case j.VideotexString:return nE;case j.VisibleString:return sE;default:return null}}function In(t){return typeof t=="function"&&t.prototype?t.prototype.toASN&&t.prototype.fromASN?!0:In(t.prototype):!!(t&&typeof t=="object"&&"toASN"in t&&"fromASN"in t)}function Dg(t){var e;if(t){const r=Object.getPrototypeOf(t);return((e=r==null?void 0:r.prototype)===null||e===void 0?void 0:e.constructor)===Array?!0:Dg(r)}return!1}function hE(t,e){if(!(t&&e)||t.byteLength!==e.byteLength)return!1;const r=new Uint8Array(t),n=new Uint8Array(e);for(let i=0;ie=>{let r;Er.has(e)?r=Er.get(e):(r=Er.createDefault(e),Er.set(e,r)),Object.assign(r,t)},O=t=>(e,r)=>{let n;Er.has(e.constructor)?n=Er.get(e.constructor):(n=Er.createDefault(e.constructor),Er.set(e.constructor,n));const i=Object.assign({},t);if(typeof i.type=="number"&&!i.converter){const o=Fu(t.type);if(!o)throw new Error(`Cannot get default converter for property '${r}' of ${e.constructor.name}`);i.converter=o}n.items[r]=i};class vd extends Error{constructor(){super(...arguments),this.schemas=[]}}class Rt{static parse(e,r){const n=ho(e);if(n.result.error)throw new Error(n.result.error);return this.fromASN(n.result,r)}static fromASN(e,r){var n;try{if(In(r))return new r().fromASN(e);const i=Er.get(r);Er.cache(r);let o=i.schema;if(e.constructor===or&&i.type!==be.Choice){o=new or({idBlock:{tagClass:3,tagNumber:e.idBlock.tagNumber},value:i.schema.valueBlock.value});for(const c in i.items)delete e[c]}const s=Ni({},e,o);if(!s.verified)throw new vd(`Data does not match to ${r.name} ASN1 schema. ${s.result.error}`);const a=new r;if(Dg(r)){if(!("value"in e.valueBlock&&Array.isArray(e.valueBlock.value)))throw new Error("Cannot get items from the ASN.1 parsed value. ASN.1 object is not constructed.");const c=i.itemType;if(typeof c=="number"){const u=Fu(c);if(!u)throw new Error(`Cannot get default converter for array item of ${r.name} ASN1 schema`);return r.from(e.valueBlock.value,y=>u.fromASN(y))}else return r.from(e.valueBlock.value,u=>this.fromASN(u,c))}for(const c in i.items){const u=s.result[c];if(!u)continue;const y=i.items[c],p=y.type;if(typeof p=="number"||In(p)){const x=(n=y.converter)!==null&&n!==void 0?n:In(p)?new p:null;if(!x)throw new Error("Converter is empty");if(y.repeated)if(y.implicit){const S=y.repeated==="sequence"?_n:kn,C=new S;C.valueBlock=u.valueBlock;const B=ho(C.toBER(!1));if(B.offset===-1)throw new Error(`Cannot parse the child item. ${B.result.error}`);if(!("value"in B.result.valueBlock&&Array.isArray(B.result.valueBlock.value)))throw new Error("Cannot get items from the ASN.1 parsed value. ASN.1 object is not constructed.");const M=B.result.valueBlock.value;a[c]=Array.from(M,N=>x.fromASN(N))}else a[c]=Array.from(u,S=>x.fromASN(S));else{let S=u;if(y.implicit){let C;if(In(p))C=new p().toSchema("");else{const B=j[p],M=Sg[B];if(!M)throw new Error(`Cannot get '${B}' class from asn1js module`);C=new M}C.valueBlock=S.valueBlock,S=ho(C.toBER(!1)).result}a[c]=x.fromASN(S)}}else if(y.repeated){if(!Array.isArray(u))throw new Error("Cannot get list of items from the ASN.1 parsed value. ASN.1 value should be iterable.");a[c]=Array.from(u,x=>this.fromASN(x,p))}else a[c]=this.fromASN(u,p)}return a}catch(i){throw i instanceof vd&&i.schemas.push(r.name),i}}}class hc{static serialize(e){return e instanceof Ft?e.toBER(!1):this.toASN(e).toBER(!1)}static toASN(e){if(e&&typeof e=="object"&&In(e))return e.toASN();if(!(e&&typeof e=="object"))throw new TypeError("Parameter 1 should be type of Object.");const r=e.constructor,n=Er.get(r);Er.cache(r);let i=[];if(n.itemType){if(!Array.isArray(e))throw new TypeError("Parameter 1 should be type of Array.");if(typeof n.itemType=="number"){const s=Fu(n.itemType);if(!s)throw new Error(`Cannot get default converter for array item of ${r.name} ASN1 schema`);i=e.map(a=>s.toASN(a))}else i=e.map(s=>this.toAsnItem({type:n.itemType},"[]",r,s))}else for(const s in n.items){const a=n.items[s],c=e[s];if(c===void 0||a.defaultValue===c||typeof a.defaultValue=="object"&&typeof c=="object"&&hE(this.serialize(a.defaultValue),this.serialize(c)))continue;const u=hc.toAsnItem(a,s,r,c);if(typeof a.context=="number")if(a.implicit)if(!a.repeated&&(typeof a.type=="number"||In(a.type))){const y={};y.valueHex=u instanceof Gi?u.valueBeforeDecodeView:u.valueBlock.toBER(),i.push(new Ms({optional:a.optional,idBlock:{tagClass:3,tagNumber:a.context},...y}))}else i.push(new or({optional:a.optional,idBlock:{tagClass:3,tagNumber:a.context},value:u.valueBlock.value}));else i.push(new or({optional:a.optional,idBlock:{tagClass:3,tagNumber:a.context},value:[u]}));else a.repeated?i=i.concat(u):i.push(u)}let o;switch(n.type){case be.Sequence:o=new _n({value:i});break;case be.Set:o=new kn({value:i});break;case be.Choice:if(!i[0])throw new Error(`Schema '${r.name}' has wrong data. Choice cannot be empty.`);o=i[0];break}return o}static toAsnItem(e,r,n,i){let o;if(typeof e.type=="number"){const s=e.converter;if(!s)throw new Error(`Property '${r}' doesn't have converter for type ${j[e.type]} in schema '${n.name}'`);if(e.repeated){if(!Array.isArray(i))throw new TypeError("Parameter 'objProp' should be type of Array.");const a=Array.from(i,u=>s.toASN(u)),c=e.repeated==="sequence"?_n:kn;o=new c({value:a})}else o=s.toASN(i)}else if(e.repeated){if(!Array.isArray(i))throw new TypeError("Parameter 'objProp' should be type of Array.");const s=Array.from(i,c=>this.toASN(c)),a=e.repeated==="sequence"?_n:kn;o=new a({value:s})}else o=this.toASN(i);return o}}class er extends Array{constructor(e=[]){if(typeof e=="number")super(e);else{super();for(const r of e)this.push(r)}}}class gi{static serialize(e){return hc.serialize(e)}static parse(e,r){return Rt.parse(e,r)}static toString(e){const r=De.isBufferSource(e)?De.toArrayBuffer(e):gi.serialize(e),n=ho(r);if(n.offset===-1)throw new Error(`Cannot decode ASN.1 data. ${n.result.error}`);return n.result.toString()}}function R(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o}class xd{static isIPv4(e){return/^(\d{1,3}\.){3}\d{1,3}$/.test(e)}static parseIPv4(e){const r=e.split(".");if(r.length!==4)throw new Error("Invalid IPv4 address");return r.map(n=>{const i=parseInt(n,10);if(isNaN(i)||i<0||i>255)throw new Error("Invalid IPv4 address part");return i})}static parseIPv6(e){const n=this.expandIPv6(e).split(":");if(n.length!==8)throw new Error("Invalid IPv6 address");return n.reduce((i,o)=>{const s=parseInt(o,16);if(isNaN(s)||s<0||s>65535)throw new Error("Invalid IPv6 address part");return i.push(s>>8&255),i.push(s&255),i},[])}static expandIPv6(e){if(!e.includes("::"))return e;const r=e.split("::");if(r.length>2)throw new Error("Invalid IPv6 address");const n=r[0]?r[0].split(":"):[],i=r[1]?r[1].split(":"):[],o=8-(n.length+i.length);if(o<0)throw new Error("Invalid IPv6 address");return[...n,...Array(o).fill("0"),...i].join(":")}static formatIPv6(e){const r=[];for(let n=0;n<16;n+=2)r.push((e[n]<<8|e[n+1]).toString(16));return this.compressIPv6(r.join(":"))}static compressIPv6(e){const r=e.split(":");let n=-1,i=0,o=-1,s=0;for(let a=0;ai&&(n=o,i=s),o=-1,s=0);if(s>i&&(n=o,i=s),i>1){const a=r.slice(0,n).join(":"),c=r.slice(n+i).join(":");return`${a}::${c}`}return e}static parseCIDR(e){const[r,n]=e.split("/"),i=parseInt(n,10);if(this.isIPv4(r)){if(i<0||i>32)throw new Error("Invalid IPv4 prefix length");return[this.parseIPv4(r),i]}else{if(i<0||i>128)throw new Error("Invalid IPv6 prefix length");return[this.parseIPv6(r),i]}}static decodeIP(e){if(e.length===64&&parseInt(e,16)===0)return"::/0";if(e.length!==16)return e;const r=parseInt(e.slice(8),16).toString(2).split("").reduce((i,o)=>i+ +o,0);let n=e.slice(0,8).replace(/(.{2})/g,i=>`${parseInt(i,16)}.`);return n=n.slice(0,-1),`${n}/${r}`}static toString(e){const r=new Uint8Array(e);if(r.length===4)return Array.from(r).join(".");if(r.length===16)return this.formatIPv6(r);if(r.length===8||r.length===32){const n=r.length/2,i=r.slice(0,n),o=r.slice(n);if(r.every(c=>c===0))return r.length===8?"0.0.0.0/0":"::/0";const a=o.reduce((c,u)=>c+(u.toString(2).match(/1/g)||[]).length,0);return r.length===8?`${Array.from(i).join(".")}/${a}`:`${this.formatIPv6(i)}/${a}`}return this.decodeIP(yt.ToHex(e))}static fromString(e){if(e.includes("/")){const[n,i]=this.parseCIDR(e),o=new Uint8Array(n.length);let s=i;for(let c=0;c=8?(o[c]=255,s-=8):s>0&&(o[c]=255<<8-s,s=0);const a=new Uint8Array(n.length*2);return a.set(n,0),a.set(o,n.length),a.buffer}const r=this.isIPv4(e)?this.parseIPv4(e):this.parseIPv6(e);return new Uint8Array(r).buffer}}var ul,hl,dl;let Gr=class{constructor(e={}){Object.assign(this,e)}toString(){return this.bmpString||this.printableString||this.teletexString||this.universalString||this.utf8String||""}};R([O({type:j.TeletexString})],Gr.prototype,"teletexString",void 0);R([O({type:j.PrintableString})],Gr.prototype,"printableString",void 0);R([O({type:j.UniversalString})],Gr.prototype,"universalString",void 0);R([O({type:j.Utf8String})],Gr.prototype,"utf8String",void 0);R([O({type:j.BmpString})],Gr.prototype,"bmpString",void 0);Gr=R([Ce({type:be.Choice})],Gr);let Co=class extends Gr{constructor(e={}){super(e),Object.assign(this,e)}toString(){return this.ia5String||(this.anyValue?yt.ToHex(this.anyValue):super.toString())}};R([O({type:j.IA5String})],Co.prototype,"ia5String",void 0);R([O({type:j.Any})],Co.prototype,"anyValue",void 0);Co=R([Ce({type:be.Choice})],Co);class Lu{constructor(e={}){this.type="",this.value=new Co,Object.assign(this,e)}}R([O({type:j.ObjectIdentifier})],Lu.prototype,"type",void 0);R([O({type:Co})],Lu.prototype,"value",void 0);let Ea=ul=class extends er{constructor(e){super(e),Object.setPrototypeOf(this,ul.prototype)}};Ea=ul=R([Ce({type:be.Set,itemType:Lu})],Ea);let pl=hl=class extends er{constructor(e){super(e),Object.setPrototypeOf(this,hl.prototype)}};pl=hl=R([Ce({type:be.Sequence,itemType:Ea})],pl);let On=dl=class extends pl{constructor(e){super(e),Object.setPrototypeOf(this,dl.prototype)}};On=dl=R([Ce({type:be.Sequence})],On);const pE={fromASN:t=>xd.toString(Aa.fromASN(t)),toASN:t=>Aa.toASN(xd.fromString(t))};class Hu{constructor(e={}){this.typeId="",this.value=new ArrayBuffer(0),Object.assign(this,e)}}R([O({type:j.ObjectIdentifier})],Hu.prototype,"typeId",void 0);R([O({type:j.Any,context:0})],Hu.prototype,"value",void 0);class $u{constructor(e={}){this.partyName=new Gr,Object.assign(this,e)}}R([O({type:Gr,optional:!0,context:0,implicit:!0})],$u.prototype,"nameAssigner",void 0);R([O({type:Gr,context:1,implicit:!0})],$u.prototype,"partyName",void 0);let Dt=class{constructor(e={}){Object.assign(this,e)}};R([O({type:Hu,context:0,implicit:!0})],Dt.prototype,"otherName",void 0);R([O({type:j.IA5String,context:1,implicit:!0})],Dt.prototype,"rfc822Name",void 0);R([O({type:j.IA5String,context:2,implicit:!0})],Dt.prototype,"dNSName",void 0);R([O({type:j.Any,context:3,implicit:!0})],Dt.prototype,"x400Address",void 0);R([O({type:On,context:4,implicit:!1})],Dt.prototype,"directoryName",void 0);R([O({type:$u,context:5})],Dt.prototype,"ediPartyName",void 0);R([O({type:j.IA5String,context:6,implicit:!0})],Dt.prototype,"uniformResourceIdentifier",void 0);R([O({type:j.OctetString,context:7,implicit:!0,converter:pE})],Dt.prototype,"iPAddress",void 0);R([O({type:j.ObjectIdentifier,context:8,implicit:!0})],Dt.prototype,"registeredID",void 0);Dt=R([Ce({type:be.Choice})],Dt);const Lo="2.5.29";var gl;class dc{constructor(e={}){this.accessMethod="",this.accessLocation=new Dt,Object.assign(this,e)}}R([O({type:j.ObjectIdentifier})],dc.prototype,"accessMethod",void 0);R([O({type:Dt})],dc.prototype,"accessLocation",void 0);let Ad=gl=class extends er{constructor(e){super(e),Object.setPrototypeOf(this,gl.prototype)}};Ad=gl=R([Ce({type:be.Sequence,itemType:dc})],Ad);const gE=`${Lo}.35`;class Cg extends Ve{}class pc{constructor(e={}){e&&Object.assign(this,e)}}R([O({type:Cg,context:0,optional:!0,implicit:!0})],pc.prototype,"keyIdentifier",void 0);R([O({type:Dt,context:1,optional:!0,implicit:!0,repeated:"sequence"})],pc.prototype,"authorityCertIssuer",void 0);R([O({type:j.Integer,context:2,optional:!0,implicit:!0,converter:mt})],pc.prototype,"authorityCertSerialNumber",void 0);const yE=`${Lo}.19`;class Vu{constructor(e={}){this.cA=!1,Object.assign(this,e)}}R([O({type:j.Boolean,defaultValue:!1})],Vu.prototype,"cA",void 0);R([O({type:j.Integer,optional:!0})],Vu.prototype,"pathLenConstraint",void 0);var yl;let ds=yl=class extends er{constructor(e){super(e),Object.setPrototypeOf(this,yl.prototype)}};ds=yl=R([Ce({type:be.Sequence,itemType:Dt})],ds);var wl;let Ed=wl=class extends ds{constructor(e){super(e),Object.setPrototypeOf(this,wl.prototype)}};Ed=wl=R([Ce({type:be.Sequence})],Ed);var ml;let Pn=class{constructor(e={}){Object.assign(this,e)}toString(){return this.ia5String||this.visibleString||this.bmpString||this.utf8String||""}};R([O({type:j.IA5String})],Pn.prototype,"ia5String",void 0);R([O({type:j.VisibleString})],Pn.prototype,"visibleString",void 0);R([O({type:j.BmpString})],Pn.prototype,"bmpString",void 0);R([O({type:j.Utf8String})],Pn.prototype,"utf8String",void 0);Pn=R([Ce({type:be.Choice})],Pn);class ju{constructor(e={}){this.organization=new Pn,this.noticeNumbers=[],Object.assign(this,e)}}R([O({type:Pn})],ju.prototype,"organization",void 0);R([O({type:j.Integer,repeated:"sequence"})],ju.prototype,"noticeNumbers",void 0);class zu{constructor(e={}){Object.assign(this,e)}}R([O({type:ju,optional:!0})],zu.prototype,"noticeRef",void 0);R([O({type:Pn,optional:!0})],zu.prototype,"explicitText",void 0);let Sa=class{constructor(e={}){Object.assign(this,e)}};R([O({type:j.IA5String})],Sa.prototype,"cPSuri",void 0);R([O({type:zu})],Sa.prototype,"userNotice",void 0);Sa=R([Ce({type:be.Choice})],Sa);class Ku{constructor(e={}){this.policyQualifierId="",this.qualifier=new ArrayBuffer(0),Object.assign(this,e)}}R([O({type:j.ObjectIdentifier})],Ku.prototype,"policyQualifierId",void 0);R([O({type:j.Any})],Ku.prototype,"qualifier",void 0);class Gu{constructor(e={}){this.policyIdentifier="",Object.assign(this,e)}}R([O({type:j.ObjectIdentifier})],Gu.prototype,"policyIdentifier",void 0);R([O({type:Ku,repeated:"sequence",optional:!0})],Gu.prototype,"policyQualifiers",void 0);let Sd=ml=class extends er{constructor(e){super(e),Object.setPrototypeOf(this,ml.prototype)}};Sd=ml=R([Ce({type:be.Sequence,itemType:Gu})],Sd);let Ba=class{constructor(e=0){this.value=e}};R([O({type:j.Integer})],Ba.prototype,"value",void 0);Ba=R([Ce({type:be.Choice})],Ba);let Bd=class extends Ba{};Bd=R([Ce({type:be.Choice})],Bd);var bl;const wE=`${Lo}.31`;var Nr;(function(t){t[t.unused=1]="unused",t[t.keyCompromise=2]="keyCompromise",t[t.cACompromise=4]="cACompromise",t[t.affiliationChanged=8]="affiliationChanged",t[t.superseded=16]="superseded",t[t.cessationOfOperation=32]="cessationOfOperation",t[t.certificateHold=64]="certificateHold",t[t.privilegeWithdrawn=128]="privilegeWithdrawn",t[t.aACompromise=256]="aACompromise"})(Nr||(Nr={}));class Ig extends Bg{toJSON(){const e=[],r=this.toNumber();return r&Nr.aACompromise&&e.push("aACompromise"),r&Nr.affiliationChanged&&e.push("affiliationChanged"),r&Nr.cACompromise&&e.push("cACompromise"),r&Nr.certificateHold&&e.push("certificateHold"),r&Nr.cessationOfOperation&&e.push("cessationOfOperation"),r&Nr.keyCompromise&&e.push("keyCompromise"),r&Nr.privilegeWithdrawn&&e.push("privilegeWithdrawn"),r&Nr.superseded&&e.push("superseded"),r&Nr.unused&&e.push("unused"),e}toString(){return`[${this.toJSON().join(", ")}]`}}let Io=class{constructor(e={}){Object.assign(this,e)}};R([O({type:Dt,context:0,repeated:"sequence",implicit:!0})],Io.prototype,"fullName",void 0);R([O({type:Ea,context:1,implicit:!0})],Io.prototype,"nameRelativeToCRLIssuer",void 0);Io=R([Ce({type:be.Choice})],Io);class Ts{constructor(e={}){Object.assign(this,e)}}R([O({type:Io,context:0,optional:!0})],Ts.prototype,"distributionPoint",void 0);R([O({type:Ig,context:1,optional:!0,implicit:!0})],Ts.prototype,"reasons",void 0);R([O({type:Dt,context:2,optional:!0,repeated:"sequence",implicit:!0})],Ts.prototype,"cRLIssuer",void 0);let Da=bl=class extends er{constructor(e){super(e),Object.setPrototypeOf(this,bl.prototype)}};Da=bl=R([Ce({type:be.Sequence,itemType:Ts})],Da);var vl;let Dd=vl=class extends Da{constructor(e){super(e),Object.setPrototypeOf(this,vl.prototype)}};Dd=vl=R([Ce({type:be.Sequence,itemType:Ts})],Dd);class Kt{constructor(e={}){this.onlyContainsUserCerts=Kt.ONLY,this.onlyContainsCACerts=Kt.ONLY,this.indirectCRL=Kt.ONLY,this.onlyContainsAttributeCerts=Kt.ONLY,Object.assign(this,e)}}Kt.ONLY=!1;R([O({type:Io,context:0,optional:!0})],Kt.prototype,"distributionPoint",void 0);R([O({type:j.Boolean,context:1,defaultValue:Kt.ONLY,implicit:!0})],Kt.prototype,"onlyContainsUserCerts",void 0);R([O({type:j.Boolean,context:2,defaultValue:Kt.ONLY,implicit:!0})],Kt.prototype,"onlyContainsCACerts",void 0);R([O({type:Ig,context:3,optional:!0,implicit:!0})],Kt.prototype,"onlySomeReasons",void 0);R([O({type:j.Boolean,context:4,defaultValue:Kt.ONLY,implicit:!0})],Kt.prototype,"indirectCRL",void 0);R([O({type:j.Boolean,context:5,defaultValue:Kt.ONLY,implicit:!0})],Kt.prototype,"onlyContainsAttributeCerts",void 0);var ts;(function(t){t[t.unspecified=0]="unspecified",t[t.keyCompromise=1]="keyCompromise",t[t.cACompromise=2]="cACompromise",t[t.affiliationChanged=3]="affiliationChanged",t[t.superseded=4]="superseded",t[t.cessationOfOperation=5]="cessationOfOperation",t[t.certificateHold=6]="certificateHold",t[t.removeFromCRL=8]="removeFromCRL",t[t.privilegeWithdrawn=9]="privilegeWithdrawn",t[t.aACompromise=10]="aACompromise"})(ts||(ts={}));let xl=class{constructor(e=ts.unspecified){this.reason=ts.unspecified,this.reason=e}toJSON(){return ts[this.reason]}toString(){return this.toJSON()}};R([O({type:j.Enumerated})],xl.prototype,"reason",void 0);xl=R([Ce({type:be.Choice})],xl);var Al;const mE=`${Lo}.37`;let El=Al=class extends er{constructor(e){super(e),Object.setPrototypeOf(this,Al.prototype)}};El=Al=R([Ce({type:be.Sequence,itemType:j.ObjectIdentifier})],El);let Sl=class{constructor(e=new ArrayBuffer(0)){this.value=e}};R([O({type:j.Integer,converter:mt})],Sl.prototype,"value",void 0);Sl=R([Ce({type:be.Choice})],Sl);let Bl=class{constructor(e){this.value=new Date,e&&(this.value=e)}};R([O({type:j.GeneralizedTime})],Bl.prototype,"value",void 0);Bl=R([Ce({type:be.Choice})],Bl);var Dl;let Cd=Dl=class extends ds{constructor(e){super(e),Object.setPrototypeOf(this,Dl.prototype)}};Cd=Dl=R([Ce({type:be.Sequence})],Cd);var Id;(function(t){t[t.digitalSignature=1]="digitalSignature",t[t.nonRepudiation=2]="nonRepudiation",t[t.keyEncipherment=4]="keyEncipherment",t[t.dataEncipherment=8]="dataEncipherment",t[t.keyAgreement=16]="keyAgreement",t[t.keyCertSign=32]="keyCertSign",t[t.cRLSign=64]="cRLSign",t[t.encipherOnly=128]="encipherOnly",t[t.decipherOnly=256]="decipherOnly"})(Id||(Id={}));var Cl;class gc{constructor(e={}){this.base=new Dt,this.minimum=0,Object.assign(this,e)}}R([O({type:Dt})],gc.prototype,"base",void 0);R([O({type:j.Integer,context:0,defaultValue:0,implicit:!0})],gc.prototype,"minimum",void 0);R([O({type:j.Integer,context:1,optional:!0,implicit:!0})],gc.prototype,"maximum",void 0);let Ca=Cl=class extends er{constructor(e){super(e),Object.setPrototypeOf(this,Cl.prototype)}};Ca=Cl=R([Ce({type:be.Sequence,itemType:gc})],Ca);class Mg{constructor(e={}){Object.assign(this,e)}}R([O({type:Ca,context:0,optional:!0,implicit:!0})],Mg.prototype,"permittedSubtrees",void 0);R([O({type:Ca,context:1,optional:!0,implicit:!0})],Mg.prototype,"excludedSubtrees",void 0);class _g{constructor(e={}){Object.assign(this,e)}}R([O({type:j.Integer,context:0,implicit:!0,optional:!0,converter:mt})],_g.prototype,"requireExplicitPolicy",void 0);R([O({type:j.Integer,context:1,implicit:!0,optional:!0,converter:mt})],_g.prototype,"inhibitPolicyMapping",void 0);var Il;class qu{constructor(e={}){this.issuerDomainPolicy="",this.subjectDomainPolicy="",Object.assign(this,e)}}R([O({type:j.ObjectIdentifier})],qu.prototype,"issuerDomainPolicy",void 0);R([O({type:j.ObjectIdentifier})],qu.prototype,"subjectDomainPolicy",void 0);let Md=Il=class extends er{constructor(e){super(e),Object.setPrototypeOf(this,Il.prototype)}};Md=Il=R([Ce({type:be.Sequence,itemType:qu})],Md);var Ml;const bE=`${Lo}.17`;let _l=Ml=class extends ds{constructor(e){super(e),Object.setPrototypeOf(this,Ml.prototype)}};_l=Ml=R([Ce({type:be.Sequence})],_l);class Wu{constructor(e={}){this.type="",this.values=[],Object.assign(this,e)}}R([O({type:j.ObjectIdentifier})],Wu.prototype,"type",void 0);R([O({type:j.Any,repeated:"set"})],Wu.prototype,"values",void 0);var kl;let _d=kl=class extends er{constructor(e){super(e),Object.setPrototypeOf(this,kl.prototype)}};_d=kl=R([Ce({type:be.Sequence,itemType:Wu})],_d);const vE=`${Lo}.14`;class xE extends Cg{}class kg{constructor(e={}){Object.assign(this,e)}}R([O({type:j.GeneralizedTime,context:0,implicit:!0,optional:!0})],kg.prototype,"notBefore",void 0);R([O({type:j.GeneralizedTime,context:1,implicit:!0,optional:!0})],kg.prototype,"notAfter",void 0);var rs;(function(t){t[t.keyUpdateAllowed=1]="keyUpdateAllowed",t[t.newExtensions=2]="newExtensions",t[t.pKIXCertificate=4]="pKIXCertificate"})(rs||(rs={}));class Tg extends Bg{toJSON(){const e=[],r=this.toNumber();return r&rs.pKIXCertificate&&e.push("pKIXCertificate"),r&rs.newExtensions&&e.push("newExtensions"),r&rs.keyUpdateAllowed&&e.push("keyUpdateAllowed"),e}toString(){return`[${this.toJSON().join(", ")}]`}}class Ng{constructor(e={}){this.entrustVers="",this.entrustInfoFlags=new Tg,Object.assign(this,e)}}R([O({type:j.GeneralString})],Ng.prototype,"entrustVers",void 0);R([O({type:Tg})],Ng.prototype,"entrustInfoFlags",void 0);var Tl;let kd=Tl=class extends er{constructor(e){super(e),Object.setPrototypeOf(this,Tl.prototype)}};kd=Tl=R([Ce({type:be.Sequence,itemType:dc})],kd);class Oe{constructor(e={}){this.algorithm="",Object.assign(this,e)}isEqual(e){return e instanceof Oe&&e.algorithm==this.algorithm&&(e.parameters&&this.parameters&&IA(e.parameters,this.parameters)||e.parameters===this.parameters)}}R([O({type:j.ObjectIdentifier})],Oe.prototype,"algorithm",void 0);R([O({type:j.Any,optional:!0})],Oe.prototype,"parameters",void 0);class yc{constructor(e={}){this.algorithm=new Oe,this.subjectPublicKey=new ArrayBuffer(0),Object.assign(this,e)}}R([O({type:Oe})],yc.prototype,"algorithm",void 0);R([O({type:j.BitString})],yc.prototype,"subjectPublicKey",void 0);let Zt=class{constructor(e){if(e)if(typeof e=="string"||typeof e=="number"||e instanceof Date){const r=new Date(e);r.getUTCFullYear()>2049?this.generalTime=r:this.utcTime=r}else Object.assign(this,e)}getTime(){const e=this.utcTime||this.generalTime;if(!e)throw new Error("Cannot get time from CHOICE object");return e}};R([O({type:j.UTCTime})],Zt.prototype,"utcTime",void 0);R([O({type:j.GeneralizedTime})],Zt.prototype,"generalTime",void 0);Zt=R([Ce({type:be.Choice})],Zt);class wc{constructor(e){this.notBefore=new Zt(new Date),this.notAfter=new Zt(new Date),e&&(this.notBefore=new Zt(e.notBefore),this.notAfter=new Zt(e.notAfter))}}R([O({type:Zt})],wc.prototype,"notBefore",void 0);R([O({type:Zt})],wc.prototype,"notAfter",void 0);var Nl;class dn{constructor(e={}){this.extnID="",this.critical=dn.CRITICAL,this.extnValue=new Ve,Object.assign(this,e)}}dn.CRITICAL=!1;R([O({type:j.ObjectIdentifier})],dn.prototype,"extnID",void 0);R([O({type:j.Boolean,defaultValue:dn.CRITICAL})],dn.prototype,"critical",void 0);R([O({type:Ve})],dn.prototype,"extnValue",void 0);let Rl=Nl=class extends er{constructor(e){super(e),Object.setPrototypeOf(this,Nl.prototype)}};Rl=Nl=R([Ce({type:be.Sequence,itemType:dn})],Rl);var Ia;(function(t){t[t.v1=0]="v1",t[t.v2=1]="v2",t[t.v3=2]="v3"})(Ia||(Ia={}));class _r{constructor(e={}){this.version=Ia.v1,this.serialNumber=new ArrayBuffer(0),this.signature=new Oe,this.issuer=new On,this.validity=new wc,this.subject=new On,this.subjectPublicKeyInfo=new yc,Object.assign(this,e)}}R([O({type:j.Integer,context:0,defaultValue:Ia.v1})],_r.prototype,"version",void 0);R([O({type:j.Integer,converter:mt})],_r.prototype,"serialNumber",void 0);R([O({type:Oe})],_r.prototype,"signature",void 0);R([O({type:On})],_r.prototype,"issuer",void 0);R([O({type:wc})],_r.prototype,"validity",void 0);R([O({type:On})],_r.prototype,"subject",void 0);R([O({type:yc})],_r.prototype,"subjectPublicKeyInfo",void 0);R([O({type:j.BitString,context:1,implicit:!0,optional:!0})],_r.prototype,"issuerUniqueID",void 0);R([O({type:j.BitString,context:2,implicit:!0,optional:!0})],_r.prototype,"subjectUniqueID",void 0);R([O({type:Rl,context:3,optional:!0})],_r.prototype,"extensions",void 0);class yi{constructor(e={}){this.tbsCertificate=new _r,this.signatureAlgorithm=new Oe,this.signatureValue=new ArrayBuffer(0),Object.assign(this,e)}}R([O({type:_r})],yi.prototype,"tbsCertificate",void 0);R([O({type:Oe})],yi.prototype,"signatureAlgorithm",void 0);R([O({type:j.BitString})],yi.prototype,"signatureValue",void 0);class mc{constructor(e={}){this.userCertificate=new ArrayBuffer(0),this.revocationDate=new Zt,Object.assign(this,e)}}R([O({type:j.Integer,converter:mt})],mc.prototype,"userCertificate",void 0);R([O({type:Zt})],mc.prototype,"revocationDate",void 0);R([O({type:dn,optional:!0,repeated:"sequence"})],mc.prototype,"crlEntryExtensions",void 0);class $n{constructor(e={}){this.signature=new Oe,this.issuer=new On,this.thisUpdate=new Zt,Object.assign(this,e)}}R([O({type:j.Integer,optional:!0})],$n.prototype,"version",void 0);R([O({type:Oe})],$n.prototype,"signature",void 0);R([O({type:On})],$n.prototype,"issuer",void 0);R([O({type:Zt})],$n.prototype,"thisUpdate",void 0);R([O({type:Zt,optional:!0})],$n.prototype,"nextUpdate",void 0);R([O({type:mc,repeated:"sequence",optional:!0})],$n.prototype,"revokedCertificates",void 0);R([O({type:dn,optional:!0,context:0,repeated:"sequence"})],$n.prototype,"crlExtensions",void 0);class bc{constructor(e={}){this.tbsCertList=new $n,this.signatureAlgorithm=new Oe,this.signature=new ArrayBuffer(0),Object.assign(this,e)}}R([O({type:$n})],bc.prototype,"tbsCertList",void 0);R([O({type:Oe})],bc.prototype,"signatureAlgorithm",void 0);R([O({type:j.BitString})],bc.prototype,"signature",void 0);const AE="1.2.840.10045.2.1",EE="1.2.840.10045.4.1",SE="1.2.840.10045.4.3.1",BE="1.2.840.10045.4.3.2",DE="1.2.840.10045.4.3.3",CE="1.2.840.10045.4.3.4",IE="1.2.840.10045.3.1.7",ME="1.3.132.0.34";function Ns(t){return new Oe({algorithm:t})}Ns(EE);Ns(SE);Ns(BE);Ns(DE);Ns(CE);let ps=class{constructor(e={}){Object.assign(this,e)}};R([O({type:j.ObjectIdentifier})],ps.prototype,"fieldType",void 0);R([O({type:j.Any})],ps.prototype,"parameters",void 0);ps=R([Ce({type:be.Sequence})],ps);class _E extends Ve{}let Mo=class{constructor(e={}){Object.assign(this,e)}};R([O({type:j.OctetString})],Mo.prototype,"a",void 0);R([O({type:j.OctetString})],Mo.prototype,"b",void 0);R([O({type:j.BitString,optional:!0})],Mo.prototype,"seed",void 0);Mo=R([Ce({type:be.Sequence})],Mo);var Ul;(function(t){t[t.ecpVer1=1]="ecpVer1"})(Ul||(Ul={}));let Fn=class{constructor(e={}){this.version=Ul.ecpVer1,Object.assign(this,e)}};R([O({type:j.Integer})],Fn.prototype,"version",void 0);R([O({type:ps})],Fn.prototype,"fieldID",void 0);R([O({type:Mo})],Fn.prototype,"curve",void 0);R([O({type:_E})],Fn.prototype,"base",void 0);R([O({type:j.Integer,converter:mt})],Fn.prototype,"order",void 0);R([O({type:j.Integer,optional:!0})],Fn.prototype,"cofactor",void 0);Fn=R([Ce({type:be.Sequence})],Fn);let Wi=class{constructor(e={}){Object.assign(this,e)}};R([O({type:j.ObjectIdentifier})],Wi.prototype,"namedCurve",void 0);R([O({type:j.Null})],Wi.prototype,"implicitCurve",void 0);R([O({type:Fn})],Wi.prototype,"specifiedCurve",void 0);Wi=R([Ce({type:be.Choice})],Wi);class vc{constructor(e={}){this.version=1,this.privateKey=new Ve,Object.assign(this,e)}}R([O({type:j.Integer})],vc.prototype,"version",void 0);R([O({type:Ve})],vc.prototype,"privateKey",void 0);R([O({type:Wi,context:0,optional:!0})],vc.prototype,"parameters",void 0);R([O({type:j.BitString,context:1,optional:!0})],vc.prototype,"publicKey",void 0);class xc{constructor(e={}){this.r=new ArrayBuffer(0),this.s=new ArrayBuffer(0),Object.assign(this,e)}}R([O({type:j.Integer,converter:mt})],xc.prototype,"r",void 0);R([O({type:j.Integer,converter:mt})],xc.prototype,"s",void 0);function Rg(t){const e=Rt.parse(t,xc);let r=new Uint8Array(e.r),n=new Uint8Array(e.s);return Td(r)&&(r=r.slice(1)),Td(n)&&(n=n.slice(1)),kE([r,n])}function Td(t){return t[0]===0&&(t[1]&128)!==0}function kE(t){let e=0;const r=t.reduce((i,o)=>i+o.length,0),n=new Uint8Array(r);return t.forEach(i=>{n.set(i,e),e+=i.length}),n}let Zo;function TE(){return new Promise((e,r)=>{if(Zo)return e(Zo);const n=RE.stubThisGlobalThisCrypto();return n?(Zo=n,e(Zo)):r(new NE)})}let NE=class extends Error{constructor(){super("An instance of the Crypto API could not be located"),this.name="MissingWebCrypto"}};const RE={stubThisGlobalThisCrypto:()=>globalThis.crypto,setCachedCrypto:t=>{Zo=t}},UE="did:peer:",Ug=UE+"0";async function OE(t,e,r){const n=Ju(e),i=await TE(),o={name:"ECDSA",hash:{name:"SHA-256"}},s=Og(n).publicKeyJwk,a={name:"ECDSA",namedCurve:s.crv},c=await i.subtle.importKey("jwk",s,a,!1,["verify"]);return await i.subtle.verify(o,c,r,t)}function Og(t){const e=X1(t);if(e[1]!=2||e[3]!=-7||e[-1]!=1||e[-2].length!=32||e[-3].length!=32)throw new Error("Unable to extract key.");const r={alg:"ES256",crv:"P-256",kty:"EC",x:Ma(e[-2]),y:Ma(e[-3])},n=Pe.Buffer.concat([Pe.Buffer.from(e[-2]),Pe.Buffer.from(e[-3])]);return{publicKeyJwk:r,publicKeyBuffer:n}}function PE(t){return t.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function Ma(t){return PE(Pe.Buffer.from(t).toString("base64"))}function Ju(t){return uA(t.substring(Ug.length))}function FE(t){const e=lA(t,"base58btc","p256-pub");return Ug+e}function nn(t){const e=new Uint8Array(t);let r="";for(const i of e)r+=String.fromCharCode(i);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function _a(t){const e=t.replace(/-/g,"+").replace(/_/g,"/"),r=(4-e.length%4)%4,n=e.padEnd(e.length+r,"="),i=atob(n),o=new ArrayBuffer(i.length),s=new Uint8Array(o);for(let a=0;as.type==="public-key").length===0?new zt({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new zt({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:t});if(t.name==="SecurityError"){const o=window.location.hostname;if(Fg(o)){if(r.rp.id!==o)return new zt({message:`The RP ID "${r.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new zt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="TypeError"){if(r.user.id.byteLength<1||r.user.id.byteLength>64)return new zt({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:t})}else if(t.name==="UnknownError")return new zt({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return t}class HE{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){const e=new Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}}const Lg=new HE,$E=["cross-platform","platform"];function Hg(t){if(t&&!($E.indexOf(t)<0))return t}async function VE(t){var x;if(!Yu())throw new Error("WebAuthn is not supported in this browser");const r={publicKey:{...t,challenge:_a(t.challenge),user:{...t.user,id:_a(t.user.id)},excludeCredentials:(x=t.excludeCredentials)==null?void 0:x.map(Pg)}};r.signal=Lg.createNewAbortSignal();let n;try{n=await navigator.credentials.create(r)}catch(S){throw LE({error:S,options:r})}if(!n)throw new Error("Registration was not completed");const{id:i,rawId:o,response:s,type:a}=n;let c;typeof s.getTransports=="function"&&(c=s.getTransports());let u;if(typeof s.getPublicKeyAlgorithm=="function")try{u=s.getPublicKeyAlgorithm()}catch(S){vf("getPublicKeyAlgorithm()",S)}let y;if(typeof s.getPublicKey=="function")try{const S=s.getPublicKey();S!==null&&(y=nn(S))}catch(S){vf("getPublicKey()",S)}let p;if(typeof s.getAuthenticatorData=="function")try{p=nn(s.getAuthenticatorData())}catch(S){vf("getAuthenticatorData()",S)}return{id:i,rawId:nn(o),response:{attestationObject:nn(s.attestationObject),clientDataJSON:nn(s.clientDataJSON),transports:c,publicKeyAlgorithm:u,publicKey:y,authenticatorData:p},type:a,clientExtensionResults:n.getClientExtensionResults(),authenticatorAttachment:Hg(n.authenticatorAttachment)}}function vf(t,e){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${t}. You should report this error to them. -`,e)}function jE(){if(!Yu())return new Promise(e=>e(!1));const t=window.PublicKeyCredential;return t.isConditionalMediationAvailable===void 0?new Promise(e=>e(!1)):t.isConditionalMediationAvailable()}function zE({error:t,options:e}){const{publicKey:r}=e;if(!r)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new zt({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new zt({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const n=window.location.hostname;if(Fg(n)){if(r.rpId!==n)return new zt({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new zt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new zt({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return t}async function KE(t,e=!1){var p,x;if(!Yu())throw new Error("WebAuthn is not supported in this browser");let r;((p=t.allowCredentials)==null?void 0:p.length)!==0&&(r=(x=t.allowCredentials)==null?void 0:x.map(Pg));const n={...t,challenge:_a(t.challenge),allowCredentials:r},i={};if(e){if(!await jE())throw Error("Browser does not support WebAuthn autofill");if(document.querySelectorAll("input[autocomplete$='webauthn']").length<1)throw Error('No with "webauthn" as the only or last value in its `autocomplete` attribute was detected');i.mediation="conditional",n.allowCredentials=[]}i.publicKey=n,i.signal=Lg.createNewAbortSignal();let o;try{o=await navigator.credentials.get(i)}catch(S){throw zE({error:S,options:i})}if(!o)throw new Error("Authentication was not completed");const{id:s,rawId:a,response:c,type:u}=o;let y;return c.userHandle&&(y=nn(c.userHandle)),{id:s,rawId:nn(a),response:{authenticatorData:nn(c.authenticatorData),clientDataJSON:nn(c.clientDataJSON),signature:nn(c.signature),userHandle:y},type:u,clientExtensionResults:o.getClientExtensionResults(),authenticatorAttachment:Hg(o.authenticatorAttachment)}}function Rs(t,e,r){if(e<24)return[e,1];const n=t.byteLength-r-1,i=new DataView(t.buffer,r+1);let o,s=0;switch(e){case 24:{n>0&&(o=i.getUint8(0),s=2);break}case 25:{n>1&&(o=i.getUint16(0,!1),s=3);break}case 26:{n>3&&(o=i.getUint32(0,!1),s=5);break}case 27:{if(n>7){const a=i.getBigUint64(0,!1);if(a>=24n&&a<=Number.MAX_SAFE_INTEGER)return[Number(a),9]}break}}if(o&&o>=24)return[o,s];throw new Error("Length not supported or not well formed")}const Ol=0,ka=1,$g=2,Vg=3,jg=4,zg=5,Kg=6,GE=7;function Mn(t,e){const r=t<<5;if(e<0)throw new Error("CBOR Data Item argument must not be negative");let n;if(typeof e=="number"){if(!Number.isInteger(e))throw new Error("CBOR Data Item argument must be an integer");n=BigInt(e)}else n=e;if(t==ka){if(n==0n)throw new Error("CBOR Data Item argument cannot be zero when negative");n=n-1n}if(n>18446744073709551615n)throw new Error("CBOR number out of range");const i=new Uint8Array(8);return new DataView(i.buffer).setBigUint64(0,n,!1),n<=23?[r|i[7]]:n<=255?[r|24,i[7]]:n<=65535?[r|25,...i.slice(6)]:n<=4294967295?[r|26,...i.slice(4)]:[r|27,...i]}class Gg{constructor(e,r){Object.defineProperty(this,"tagId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"tagValue",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.tagId=e,this.tagValue=r}get tag(){return this.tagId}get value(){return this.tagValue}}function qg(t,e,r){return Rs(t,e,r)}function qE(t,e,r){const[n,i]=qg(t,e,r);return[-n-1,i]}function Wg(t,e,r){const[n,i]=Rs(t,e,r),o=r+i;return[new Uint8Array(t.buffer.slice(o,o+n)),i+n]}const WE=new TextDecoder;function JE(t,e,r){const[n,i]=Wg(t,e,r);return[WE.decode(n),i]}function YE(t,e,r){if(e===0)return[[],1];const[n,i]=Rs(t,e,r);let o=i;const s=[];for(let a=0;at.byteLength)throw new Error("CBOR stream ended before end of Float 16");const r=t.getUint16(e+1,!1);if(r==31744)return[1/0,3];if(r==32256)return[NaN,3];if(r==64512)return[-1/0,3];throw new Error("Float16 data is unsupported")}function XE(t,e){if(e+5>t.byteLength)throw new Error("CBOR stream ended before end of Float 32");return[t.getFloat32(e+1,!1),5]}function eS(t,e){if(e+9>t.byteLength)throw new Error("CBOR stream ended before end of Float 64");return[t.getFloat64(e+1,!1),9]}function tS(t,e,r){const[n,i]=Rs(t,e,r),[o,s]=$i(t,r+i);return[new Gg(n,o),i+s]}function $i(t,e){if(e>=t.byteLength)throw new Error("CBOR stream ended before tag value");const r=t.getUint8(e),n=r>>5,i=r&31;switch(n){case Ol:return qg(t,i,e);case ka:return qE(t,i,e);case $g:return Wg(t,i,e);case Vg:return JE(t,i,e);case jg:return YE(t,i,e);case zg:return QE(t,i,e);case Kg:return tS(t,i,e);case GE:switch(i){case 20:return[!1,1];case 21:return[!0,1];case 22:return[null,1];case 23:return[void 0,1];case 25:return ZE(t,e);case 26:return XE(t,e);case 27:return eS(t,e)}}throw new Error(`Unsupported or not well formed at ${e}`)}function rS(t){return t===!0?245:t===!1?244:t===null?246:247}function nS(t){if(Math.fround(t)==t||!Number.isFinite(t)||Number.isNaN(t)){const e=new Uint8Array(5);return e[0]=250,new DataView(e.buffer).setFloat32(1,t,!1),e}else{const e=new Uint8Array(9);return e[0]=251,new DataView(e.buffer).setFloat64(1,t,!1),e}}function iS(t){return typeof t=="number"?Number.isSafeInteger(t)?t<0?Mn(ka,Math.abs(t)):Mn(Ol,t):[nS(t)]:t<0n?Mn(ka,t*-1n):Mn(Ol,t)}const oS=new TextEncoder;function sS(t,e){e.push(...Mn(Vg,t.length)),e.push(oS.encode(t))}function aS(t,e){e.push(...Mn($g,t.length)),e.push(t)}function cS(t,e){e.push(...Mn(jg,t.length));for(const r of t)gs(r,e)}function fS(t,e){e.push(new Uint8Array(Mn(zg,t.size)));for(const[r,n]of t.entries())gs(r,e),gs(n,e)}function lS(t,e){e.push(...Mn(Kg,t.tag)),gs(t.value,e)}function gs(t,e){if(typeof t=="boolean"||t===null||t==null){e.push(rS(t));return}if(typeof t=="number"||typeof t=="bigint"){e.push(...iS(t));return}if(typeof t=="string"){sS(t,e);return}if(t instanceof Uint8Array){aS(t,e);return}if(Array.isArray(t)){cS(t,e);return}if(t instanceof Map){fS(t,e);return}if(t instanceof Gg){lS(t,e);return}throw new Error("Not implemented")}function uS(t,e){if(t.byteLength===0||t.byteLength<=e||e<0)throw new Error("No data");return t instanceof Uint8Array?$i(new DataView(t.buffer),e):t instanceof ArrayBuffer?$i(new DataView(t),e):$i(t,e)}function hS(t){const e=[];gs(t,e);let r=0;for(const o of e)typeof o=="number"?r+=1:r+=o.length;const n=new Uint8Array(r);let i=0;for(const o of e)typeof o=="number"?(n[i]=o,i+=1):(n.set(o,i),i+=o.length);return n}const Qu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Jg="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",Yg=t=>{const e=typeof Uint8Array>"u"?[]:new Uint8Array(256),r=Qu.length;for(let n=0;n{const r=t.length;let n=t.length*.75,i,o=0,s,a,c,u;t[t.length-1]==="="&&(n--,t[t.length-2]==="="&&n--);const y=new ArrayBuffer(n),p=new Uint8Array(y),x=e?pS:dS;for(i=0;i>4,p[o++]=(a&15)<<4|c>>2,p[o++]=(c&3)<<6|u&63;return y};qt.fromArrayBuffer=(t,e)=>{const r=new Uint8Array(t);let n,i="";const o=r.length,s=e?Jg:Qu;for(n=0;n>2],i+=s[(r[n]&3)<<4|r[n+1]>>4],i+=s[(r[n+1]&15)<<2|r[n+2]>>6],i+=s[r[n+2]&63];const a=o%3;return a===2?i=i.substring(0,i.length-1)+(e?"":"="):a===1&&(i=i.substring(0,i.length-2)+(e?"":"==")),i};qt.toString=(t,e)=>new TextDecoder().decode(qt.toArrayBuffer(t,e));qt.fromString=(t,e)=>qt.fromArrayBuffer(new TextEncoder().encode(t),e);qt.validate=(t,e)=>{if(!(typeof t=="string"||t instanceof String))return!1;try{return e?gS.test(t):yS.test(t)}catch{return!1}};qt.base64=qt;var Pl={exports:{}};(function(t,e){var r=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof ao<"u"&&ao,n=function(){function o(){this.fetch=!1,this.DOMException=r.DOMException}return o.prototype=r,new o}();(function(o){(function(s){var a=typeof o<"u"&&o||typeof self<"u"&&self||typeof ao<"u"&&ao||{},c={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function u(l){return l&&DataView.prototype.isPrototypeOf(l)}if(c.arrayBuffer)var y=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],p=ArrayBuffer.isView||function(l){return l&&y.indexOf(Object.prototype.toString.call(l))>-1};function x(l){if(typeof l!="string"&&(l=String(l)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(l)||l==="")throw new TypeError('Invalid character in header field name: "'+l+'"');return l.toLowerCase()}function S(l){return typeof l!="string"&&(l=String(l)),l}function C(l){var g={next:function(){var m=l.shift();return{done:m===void 0,value:m}}};return c.iterable&&(g[Symbol.iterator]=function(){return g}),g}function B(l){this.map={},l instanceof B?l.forEach(function(g,m){this.append(m,g)},this):Array.isArray(l)?l.forEach(function(g){if(g.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+g.length);this.append(g[0],g[1])},this):l&&Object.getOwnPropertyNames(l).forEach(function(g){this.append(g,l[g])},this)}B.prototype.append=function(l,g){l=x(l),g=S(g);var m=this.map[l];this.map[l]=m?m+", "+g:g},B.prototype.delete=function(l){delete this.map[x(l)]},B.prototype.get=function(l){return l=x(l),this.has(l)?this.map[l]:null},B.prototype.has=function(l){return this.map.hasOwnProperty(x(l))},B.prototype.set=function(l,g){this.map[x(l)]=S(g)},B.prototype.forEach=function(l,g){for(var m in this.map)this.map.hasOwnProperty(m)&&l.call(g,this.map[m],m,this)},B.prototype.keys=function(){var l=[];return this.forEach(function(g,m){l.push(m)}),C(l)},B.prototype.values=function(){var l=[];return this.forEach(function(g){l.push(g)}),C(l)},B.prototype.entries=function(){var l=[];return this.forEach(function(g,m){l.push([m,g])}),C(l)},c.iterable&&(B.prototype[Symbol.iterator]=B.prototype.entries);function M(l){if(!l._noBody){if(l.bodyUsed)return Promise.reject(new TypeError("Already read"));l.bodyUsed=!0}}function N(l){return new Promise(function(g,m){l.onload=function(){g(l.result)},l.onerror=function(){m(l.error)}})}function H(l){var g=new FileReader,m=N(g);return g.readAsArrayBuffer(l),m}function L(l){var g=new FileReader,m=N(g),E=/charset=([A-Za-z0-9_-]+)/.exec(l.type),I=E?E[1]:"utf-8";return g.readAsText(l,I),m}function G(l){for(var g=new Uint8Array(l),m=new Array(g.length),E=0;E-1?g:l}function ee(l,g){if(!(this instanceof ee))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');g=g||{};var m=g.body;if(l instanceof ee){if(l.bodyUsed)throw new TypeError("Already read");this.url=l.url,this.credentials=l.credentials,g.headers||(this.headers=new B(l.headers)),this.method=l.method,this.mode=l.mode,this.signal=l.signal,!m&&l._bodyInit!=null&&(m=l._bodyInit,l.bodyUsed=!0)}else this.url=String(l);if(this.credentials=g.credentials||this.credentials||"same-origin",(g.headers||!this.headers)&&(this.headers=new B(g.headers)),this.method=Z(g.method||this.method||"GET"),this.mode=g.mode||this.mode||null,this.signal=g.signal||this.signal||function(){if("AbortController"in a){var T=new AbortController;return T.signal}}(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&m)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(m),(this.method==="GET"||this.method==="HEAD")&&(g.cache==="no-store"||g.cache==="no-cache")){var E=/([?&])_=[^&]*/;if(E.test(this.url))this.url=this.url.replace(E,"$1_="+new Date().getTime());else{var I=/\?/;this.url+=(I.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}ee.prototype.clone=function(){return new ee(this,{body:this._bodyInit})};function se(l){var g=new FormData;return l.trim().split("&").forEach(function(m){if(m){var E=m.split("="),I=E.shift().replace(/\+/g," "),T=E.join("=").replace(/\+/g," ");g.append(decodeURIComponent(I),decodeURIComponent(T))}}),g}function ne(l){var g=new B,m=l.replace(/\r?\n[\t ]+/g," ");return m.split("\r").map(function(E){return E.indexOf(` -`)===0?E.substr(1,E.length):E}).forEach(function(E){var I=E.split(":"),T=I.shift().trim();if(T){var D=I.join(":").trim();try{g.append(T,D)}catch(h){console.warn("Response "+h.message)}}}),g}q.call(ee.prototype);function ie(l,g){if(!(this instanceof ie))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(g||(g={}),this.type="default",this.status=g.status===void 0?200:g.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=g.statusText===void 0?"":""+g.statusText,this.headers=new B(g.headers),this.url=g.url||"",this._initBody(l)}q.call(ie.prototype),ie.prototype.clone=function(){return new ie(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new B(this.headers),url:this.url})},ie.error=function(){var l=new ie(null,{status:200,statusText:""});return l.ok=!1,l.status=0,l.type="error",l};var b=[301,302,303,307,308];ie.redirect=function(l,g){if(b.indexOf(g)===-1)throw new RangeError("Invalid status code");return new ie(null,{status:g,headers:{location:l}})},s.DOMException=a.DOMException;try{new s.DOMException}catch{s.DOMException=function(g,m){this.message=g,this.name=m;var E=Error(g);this.stack=E.stack},s.DOMException.prototype=Object.create(Error.prototype),s.DOMException.prototype.constructor=s.DOMException}function f(l,g){return new Promise(function(m,E){var I=new ee(l,g);if(I.signal&&I.signal.aborted)return E(new s.DOMException("Aborted","AbortError"));var T=new XMLHttpRequest;function D(){T.abort()}T.onload=function(){var re={statusText:T.statusText,headers:ne(T.getAllResponseHeaders()||"")};I.url.indexOf("file://")===0&&(T.status<200||T.status>599)?re.status=200:re.status=T.status,re.url="responseURL"in T?T.responseURL:re.headers.get("X-Request-URL");var v="response"in T?T.response:T.responseText;setTimeout(function(){m(new ie(v,re))},0)},T.onerror=function(){setTimeout(function(){E(new TypeError("Network request failed"))},0)},T.ontimeout=function(){setTimeout(function(){E(new TypeError("Network request timed out"))},0)},T.onabort=function(){setTimeout(function(){E(new s.DOMException("Aborted","AbortError"))},0)};function h(re){try{return re===""&&a.location.href?a.location.href:re}catch{return re}}if(T.open(I.method,h(I.url),!0),I.credentials==="include"?T.withCredentials=!0:I.credentials==="omit"&&(T.withCredentials=!1),"responseType"in T&&(c.blob?T.responseType="blob":c.arrayBuffer&&(T.responseType="arraybuffer")),g&&typeof g.headers=="object"&&!(g.headers instanceof B||a.Headers&&g.headers instanceof a.Headers)){var k=[];Object.getOwnPropertyNames(g.headers).forEach(function(re){k.push(x(re)),T.setRequestHeader(re,S(g.headers[re]))}),I.headers.forEach(function(re,v){k.indexOf(v)===-1&&T.setRequestHeader(v,re)})}else I.headers.forEach(function(re,v){T.setRequestHeader(v,re)});I.signal&&(I.signal.addEventListener("abort",D),T.onreadystatechange=function(){T.readyState===4&&I.signal.removeEventListener("abort",D)}),T.send(typeof I._bodyInit>"u"?null:I._bodyInit)})}return f.polyfill=!0,a.fetch||(a.fetch=f,a.Headers=B,a.Request=ee,a.Response=ie),s.Headers=B,s.Request=ee,s.Response=ie,s.fetch=f,s})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=r.fetch?r:n;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e})(Pl,Pl.exports);var wS=Pl.exports;const kr="1.2.840.113549.1.1",mS=`${kr}.1`,bS=`${kr}.7`,vS=`${kr}.9`,xS=`${kr}.10`,AS=`${kr}.2`,ES=`${kr}.4`,SS=`${kr}.5`,BS=`${kr}.12`,DS=`${kr}.13`,Qg=`${kr}.15`,Zg=`${kr}.16`,CS="1.3.14.3.2.26",IS="2.16.840.1.101.3.4.2.4",MS="2.16.840.1.101.3.4.2.1",_S="2.16.840.1.101.3.4.2.2",kS="2.16.840.1.101.3.4.2.3",TS="2.16.840.1.101.3.4.2.5",NS="2.16.840.1.101.3.4.2.6",RS="1.2.840.113549.2.2",US="1.2.840.113549.2.5",Zu=`${kr}.8`;function Ct(t){return new Oe({algorithm:t,parameters:null})}Ct(RS);Ct(US);const Ji=Ct(CS);Ct(IS);Ct(MS);Ct(_S);Ct(kS);Ct(TS);Ct(NS);const Xg=new Oe({algorithm:Zu,parameters:gi.serialize(Ji)}),ey=new Oe({algorithm:vS,parameters:gi.serialize(Aa.toASN(new Uint8Array([218,57,163,238,94,107,75,13,50,85,191,239,149,96,24,144,175,216,7,9]).buffer))});Ct(mS);Ct(AS);Ct(ES);Ct(SS);Ct(Qg);Ct(Zg);Ct(BS);Ct(DS);Ct(Qg);Ct(Zg);class Ac{constructor(e={}){this.hashAlgorithm=new Oe(Ji),this.maskGenAlgorithm=new Oe({algorithm:Zu,parameters:gi.serialize(Ji)}),this.pSourceAlgorithm=new Oe(ey),Object.assign(this,e)}}R([O({type:Oe,context:0,defaultValue:Ji})],Ac.prototype,"hashAlgorithm",void 0);R([O({type:Oe,context:1,defaultValue:Xg})],Ac.prototype,"maskGenAlgorithm",void 0);R([O({type:Oe,context:2,defaultValue:ey})],Ac.prototype,"pSourceAlgorithm",void 0);new Oe({algorithm:bS,parameters:gi.serialize(new Ac)});class Us{constructor(e={}){this.hashAlgorithm=new Oe(Ji),this.maskGenAlgorithm=new Oe({algorithm:Zu,parameters:gi.serialize(Ji)}),this.saltLength=20,this.trailerField=1,Object.assign(this,e)}}R([O({type:Oe,context:0,defaultValue:Ji})],Us.prototype,"hashAlgorithm",void 0);R([O({type:Oe,context:1,defaultValue:Xg})],Us.prototype,"maskGenAlgorithm",void 0);R([O({type:j.Integer,context:2,defaultValue:20})],Us.prototype,"saltLength",void 0);R([O({type:j.Integer,context:3,defaultValue:1})],Us.prototype,"trailerField",void 0);new Oe({algorithm:xS,parameters:gi.serialize(new Us)});class ty{constructor(e={}){this.digestAlgorithm=new Oe,this.digest=new Ve,Object.assign(this,e)}}R([O({type:Oe})],ty.prototype,"digestAlgorithm",void 0);R([O({type:Ve})],ty.prototype,"digest",void 0);var Fl;class Ec{constructor(e={}){this.prime=new ArrayBuffer(0),this.exponent=new ArrayBuffer(0),this.coefficient=new ArrayBuffer(0),Object.assign(this,e)}}R([O({type:j.Integer,converter:mt})],Ec.prototype,"prime",void 0);R([O({type:j.Integer,converter:mt})],Ec.prototype,"exponent",void 0);R([O({type:j.Integer,converter:mt})],Ec.prototype,"coefficient",void 0);let Ll=Fl=class extends er{constructor(e){super(e),Object.setPrototypeOf(this,Fl.prototype)}};Ll=Fl=R([Ce({type:be.Sequence,itemType:Ec})],Ll);class wn{constructor(e={}){this.version=0,this.modulus=new ArrayBuffer(0),this.publicExponent=new ArrayBuffer(0),this.privateExponent=new ArrayBuffer(0),this.prime1=new ArrayBuffer(0),this.prime2=new ArrayBuffer(0),this.exponent1=new ArrayBuffer(0),this.exponent2=new ArrayBuffer(0),this.coefficient=new ArrayBuffer(0),Object.assign(this,e)}}R([O({type:j.Integer})],wn.prototype,"version",void 0);R([O({type:j.Integer,converter:mt})],wn.prototype,"modulus",void 0);R([O({type:j.Integer,converter:mt})],wn.prototype,"publicExponent",void 0);R([O({type:j.Integer,converter:mt})],wn.prototype,"privateExponent",void 0);R([O({type:j.Integer,converter:mt})],wn.prototype,"prime1",void 0);R([O({type:j.Integer,converter:mt})],wn.prototype,"prime2",void 0);R([O({type:j.Integer,converter:mt})],wn.prototype,"exponent1",void 0);R([O({type:j.Integer,converter:mt})],wn.prototype,"exponent2",void 0);R([O({type:j.Integer,converter:mt})],wn.prototype,"coefficient",void 0);R([O({type:Ll,optional:!0})],wn.prototype,"otherPrimeInfos",void 0);class Xu{constructor(e={}){this.modulus=new ArrayBuffer(0),this.publicExponent=new ArrayBuffer(0),Object.assign(this,e)}}R([O({type:j.Integer,converter:mt})],Xu.prototype,"modulus",void 0);R([O({type:j.Integer,converter:mt})],Xu.prototype,"publicExponent",void 0);var Hl;const OS="1.3.6.1.4.1.11129.2.1.17";var $l;(function(t){t[t.verified=0]="verified",t[t.selfSigned=1]="selfSigned",t[t.unverified=2]="unverified",t[t.failed=3]="failed"})($l||($l={}));class Os{constructor(e={}){this.verifiedBootKey=new Ve,this.deviceLocked=!1,this.verifiedBootState=$l.verified,Object.assign(this,e)}}R([O({type:Ve})],Os.prototype,"verifiedBootKey",void 0);R([O({type:j.Boolean})],Os.prototype,"deviceLocked",void 0);R([O({type:j.Enumerated})],Os.prototype,"verifiedBootState",void 0);R([O({type:Ve,optional:!0})],Os.prototype,"verifiedBootHash",void 0);let _o=Hl=class extends er{constructor(e){super(e),Object.setPrototypeOf(this,Hl.prototype)}};_o=Hl=R([Ce({type:be.Set,itemType:j.Integer})],_o);class xe{constructor(e={}){Object.assign(this,e)}}R([O({context:1,type:_o,optional:!0})],xe.prototype,"purpose",void 0);R([O({context:2,type:j.Integer,optional:!0})],xe.prototype,"algorithm",void 0);R([O({context:3,type:j.Integer,optional:!0})],xe.prototype,"keySize",void 0);R([O({context:5,type:_o,optional:!0})],xe.prototype,"digest",void 0);R([O({context:6,type:_o,optional:!0})],xe.prototype,"padding",void 0);R([O({context:10,type:j.Integer,optional:!0})],xe.prototype,"ecCurve",void 0);R([O({context:200,type:j.Integer,optional:!0})],xe.prototype,"rsaPublicExponent",void 0);R([O({context:203,type:_o,optional:!0})],xe.prototype,"mgfDigest",void 0);R([O({context:303,type:j.Null,optional:!0})],xe.prototype,"rollbackResistance",void 0);R([O({context:305,type:j.Null,optional:!0})],xe.prototype,"earlyBootOnly",void 0);R([O({context:400,type:j.Integer,optional:!0})],xe.prototype,"activeDateTime",void 0);R([O({context:401,type:j.Integer,optional:!0})],xe.prototype,"originationExpireDateTime",void 0);R([O({context:402,type:j.Integer,optional:!0})],xe.prototype,"usageExpireDateTime",void 0);R([O({context:405,type:j.Integer,optional:!0})],xe.prototype,"usageCountLimit",void 0);R([O({context:503,type:j.Null,optional:!0})],xe.prototype,"noAuthRequired",void 0);R([O({context:504,type:j.Integer,optional:!0})],xe.prototype,"userAuthType",void 0);R([O({context:505,type:j.Integer,optional:!0})],xe.prototype,"authTimeout",void 0);R([O({context:506,type:j.Null,optional:!0})],xe.prototype,"allowWhileOnBody",void 0);R([O({context:507,type:j.Null,optional:!0})],xe.prototype,"trustedUserPresenceRequired",void 0);R([O({context:508,type:j.Null,optional:!0})],xe.prototype,"trustedConfirmationRequired",void 0);R([O({context:509,type:j.Null,optional:!0})],xe.prototype,"unlockedDeviceRequired",void 0);R([O({context:600,type:j.Null,optional:!0})],xe.prototype,"allApplications",void 0);R([O({context:601,type:Ve,optional:!0})],xe.prototype,"applicationId",void 0);R([O({context:701,type:j.Integer,optional:!0})],xe.prototype,"creationDateTime",void 0);R([O({context:702,type:j.Integer,optional:!0})],xe.prototype,"origin",void 0);R([O({context:703,type:j.Null,optional:!0})],xe.prototype,"rollbackResistant",void 0);R([O({context:704,type:Os,optional:!0})],xe.prototype,"rootOfTrust",void 0);R([O({context:705,type:j.Integer,optional:!0})],xe.prototype,"osVersion",void 0);R([O({context:706,type:j.Integer,optional:!0})],xe.prototype,"osPatchLevel",void 0);R([O({context:709,type:Ve,optional:!0})],xe.prototype,"attestationApplicationId",void 0);R([O({context:710,type:Ve,optional:!0})],xe.prototype,"attestationIdBrand",void 0);R([O({context:711,type:Ve,optional:!0})],xe.prototype,"attestationIdDevice",void 0);R([O({context:712,type:Ve,optional:!0})],xe.prototype,"attestationIdProduct",void 0);R([O({context:713,type:Ve,optional:!0})],xe.prototype,"attestationIdSerial",void 0);R([O({context:714,type:Ve,optional:!0})],xe.prototype,"attestationIdImei",void 0);R([O({context:715,type:Ve,optional:!0})],xe.prototype,"attestationIdMeid",void 0);R([O({context:716,type:Ve,optional:!0})],xe.prototype,"attestationIdManufacturer",void 0);R([O({context:717,type:Ve,optional:!0})],xe.prototype,"attestationIdModel",void 0);R([O({context:718,type:j.Integer,optional:!0})],xe.prototype,"vendorPatchLevel",void 0);R([O({context:719,type:j.Integer,optional:!0})],xe.prototype,"bootPatchLevel",void 0);R([O({context:720,type:j.Null,optional:!0})],xe.prototype,"deviceUniqueAttestation",void 0);var ko;(function(t){t[t.software=0]="software",t[t.trustedEnvironment=1]="trustedEnvironment",t[t.strongBox=2]="strongBox"})(ko||(ko={}));var Ta;(function(t){t[t.KM2=1]="KM2",t[t.KM3=2]="KM3",t[t.KM4=3]="KM4",t[t.KM4_1=4]="KM4_1",t[t.keyMint1=100]="keyMint1",t[t.keyMint2=200]="keyMint2"})(Ta||(Ta={}));class Vn{constructor(e={}){this.attestationVersion=Ta.KM4,this.attestationSecurityLevel=ko.software,this.keymasterVersion=0,this.keymasterSecurityLevel=ko.software,this.attestationChallenge=new Ve,this.uniqueId=new Ve,this.softwareEnforced=new xe,this.teeEnforced=new xe,Object.assign(this,e)}}R([O({type:j.Integer})],Vn.prototype,"attestationVersion",void 0);R([O({type:j.Enumerated})],Vn.prototype,"attestationSecurityLevel",void 0);R([O({type:j.Integer})],Vn.prototype,"keymasterVersion",void 0);R([O({type:j.Enumerated})],Vn.prototype,"keymasterSecurityLevel",void 0);R([O({type:Ve})],Vn.prototype,"attestationChallenge",void 0);R([O({type:Ve})],Vn.prototype,"uniqueId",void 0);R([O({type:xe})],Vn.prototype,"softwareEnforced",void 0);R([O({type:xe})],Vn.prototype,"teeEnforced",void 0);var Vl;let jl=class extends xe{};jl=R([Ce({type:be.Choice})],jl);let To=Vl=class extends er{constructor(e){super(e),Object.setPrototypeOf(this,Vl.prototype)}findProperty(e){const r=this.find(n=>e in n);if(r)return r[e]}};To=Vl=R([Ce({type:be.Sequence,itemType:jl})],To);class wi{constructor(e={}){this.attestationVersion=Ta.KM4,this.attestationSecurityLevel=ko.software,this.keymasterVersion=0,this.keymasterSecurityLevel=ko.software,this.attestationChallenge=new Ve,this.uniqueId=new Ve,this.softwareEnforced=new To,this.teeEnforced=new To,Object.assign(this,e)}}R([O({type:j.Integer})],wi.prototype,"attestationVersion",void 0);R([O({type:j.Enumerated})],wi.prototype,"attestationSecurityLevel",void 0);R([O({type:j.Integer})],wi.prototype,"keymasterVersion",void 0);R([O({type:j.Enumerated})],wi.prototype,"keymasterSecurityLevel",void 0);R([O({type:Ve})],wi.prototype,"attestationChallenge",void 0);R([O({type:Ve})],wi.prototype,"uniqueId",void 0);R([O({type:To})],wi.prototype,"softwareEnforced",void 0);R([O({type:To})],wi.prototype,"teeEnforced",void 0);class eh{constructor(e={}){Object.assign(this,e)}}R([O({type:j.OctetString})],eh.prototype,"packageName",void 0);R([O({type:j.Integer})],eh.prototype,"version",void 0);class ry{constructor(e={}){Object.assign(this,e)}}R([O({type:eh,repeated:"set"})],ry.prototype,"packageInfos",void 0);R([O({type:j.OctetString,repeated:"set"})],ry.prototype,"signatureDigests",void 0);function Tn(t,e="base64url"){const r=qt.toArrayBuffer(t,e==="base64url");return new Uint8Array(r)}function qr(t,e="base64url"){return qt.fromArrayBuffer(t,e==="base64url")}function PS(t){const e=qt.toArrayBuffer(t,!0);return qt.fromArrayBuffer(e)}function ys(t){return qt.toString(t,!0)}function FS(t){return qt.validate(t,!1)}function ws(t){return t=th(t),qt.validate(t,!0)}function th(t){return t.replace(/=/g,"")}function No(t){const e=new Uint8Array(t),r=uS(e,0),[n]=r;return n}function Nd(t){return hS(t)}function LS(t){const e=t.get(Se.kty);return nh(e)&&e===Wr.OKP}function Sc(t){const e=t.get(Se.kty);return nh(e)&&e===Wr.EC2}function rh(t){const e=t.get(Se.kty);return nh(e)&&e===Wr.RSA}var Se;(function(t){t[t.kty=1]="kty",t[t.alg=3]="alg",t[t.crv=-1]="crv",t[t.x=-2]="x",t[t.y=-3]="y",t[t.n=-1]="n",t[t.e=-2]="e"})(Se||(Se={}));var Wr;(function(t){t[t.OKP=1]="OKP",t[t.EC2=2]="EC2",t[t.RSA=3]="RSA"})(Wr||(Wr={}));function nh(t){return Object.values(Wr).indexOf(t)>=0}var Br;(function(t){t[t.P256=1]="P256",t[t.P384=2]="P384",t[t.P521=3]="P521",t[t.ED25519=6]="ED25519",t[t.SECP256K1=8]="SECP256K1"})(Br||(Br={}));function HS(t){return Object.values(Br).indexOf(t)>=0}var Be;(function(t){t[t.ES256=-7]="ES256",t[t.EdDSA=-8]="EdDSA",t[t.ES384=-35]="ES384",t[t.ES512=-36]="ES512",t[t.PS256=-37]="PS256",t[t.PS384=-38]="PS384",t[t.PS512=-39]="PS512",t[t.ES256K=-47]="ES256K",t[t.RS256=-257]="RS256",t[t.RS384=-258]="RS384",t[t.RS512=-259]="RS512",t[t.RS1=-65535]="RS1"})(Be||(Be={}));function Ps(t){return Object.values(Be).indexOf(t)>=0}function ms(t){if([Be.RS1].indexOf(t)>=0)return"SHA-1";if([Be.ES256,Be.PS256,Be.RS256].indexOf(t)>=0)return"SHA-256";if([Be.ES384,Be.PS384,Be.RS384].indexOf(t)>=0)return"SHA-384";if([Be.ES512,Be.PS512,Be.RS512,Be.EdDSA].indexOf(t)>=0)return"SHA-512";throw new Error(`Could not map COSE alg value of ${t} to a WebCrypto alg`)}let Xo;function Ho(){return new Promise((e,r)=>{if(Xo)return e(Xo);const n=VS.stubThisGlobalThisCrypto();return n?(Xo=n,e(Xo)):r(new $S)})}class $S extends Error{constructor(){super("An instance of the Crypto API could not be located"),this.name="MissingWebCrypto"}}const VS={stubThisGlobalThisCrypto:()=>globalThis.crypto,setCachedCrypto:t=>{Xo=t}};async function jS(t,e){const r=await Ho(),n=ms(e),i=await r.subtle.digest(n,t);return new Uint8Array(i)}async function ny(t){return(await Ho()).getRandomValues(t),t}async function ih(t){const e=await Ho(),{keyData:r,algorithm:n}=t;return e.subtle.importKey("jwk",r,n,!1,["verify"])}async function iy(t){const{cosePublicKey:e,signature:r,data:n,shaHashOverride:i}=t,o=await Ho(),s=e.get(Se.alg),a=e.get(Se.crv),c=e.get(Se.x),u=e.get(Se.y);if(!s)throw new Error("Public key was missing alg (EC2)");if(!a)throw new Error("Public key was missing crv (EC2)");if(!c)throw new Error("Public key was missing x (EC2)");if(!u)throw new Error("Public key was missing y (EC2)");let y;if(a===Br.P256)y="P-256";else if(a===Br.P384)y="P-384";else if(a===Br.P521)y="P-521";else throw new Error(`Unexpected COSE crv value of ${a} (EC2)`);const p={kty:"EC",crv:y,x:qr(c),y:qr(u),ext:!1},S=await ih({keyData:p,algorithm:{name:"ECDSA",namedCurve:y}});let C=ms(s);i&&(C=ms(i));const B={name:"ECDSA",hash:{name:C}};return o.subtle.verify(B,S,r,n)}function Rd(t){if([Be.EdDSA].indexOf(t)>=0)return"Ed25519";if([Be.ES256,Be.ES384,Be.ES512,Be.ES256K].indexOf(t)>=0)return"ECDSA";if([Be.RS256,Be.RS384,Be.RS512,Be.RS1].indexOf(t)>=0)return"RSASSA-PKCS1-v1_5";if([Be.PS256,Be.PS384,Be.PS512].indexOf(t)>=0)return"RSA-PSS";throw new Error(`Could not map COSE alg value of ${t} to a WebCrypto key alg name`)}async function oy(t){const{cosePublicKey:e,signature:r,data:n,shaHashOverride:i}=t,o=await Ho(),s=e.get(Se.alg),a=e.get(Se.n),c=e.get(Se.e);if(!s)throw new Error("Public key was missing alg (RSA)");if(!Ps(s))throw new Error(`Public key had invalid alg ${s} (RSA)`);if(!a)throw new Error("Public key was missing n (RSA)");if(!c)throw new Error("Public key was missing e (RSA)");const u={kty:"RSA",alg:"",n:qr(a),e:qr(c),ext:!1},y={name:Rd(s),hash:{name:ms(s)}},p={name:Rd(s)};if(i&&(y.hash.name=ms(i)),y.name==="RSASSA-PKCS1-v1_5")y.hash.name==="SHA-256"?u.alg="RS256":y.hash.name==="SHA-384"?u.alg="RS384":y.hash.name==="SHA-512"?u.alg="RS512":y.hash.name==="SHA-1"&&(u.alg="RS1");else if(y.name==="RSA-PSS"){let S=0;y.hash.name==="SHA-256"?(u.alg="PS256",S=32):y.hash.name==="SHA-384"?(u.alg="PS384",S=48):y.hash.name==="SHA-512"&&(u.alg="PS512",S=64),p.saltLength=S}else throw new Error(`Unexpected RSA key algorithm ${s} (${y.name})`);const x=await ih({keyData:u,algorithm:y});return o.subtle.verify(p,x,r,n)}function sy(t){const e=lo(t);return[e.slice(0,8),e.slice(8,12),e.slice(12,16),e.slice(16,20),e.slice(20,32)].join("-")}function pn(t){let e;if(typeof t=="string")if(ws(t))e=PS(t);else if(FS(t))e=t;else throw new Error("Certificate is not a valid base64 or base64url string");else e=qr(t,"base64");let r="";for(let n=0;nt};function ay(t){const e=ys(t),r=JSON.parse(e);return GS.stubThis(r)}const GS={stubThis:t=>t};function Bc(t){return qS.stubThis(No(t))}const qS={stubThis:t=>t};async function WS(){const t=new Uint8Array(32);return await ny(t),JS.stubThis(t)}const JS={stubThis:t=>t},Ud={"2.5.4.6":"C","2.5.4.10":"O","2.5.4.11":"OU","2.5.4.3":"CN"};function bs(t){const e=Rt.parse(t,yi),r=e.tbsCertificate,n={combined:""};r.issuer.forEach(([s])=>{const a=Ud[s.type];a&&(n[a]=s.value.toString())}),n.combined=Od(n);const i={combined:""};r.subject.forEach(([s])=>{const a=Ud[s.type];a&&(i[a]=s.value.toString())}),i.combined=Od(i);let o=!1;if(r.extensions)for(const s of r.extensions)s.extnID===yE&&(o=Rt.parse(s.extnValue,Vu).cA);return{issuer:n,subject:i,version:r.version,basicConstraintsCA:o,notBefore:r.validity.notBefore.getTime(),notAfter:r.validity.notAfter.getTime(),parsedCertificate:e}}function Od(t){const e=[];return t.C&&e.push(t.C),t.O&&e.push(t.O),t.OU&&e.push(t.OU),t.CN&&e.push(t.CN),e.join(" : ")}function cy(t){return YS.stubThis(t)}const YS={stubThis:t=>wS.fetch(t)},Pd={};async function QS(t){var x,S;const{extensions:e}=t.tbsCertificate;if(!e)return!1;let r,n,i;e.forEach(C=>{C.extnID===gE?r=Rt.parse(C.extnValue,pc):C.extnID===vE?n=Rt.parse(C.extnValue,xE):C.extnID===wE&&(i=Rt.parse(C.extnValue,Da))});let o;r&&r.keyIdentifier?o=lo(new Uint8Array(r.keyIdentifier.buffer)):n&&(o=lo(new Uint8Array(n.buffer)));const s=lo(new Uint8Array(t.tbsCertificate.serialNumber));if(o){const C=Pd[o];if(C){const B=new Date;if(!C.nextUpdate||C.nextUpdate>B)return C.revokedCerts.indexOf(s)>=0}}const a=(S=(x=i==null?void 0:i[0].distributionPoint)==null?void 0:x.fullName)==null?void 0:S[0].uniformResourceIdentifier;if(!a)return!1;let c;try{c=await(await cy(a)).arrayBuffer()}catch{return!1}let u;try{u=Rt.parse(c,bc)}catch{return!1}const y={revokedCerts:[],nextUpdate:void 0};u.tbsCertList.nextUpdate&&(y.nextUpdate=u.tbsCertList.nextUpdate.getTime());const p=u.tbsCertList.revokedCertificates;if(p){for(const C of p){const B=lo(new Uint8Array(C.userCertificate));y.revokedCerts.push(B)}return o&&(Pd[o]=y),y.revokedCerts.indexOf(s)>=0}return!1}function ZS(t){let e;try{e=No(t)}catch(r){const n=r;throw new Error(`Error decoding authenticator extensions: ${n.message}`)}return fy(e)}function fy(t){const e={};for(const[r,n]of t)n instanceof Map?e[r]=fy(n):e[r]=n;return e}function ly(t){if(t.byteLength<37)throw new Error(`Authenticator data was ${t.byteLength} bytes, expected at least 37 bytes`);let e=0;const r=Na(t),n=t.slice(e,e+=32),i=t.slice(e,e+=1),o=i[0],s={up:!!(o&1),uv:!!(o&4),be:!!(o&8),bs:!!(o&16),at:!!(o&64),ed:!!(o&128),flagsInt:o},a=t.slice(e,e+4),c=r.getUint32(e,!1);e+=4;let u,y,p;if(s.at){u=t.slice(e,e+=16);const C=r.getUint16(e);e+=2,y=t.slice(e,e+=C);const B=s3("a301634f4b500327206745643235353139"),M=t.slice(e,e+B.byteLength);let N=!1;on(B,M)&&(N=!0,t[e]=164);const H=No(t.slice(e)),L=Uint8Array.from(Nd(H));N&&(t[e]=163),p=L,e+=L.byteLength}let x,S;if(s.ed){const C=No(t.slice(e));S=Uint8Array.from(Nd(C)),x=ZS(S),e+=S.byteLength}if(t.byteLength>e)throw new Error("Leftover bytes detected while parsing authenticator data");return XS.stubThis({rpIdHash:n,flagsBuf:i,flags:s,counter:c,counterBuf:a,aaguid:u,credentialID:y,credentialPublicKey:p,extensionsData:x,extensionsDataBuffer:S})}const XS={stubThis:t=>t};function Yi(t,e=-7){return typeof t=="string"&&(t=Fs(t)),jS(t,e)}function zl(t){let e;if(t==="1.2.840.10045.4.3.2")e=Be.ES256;else if(t==="1.2.840.10045.4.3.3")e=Be.ES384;else if(t==="1.2.840.10045.4.3.4")e=Be.ES512;else if(t==="1.2.840.113549.1.1.11")e=Be.RS256;else if(t==="1.2.840.113549.1.1.12")e=Be.RS384;else if(t==="1.2.840.113549.1.1.13")e=Be.RS512;else if(t==="1.2.840.113549.1.1.5")e=Be.RS1;else throw new Error(`Unable to map X.509 signature algorithm ${t} to a COSE algorithm`);return e}function uy(t){let e=new Map;const r=Rt.parse(t,yi),{tbsCertificate:n}=r,{subjectPublicKeyInfo:i,signature:o}=n,s=o.algorithm,a=i.algorithm.algorithm;if(a===AE){if(!i.algorithm.parameters)throw new Error("Certificate public key was missing parameters (EC2)");const c=Rt.parse(new Uint8Array(i.algorithm.parameters),Wi);let u=-999;const{namedCurve:y}=c;if(y===IE)u=Br.P256;else if(y===ME)u=Br.P384;else throw new Error(`Certificate public key contained unexpected namedCurve ${y} (EC2)`);const p=new Uint8Array(i.subjectPublicKey);let x,S;if(p[0]===4){let B=1;const M=(p.length-1)/2;x=p.slice(B,B+=M),S=p.slice(B)}else throw new Error('TODO: Figure out how to handle public keys in "compressed form"');const C=new Map;C.set(Se.kty,Wr.EC2),C.set(Se.alg,zl(s)),C.set(Se.crv,u),C.set(Se.x,x),C.set(Se.y,S),e=C}else if(a==="1.2.840.113549.1.1.1"){const c=Rt.parse(i.subjectPublicKey,Xu),u=new Map;u.set(Se.kty,Wr.RSA),u.set(Se.alg,zl(s)),u.set(Se.n,new Uint8Array(c.modulus)),u.set(Se.e,new Uint8Array(c.publicExponent)),e=u}else throw new Error(`Certificate public key contained unexpected algorithm ID ${a}`);return e}function hi(t){const{signature:e,data:r,credentialPublicKey:n,x509Certificate:i,hashAlgorithm:o}=t;if(!i&&!n)throw new Error('Must declare either "leafCert" or "credentialPublicKey"');if(i&&n)throw new Error('Must not declare both "leafCert" and "credentialPublicKey"');let s=new Map;return n?s=Bc(n):i&&(s=uy(i)),e3.stubThis(o3({cosePublicKey:s,signature:e,data:r,shaHashOverride:o}))}const e3={stubThis:t=>t};function na(t){const e=t.replace("-----BEGIN CERTIFICATE-----","").replace("-----END CERTIFICATE-----","").replace(/[\n ]/g,"");return Tn(e,"base64")}async function mi(t,e=[]){if(e.length===0)return!0;let r=!1,n;for(const i of e)try{const o=t.concat([i]);await t3(o),r=!1,n=void 0;break}catch(o){if(o instanceof Kl)r=!0;else if(o instanceof ns)n=o.message;else throw o}if(r)throw new Kl;if(n)throw new ns(n);return!0}async function t3(t){if(new Set(t).size!==t.length)throw new Error("Invalid certificate path: found duplicate certificates");for(let e=0;e=t.length;let o="";i?o=r:o=t[e+1];const s=bs(na(r)),a=bs(na(o)),c=s.parsedCertificate;if(await QS(c))throw new Error("Found revoked certificate in certificate path");const{notBefore:y,notAfter:p}=a,x=new Date(Date.now());if(y>x||pr===e[n])}function lo(t){return Array.from(t,r=>r.toString(16).padStart(2,"0")).join("")}function s3(t){if(!(t.length!==0&&t.length%2===0&&!/[^a-fA-F0-9]/u.test(t)))throw new Error("Invalid hex string");const r=t.match(/.{1,2}/g)??[];return Uint8Array.from(r.map(n=>parseInt(n,16)))}function gr(t){let e=0;const r=t.reduce((i,o)=>i+o.length,0),n=new Uint8Array(r);return t.forEach(i=>{n.set(i,e),e+=i.length}),n}function a3(t){return new globalThis.TextDecoder("utf-8").decode(t)}function Fs(t){return new globalThis.TextEncoder().encode(t)}function c3(t){return Uint8Array.from(t.split("").map(e=>e.charCodeAt(0)))}function Na(t){return new DataView(t.buffer,t.byteOffset,t.length)}async function hy(){const t=new Uint8Array(32);return await ny(t),f3.stubThis(t)}const f3={stubThis:t=>t},l3=[-8,-7,-36,-37,-38,-39,-257,-258,-259,-65535],u3={residentKey:"preferred",userVerification:"preferred"},h3=[-8,-7,-257];async function d3(t){const{rpName:e,rpID:r,userName:n,userID:i,challenge:o=await hy(),userDisplayName:s="",timeout:a=6e4,attestationType:c="none",excludeCredentials:u=[],authenticatorSelection:y=u3,extensions:p,supportedAlgorithmIDs:x=h3}=t,S=x.map(M=>({alg:M,type:"public-key"}));y.residentKey===void 0?y.requireResidentKey&&(y.residentKey="required"):y.requireResidentKey=y.residentKey==="required";let C=o;if(typeof C=="string"&&(C=Fs(C)),typeof i=="string")throw new Error("String values for `userID` are no longer supported. See https://simplewebauthn.dev/docs/advanced/server/custom-user-ids");let B=i;return B||(B=await WS()),{challenge:qr(C),rp:{name:e,id:r},user:{id:qr(B),name:n,displayName:s},pubKeyCredParams:S,timeout:a,attestation:c,excludeCredentials:u.map(M=>{if(!ws(M.id))throw new Error(`excludeCredential id "${M.id}" is not a valid base64url string`);return{...M,id:th(M.id),type:"public-key"}}),authenticatorSelection:y,extensions:{...p,credProps:!0}}}function dy({be:t,bs:e}){const r=e;let n="singleDevice";if(t&&(n="multiDevice"),n==="singleDevice"&&r)throw new p3("Single-device credential indicated that it was backed up, which should be impossible.");return{credentialDeviceType:n,credentialBackedUp:r}}class p3 extends Error{constructor(e){super(e),this.name="InvalidBackupFlags"}}async function py(t,e){try{return await Promise.any(e.map(n=>new Promise((i,o)=>{Yi(c3(n)).then(s=>{on(t,s)?i(n):o()})})))}catch(r){throw r.name==="AggregateError"?new g3:r}}class g3 extends Error{constructor(){super("Unexpected RP ID hash"),this.name="UnexpectedRPIDHash"}}const y3=`-----BEGIN CERTIFICATE----- -MIIDdTCCAl2gAwIBAgILBAAAAAABFUtaw5QwDQYJKoZIhvcNAQEFBQAwVzELMAkG -A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv -b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAw -MDBaFw0yODAxMjgxMjAwMDBaMFcxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i -YWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYDVQQDExJHbG9iYWxT -aWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDaDuaZ -jc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavp -xy0Sy6scTHAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp -1Wrjsok6Vjk4bwY8iGlbKk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdG -snUOhugZitVtbNV4FpWi6cgKOOvyJBNPc1STE4U6G7weNLWLBYy5d4ux2x8gkasJ -U26Qzns3dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrXgzT/LCrBbBlDSgeF59N8 -9iFo7+ryUp9/k5DPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8E -BTADAQH/MB0GA1UdDgQWBBRge2YaRQ2XyolQL30EzTSo//z9SzANBgkqhkiG9w0B -AQUFAAOCAQEA1nPnfE920I2/7LqivjTFKDK1fPxsnCwrvQmeU79rXqoRSLblCKOz -yj1hTdNGCbM+w6DjY1Ub8rrvrTnhQ7k4o+YviiY776BQVvnGCv04zcQLcFGUl5gE -38NflNUVyRRBnMRddWQVDf9VMOyGj/8N7yy5Y0b2qvzfvGn9LhJIZJrglfCm7ymP -AbEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhHhm4qxFYxldBniYUr+WymXUad -DKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveCX4XSQRjbgbME -HMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A== ------END CERTIFICATE----- -`,w3=`-----BEGIN CERTIFICATE----- -MIIFYDCCA0igAwIBAgIJAOj6GWMU0voYMA0GCSqGSIb3DQEBCwUAMBsxGTAXBgNV -BAUTEGY5MjAwOWU4NTNiNmIwNDUwHhcNMTYwNTI2MTYyODUyWhcNMjYwNTI0MTYy -ODUyWjAbMRkwFwYDVQQFExBmOTIwMDllODUzYjZiMDQ1MIICIjANBgkqhkiG9w0B -AQEFAAOCAg8AMIICCgKCAgEAr7bHgiuxpwHsK7Qui8xUFmOr75gvMsd/dTEDDJdS -Sxtf6An7xyqpRR90PL2abxM1dEqlXnf2tqw1Ne4Xwl5jlRfdnJLmN0pTy/4lj4/7 -tv0Sk3iiKkypnEUtR6WfMgH0QZfKHM1+di+y9TFRtv6y//0rb+T+W8a9nsNL/ggj -nar86461qO0rOs2cXjp3kOG1FEJ5MVmFmBGtnrKpa73XpXyTqRxB/M0n1n/W9nGq -C4FSYa04T6N5RIZGBN2z2MT5IKGbFlbC8UrW0DxW7AYImQQcHtGl/m00QLVWutHQ -oVJYnFPlXTcHYvASLu+RhhsbDmxMgJJ0mcDpvsC4PjvB+TxywElgS70vE0XmLD+O -JtvsBslHZvPBKCOdT0MS+tgSOIfga+z1Z1g7+DVagf7quvmag8jfPioyKvxnK/Eg -sTUVi2ghzq8wm27ud/mIM7AY2qEORR8Go3TVB4HzWQgpZrt3i5MIlCaY504LzSRi -igHCzAPlHws+W0rB5N+er5/2pJKnfBSDiCiFAVtCLOZ7gLiMm0jhO2B6tUXHI/+M -RPjy02i59lINMRRev56GKtcd9qO/0kUJWdZTdA2XoS82ixPvZtXQpUpuL12ab+9E -aDK8Z4RHJYYfCT3Q5vNAXaiWQ+8PTWm2QgBR/bkwSWc+NpUFgNPN9PvQi8WEg5Um -AGMCAwEAAaOBpjCBozAdBgNVHQ4EFgQUNmHhAHyIBQlRi0RsR/8aTMnqTxIwHwYD -VR0jBBgwFoAUNmHhAHyIBQlRi0RsR/8aTMnqTxIwDwYDVR0TAQH/BAUwAwEB/zAO -BgNVHQ8BAf8EBAMCAYYwQAYDVR0fBDkwNzA1oDOgMYYvaHR0cHM6Ly9hbmRyb2lk -Lmdvb2dsZWFwaXMuY29tL2F0dGVzdGF0aW9uL2NybC8wDQYJKoZIhvcNAQELBQAD -ggIBACDIw41L3KlXG0aMiS//cqrG+EShHUGo8HNsw30W1kJtjn6UBwRM6jnmiwfB -Pb8VA91chb2vssAtX2zbTvqBJ9+LBPGCdw/E53Rbf86qhxKaiAHOjpvAy5Y3m00m -qC0w/Zwvju1twb4vhLaJ5NkUJYsUS7rmJKHHBnETLi8GFqiEsqTWpG/6ibYCv7rY -DBJDcR9W62BW9jfIoBQcxUCUJouMPH25lLNcDc1ssqvC2v7iUgI9LeoM1sNovqPm -QUiG9rHli1vXxzCyaMTjwftkJLkf6724DFhuKug2jITV0QkXvaJWF4nUaHOTNA4u -JU9WDvZLI1j83A+/xnAJUucIv/zGJ1AMH2boHqF8CY16LpsYgBt6tKxxWH00XcyD -CdW2KlBCeqbQPcsFmWyWugxdcekhYsAWyoSf818NUsZdBWBaR/OukXrNLfkQ79Iy -ZohZbvabO/X+MVT3rriAoKc8oE2Uws6DF+60PV7/WIPjNvXySdqspImSN78mflxD -qwLqRBYkA3I75qppLGG9rp7UCdRjxMl8ZDBld+7yvHVgt1cVzJx9xnyGCC23Uaic -MDSXYrB4I4WHXPGjxhZuCuPBLTdOLU8YRvMYdEvYebWHMpvwGCF6bAx3JBpIeOQ1 -wDB5y0USicV3YgYGmi+NZfhA4URSh77Yd6uuJOJENRaNVTzk ------END CERTIFICATE----- -`,m3=`-----BEGIN CERTIFICATE----- -MIIFHDCCAwSgAwIBAgIJANUP8luj8tazMA0GCSqGSIb3DQEBCwUAMBsxGTAXBgNV -BAUTEGY5MjAwOWU4NTNiNmIwNDUwHhcNMTkxMTIyMjAzNzU4WhcNMzQxMTE4MjAz -NzU4WjAbMRkwFwYDVQQFExBmOTIwMDllODUzYjZiMDQ1MIICIjANBgkqhkiG9w0B -AQEFAAOCAg8AMIICCgKCAgEAr7bHgiuxpwHsK7Qui8xUFmOr75gvMsd/dTEDDJdS -Sxtf6An7xyqpRR90PL2abxM1dEqlXnf2tqw1Ne4Xwl5jlRfdnJLmN0pTy/4lj4/7 -tv0Sk3iiKkypnEUtR6WfMgH0QZfKHM1+di+y9TFRtv6y//0rb+T+W8a9nsNL/ggj -nar86461qO0rOs2cXjp3kOG1FEJ5MVmFmBGtnrKpa73XpXyTqRxB/M0n1n/W9nGq -C4FSYa04T6N5RIZGBN2z2MT5IKGbFlbC8UrW0DxW7AYImQQcHtGl/m00QLVWutHQ -oVJYnFPlXTcHYvASLu+RhhsbDmxMgJJ0mcDpvsC4PjvB+TxywElgS70vE0XmLD+O -JtvsBslHZvPBKCOdT0MS+tgSOIfga+z1Z1g7+DVagf7quvmag8jfPioyKvxnK/Eg -sTUVi2ghzq8wm27ud/mIM7AY2qEORR8Go3TVB4HzWQgpZrt3i5MIlCaY504LzSRi -igHCzAPlHws+W0rB5N+er5/2pJKnfBSDiCiFAVtCLOZ7gLiMm0jhO2B6tUXHI/+M -RPjy02i59lINMRRev56GKtcd9qO/0kUJWdZTdA2XoS82ixPvZtXQpUpuL12ab+9E -aDK8Z4RHJYYfCT3Q5vNAXaiWQ+8PTWm2QgBR/bkwSWc+NpUFgNPN9PvQi8WEg5Um -AGMCAwEAAaNjMGEwHQYDVR0OBBYEFDZh4QB8iAUJUYtEbEf/GkzJ6k8SMB8GA1Ud -IwQYMBaAFDZh4QB8iAUJUYtEbEf/GkzJ6k8SMA8GA1UdEwEB/wQFMAMBAf8wDgYD -VR0PAQH/BAQDAgIEMA0GCSqGSIb3DQEBCwUAA4ICAQBOMaBc8oumXb2voc7XCWnu -XKhBBK3e2KMGz39t7lA3XXRe2ZLLAkLM5y3J7tURkf5a1SutfdOyXAmeE6SRo83U -h6WszodmMkxK5GM4JGrnt4pBisu5igXEydaW7qq2CdC6DOGjG+mEkN8/TA6p3cno -L/sPyz6evdjLlSeJ8rFBH6xWyIZCbrcpYEJzXaUOEaxxXxgYz5/cTiVKN2M1G2ok -QBUIYSY6bjEL4aUN5cfo7ogP3UvliEo3Eo0YgwuzR2v0KR6C1cZqZJSTnghIC/vA -D32KdNQ+c3N+vl2OTsUVMC1GiWkngNx1OO1+kXW+YTnnTUOtOIswUP/Vqd5SYgAI -mMAfY8U9/iIgkQj6T2W6FsScy94IN9fFhE1UtzmLoBIuUFsVXJMTz+Jucth+IqoW -Fua9v1R93/k98p41pjtFX+H8DslVgfP097vju4KDlqN64xV1grw3ZLl4CiOe/A91 -oeLm2UHOq6wn3esB4r2EIQKb6jTVGu5sYCcdWpXr0AUVqcABPdgL+H7qJguBw09o -jm6xNIrw2OocrDKsudk/okr/AwqEyPKw9WnMlQgLIKw1rODG2NvU9oR3GVGdMkUB -ZutL8VuFkERQGt6vQ2OCw0sV47VMkuYbacK/xyZFiRcrPJPb41zgbQj9XAEyLKCH -ex0SdDrx+tWUDqG8At2JHA== ------END CERTIFICATE----- -`,b3=`-----BEGIN CERTIFICATE----- -MIICEjCCAZmgAwIBAgIQaB0BbHo84wIlpQGUKEdXcTAKBggqhkjOPQQDAzBLMR8w -HQYDVQQDDBZBcHBsZSBXZWJBdXRobiBSb290IENBMRMwEQYDVQQKDApBcHBsZSBJ -bmMuMRMwEQYDVQQIDApDYWxpZm9ybmlhMB4XDTIwMDMxODE4MjEzMloXDTQ1MDMx -NTAwMDAwMFowSzEfMB0GA1UEAwwWQXBwbGUgV2ViQXV0aG4gUm9vdCBDQTETMBEG -A1UECgwKQXBwbGUgSW5jLjETMBEGA1UECAwKQ2FsaWZvcm5pYTB2MBAGByqGSM49 -AgEGBSuBBAAiA2IABCJCQ2pTVhzjl4Wo6IhHtMSAzO2cv+H9DQKev3//fG59G11k -xu9eI0/7o6V5uShBpe1u6l6mS19S1FEh6yGljnZAJ+2GNP1mi/YK2kSXIuTHjxA/ -pcoRf7XkOtO4o1qlcaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUJtdk -2cV4wlpn0afeaxLQG2PxxtcwDgYDVR0PAQH/BAQDAgEGMAoGCCqGSM49BAMDA2cA -MGQCMFrZ+9DsJ1PW9hfNdBywZDsWDbWFp28it1d/5w2RPkRX3Bbn/UbDTNLx7Jr3 -jAGGiQIwHFj+dJZYUJR786osByBelJYsVZd2GbHQu209b5RCmGQ21gpSAk9QZW4B -1bWeT0vT ------END CERTIFICATE----- -`,v3=`-----BEGIN CERTIFICATE----- - MIIDXzCCAkegAwIBAgILBAAAAAABIVhTCKIwDQYJKoZIhvcNAQELBQAwTDEgMB4G - A1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNp - Z24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDkwMzE4MTAwMDAwWhcNMjkwMzE4 - MTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEG - A1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI - hvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWtiHL8 - RgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsT - gHeMCOFJ0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmm - KPZpO/bLyCiR5Z2KYVc3rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zd - QQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjlOCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZ - XriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2xmmFghcCAwEAAaNCMEAw - DgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFI/wS3+o - LkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZU - RUm7lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMp - jjM5RcOO5LlXbKr8EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK - 6fBdRoyV3XpYKBovHd7NADdBj+1EbddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQX - mcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18YIvDQVETI53O9zJrlAGomecs - Mx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7rkpeDMdmztcpH - WD9f - -----END CERTIFICATE----- - `;class x3{constructor(){Object.defineProperty(this,"pemCertificates",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.pemCertificates=new Map}setRootCertificates(e){const{identifier:r,certificates:n}=e,i=[];for(const o of n)o instanceof Uint8Array?i.push(pn(o)):i.push(o);this.pemCertificates.set(r,i)}getRootCertificates(e){const{identifier:r}=e;return this.pemCertificates.get(r)??[]}}const $o=new x3;$o.setRootCertificates({identifier:"android-key",certificates:[w3,m3]});$o.setRootCertificates({identifier:"android-safetynet",certificates:[y3]});$o.setRootCertificates({identifier:"apple",certificates:[b3]});$o.setRootCertificates({identifier:"mds",certificates:[v3]});async function A3(t){const{attStmt:e,clientDataHash:r,rpIdHash:n,credentialID:i,credentialPublicKey:o,aaguid:s,rootCertificates:a}=t,c=Uint8Array.from([0]),u=oh(o),y=gr([c,n,r,i,u]),p=e.get("sig"),x=e.get("x5c");if(!x)throw new Error("No attestation certificate provided in attestation statement (FIDOU2F)");if(!p)throw new Error("No attestation signature provided in attestation statement (FIDOU2F)");const S=Number.parseInt(lo(s),16);if(S!==0)throw new Error(`AAGUID "${S}" was not expected value`);try{await mi(x.map(pn),a)}catch(C){const B=C;throw new Error(`${B.message} (FIDOU2F)`)}return hi({signature:p,data:y,x509Certificate:x[0],hashAlgorithm:Be.ES256})}function E3(t){return(e,...r)=>{}}function S3(t){const e=t.split(".");return[JSON.parse(ys(e[0])),JSON.parse(ys(e[1])),e[2]]}function B3(t,e){const[r,n,i]=t.split("."),o=uy(e),s=Fs(`${r}.${n}`),a=Tn(i);if(Sc(o))return iy({data:s,signature:a,cosePublicKey:o,shaHashOverride:Be.ES256});if(rh(o))return oy({data:s,signature:a,cosePublicKey:o});const c=o.get(Se.kty);throw new Error(`JWT verification with public key of kty ${c} is not supported by this method`)}const D3="https://mds.fidoalliance.org/";var cr;(function(t){t[t.DISABLED=0]="DISABLED",t[t.REFRESHING=1]="REFRESHING",t[t.READY=2]="READY"})(cr||(cr={}));const so=E3();class C3{constructor(){Object.defineProperty(this,"mdsCache",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"statementCache",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:cr.DISABLED}),Object.defineProperty(this,"verificationMode",{enumerable:!0,configurable:!0,writable:!0,value:"strict"})}async initialize(e={}){const{mdsServers:r=[D3],statements:n,verificationMode:i}=e;if(this.setState(cr.REFRESHING),n!=null&&n.length){let o=0;n.forEach(s=>{s.aaguid&&(this.statementCache[s.aaguid]={entry:{metadataStatement:s,statusReports:[],timeOfLastStatusChange:"1970-01-01"},url:""},o+=1)}),so(`Cached ${o} local statements`)}if(r!=null&&r.length){const o=Object.keys(this.statementCache).length;let s=r.length;for(const u of r)try{await this.downloadBlob({url:u,no:0,nextUpdate:new Date(0)})}catch(y){so(`Could not download BLOB from ${u}:`,y),s-=1}const c=Object.keys(this.statementCache).length-o;so(`Cached ${c} statements from ${s} metadata server(s)`)}i&&(this.verificationMode=i),this.setState(cr.READY)}async getStatement(e){if(this.state===cr.DISABLED||!e)return;e instanceof Uint8Array&&(e=sy(e)),await this.pauseUntilReady();const r=this.statementCache[e];if(!r){if(this.verificationMode==="strict")throw new Error(`No metadata statement found for aaguid "${e}"`);return}if(r.url){const i=this.mdsCache[r.url];if(new Date>i.nextUpdate)try{this.setState(cr.REFRESHING),await this.downloadBlob(i)}finally{this.setState(cr.READY)}}const{entry:n}=r;for(const i of n.statusReports){const{status:o}=i;if(o==="USER_VERIFICATION_BYPASS"||o==="ATTESTATION_KEY_COMPROMISE"||o==="USER_KEY_REMOTE_COMPROMISE"||o==="USER_KEY_PHYSICAL_COMPROMISE")throw new Error(`Detected compromised aaguid "${e}"`)}return n.metadataStatement}async downloadBlob(e){const{url:r,no:n}=e,o=await(await cy(r)).text(),s=S3(o),a=s[0],c=s[1];if(c.no<=n)throw new Error(`Latest BLOB no. "${c.no}" is not greater than previous ${n}`);const u=a.x5c.map(pn);try{const B=$o.getRootCertificates({identifier:"mds"});await mi(u,B)}catch(B){const M=B;throw new Error(`BLOB certificate path could not be validated: ${M.message}`)}const y=u[0];if(!await B3(o,na(y)))throw new Error("BLOB signature could not be verified");for(const B of c.entries)B.aaguid&&(this.statementCache[B.aaguid]={entry:B,url:r});const[x,S,C]=c.nextUpdate.split("-");this.mdsCache[r]={...e,no:c.no,nextUpdate:new Date(parseInt(x,10),parseInt(S,10)-1,parseInt(C,10))}}pauseUntilReady(){return this.state===cr.READY?new Promise(r=>{r()}):new Promise((r,n)=>{let s=700;const a=globalThis.setInterval(()=>{s<1?(clearInterval(a),n(`State did not become ready in ${7e4/1e3} seconds`)):this.state===cr.READY&&(clearInterval(a),r()),s-=1},100)})}setState(e){this.state=e,e===cr.DISABLED?so("MetadataService is DISABLED"):e===cr.REFRESHING?so("MetadataService is REFRESHING"):e===cr.READY&&so("MetadataService is READY")}}const Dc=new C3;async function Cc({statement:t,credentialPublicKey:e,x5c:r,attestationStatementAlg:n}){const{authenticationAlgorithms:i,authenticatorGetInfo:o,attestationRootCertificates:s}=t,a=new Set;i.forEach(M=>{const N=Ld[M];N&&a.add(N)});const c=Bc(e),u=c.get(Se.kty),y=c.get(Se.alg);if(!u)throw new Error("Credential public key was missing kty");if(!y)throw new Error("Credential public key was missing alg");if(!u)throw new Error("Credential public key was missing kty");const p={kty:u,alg:y};if(Sc(c)){const M=c.get(Se.crv);p.crv=M}let x=!1;for(const M of a)if(M.alg===p.alg&&M.kty===p.kty&&((M.kty===Wr.EC2||M.kty===Wr.OKP)&&(M.crv,p.crv),x=!0),x)break;if(!x){const M=i.map(L=>`'${L}' (COSE info: ${Hd(Ld[L])})`),N=JSON.stringify(M,null,2).replace(/"/g,""),H=Hd(p);throw new Error(`Public key parameters ${H} did not match any of the following metadata algorithms: -${N}`)}if(n!==void 0&&(o==null?void 0:o.algorithms)!==void 0){const M=o.algorithms.map(N=>N.alg);if(M.indexOf(n)<0)throw new Error(`Attestation statement alg ${n} did not match one of ${M}`)}const S=r.map(pn),C=s.map(pn);let B=!1;if(S.length===1&&C.indexOf(S[0])>=0&&(B=!0),!B)try{await mi(S,C)}catch(M){const N=M;throw new Error(`Could not validate certificate path with any metadata root certificates: ${N.message}`)}return!0}const Ld={secp256r1_ecdsa_sha256_raw:{kty:2,alg:-7,crv:1},secp256r1_ecdsa_sha256_der:{kty:2,alg:-7,crv:1},rsassa_pss_sha256_raw:{kty:3,alg:-37},rsassa_pss_sha256_der:{kty:3,alg:-37},secp256k1_ecdsa_sha256_raw:{kty:2,alg:-47,crv:8},secp256k1_ecdsa_sha256_der:{kty:2,alg:-47,crv:8},rsassa_pss_sha384_raw:{kty:3,alg:-38},rsassa_pkcsv15_sha256_raw:{kty:3,alg:-257},rsassa_pkcsv15_sha384_raw:{kty:3,alg:-258},rsassa_pkcsv15_sha512_raw:{kty:3,alg:-259},rsassa_pkcsv15_sha1_raw:{kty:3,alg:-65535},secp384r1_ecdsa_sha384_raw:{kty:2,alg:-35,crv:2},secp512r1_ecdsa_sha256_raw:{kty:2,alg:-36,crv:3},ed25519_eddsa_sha512_raw:{kty:1,alg:-8,crv:6}};function Hd(t){const{kty:e,alg:r,crv:n}=t;let i="";return e!==Wr.RSA?i=`{ kty: ${e}, alg: ${r}, crv: ${n} }`:i=`{ kty: ${e}, alg: ${r} }`,i}async function I3(t){const{attStmt:e,clientDataHash:r,authData:n,credentialPublicKey:i,aaguid:o,rootCertificates:s}=t,a=e.get("sig"),c=e.get("x5c"),u=e.get("alg");if(!a)throw new Error("No attestation signature provided in attestation statement (Packed)");if(!u)throw new Error("Attestation statement did not contain alg (Packed)");if(!Ps(u))throw new Error(`Attestation statement contained invalid alg ${u} (Packed)`);const y=gr([n,r]);let p=!1;if(c){const{subject:x,basicConstraintsCA:S,version:C,notBefore:B,notAfter:M}=bs(c[0]),{OU:N,CN:H,O:L,C:G}=x;if(N!=="Authenticator Attestation")throw new Error('Certificate OU was not "Authenticator Attestation" (Packed|Full)');if(!H)throw new Error("Certificate CN was empty (Packed|Full)");if(!L)throw new Error("Certificate O was empty (Packed|Full)");if(!G||G.length!==2)throw new Error("Certificate C was not two-character ISO 3166 code (Packed|Full)");if(S)throw new Error("Certificate basic constraints CA was not `false` (Packed|Full)");if(C!==2)throw new Error("Certificate version was not `3` (ASN.1 value of 2) (Packed|Full)");let K=new Date;if(B>K)throw new Error(`Certificate not good before "${B.toString()}" (Packed|Full)`);if(K=new Date,MDate.now())throw new Error(`Payload timestamp "${H}" was later than "${b}" (SafetyNet)`);const f=H+60*1e3;if(b=Date.now(),f0)throw new Error("Certificate subject was not empty (TPM)");let m=new Date;if(g>m)throw new Error(`Certificate not good before "${g.toString()}" (TPM)`);if(m=new Date,l{$.extnID===bE?I=Rt.parse($.extnValue,_l):$.extnID===mE&&(T=Rt.parse($.extnValue,El))}),!I)throw new Error("Certificate did not contain subjectAltName extension (TPM)");if(!((v=I[0].directoryName)!=null&&v[0].length))throw new Error("Certificate subjectAltName extension directoryName was empty (TPM)");const{tcgAtTpmManufacturer:D,tcgAtTpmModel:h,tcgAtTpmVersion:k}=P3(I[0].directoryName);if(!D||!h||!k)throw new Error("Certificate contained incomplete subjectAltName data (TPM)");if(!T)throw new Error("Certificate did not contain ExtendedKeyUsage extension (TPM)");if(!T3[D])throw new Error(`Could not match TPM manufacturer "${D}" (TPM)`);if(T[0]!=="2.23.133.8.3")throw new Error(`Unexpected extKeyUsage "${T[0]}", expected "2.23.133.8.3" (TPM)`);const re=await Dc.getStatement(e);if(re)try{await Cc({statement:re,credentialPublicKey:i,x5c:y,attestationStatementAlg:u})}catch($){const Y=$;throw new Error(`${Y.message} (TPM)`)}else try{await mi(y.map(pn),s)}catch($){const Y=$;throw new Error(`${Y.message} (TPM)`)}return hi({signature:c,data:x,x509Certificate:y[0],hashAlgorithm:u})}function P3(t){const e="2.23.133.2.1",r="2.23.133.2.2",n="2.23.133.2.3";let i,o,s;return t.forEach(a=>{a.forEach(c=>{c.type===e?i=c.value.toString():c.type===r?o=c.value.toString():c.type===n&&(s=c.value.toString())})}),{tcgAtTpmManufacturer:i,tcgAtTpmModel:o,tcgAtTpmVersion:s}}function F3(t){if(t==="TPM_ALG_SHA256")return Be.ES256;if(t==="TPM_ALG_SHA384")return Be.ES384;if(t==="TPM_ALG_SHA512")return Be.ES512;throw new Error(`Unexpected TPM attested name alg ${t}`)}async function L3(t){var G;const{authData:e,clientDataHash:r,attStmt:n,credentialPublicKey:i,aaguid:o,rootCertificates:s}=t,a=n.get("x5c"),c=n.get("sig"),u=n.get("alg");if(!a)throw new Error("No attestation certificate provided in attestation statement (AndroidKey)");if(!c)throw new Error("No attestation signature provided in attestation statement (AndroidKey)");if(!u)throw new Error("Attestation statement did not contain alg (AndroidKey)");if(!Ps(u))throw new Error(`Attestation statement contained invalid alg ${u} (AndroidKey)`);const y=Rt.parse(a[0],yi),p=new Uint8Array(y.tbsCertificate.subjectPublicKeyInfo.subjectPublicKey),x=oh(i);if(!on(x,p))throw new Error("Credential public key does not equal leaf cert public key (AndroidKey)");const S=(G=y.tbsCertificate.extensions)==null?void 0:G.find(K=>K.extnID===OS);if(!S)throw new Error("Certificate did not contain extKeyStore (AndroidKey)");const C=Rt.parse(S.extnValue,Vn),{attestationChallenge:B,teeEnforced:M,softwareEnforced:N}=C;if(!on(new Uint8Array(B.buffer),r))throw new Error("Attestation challenge was not equal to client data hash (AndroidKey)");if(M.allApplications!==void 0)throw new Error('teeEnforced contained "allApplications [600]" tag (AndroidKey)');if(N.allApplications!==void 0)throw new Error('teeEnforced contained "allApplications [600]" tag (AndroidKey)');const H=await Dc.getStatement(o);if(H)try{await Cc({statement:H,credentialPublicKey:i,x5c:a,attestationStatementAlg:u})}catch(K){const q=K;throw new Error(`${q.message} (AndroidKey)`)}else try{await mi(a.map(pn),s)}catch(K){const q=K;throw new Error(`${q.message} (AndroidKey)`)}const L=gr([e,r]);return hi({signature:c,data:L,x509Certificate:a[0],hashAlgorithm:u})}async function H3(t){const{attStmt:e,authData:r,clientDataHash:n,credentialPublicKey:i,rootCertificates:o}=t,s=e.get("x5c");if(!s)throw new Error("No attestation certificate provided in attestation statement (Apple)");try{await mi(s.map(pn),o)}catch(M){const N=M;throw new Error(`${N.message} (Apple)`)}const a=Rt.parse(s[0],yi),{extensions:c,subjectPublicKeyInfo:u}=a.tbsCertificate;if(!c)throw new Error("credCert missing extensions (Apple)");const y=c.find(M=>M.extnID==="1.2.840.113635.100.8.2");if(!y)throw new Error('credCert missing "1.2.840.113635.100.8.2" extension (Apple)');const p=gr([r,n]),x=await Yi(p),S=new Uint8Array(y.extnValue.buffer).slice(6);if(!on(x,S))throw new Error("credCert nonce was not expected value (Apple)");const C=oh(i),B=new Uint8Array(u.subjectPublicKey);if(!on(C,B))throw new Error("Credential public key does not equal credCert public key (Apple)");return!0}async function $3(t){const{response:e,expectedChallenge:r,expectedOrigin:n,expectedRPID:i,expectedType:o,requireUserVerification:s=!0,supportedAlgorithmIDs:a=l3}=t,{id:c,rawId:u,type:y,response:p}=e;if(!c)throw new Error("Missing credential ID");if(c!==u)throw new Error("Credential ID was not base64url-encoded");if(y!=="public-key")throw new Error(`Unexpected credential type ${y}, expected "public-key"`);const x=ay(p.clientDataJSON),{type:S,origin:C,challenge:B,tokenBinding:M}=x;if(Array.isArray(o)){if(!o.includes(S)){const h=o.join(", ");throw new Error(`Unexpected registration response type "${S}", expected one of: ${h}`)}}else if(o){if(S!==o)throw new Error(`Unexpected registration response type "${S}", expected "${o}"`)}else if(S!=="webauthn.create")throw new Error(`Unexpected registration response type: ${S}`);if(typeof r=="function"){if(!await r(B))throw new Error(`Custom challenge verifier returned false for registration response challenge "${B}"`)}else if(B!==r)throw new Error(`Unexpected registration response challenge "${B}", expected "${r}"`);if(Array.isArray(n)){if(!n.includes(C))throw new Error(`Unexpected registration response origin "${C}", expected one of: ${n.join(", ")}`)}else if(C!==n)throw new Error(`Unexpected registration response origin "${C}", expected "${n}"`);if(M){if(typeof M!="object")throw new Error(`Unexpected value for TokenBinding "${M}"`);if(["present","supported","not-supported"].indexOf(M.status)<0)throw new Error(`Unexpected tokenBinding.status value of "${M.status}"`)}const N=Tn(p.attestationObject),H=zS(N),L=H.get("fmt"),G=H.get("authData"),K=H.get("attStmt"),q=ly(G),{aaguid:Q,rpIdHash:Z,flags:ee,credentialID:se,counter:ne,credentialPublicKey:ie,extensionsData:b}=q;let f;if(i){let h=[];typeof i=="string"?h=[i]:h=i,f=await py(Z,h)}if(!ee.up)throw new Error("User not present during registration");if(s&&!ee.uv)throw new Error("User verification required, but user could not be verified");if(!se)throw new Error("No credential ID was provided by authenticator");if(!ie)throw new Error("No public key was provided by authenticator");if(!Q)throw new Error("No AAGUID was present during registration");const g=Bc(ie).get(Se.alg);if(typeof g!="number")throw new Error("Credential public key was missing numeric alg");if(!a.includes(g)){const h=a.join(", ");throw new Error(`Unexpected public key alg "${g}", expected one of "${h}"`)}const m=await Yi(Tn(p.clientDataJSON)),E=$o.getRootCertificates({identifier:L}),I={aaguid:Q,attStmt:K,authData:G,clientDataHash:m,credentialID:se,credentialPublicKey:ie,rootCertificates:E,rpIdHash:Z};let T=!1;if(L==="fido-u2f")T=await A3(I);else if(L==="packed")T=await I3(I);else if(L==="android-safetynet")T=await M3(I);else if(L==="android-key")T=await L3(I);else if(L==="tpm")T=await O3(I);else if(L==="apple")T=await H3(I);else if(L==="none"){if(K.size>0)throw new Error("None attestation had unexpected attestation statement");T=!0}else throw new Error(`Unsupported Attestation Format: ${L}`);const D={verified:T};if(D.verified){const{credentialDeviceType:h,credentialBackedUp:k}=dy(ee);D.registrationInfo={fmt:L,counter:ne,aaguid:sy(Q),credentialID:qr(se),credentialPublicKey:ie,credentialType:y,attestationObject:N,userVerified:ee.uv,credentialDeviceType:h,credentialBackedUp:k,origin:x.origin,rpID:f,authenticatorExtensionResults:b}}return D}async function V3(t){const{allowCredentials:e,challenge:r=await hy(),timeout:n=6e4,userVerification:i="preferred",extensions:o,rpID:s}=t;let a=r;return typeof a=="string"&&(a=Fs(a)),{rpId:s,challenge:qr(a),allowCredentials:e==null?void 0:e.map(c=>{if(!ws(c.id))throw new Error(`excludeCredential id "${c.id}" is not a valid base64url string`);return{...c,id:th(c.id),type:"public-key"}}),timeout:n,userVerification:i,extensions:o}}async function j3(t){const{response:e,expectedChallenge:r,expectedOrigin:n,expectedRPID:i,expectedType:o,authenticator:s,requireUserVerification:a=!0,advancedFIDOConfig:c}=t,{id:u,rawId:y,type:p,response:x}=e;if(!u)throw new Error("Missing credential ID");if(u!==y)throw new Error("Credential ID was not base64url-encoded");if(p!=="public-key")throw new Error(`Unexpected credential type ${p}, expected "public-key"`);if(!e)throw new Error("Credential missing response");if(typeof(x==null?void 0:x.clientDataJSON)!="string")throw new Error("Credential response clientDataJSON was not a string");const S=ay(x.clientDataJSON),{type:C,origin:B,challenge:M,tokenBinding:N}=S;if(Array.isArray(o)){if(!o.includes(C)){const g=o.join(", ");throw new Error(`Unexpected authentication response type "${C}", expected one of: ${g}`)}}else if(o){if(C!==o)throw new Error(`Unexpected authentication response type "${C}", expected "${o}"`)}else if(C!=="webauthn.get")throw new Error(`Unexpected authentication response type: ${C}`);if(typeof r=="function"){if(!await r(M))throw new Error(`Custom challenge verifier returned false for registration response challenge "${M}"`)}else if(M!==r)throw new Error(`Unexpected authentication response challenge "${M}", expected "${r}"`);if(Array.isArray(n)){if(!n.includes(B)){const g=n.join(", ");throw new Error(`Unexpected authentication response origin "${B}", expected one of: ${g}`)}}else if(B!==n)throw new Error(`Unexpected authentication response origin "${B}", expected "${n}"`);if(!ws(x.authenticatorData))throw new Error("Credential response authenticatorData was not a base64url string");if(!ws(x.signature))throw new Error("Credential response signature was not a base64url string");if(x.userHandle&&typeof x.userHandle!="string")throw new Error("Credential response userHandle was not a string");if(N){if(typeof N!="object")throw new Error("ClientDataJSON tokenBinding was not an object");if(["present","supported","notSupported"].indexOf(N.status)<0)throw new Error(`Unexpected tokenBinding status ${N.status}`)}const H=Tn(x.authenticatorData),L=ly(H),{rpIdHash:G,flags:K,counter:q,extensionsData:Q}=L;let Z=[];typeof i=="string"?Z=[i]:Z=i;const ee=await py(G,Z);if(c!==void 0){const{userVerification:g}=c;if(g==="required"&&!K.uv)throw new Error("User verification required, but user could not be verified")}else{if(!K.up)throw new Error("User not present during authentication");if(a&&!K.uv)throw new Error("User verification required, but user could not be verified")}const se=await Yi(Tn(x.clientDataJSON)),ne=gr([H,se]),ie=Tn(x.signature);if((q>0||s.counter>0)&&q<=s.counter)throw new Error(`Response counter value ${q} was lower than expected ${s.counter}`);const{credentialDeviceType:b,credentialBackedUp:f}=dy(K);return{verified:await hi({signature:ie,data:ne,credentialPublicKey:s.credentialPublicKey}),authenticationInfo:{newCounter:q,credentialID:s.credentialID,userVerified:K.uv,credentialDeviceType:b,credentialBackedUp:f,authenticatorExtensionResults:Q,origin:S.origin,rpID:ee}}}async function z3(t){var a,c,u,y;const e=await d3({rpName:dh.APP_NAME,rpID:window.location.hostname,userName:t||dh.APP_NAME+" User",attestationType:"none",authenticatorSelection:{residentKey:"preferred",userVerification:"preferred",authenticatorAttachment:"platform"}}),r=await VE(e),n=await $3({response:r,expectedChallenge:e.challenge,expectedOrigin:window.location.origin,expectedRPID:window.location.hostname}),i=(a=n.registrationInfo)==null?void 0:a.credentialID;r.rawId!==i&&console.log("Warning! The raw ID does not match the credential ID.");const o=Pe.Buffer.from(q3(i)).toString("hex"),{publicKeyJwk:s}=Og((c=n.registrationInfo)==null?void 0:c.credentialPublicKey);return{authData:(u=n.registrationInfo)==null?void 0:u.attestationObject,credIdHex:o,publicKeyJwk:s,publicKeyBytes:(y=n.registrationInfo)==null?void 0:y.credentialPublicKey}}class K3{constructor(){ze(this,"authenticatorData");ze(this,"challenge");ze(this,"clientDataJsonBase64Url");ze(this,"signature")}async createJwtSimplewebauthn(e,r,n,i=1){const o=ia(Pe.Buffer.from(n,"hex").buffer),s=Math.floor(Date.now()/1e3),a=Math.floor(Date.now()/1e3)+i*60,c={...r,exp:a,iat:s,iss:e};this.challenge=new Uint8Array(Pe.Buffer.from(JSON.stringify(c)));const u=await V3({challenge:this.challenge,rpID:window.location.hostname,allowCredentials:[{id:o}]}),y=await KE(u),p=y.response.authenticatorData;this.authenticatorData=Pe.Buffer.from(y.response.authenticatorData,"base64").buffer,this.clientDataJsonBase64Url=y.response.clientDataJSON,this.signature=y.response.signature;const x={typ:"JWANT",alg:"ES256"},S=Pe.Buffer.from(JSON.stringify(x)).toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),C={AuthenticationDataB64URL:p,ClientDataJSONB64URL:this.clientDataJsonBase64Url,exp:a,iat:s,iss:e},B=JSON.stringify(C),M=Pe.Buffer.from(B).toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),N=y.response.signature;return S+"."+M+"."+N}async createJwtNavigator(e,r,n,i=1){const o=Math.floor(Date.now()/1e3),s=Math.floor(Date.now()/1e3)+i*60,a={...r,exp:s,iat:o,iss:e},c=JSON.stringify(a),u=Pe.Buffer.from(c),y=Pe.Buffer.from(n,"hex");this.challenge=new Uint8Array(u);const p={publicKey:{allowCredentials:[{id:y,type:"public-key"}],challenge:this.challenge.buffer,rpID:window.location.hostname,userVerification:"preferred"}},x=await navigator.credentials.get(p);this.authenticatorData=x==null?void 0:x.response.authenticatorData;const S=ia(this.authenticatorData);this.clientDataJsonBase64Url=ia(x==null?void 0:x.response.clientDataJSON);const C={typ:"JWANT",alg:"ES256"},B=Pe.Buffer.from(JSON.stringify(C)).toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),M={AuthenticationDataB64URL:S,ClientDataJSONB64URL:this.clientDataJsonBase64Url,exp:s,iat:o,iss:e},N=JSON.stringify(M),H=Pe.Buffer.from(N).toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),L=Pe.Buffer.from(x==null?void 0:x.response.signature).toString("base64");return this.signature=L.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),B+"."+H+"."+this.signature}}async function G3(t,e,r){return await new K3().createJwtNavigator(t,r,e)}async function a4(t,e,r,n,i,o){const s=Pe.Buffer.from(r),a=Pe.Buffer.from(i,"base64"),c=Pe.Buffer.from(o,"base64"),u=Rg(c),y=Ju(e),p=uu(a),x=Pe.Buffer.concat([s,p]);return p256.verify(u,new Uint8Array(x),y)}async function c4(t,e,r,n,i,o){const s=Ma(Pe.Buffer.from(r)),a=Ju(e),c=ia(Pe.Buffer.from(t,"hex").buffer),u={authenticator:{credentialID:c,credentialPublicKey:a,counter:0},expectedChallenge:Ma(n),expectedOrigin:window.location.origin,expectedRPID:window.location.hostname,response:{authenticatorAttachment:"platform",clientExtensionResults:{},id:c,rawId:c,response:{authenticatorData:s,clientDataJSON:i,signature:o},type:"public-key"}};return(await j3(u)).verified}async function f4(t,e,r,n,i,o){const s=Pe.Buffer.from(r),a=Pe.Buffer.from(i,"base64"),c=Pe.Buffer.from(o,"base64"),u=Rg(c),y=uu(a),p=Pe.Buffer.concat([s,y]);return OE(p,e,u)}function ia(t){const e=new Uint8Array(t);let r="";for(const i of e)r+=String.fromCharCode(i);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function q3(t){const e=t.replace(/-/g,"+").replace(/_/g,"/"),r=(4-e.length%4)%4,n=e.padEnd(e.length+r,"="),i=atob(n),o=new ArrayBuffer(i.length),s=new Uint8Array(o);for(let a=0;a(t.Home="HOME",t.Discover="DISCOVER",t.Create="CREATE",t.Contact="CONTACT",t.Account="ACCOUNT",t))(gy||{});const W3="The data you send will be visible to the world -- except: your IDs and the IDs of anyone you tag will stay private, only visible to them and others you explicitly allow.",J3="shared-photo-base64",Y3={BTC:"BTC",BX:"BX",ETH:"ETH",HUR:"Hours",USD:"US $"},Q3={BTC:"Bitcoin",BX:"Buxbe",ETH:"Ethereum",HUR:"hours",USD:"dollars"},Z3={BTC:{name:"Bitcoin",faIcon:"bitcoin-sign"},HUR:{name:"hours",faIcon:"clock"},USD:{name:"US Dollars",faIcon:"dollar"}};function X3(t){var e;return((e=Z3[t])==null?void 0:e.faIcon)||"question"}function yy(t){return!isNaN(t)&&!isNaN(parseFloat(t))}function e8(t){return yy(t)?+t:0}const t8=t=>t&&t.match(new RegExp(/^[A-Za-z][A-Za-z0-9+.-]+:/)),sh=t=>t==="GiveAction",wy=t=>sh(t.claimType),r8=t=>t.startsWith("did:peer:")?t.substring(0,11)+"..."+t.substring(27,34)+"...":t.startsWith("did:ethr:")?t.substring(0,18)+"...":t.substring(0,t.indexOf(":",4)+7)+"...",n8=(t,e,r)=>{if(r===t)return"you";const n=eu(i=>i.did==r,e);return my(n)},my=(t,e)=>(t==null?void 0:t.name)||(e?"This":"this")+" unnamed user",i8=(t,e)=>{e(),rw().copy(t).then(()=>setTimeout(e,2e3))};async function o8(t,e,r,n){const i=t+"/api/report/issuersWhoClaimedOrConfirmed?claimId="+encodeURIComponent(Ty(e)),o=await bi(n),s=await Yd.get(i,{headers:o});if(s.status===200){const a=s.data.result||[];delete a.publicUrls;const c=ph(Qi,a),u=ph(C=>C===r,c),y=u;let p=a.length-c.length;u.length===c.length&&(p=p-1);const x=s.data.result.resultVisibleToDids||[];return{confirmerIdList:y,confsVisibleToIdList:x,numConfsNotVisible:p}}else{console.error("Bad response status of",s.status,"for confirmers:",s);return}}function s8(t,e,r,n=[]){return t&&wy(e)&&!n.includes(r)&&e.issuer!==r&&!ah(e.claim)}function a8(t,e,r,n,i,o=[]){e?sh(r)?o.includes(i)?t({group:"alert",type:"info",title:"Already Confirmed",text:"You already confirmed this claim."},3e3):(n==null?void 0:n.issuerDid)==i?t({group:"alert",type:"info",title:"Cannot Confirm",text:"You cannot confirm this because you issued this claim."},3e3):ah(n==null?void 0:n.fullClaim)?t({group:"alert",type:"info",title:"Cannot Confirm",text:"You cannot confirm this because some people are hidden."},3e3):t({group:"alert",type:"info",title:"Cannot Confirm",text:"You cannot confirm this claim. There are no other details -- we can help more if you contact us and send us screenshots."},3e3):t({group:"alert",type:"info",title:"Not A Give",text:"This is not a giving action to confirm."},3e3):t({group:"alert",type:"info",title:"Not Registered",text:"Someone needs to register you before you can confirm."},3e3)}async function c8(t){return new Promise((e,r)=>{const n=new FileReader;n.onloadend=()=>e(n.result),n.onerror=r,n.readAsDataURL(t)})}function f8(t,e=512){const[r,n]=t.split(","),i=r.match(/data:(.*?);base64/),o=i?i[1]:"",s=atob(n),a=[];for(let c=0;ct.claimType==="Offer"&&!!by(t);function Gl(t,e=!1){if(Array.isArray(t)){const r={};for(let n=0;nawait(await di).accounts.count(),h8=async()=>(await(await di).accounts.toArray()).map(n=>n.did),vy=async t=>{const r=await(await di).accounts.where("did").equals(t).first();if(r){const{identity:n,mnemonic:i,...o}=r;return o}else return},d8=async()=>(await(await di).accounts.toArray()).map(r=>{const{identity:n,mnemonic:i,...o}=r;return o}),xy=async t=>await(await di).accounts.where("did").equals(t).first(),p8=async()=>await(await di).accounts.toArray(),g8=async()=>{const t=zy(),[e,r,n,i]=lh(t),o=jy(e,n,r,i),s=JSON.stringify(o);return await(await di).accounts.add({dateCreated:new Date().toISOString(),derivationPath:i,did:o.did,identity:s,mnemonic:t,publicKeyHex:o.keys[0].publicKeyHex}),await Qd({activeDid:o.did}),await Zd(o.did,{isRegistered:!1}),o.did},Ay=async t=>{const e=await z3(t),r=e.publicKeyBytes,n=FE(r),i=e.credIdHex,o={dateCreated:new Date().toISOString(),did:n,passkeyCredIdHex:i,publicKeyHex:Pe.Buffer.from(r).toString("hex")};return await(await di).accounts.add(o),o},y8=async t=>{const e=await Ay(t);return await Qd({activeDid:e.did}),await Zd(e.did,{isRegistered:!1}),e},Ey=async()=>{const t=await Xd();return((t==null?void 0:t.passkeyExpirationMinutes)??Qy)*60},w8="DAILY_CHECK",Sy="DIRECT_NOTIFICATION",m8=async(t,e)=>{const r=await Xd();let n=Zy;r!=null&&r.webPushServer&&(n=r.webPushServer);const i={...t,message:`Test, where you will see this message ${e?"un":""}filtered.`,title:e?Sy:"Your Web Push"};console.log("Sending a test web push message:",i);const o=JSON.stringify(i),s=await Yd.post(n+"/web-push/send-test",o,{headers:{"Content-Type":"application/json"}});return console.log("Got response from web push server:",s),s},l4=Object.freeze(Object.defineProperty({__proto__:null,DAILY_CHECK_TITLE:w8,DIRECT_PUSH_TITLE:Sy,OnboardPage:gy,PRIVACY_MESSAGE:W3,SHARED_PHOTO_BASE64_KEY:J3,UNIT_LONG:Q3,UNIT_SHORT:Y3,base64ToBlob:f8,blobToBase64:c8,canFulfillOffer:l8,doCopyTwoSecRedo:i8,findAllVisibleToDids:Gl,generateSaveAndActivateIdentity:g8,getPasskeyExpirationSeconds:Ey,iconForUnitCode:X3,isGiveAction:wy,isGiveClaimType:sh,isGiveRecordTheUserCanConfirm:s8,isGlobalUri:t8,isNumeric:yy,nameForContact:my,nameForDid:n8,notifyWhyCannotConfirm:a8,numberOrZero:e8,offerGiverDid:by,registerAndSavePasskey:Ay,registerSaveAndActivatePasskey:y8,retrieveAccountCount:u8,retrieveAccountDids:h8,retrieveAccountMetadata:vy,retrieveAllAccountsMetadata:d8,retrieveAllFullyDecryptedAccounts:p8,retrieveConfirmerIdList:o8,retrieveFullyDecryptedAccount:xy,sendTestThroughPushServer:m8,shortDid:r8},Symbol.toStringTag,{value:"Module"}));function b8(t){return globalThis.Buffer!=null?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function v8(t=0){var e;return((e=globalThis.Buffer)==null?void 0:e.allocUnsafe)!=null?b8(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}function x8(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n>>0,G=new Uint8Array(L);N!==H;){for(var K=C[N],q=0,Q=L-1;(K!==0||q>>0,G[Q]=K%a>>>0,K=K/a>>>0;if(K!==0)throw new Error("Non-zero carry");M=q,N++}for(var Z=L-M;Z!==L&&G[Z]===0;)Z++;for(var ee=c.repeat(B);Z>>0,L=new Uint8Array(H);C[B];){var G=r[C.charCodeAt(B)];if(G===255)return;for(var K=0,q=H-1;(G!==0||K>>0,L[q]=G%256>>>0,G=G/256>>>0;if(G!==0)throw new Error("Non-zero carry");N=K,B++}if(C[B]!==" "){for(var Q=H-N;Q!==H&&L[Q]===0;)Q++;for(var Z=new Uint8Array(M+(H-Q)),ee=M;Q!==H;)Z[ee++]=L[Q++];return Z}}}function S(C){var B=x(C);if(B)return B;throw new Error(`Non-${e} character`)}return{encode:p,decodeUnsafe:x,decode:S}}var A8=x8,E8=A8;const S8=t=>{if(t instanceof Uint8Array&&t.constructor.name==="Uint8Array")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")},B8=t=>new TextEncoder().encode(t),D8=t=>new TextDecoder().decode(t);class C8{constructor(e,r,n){this.name=e,this.prefix=r,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class I8{constructor(e,r,n){if(this.name=e,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return By(this,e)}}class M8{constructor(e){this.decoders=e}or(e){return By(this,e)}decode(e){const r=e[0],n=this.decoders[r];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const By=(t,e)=>new M8({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class _8{constructor(e,r,n,i){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new C8(e,r,n),this.decoder=new I8(e,r,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const Ic=({name:t,prefix:e,encode:r,decode:n})=>new _8(t,e,r,n),Ls=({prefix:t,name:e,alphabet:r})=>{const{encode:n,decode:i}=E8(r,e);return Ic({prefix:t,name:e,encode:n,decode:o=>S8(i(o))})},k8=(t,e,r,n)=>{const i={};for(let y=0;y=8&&(a-=8,s[u++]=255&c>>a)}if(a>=r||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return s},T8=(t,e,r)=>{const n=e[e.length-1]==="=",i=(1<r;)s-=r,o+=e[i&a>>s];if(s&&(o+=e[i&a<Ic({prefix:e,name:t,encode(i){return T8(i,n,r)},decode(i){return k8(i,n,r,t)}}),N8=Ls({prefix:"9",name:"base10",alphabet:"0123456789"}),R8=Object.freeze(Object.defineProperty({__proto__:null,base10:N8},Symbol.toStringTag,{value:"Module"})),U8=$t({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),O8=$t({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),P8=Object.freeze(Object.defineProperty({__proto__:null,base16:U8,base16upper:O8},Symbol.toStringTag,{value:"Module"})),F8=$t({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),L8=Object.freeze(Object.defineProperty({__proto__:null,base2:F8},Symbol.toStringTag,{value:"Module"})),Dy=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),H8=Dy.reduce((t,e,r)=>(t[r]=e,t),[]),$8=Dy.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);function V8(t){return t.reduce((e,r)=>(e+=H8[r],e),"")}function j8(t){const e=[];for(const r of t){const n=$8[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}const z8=Ic({prefix:"🚀",name:"base256emoji",encode:V8,decode:j8}),K8=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:z8},Symbol.toStringTag,{value:"Module"})),G8=$t({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),q8=$t({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),W8=$t({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),J8=$t({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Y8=$t({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Q8=$t({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Z8=$t({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),X8=$t({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),eB=$t({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),tB=Object.freeze(Object.defineProperty({__proto__:null,base32:G8,base32hex:Y8,base32hexpad:Z8,base32hexpadupper:X8,base32hexupper:Q8,base32pad:W8,base32padupper:J8,base32upper:q8,base32z:eB},Symbol.toStringTag,{value:"Module"})),rB=Ls({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),nB=Ls({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),iB=Object.freeze(Object.defineProperty({__proto__:null,base36:rB,base36upper:nB},Symbol.toStringTag,{value:"Module"})),oB=Ls({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),sB=Ls({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),aB=Object.freeze(Object.defineProperty({__proto__:null,base58btc:oB,base58flickr:sB},Symbol.toStringTag,{value:"Module"})),cB=$t({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),fB=$t({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),lB=$t({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),uB=$t({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),hB=Object.freeze(Object.defineProperty({__proto__:null,base64:cB,base64pad:fB,base64url:lB,base64urlpad:uB},Symbol.toStringTag,{value:"Module"})),dB=$t({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),pB=Object.freeze(Object.defineProperty({__proto__:null,base8:dB},Symbol.toStringTag,{value:"Module"})),gB=Ic({prefix:"\0",name:"identity",encode:t=>D8(t),decode:t=>B8(t)}),yB=Object.freeze(Object.defineProperty({__proto__:null,identity:gB},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;const $d={...yB,...L8,...pB,...R8,...P8,...tB,...iB,...aB,...hB,...K8};function Cy(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const Vd=Cy("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),xf=Cy("ascii","a",t=>{let e="a";for(let r=0;r{t=t.substring(1);const e=v8(t.length);for(let r=0;r{const e=/^did:ethr:(0x[0-9a-fA-F]{40})$/,r=t.match(e);if(r){const i=r[1];return{didDocumentMetadata:{},didResolutionMetadata:{contentType:"application/did+ld+json"},didDocument:{"@context":["https://www.w3.org/ns/did/v1","https://w3id.org/security/suites/secp256k1recovery-2020/v2"],id:t,verificationMethod:[{id:`${t}#controller`,type:"EcdsaSecp256k1RecoveryMethod2020",controller:t,blockchainAccountId:"eip155:1:"+i}],authentication:[`${t}#controller`],assertionMethod:[`${t}#controller`]}}}throw new Error(`Unsupported DID format: ${t}`)},u4="did:ethr:";new X2({ethr:bB});function h4(t){return!!(t!=null&&t.passkeyCredIdHex)}async function vB(t,e,r){if(t!=null&&t.identity){const i=JSON.parse(t.identity).keys[0].privateKeyHex,o=await xB(i),s={issuer:t.did,signer:o,expiresIn:void 0};return r&&(s.expiresIn=r),vA(e,s)}else{if(t!=null&&t.passkeyCredIdHex)return G3(t.did,t.passkeyCredIdHex,e);throw new Error("No identity data found to sign for DID "+t.did)}}function xB(t){const e=gA(hA(t),!0);return async r=>{const n=await e(r);return AB(n)}}function AB(t){const e=Su(t);if(e.length<64||e.length>65)throw new TypeError(`Wrong size for signature. Expected 64 or 65 bytes, but got ${e.length}`);const r=jd(e.slice(0,32)),n=jd(e.slice(32,64)),i=e.length===65?e[64]:void 0;return{r,s:n,recoveryParam:i}}function jd(t){return mB(t,"base16")}function d4(t){return Bp(t)}const jn="https://schema.org",Iy="endorser.ch",EB="name,did,pubKeyBase64,seesMe,registered",Ra="/contact-import/",ql="/contacts?contactJwt=",Wl="/contact?jwt=",Jl="https://endorser.ch/entity/",SB={claim:{"@type":""},handleId:"",id:"",issuedAt:"",issuer:""},My="did:none:HIDDEN";function _y(t){return t.startsWith("did:")}function Qi(t){return t===My}function ky(t){return!t||t===My}function Ua(t,e){if(Object.prototype.toString.call(e)==="[object String]")return t(e);if(e instanceof Object){if(Array.isArray(e)){for(const r of e)if(Ua(t,r))return!0}else for(const r in e)if(Ua(t,e[r]))return!0;return!1}else return!1}function ah(t){return Ua(Qi,t)}const BB=t=>Ua(e=>_y(e)&&!Qi(e),t);function Ty(t){return t&&t.startsWith(Jl)?t.substring(Jl.length):t}function Ny(t){return t["@context"]===jn?n0(["@context"],t):t}function Ry(t,e,r){if(!t.identifier&&e){const n=os(t);return n.lastClaimId=e,n}else if(!t.identifier&&r){const n=os(t);return n.identifier=r,n}else return t}function Oa(t){if(t instanceof Object){if(Array.isArray(t))return fw(Oa,t);{const e={};for(const r in t)r.endsWith("VisibleToDids")||(e[r]=Oa(os(t[r])));return e}}else return t}function Mc(t,e){return ky(t)?void 0:eu(r=>r.did===t,e)}function _c(t,e,r,n=[],i=!1){return t?t===e?{displayName:"You",known:!0}:r?{displayName:r.name||"Contact With No Name",known:!0,profileImageUrl:r.profileImageUrl}:eu(t0(t),n)?{displayName:"You (Alt ID)",known:!0}:Qi(t)?{displayName:"Someone Outside Your View",known:!1}:{displayName:i?t:"Someone Visible But Not In Your Contact List",known:!1}:{displayName:"Someone Unnamed/Unknown",known:!1}}function DB(t,e,r,n){const i=Mc(t,n);return _c(t,e,i,r)}function An(t,e,r,n){const i=Mc(t,n);return _c(t,e,i,r).displayName}function CB(t,e){return _c(t,void 0,Mc(t,e),[],!0).displayName}let is="",vs=0;function IB(){is="",vs=0}function MB(){return!is||vsDate.now()/1e3)i=is;else{i=await Zl(t),is=i;const s=await Ey();vs=Date.now()/1e3+s}else i=await Zl(t);n.Authorization="Bearer "+i}catch(i){Xy("Something failed in getHeaders call (will proceed anonymously"+(e?" and notify user":"")+"): "+i,!0),e&&e({group:"alert",type:"danger",title:"Personal Data Error",text:r||"Showing anonymous data. See the Help page for help with personal data."},3e3)}return n}const Yl=new Hf({max:500});async function _B(t,e,r,n){var o,s;if(!t)return;let i=Yl.get(t);if(!i){const a=r+"/api/v2/report/plans?handleId="+encodeURIComponent(t),c=await bi(n);try{const u=await e.get(a,{headers:c});u.status===200&&((s=(o=u.data)==null?void 0:o.data)==null?void 0:s.length)>0?(i=u.data.data[0],Yl.set(t,i)):console.info("[EndorserServer] Plan cache is empty for handle",t," Got data:",JSON.stringify(u.data))}catch(u){console.error("[EndorserServer] Failed to load plan with handle",t," Got error:",JSON.stringify(u))}}return i}async function kB(t,e){Yl.set(t,e)}function Uy(t){var e,r,n;return(n=(r=(e=t==null?void 0:t.response)==null?void 0:e.data)==null?void 0:r.error)==null?void 0:n.message}function TB(t){var i;let e=""+t;try{e=JSON.stringify(t)}catch{}let r=""+t+" - JSON: "+e;const n=JSON.stringify(t.response);if(!vw(n)&&!r.includes(n))if(t0(t==null?void 0:t.config,(i=t==null?void 0:t.response)==null?void 0:i.config)){const o=JSON.stringify(n0(["config"],t.response));r+=" - .response w/o same config JSON: "+o}else r+=" - .response JSON: "+n;return r}async function NB(t,e,r,n,i){let o=`${e}/api/v2/report/offers?recipientDid=${r}`;n&&(o+="&afterId="+n),i&&(o+="&beforeId="+i);const s=await bi(r);return(await t.get(o,{headers:s})).data}async function RB(t,e,r,n,i){let o=`${e}/api/v2/report/offersToPlansOwnedByMe`;n&&(o+="?afterId="+n),i&&(o+=n?"&":"?",o+="beforeId="+i);const s=await bi(r);return(await t.get(o,{headers:s})).data}function ch(t,e,r,n,i,o,s,a,c=!1,u,y,p){const x=t?os(t):{"@context":jn,"@type":"GiveAction"};return p&&(x.lastClaimId=p,delete x.identifier),x.agent=e?{identifier:e}:void 0,x.recipient=r?{identifier:r}:void 0,x.description=n||void 0,x.object=i&&!isNaN(i)?{amountOfThisGood:i,unitCode:o||"HUR"}:void 0,Array.isArray(x.fulfills)||(x.fulfills=x.fulfills?[x.fulfills]:[]),x.fulfills=x.fulfills.filter(S=>S["@type"]!=="PlanAction"),s&&x.fulfills.push({"@type":"PlanAction",identifier:s}),x.fulfills=x.fulfills.filter(S=>S["@type"]!=="Offer"),a&&x.fulfills.push({"@type":"Offer",identifier:a}),x.fulfills=x.fulfills.filter(S=>S["@type"]!=="DonateAction"&&S["@type"]!=="TradeAction"),x.fulfills.push({"@type":c?"TradeAction":"DonateAction"}),x.image=u||void 0,x.provider=y?{"@type":"PlanAction",identifier:y}:void 0,x}async function UB(t,e,r,n,i,o,s,a,c,u,y=!1,p,x){const S=ch(void 0,n,i,o,s,a,c,u,y,p,x,void 0);return Vo(S,r,e,t)}async function OB(t,e,r,n,i,o,s,a,c,u,y,p=!1,x,S){const C=ch(r.claim,i,o,s,a,c,u,y,p,x,S,r.id);return Vo(C,n,e,t)}function fh(t,e,r,n,i,o,s,a,c,u){const y=t?os(t):{"@context":jn,"@type":"Offer"};return u&&(y.lastClaimId=u,delete y.identifier),y.offeredBy=e?{identifier:e}:void 0,y.recipient=r?{identifier:r}:void 0,y.description=s||void 0,y.includesObject=i&&!isNaN(i)?{amountOfThisGood:i,unitCode:o||"HUR"}:void 0,(n||a)&&(y.itemOffered=y.itemOffered||{},y.itemOffered.description=n||void 0,a&&(y.itemOffered.isPartOf={"@type":"PlanAction",identifier:a})),y.validThrough=c||void 0,y}async function PB(t,e,r,n,i,o,s,a,c,u){const y=fh(void 0,r,c,n,i,o,s,u,a,void 0);return Vo(y,r,e,t)}async function FB(t,e,r,n,i,o,s,a,c,u,y){const p=fh(r.claim,n,u,i,o,s,a,y,c,r.id);return Vo(p,n,e,t)}const LB=async(t,e,r,n,i,o)=>{const s=Ny(Oa(Ry(e,r,n)));return Vo({"@context":jn,"@type":"AgreeAction",object:s},t,i,o)};async function Vo(t,e,r,n){try{const o=await jo(e,{vc:{"@context":["https://www.w3.org/2018/credentials/v1"],type:["VerifiableCredential"],credentialSubject:t}}),s=JSON.stringify({jwtEncoded:o}),a=`${r}/api/v2/claim`;return{type:"success",response:await n.post(a,s,{headers:{"Content-Type":"application/json"}})}}catch(i){return console.error("Error submitting claim:",i),{type:"error",error:{error:Uy(i)||i.message||"Got some error submitting the claim. Check your permissions, network, and error logs."}}}}async function HB(t,e,r,n,i){const o=t.publicKeyHex,s=Pe.Buffer.from(o,"hex").toString("base64"),a={iat:Date.now(),iss:t.did,own:{did:t.did,name:r??"",publicEncKey:s,registered:!!e}};if(n&&(a.own.profileImageUrl=n),i&&(t!=null&&t.mnemonic)&&(t!=null&&t.derivationPath)){const y=Ky(t.derivationPath),p=lh(t.mnemonic,y)[2],x=Pe.Buffer.from(p,"hex"),S=uu(x),C=Pe.Buffer.from(S).toString("base64");a.own.nextPublicEncKeyHash=C}const c=await jo(t.did,a);return tw+Ra+c}async function jo(t,e,r){const n=await xy(t);return vB(n,e,r)}const Oy=t=>t&&t["@context"]===jn&&t["@type"]==="AcceptAction",Py=t=>t&&t["@context"]===jn&&t["@type"]==="Offer";function Fy(t,e){return t==="HUR"?e?"hour":"hours":t}function Ql(t,e){return""+e+" "+Fy(t,e===1)}const Ly=t=>t?t[0].toUpperCase()+t.substr(1).replace(/([A-Z])/g," $1"):"",Af=t=>{if(!t)return"something";let e=t;if(t.claim&&(e=t.claim),Array.isArray(e))if(e.length===1)e=e[0];else return"multiple claims";const r=e["@type"];if(r){let n=Ly(r);return n==="Person"&&(n+=" claim"),"a "+n}else return"a claim"},$B=(t,e,r,n)=>{var a,c,u,y,p,x,S,C,B,M,N,H,L,G,K,q,Q;let i=t.claim;i.claim&&(i=i.claim);const o=An(t.issuer,e,r,n),s=i["@type"]||"UnknownType";if(s==="AgreeAction")return o+" agreed with "+Af(i.object);if(Oy(i))return o+" accepted "+Af(i.object);if(s==="GiveAction"){const Z=((a=i.agent)==null?void 0:a.identifier)||((c=i.agent)==null?void 0:c.did),ee=An(Z,e,r,n);let se=(u=i.object)!=null&&u.amountOfThisGood?Ql(i.object.unitCode,i.object.amountOfThisGood):"";i.description&&(se&&(se=se+", and also: "),se=se+i.description),se||(se="something not described");const ne=((y=i.recipient)==null?void 0:y.identifier)||((p=i.recipient)==null?void 0:p.did),ie=ne?" to "+An(ne,e,r,n):"";return ee+" gave"+ie+": "+se}else if(s==="JoinAction"){const Z=((x=i.agent)==null?void 0:x.identifier)||((S=i.agent)==null?void 0:S.did),ee=An(Z,e,r,n);let se=i.event&&i.event.organizer&&i.event.organizer.name;se=se||"";let ne=i.event&&i.event.name;ne=ne?" "+ne:"";let ie=se+ne;ie=ie?" attended the "+ie:"";let b=i.event&&i.event.startTime;return b=b?" at "+b:"",ee+ie+b}else if(Py(i)){const Z=(C=i.offeredBy)==null?void 0:C.identifier,ee=An(Z,e,r,n);let se="";i.includesObject&&(se+=" "+Ql(i.includesObject.unitCode,i.includesObject.amountOfThisGood)),(B=i.itemOffered)!=null&&B.description&&(se+=", saying: "+((M=i.itemOffered)==null?void 0:M.description));const ne=((N=i.recipient)==null?void 0:N.identifier)||((H=i.recipient)==null?void 0:H.did),ie=ne?" to "+An(ne,e,r,n):"";return ee+" offered"+se+ie}else if(s==="PlanAction"){const Z=((L=i.agent)==null?void 0:L.identifier)||t.issuer;return An(Z,e,r,n)+" announced a project: "+i.name}else if(s==="Tenure"){const Z=((G=i.party)==null?void 0:G.identifier)||((K=i.party)==null?void 0:K.did),ee=An(Z,e,r,n),se=((Q=(q=i.spatialUnit)==null?void 0:q.geo)==null?void 0:Q.polygon)||"";return ee+" possesses ["+se.substring(0,se.indexOf(" "))+"...]"}else return o+" declared "+Af(i)},VB="https://endorser.ch/entity/01GXYPFF7FA03NXKPYY142PY4H",jB=(t,e)=>({"@context":jn,"@type":"JoinAction",agent:{identifier:t},event:{organizer:{name:"Bountiful Voluntaryist Community"},name:"Saturday Morning Meeting",startTime:e}});async function zB(t,e){return jo(t,{vc:{"@context":["https://www.w3.org/2018/credentials/v1"],type:["VerifiableCredential"],credentialSubject:e}})}async function Hy(t,e,r,n){const i={"@context":jn,"@type":"RegisterAction",agent:{identifier:t},object:Iy};return e&&(i.participant={identifier:e.did}),r&&(i.identifier=r),await jo(t,{vc:{"@context":["https://www.w3.org/2018/credentials/v1"],type:["VerifiableCredential"],credentialSubject:i}},n)}async function KB(t,e,r,n){var a,c,u,y;const i=await Hy(t,n),o=e+"/api/v2/claim",s=await r.post(o,{jwtEncoded:i});if((c=(a=s.data)==null?void 0:a.success)!=null&&c.handleId)return{success:!0};if((y=(u=s.data)==null?void 0:u.success)!=null&&y.embeddedRecordError){let p="There was some problem with the registration and so it may not be complete.";return typeof s.data.success.embeddedRecordError=="string"&&(p+=" "+s.data.success.embeddedRecordError),{error:p}}else return console.error(s),{error:"Got a server error when registering."}}async function GB(t,e,r,n,i,o){var u;if(!t)return{error:"Cannot set visibility without an identifier."};const s=e+"/api/report/"+(o?"canSeeMe":"cannotSeeMe"),a=await bi(t),c=JSON.stringify({did:i.did});try{const y=await r.post(s,c,{headers:a});if(y.status===200){const p=y.data.success;return p&&n.contacts.update(i.did,{seesMe:o}),{success:p}}else return console.error("Got some bad server response when setting visibility: ",y.status,y),{error:((u=y.data.error)==null?void 0:u.message)||"Got some error setting visibility."}}catch(y){return console.error("Got some error when setting visibility:",y),{error:"Check connectivity and try again."}}}async function qB(t,e,r){const n=`${t}/api/report/rateLimits`,i=await bi(r);return await e.get(n,{headers:i})}async function WB(t,e){const r=ew+"/image-limits",n=await bi(e);return await t.get(r,{headers:n})}const p4=Object.freeze(Object.defineProperty({__proto__:null,BLANK_GENERIC_SERVER_RECORD:SB,BVC_MEETUPS_PROJECT_CLAIM_ID:VB,CONTACT_CSV_HEADER:EB,CONTACT_IMPORT_CONFIRM_URL_PATH_TIME_SAFARI:Ra,CONTACT_IMPORT_ONE_URL_PATH_TIME_SAFARI:ql,CONTACT_URL_PATH_ENDORSER_CH_OLD:Wl,ENDORSER_CH_HANDLE_PREFIX:Jl,SCHEMA_ORG_CONTEXT:jn,SERVICE_ID:Iy,addLastClaimOrHandleAsIdIfMissing:Ry,bvcMeetingJoinClaim:jB,capitalizeAndInsertSpacesBeforeCaps:Ly,claimSpecialDescription:$B,clearPasskeyToken:IB,contactForDid:Mc,containsHiddenDid:ah,containsNonHiddenDid:BB,createAndSubmitClaim:Vo,createAndSubmitConfirmation:LB,createAndSubmitGive:UB,createAndSubmitOffer:PB,createEndorserJwtForDid:jo,createEndorserJwtVcFromClaim:zB,createInviteJwt:Hy,currencyShortWordForCode:Fy,didInfo:An,didInfoForCertificate:CB,didInfoForContact:_c,didInfoObject:DB,displayAmount:Ql,editAndSubmitGive:OB,editAndSubmitOffer:FB,errorStringForLog:TB,fetchEndorserRateLimits:qB,fetchImageRateLimits:WB,generateEndorserJwtUrlForAccount:HB,getHeaders:bi,getNewOffersToUser:NB,getNewOffersToUserProjects:RB,getPlanFromCache:_B,hydrateGive:ch,hydrateOffer:fh,isAccept:Oy,isDid:_y,isEmptyOrHiddenDid:ky,isHiddenDid:Qi,isOffer:Py,register:KB,removeSchemaContext:Ny,removeVisibleToDids:Oa,serverMessageForUser:Uy,setPlanInCache:kB,setVisibilityUtil:GB,stripEndorserPrefix:Ty,tokenExpiryTimeDescription:MB},Symbol.toStringTag,{value:"Module"}));function JB(t){return"did:ethr"}const zd=JB(),$y="m/84737769'/0'/0'/0'",Vy="local",jy=(t,e,r,n)=>({did:zd+":"+t,keys:[{kid:e,kms:Vy,meta:{derivationPath:n},privateKeyHex:r,publicKeyHex:e,type:"Secp256k1"}],provider:zd,services:[]}),lh=(t,e=$y)=>{t=t.trim().toLowerCase();const n=Sn.fromMnemonic(t).derivePath(e),i=n.privateKey.substring(2),o=n.publicKey.substring(2);return[n.address,i,o,e]},YB=t=>a0(t),zy=()=>{const t=a0(32);return cm(t,fm)},Zl=async t=>{if(t){const e=Math.floor(Date.now()/1e3),n={exp:e+60,iat:e,iss:t};return jo(t,n)}else return""},QB=t=>{let e=t;const r=e.indexOf(Ra);r>-1&&(e=e.substring(r+Ra.length));const n=e.indexOf(ql);n>-1&&(e=e.substring(n+ql.length));const i=e.indexOf(Wl);return i>-1&&(e=e.substring(i+Wl.length)),e},Ky=t=>{let e=t.split("/").slice(-1)[0];e.endsWith("'")&&(e=e.slice(0,-1));const i=(parseInt(e,10)+1).toString()+(e.endsWith("'")?"'":"");return t.split("/").slice(0,-1).concat([i]).join("/")};function Ef(t){const e=atob(t),r=new Uint8Array(e.length);for(let n=0;n"u"||e===null}function Sn(e){return typeof e=="object"&&e!==null}function En(e){return Array.isArray(e)?e:_e(e)?[]:[e]}function bn(e,n){var i,l,r,u;if(n)for(u=Object.keys(n),i=0,l=u.length;if&&(u=" ... ",n=l-f+u.length),i-l>f&&(o=" ...",i=l+f-o.length),{str:u+e.slice(n,i).replace(/\t/g,"→")+o,pos:l-n+u.length}}function Q(e,n){return y.repeat(" ",n-e.length)+e}function Mn(e,n){if(n=Object.create(n||null),!e.buffer)return null;n.maxLength||(n.maxLength=79),typeof n.indent!="number"&&(n.indent=1),typeof n.linesBefore!="number"&&(n.linesBefore=3),typeof n.linesAfter!="number"&&(n.linesAfter=2);for(var i=/\r?\n|\r|\0/g,l=[0],r=[],u,o=-1;u=i.exec(e.buffer);)r.push(u.index),l.push(u.index+u[0].length),e.position<=u.index&&o<0&&(o=l.length-2);o<0&&(o=l.length-1);var f="",c,a,t=Math.min(e.line+n.linesAfter,r.length).toString().length,p=n.maxLength-(n.indent+t+3);for(c=1;c<=n.linesBefore&&!(o-c<0);c++)a=$(e.buffer,l[o-c],r[o-c],e.position-(l[o]-l[o-c]),p),f=y.repeat(" ",n.indent)+Q((e.line-c+1).toString(),t)+" | "+a.str+` -`+f;for(a=$(e.buffer,l[o],r[o],e.position,p),f+=y.repeat(" ",n.indent)+Q((e.line+1).toString(),t)+" | "+a.str+` -`,f+=y.repeat("-",n.indent+t+3+a.pos)+`^ -`,c=1;c<=n.linesAfter&&!(o+c>=r.length);c++)a=$(e.buffer,l[o+c],r[o+c],e.position-(l[o]-l[o+c]),p),f+=y.repeat(" ",n.indent)+Q((e.line+c+1).toString(),t)+" | "+a.str+` -`;return f.replace(/\n$/,"")}var Dn=Mn,Yn=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Bn=["scalar","sequence","mapping"];function Pn(e){var n={};return e!==null&&Object.keys(e).forEach(function(i){e[i].forEach(function(l){n[String(l)]=i})}),n}function Hn(e,n){if(n=n||{},Object.keys(n).forEach(function(i){if(Yn.indexOf(i)===-1)throw new w('Unknown option "'+i+'" is met in definition of "'+e+'" YAML type.')}),this.options=n,this.tag=e,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(i){return i},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=Pn(n.styleAliases||null),Bn.indexOf(this.kind)===-1)throw new w('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var C=Hn;function fe(e,n){var i=[];return e[n].forEach(function(l){var r=i.length;i.forEach(function(u,o){u.tag===l.tag&&u.kind===l.kind&&u.multi===l.multi&&(r=o)}),i[r]=l}),i}function jn(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},n,i;function l(r){r.multi?(e.multi[r.kind].push(r),e.multi.fallback.push(r)):e[r.kind][r.tag]=e.fallback[r.tag]=r}for(n=0,i=arguments.length;n=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),ei=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function ni(e){return!(e===null||!ei.test(e)||e[e.length-1]==="_")}function ii(e){var n,i;return n=e.replace(/_/g,"").toLowerCase(),i=n[0]==="-"?-1:1,"+-".indexOf(n[0])>=0&&(n=n.slice(1)),n===".inf"?i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:n===".nan"?NaN:i*parseFloat(n,10)}var ri=/^[-+]?[0-9]+e/;function li(e,n){var i;if(isNaN(e))switch(n){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(n){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(n){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(y.isNegativeZero(e))return"-0.0";return i=e.toString(10),ri.test(i)?i.replace("e",".e"):i}function oi(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||y.isNegativeZero(e))}var ke=new C("tag:yaml.org,2002:float",{kind:"scalar",resolve:ni,construct:ii,predicate:oi,represent:li,defaultStyle:"lowercase"}),Ne=Te.extend({implicit:[Oe,Ie,Le,ke]}),Re=Ne,Me=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),De=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function ui(e){return e===null?!1:Me.exec(e)!==null||De.exec(e)!==null}function fi(e){var n,i,l,r,u,o,f,c=0,a=null,t,p,d;if(n=Me.exec(e),n===null&&(n=De.exec(e)),n===null)throw new Error("Date resolve error");if(i=+n[1],l=+n[2]-1,r=+n[3],!n[4])return new Date(Date.UTC(i,l,r));if(u=+n[4],o=+n[5],f=+n[6],n[7]){for(c=n[7].slice(0,3);c.length<3;)c+="0";c=+c}return n[9]&&(t=+n[10],p=+(n[11]||0),a=(t*60+p)*6e4,n[9]==="-"&&(a=-a)),d=new Date(Date.UTC(i,l,r,u,o,f,c)),a&&d.setTime(d.getTime()-a),d}function ci(e){return e.toISOString()}var Ye=new C("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:ui,construct:fi,instanceOf:Date,represent:ci});function ai(e){return e==="<<"||e===null}var Be=new C("tag:yaml.org,2002:merge",{kind:"scalar",resolve:ai}),ne=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= -\r`;function pi(e){if(e===null)return!1;var n,i,l=0,r=e.length,u=ne;for(i=0;i64)){if(n<0)return!1;l+=6}return l%8===0}function ti(e){var n,i,l=e.replace(/[\r\n=]/g,""),r=l.length,u=ne,o=0,f=[];for(n=0;n>16&255),f.push(o>>8&255),f.push(o&255)),o=o<<6|u.indexOf(l.charAt(n));return i=r%4*6,i===0?(f.push(o>>16&255),f.push(o>>8&255),f.push(o&255)):i===18?(f.push(o>>10&255),f.push(o>>2&255)):i===12&&f.push(o>>4&255),new Uint8Array(f)}function hi(e){var n="",i=0,l,r,u=e.length,o=ne;for(l=0;l>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[i&63]),i=(i<<8)+e[l];return r=u%3,r===0?(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[i&63]):r===2?(n+=o[i>>10&63],n+=o[i>>4&63],n+=o[i<<2&63],n+=o[64]):r===1&&(n+=o[i>>2&63],n+=o[i<<4&63],n+=o[64],n+=o[64]),n}function di(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Pe=new C("tag:yaml.org,2002:binary",{kind:"scalar",resolve:pi,construct:ti,predicate:di,represent:hi}),si=Object.prototype.hasOwnProperty,mi=Object.prototype.toString;function xi(e){if(e===null)return!0;var n=[],i,l,r,u,o,f=e;for(i=0,l=f.length;i>10)+55296,(e-65536&1023)+56320)}var $e=new Array(256),Qe=new Array(256);for(var L=0;L<256;L++)$e[L]=pe(L)?1:0,Qe[L]=pe(L);function ki(e,n){this.input=e,this.filename=n.filename||null,this.schema=n.schema||ie,this.onWarning=n.onWarning||null,this.legacy=n.legacy||!1,this.json=n.json||!1,this.listener=n.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Ve(e,n){var i={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return i.snippet=Dn(i),new w(n,i)}function h(e,n){throw Ve(e,n)}function K(e,n){e.onWarning&&e.onWarning.call(null,Ve(e,n))}var te={YAML:function(n,i,l){var r,u,o;n.version!==null&&h(n,"duplication of %YAML directive"),l.length!==1&&h(n,"YAML directive accepts exactly one argument"),r=/^([0-9]+)\.([0-9]+)$/.exec(l[0]),r===null&&h(n,"ill-formed argument of the YAML directive"),u=parseInt(r[1],10),o=parseInt(r[2],10),u!==1&&h(n,"unacceptable YAML version of the document"),n.version=l[0],n.checkLineBreaks=o<2,o!==1&&o!==2&&K(n,"unsupported YAML version of the document")},TAG:function(n,i,l){var r,u;l.length!==2&&h(n,"TAG directive accepts exactly two arguments"),r=l[0],u=l[1],Ge.test(r)||h(n,"ill-formed tag handle (first argument) of the TAG directive"),O.call(n.tagMap,r)&&h(n,'there is a previously declared suffix for "'+r+'" tag handle'),We.test(u)||h(n,"ill-formed tag prefix (second argument) of the TAG directive");try{u=decodeURIComponent(u)}catch{h(n,"tag prefix is malformed: "+u)}n.tagMap[r]=u}};function T(e,n,i,l){var r,u,o,f;if(n1&&(e.result+=y.repeat(` -`,n-1))}function Ni(e,n,i){var l,r,u,o,f,c,a,t,p=e.kind,d=e.result,s;if(s=e.input.charCodeAt(e.position),S(s)||N(s)||s===35||s===38||s===42||s===33||s===124||s===62||s===39||s===34||s===37||s===64||s===96||(s===63||s===45)&&(r=e.input.charCodeAt(e.position+1),S(r)||i&&N(r)))return!1;for(e.kind="scalar",e.result="",u=o=e.position,f=!1;s!==0;){if(s===58){if(r=e.input.charCodeAt(e.position+1),S(r)||i&&N(r))break}else if(s===35){if(l=e.input.charCodeAt(e.position-1),S(l))break}else{if(e.position===e.lineStart&&W(e)||i&&N(s))break;if(b(s))if(c=e.line,a=e.lineStart,t=e.lineIndent,v(e,!1,-1),e.lineIndent>=n){f=!0,s=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=c,e.lineStart=a,e.lineIndent=t;break}}f&&(T(e,u,o,!1),le(e,e.line-c),u=o=e.position,f=!1),I(s)||(o=e.position+1),s=e.input.charCodeAt(++e.position)}return T(e,u,o,!1),e.result?!0:(e.kind=p,e.result=d,!1)}function Ri(e,n){var i,l,r;if(i=e.input.charCodeAt(e.position),i!==39)return!1;for(e.kind="scalar",e.result="",e.position++,l=r=e.position;(i=e.input.charCodeAt(e.position))!==0;)if(i===39)if(T(e,l,e.position,!0),i=e.input.charCodeAt(++e.position),i===39)l=e.position,e.position++,r=e.position;else return!0;else b(i)?(T(e,l,r,!0),le(e,v(e,!1,n)),l=r=e.position):e.position===e.lineStart&&W(e)?h(e,"unexpected end of the document within a single quoted scalar"):(e.position++,r=e.position);h(e,"unexpected end of the stream within a single quoted scalar")}function Mi(e,n){var i,l,r,u,o,f;if(f=e.input.charCodeAt(e.position),f!==34)return!1;for(e.kind="scalar",e.result="",e.position++,i=l=e.position;(f=e.input.charCodeAt(e.position))!==0;){if(f===34)return T(e,i,e.position,!0),e.position++,!0;if(f===92){if(T(e,i,e.position,!0),f=e.input.charCodeAt(++e.position),b(f))v(e,!1,n);else if(f<256&&$e[f])e.result+=Qe[f],e.position++;else if((o=Oi(f))>0){for(r=o,u=0;r>0;r--)f=e.input.charCodeAt(++e.position),(o=Ti(f))>=0?u=(u<<4)+o:h(e,"expected hexadecimal character");e.result+=Li(u),e.position++}else h(e,"unknown escape sequence");i=l=e.position}else b(f)?(T(e,i,l,!0),le(e,v(e,!1,n)),i=l=e.position):e.position===e.lineStart&&W(e)?h(e,"unexpected end of the document within a double quoted scalar"):(e.position++,l=e.position)}h(e,"unexpected end of the stream within a double quoted scalar")}function Di(e,n){var i=!0,l,r,u,o=e.tag,f,c=e.anchor,a,t,p,d,s,m=Object.create(null),g,A,E,x;if(x=e.input.charCodeAt(e.position),x===91)t=93,s=!1,f=[];else if(x===123)t=125,s=!0,f={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=f),x=e.input.charCodeAt(++e.position);x!==0;){if(v(e,!0,n),x=e.input.charCodeAt(e.position),x===t)return e.position++,e.tag=o,e.anchor=c,e.kind=s?"mapping":"sequence",e.result=f,!0;i?x===44&&h(e,"expected the node content, but found ','"):h(e,"missed comma between flow collection entries"),A=g=E=null,p=d=!1,x===63&&(a=e.input.charCodeAt(e.position+1),S(a)&&(p=d=!0,e.position++,v(e,!0,n))),l=e.line,r=e.lineStart,u=e.position,M(e,n,j,!1,!0),A=e.tag,g=e.result,v(e,!0,n),x=e.input.charCodeAt(e.position),(d||e.line===l)&&x===58&&(p=!0,x=e.input.charCodeAt(++e.position),v(e,!0,n),M(e,n,j,!1,!0),E=e.result),s?R(e,f,m,A,g,E,l,r,u):p?f.push(R(e,null,m,A,g,E,l,r,u)):f.push(g),v(e,!0,n),x=e.input.charCodeAt(e.position),x===44?(i=!0,x=e.input.charCodeAt(++e.position)):i=!1}h(e,"unexpected end of the stream within a flow collection")}function Yi(e,n){var i,l,r=V,u=!1,o=!1,f=n,c=0,a=!1,t,p;if(p=e.input.charCodeAt(e.position),p===124)l=!1;else if(p===62)l=!0;else return!1;for(e.kind="scalar",e.result="";p!==0;)if(p=e.input.charCodeAt(++e.position),p===43||p===45)V===r?r=p===43?ce:Si:h(e,"repeat of a chomping mode identifier");else if((t=Ii(p))>=0)t===0?h(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?h(e,"repeat of an indentation width identifier"):(f=n+t-1,o=!0);else break;if(I(p)){do p=e.input.charCodeAt(++e.position);while(I(p));if(p===35)do p=e.input.charCodeAt(++e.position);while(!b(p)&&p!==0)}for(;p!==0;){for(re(e),e.lineIndent=0,p=e.input.charCodeAt(e.position);(!o||e.lineIndentf&&(f=e.lineIndent),b(p)){c++;continue}if(e.lineIndentn)&&c!==0)h(e,"bad indentation of a sequence entry");else if(e.lineIndentn)&&(A&&(o=e.line,f=e.lineStart,c=e.position),M(e,n,U,!0,r)&&(A?m=e.result:g=e.result),A||(R(e,p,d,s,m,g,o,f,c),s=m=g=null),v(e,!0,-1),x=e.input.charCodeAt(e.position)),(e.line===u||e.lineIndent>n)&&x!==0)h(e,"bad indentation of a mapping entry");else if(e.lineIndentn?c=1:e.lineIndent===n?c=0:e.lineIndentn?c=1:e.lineIndent===n?c=0:e.lineIndent tag; it should be "scalar", not "'+e.kind+'"'),p=0,d=e.implicitTypes.length;p"),e.result!==null&&m.kind!==e.kind&&h(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+m.kind+'", not "'+e.kind+'"'),m.resolve(e.result,e.tag)?(e.result=m.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):h(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||t}function Ui(e){var n=e.position,i,l,r,u=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(v(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(u=!0,o=e.input.charCodeAt(++e.position),i=e.position;o!==0&&!S(o);)o=e.input.charCodeAt(++e.position);for(l=e.input.slice(i,e.position),r=[],l.length<1&&h(e,"directive name must not be less than one character in length");o!==0;){for(;I(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!b(o));break}if(b(o))break;for(i=e.position;o!==0&&!S(o);)o=e.input.charCodeAt(++e.position);r.push(e.input.slice(i,e.position))}o!==0&&re(e),O.call(te,l)?te[l](e,l,r):K(e,'unknown document directive "'+l+'"')}if(v(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,v(e,!0,-1)):u&&h(e,"directives end mark is expected"),M(e,e.lineIndent-1,U,!1,!0),v(e,!0,-1),e.checkLineBreaks&&bi.test(e.input.slice(n,e.position))&&K(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&W(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,v(e,!0,-1));return}if(e.position"u"&&(i=n,n=null);var l=Xe(e,i);if(typeof n!="function")return l;for(var r=0,u=l.length;r=55296&&i<=56319&&n+1=56320&&l<=57343)?(i-55296)*1024+l-56320+65536:i}function un(e){var n=/^\n* /;return n.test(e)}var fn=1,J=2,cn=3,an=4,k=5;function Ar(e,n,i,l,r,u,o,f){var c,a=0,t=null,p=!1,d=!1,s=l!==-1,m=-1,g=xr(D(e,0))&&gr(D(e,e.length-1));if(n||o)for(c=0;c=65536?c+=2:c++){if(a=D(e,c),!H(a))return k;g=g&&xe(a,t,f),t=a}else{for(c=0;c=65536?c+=2:c++){if(a=D(e,c),a===B)p=!0,s&&(d=d||c-m-1>l&&e[m+1]!==" ",m=c);else if(!H(a))return k;g=g&&xe(a,t,f),t=a}d=d||s&&c-m-1>l&&e[m+1]!==" "}return!p&&!d?g&&!o&&!r(e)?fn:u===P?k:J:i>9&&un(e)?k:o?u===P?k:J:d?an:cn}function vr(e,n,i,l,r){e.dump=function(){if(n.length===0)return e.quotingType===P?'""':"''";if(!e.noCompatMode&&(ar.indexOf(n)!==-1||pr.test(n)))return e.quotingType===P?'"'+n+'"':"'"+n+"'";var u=e.indent*Math.max(1,i),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-u),f=l||e.flowLevel>-1&&i>=e.flowLevel;function c(a){return mr(e,a)}switch(Ar(n,f,e.indent,o,c,e.quotingType,e.forceQuotes&&!l,r)){case fn:return n;case J:return"'"+n.replace(/'/g,"''")+"'";case cn:return"|"+ge(n,e.indent)+Ae(se(n,u));case an:return">"+ge(n,e.indent)+Ae(se(yr(n,o),u));case k:return'"'+Cr(n)+'"';default:throw new w("impossible error: invalid scalar style")}}()}function ge(e,n){var i=un(e)?String(n):"",l=e[e.length-1]===` -`,r=l&&(e[e.length-2]===` -`||e===` -`),u=r?"+":l?"":"-";return i+u+` -`}function Ae(e){return e[e.length-1]===` -`?e.slice(0,-1):e}function yr(e,n){for(var i=/(\n+)([^\n]*)/g,l=function(){var a=e.indexOf(` -`);return a=a!==-1?a:e.length,i.lastIndex=a,ve(e.slice(0,a),n)}(),r=e[0]===` -`||e[0]===" ",u,o;o=i.exec(e);){var f=o[1],c=o[2];u=c[0]===" ",l+=f+(!r&&!u&&c!==""?` -`:"")+ve(c,n),r=u}return l}function ve(e,n){if(e===""||e[0]===" ")return e;for(var i=/ [^ ]/g,l,r=0,u,o=0,f=0,c="";l=i.exec(e);)f=l.index,f-r>n&&(u=o>r?o:f,c+=` -`+e.slice(r,u),r=u+1),o=f;return c+=` -`,e.length-r>n&&o>r?c+=e.slice(r,o)+` -`+e.slice(o+1):c+=e.slice(r),c.slice(1)}function Cr(e){for(var n="",i=0,l,r=0;r=65536?r+=2:r++)i=D(e,r),l=_[i],!l&&H(i)?(n+=e[r],i>=65536&&(n+=e[r+1])):n+=l||hr(i);return n}function _r(e,n,i){var l="",r=e.tag,u,o,f;for(u=0,o=i.length;u"u"&&F(e,n,null,!1,!1))&&(l!==""&&(l+=","+(e.condenseFlow?"":" ")),l+=e.dump);e.tag=r,e.dump="["+l+"]"}function ye(e,n,i,l){var r="",u=e.tag,o,f,c;for(o=0,f=i.length;o"u"&&F(e,n+1,null,!0,!0,!1,!0))&&((!l||r!=="")&&(r+=z(e,n)),e.dump&&B===e.dump.charCodeAt(0)?r+="-":r+="- ",r+=e.dump);e.tag=u,e.dump=r||"[]"}function wr(e,n,i){var l="",r=e.tag,u=Object.keys(i),o,f,c,a,t;for(o=0,f=u.length;o1024&&(t+="? "),t+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),F(e,n,a,!1,!1)&&(t+=e.dump,l+=t));e.tag=r,e.dump="{"+l+"}"}function Sr(e,n,i,l){var r="",u=e.tag,o=Object.keys(i),f,c,a,t,p,d;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new w("sortKeys must be a boolean or a function");for(f=0,c=o.length;f1024,p&&(e.dump&&B===e.dump.charCodeAt(0)?d+="?":d+="? "),d+=e.dump,p&&(d+=z(e,n)),F(e,n+1,t,!0,p)&&(e.dump&&B===e.dump.charCodeAt(0)?d+=":":d+=": ",d+=e.dump,r+=d));e.tag=u,e.dump=r||"{}"}function Ce(e,n,i){var l,r,u,o,f,c;for(r=i?e.explicitTypes:e.implicitTypes,u=0,o=r.length;u tag resolver accepts not "'+c+'" style');e.dump=l}return!0}return!1}function F(e,n,i,l,r,u,o){e.tag=null,e.dump=i,Ce(e,i,!1)||Ce(e,i,!0);var f=ze.call(e.dump),c=l,a;l&&(l=e.flowLevel<0||e.flowLevel>n);var t=f==="[object Object]"||f==="[object Array]",p,d;if(t&&(p=e.duplicates.indexOf(i),d=p!==-1),(e.tag!==null&&e.tag!=="?"||d||e.indent!==2&&n>0)&&(r=!1),d&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(t&&d&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),f==="[object Object]")l&&Object.keys(e.dump).length!==0?(Sr(e,n,e.dump,r),d&&(e.dump="&ref_"+p+e.dump)):(wr(e,n,e.dump),d&&(e.dump="&ref_"+p+" "+e.dump));else if(f==="[object Array]")l&&e.dump.length!==0?(e.noArrayIndent&&!o&&n>0?ye(e,n-1,e.dump,r):ye(e,n,e.dump,r),d&&(e.dump="&ref_"+p+e.dump)):(_r(e,n,e.dump),d&&(e.dump="&ref_"+p+" "+e.dump));else if(f==="[object String]")e.tag!=="?"&&vr(e,e.dump,n,u,c);else{if(f==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new w("unacceptable kind of an object to dump "+f)}e.tag!==null&&e.tag!=="?"&&(a=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?a="!"+a:a.slice(0,18)==="tag:yaml.org,2002:"?a="!!"+a.slice(18):a="!<"+a+">",e.dump=a+" "+e.dump)}return!0}function Er(e,n){var i=[],l=[],r,u;for(ee(e,i,l),r=0,u=l.length;rsvg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::-moz-selection{background:transparent}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fff;background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:""}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}} diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/leaflet-src-Dm7ILaeL.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/leaflet-src-Dm7ILaeL.js deleted file mode 100644 index 396dedd..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/leaflet-src-Dm7ILaeL.js +++ /dev/null @@ -1,4 +0,0 @@ -import{a0 as Vo,L as qo}from"./main.common-DD7dqhZp.js";function jo(Gt,Vt){for(var l=0;lit[x]})}}}return Object.freeze(Object.defineProperty(Gt,Symbol.toStringTag,{value:"Module"}))}var Xe={exports:{}};/* @preserve - * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com - * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade - */(function(Gt,Vt){(function(l,it){it(Vt)})(Vo,function(l){var it="1.9.4";function x(t){var e,i,n,o;for(i=1,n=arguments.length;i"u"||!L||!L.Mixin)){t=K(t)?t:[t];for(var e=0;e0?Math.floor(t):Math.ceil(t)};m.prototype={clone:function(){return new m(this.x,this.y)},add:function(t){return this.clone()._add(_(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(_(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new m(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new m(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=oi(this.x),this.y=oi(this.y),this},distanceTo:function(t){t=_(t);var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return t=_(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=_(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+J(this.x)+", "+J(this.y)+")"}};function _(t,e,i){return t instanceof m?t:K(t)?new m(t[0],t[1]):t==null?t:typeof t=="object"&&"x"in t&&"y"in t?new m(t.x,t.y):new m(t,e,i)}function z(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=F(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>=e.x&&n.x<=i.x,r=o.y>=e.y&&n.y<=i.y;return s&&r},overlaps:function(t){t=F(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>e.x&&n.xe.y&&n.y=e.lat&&o.lat<=i.lat&&n.lng>=e.lng&&o.lng<=i.lng},intersects:function(t){t=O(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=e.lat&&n.lat<=i.lat,r=o.lng>=e.lng&&n.lng<=i.lng;return s&&r},overlaps:function(t){t=O(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>e.lat&&n.late.lng&&n.lng1,On=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",E,e),window.removeEventListener("testPassiveEventSupport",E,e)}catch{}return t}(),In=function(){return!!document.createElement("canvas").getContext}(),Le=!!(document.createElementNS&&ri("svg").createSVGRect),An=!!Le&&function(){var t=document.createElement("div");return t.innerHTML="",(t.firstChild&&t.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),Bn=!Le&&function(){try{var t=document.createElement("div");t.innerHTML='';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&typeof e.adj=="object"}catch{return!1}}(),Nn=navigator.platform.indexOf("Mac")===0,Rn=navigator.platform.indexOf("Linux")===0;function $(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var f={ie:jt,ielt9:xn,edge:hi,webkit:we,android:ui,android23:li,androidStock:Ln,opera:xe,chrome:ci,gecko:fi,safari:Tn,phantom:di,opera12:_i,win:bn,ie3d:mi,webkit3d:Pe,gecko3d:pi,any3d:Mn,mobile:Et,mobileWebkit:Sn,mobileWebkit3d:Cn,msPointer:vi,pointer:gi,touch:zn,touchNative:yi,mobileOpera:kn,mobileGecko:En,retina:Zn,passiveEvents:On,canvas:In,svg:Le,vml:Bn,inlineSvg:An,mac:Nn,linux:Rn},wi=f.msPointer?"MSPointerDown":"pointerdown",xi=f.msPointer?"MSPointerMove":"pointermove",Pi=f.msPointer?"MSPointerUp":"pointerup",Li=f.msPointer?"MSPointerCancel":"pointercancel",Te={touchstart:wi,touchmove:xi,touchend:Pi,touchcancel:Li},Ti={touchstart:Gn,touchmove:Kt,touchend:Kt,touchcancel:Kt},yt={},bi=!1;function Dn(t,e,i){return e==="touchstart"&&Un(),Ti[e]?(i=Ti[e].bind(this,i),t.addEventListener(Te[e],i,!1),i):(console.warn("wrong event specified:",e),E)}function Fn(t,e,i){if(!Te[e]){console.warn("wrong event specified:",e);return}t.removeEventListener(Te[e],i,!1)}function Hn(t){yt[t.pointerId]=t}function Wn(t){yt[t.pointerId]&&(yt[t.pointerId]=t)}function Mi(t){delete yt[t.pointerId]}function Un(){bi||(document.addEventListener(wi,Hn,!0),document.addEventListener(xi,Wn,!0),document.addEventListener(Pi,Mi,!0),document.addEventListener(Li,Mi,!0),bi=!0)}function Kt(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){e.touches=[];for(var i in yt)e.touches.push(yt[i]);e.changedTouches=[e],t(e)}}function Gn(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&N(e),Kt(t,e)}function Vn(t){var e={},i,n;for(n in t)i=t[n],e[n]=i&&i.bind?i.bind(t):i;return t=e,e.type="dblclick",e.detail=2,e.isTrusted=!1,e._simulated=!0,e}var qn=200;function jn(t,e){t.addEventListener("dblclick",e);var i=0,n;function o(s){if(s.detail!==1){n=s.detail;return}if(!(s.pointerType==="mouse"||s.sourceCapabilities&&!s.sourceCapabilities.firesTouchEvents)){var r=Ei(s);if(!(r.some(function(h){return h instanceof HTMLLabelElement&&h.attributes.for})&&!r.some(function(h){return h instanceof HTMLInputElement||h instanceof HTMLSelectElement}))){var a=Date.now();a-i<=qn?(n++,n===2&&e(Vn(s))):n=1,i=a}}}return t.addEventListener("click",o),{dblclick:e,simDblclick:o}}function Kn(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}var be=Jt(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Zt=Jt(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Si=Zt==="webkitTransition"||Zt==="OTransition"?Zt+"End":"transitionend";function Ci(t){return typeof t=="string"?document.getElementById(t):t}function Ot(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||i==="auto")&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return i==="auto"?null:i}function T(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n}function k(t){var e=t.parentNode;e&&e.removeChild(t)}function Yt(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function wt(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function xt(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function Me(t,e){if(t.classList!==void 0)return t.classList.contains(e);var i=Xt(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function v(t,e){if(t.classList!==void 0)for(var i=dt(e),n=0,o=i.length;n0?2*window.devicePixelRatio:1;function Oi(t){return f.edge?t.wheelDeltaY/2:t.deltaY&&t.deltaMode===0?-t.deltaY/Jn:t.deltaY&&t.deltaMode===1?-t.deltaY*20:t.deltaY&&t.deltaMode===2?-t.deltaY*60:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?-t.detail*20:t.detail?t.detail/-32765*60:0}function Re(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch{return!1}return i!==t}var $n={__proto__:null,on:p,off:M,stopPropagation:pt,disableScrollPropagation:Ne,disableClickPropagation:Nt,preventDefault:N,stop:vt,getPropagationPath:Ei,getMousePosition:Zi,getWheelDelta:Oi,isExternalTarget:Re,addListener:p,removeListener:M},Ii=zt.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=mt(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=D(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=this._duration*1e3;ethis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,O(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},panInside:function(t,e){e=e||{};var i=_(e.paddingTopLeft||e.padding||[0,0]),n=_(e.paddingBottomRight||e.padding||[0,0]),o=this.project(this.getCenter()),s=this.project(t),r=this.getPixelBounds(),a=F([r.min.add(i),r.max.subtract(n)]),h=a.getSize();if(!a.contains(s)){this._enforcingBounds=!0;var u=s.subtract(a.getCenter()),c=a.extend(s).getSize().subtract(h);o.x+=u.x<0?-c.x:c.x,o.y+=u.y<0?-c.y:c.y,this.panTo(this.unproject(o),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=x({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),n=e.divideBy(2).round(),o=i.divideBy(2).round(),s=n.subtract(o);return!s.x&&!s.y?this:(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(S(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=x({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=S(this._handleGeolocationResponse,this),i=S(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var e=t.code,i=t.message||(e===1?"permission denied":e===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=t.coords.latitude,i=t.coords.longitude,n=new b(e,i),o=n.toBounds(t.coords.accuracy*2),s=this._locateOptions;if(s.setView){var r=this.getBoundsZoom(o);this.setView(n,s.maxZoom?Math.min(r,s.maxZoom):r)}var a={latlng:n,bounds:o,timestamp:t.timestamp};for(var h in t.coords)typeof t.coords[h]=="number"&&(a[h]=t.coords[h]);this.fire("locationfound",a)}},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),k(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(G(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var t;for(t in this._layers)this._layers[t].remove();for(t in this._panes)k(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),n=T("div",i,e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new H(e,i)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=O(t),i=_(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),h=this.getSize().subtract(i),u=F(this.project(a,n),this.project(r,n)).getSize(),c=f.any3d?this.options.zoomSnap:1,d=h.x/u.x,g=h.y/u.y,R=e?Math.max(d,g):Math.min(d,g);return n=this.getScaleZoom(R,n),c&&(n=Math.round(n/(c/100))*(c/100),n=e?Math.ceil(n/c)*c:Math.floor(n/c)*c),Math.max(o,Math.min(s,n))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new m(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new z(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(t===void 0?this.getZoom():t)},getPane:function(t){return typeof t=="string"?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=e===void 0?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=e===void 0?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},project:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.latLngToPoint(y(t),e)},unproject:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.pointToLatLng(_(t),e)},layerPointToLatLng:function(t){var e=_(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(y(t))._round();return e._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(y(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(O(t))},distance:function(t,e){return this.options.crs.distance(y(t),y(e))},containerPointToLayerPoint:function(t){return _(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return _(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(_(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(y(t)))},mouseEventToContainerPoint:function(t){return Zi(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=Ci(t);if(e){if(e._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");p(e,"scroll",this._onScroll,this),this._containerId=P(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&f.any3d,v(t,"leaflet-container"+(f.touch?" leaflet-touch":"")+(f.retina?" leaflet-retina":"")+(f.ielt9?" leaflet-oldie":"")+(f.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=Ot(t,"position");e!=="absolute"&&e!=="relative"&&e!=="fixed"&&e!=="sticky"&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),I(this._mapPane,new m(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(v(t.markerPane,"leaflet-zoom-hide"),v(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,i){I(this._mapPane,new m(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var o=this._zoom!==e;this._moveStart(o,i)._move(t,e)._moveEnd(o),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i,n){e===void 0&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?i&&i.pinch&&this.fire("zoom",i):((o||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return G(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){I(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[P(this._container)]=this;var e=t?M:p;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),f.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){G(this._resizeRequest),this._resizeRequest=D(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i=[],n,o=e==="mouseout"||e==="mouseover",s=t.target||t.srcElement,r=!1;s;){if(n=this._targets[P(s)],n&&(e==="click"||e==="preclick")&&this._draggableMoved(n)){r=!0;break}if(n&&n.listens(e,!0)&&(o&&!Re(s,t)||(i.push(n),o))||s===this._container)break;s=s.parentNode}return!i.length&&!r&&!o&&this.listens(e,!0)&&(i=[this]),i},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||t.type==="click"&&this._isClickDisabled(e))){var i=t.type;i==="mousedown"&&Ze(e),this._fireDOMEvent(t,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if(t.type==="click"){var n=x({},t);n.type="preclick",this._fireDOMEvent(n,n.type,i)}var o=this._findEventTargets(t,e);if(i){for(var s=[],r=0;r0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=f.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Z(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._trunc();return(e&&e.animate)!==!0&&!this.getSize().contains(i)?!1:(this.panBy(i,e),!0)},_createAnimProxy:function(){var t=this._proxy=T("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(e){var i=be,n=this._proxy.style[i];_t(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),n===this._proxy.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){k(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();_t(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n);return i.animate!==!0&&!this.getSize().contains(o)?!1:(D(function(){this._moveStart(!0,i.noMoveStart||!1)._animateZoom(t,e,!0)},this),!0)},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,v(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(S(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Z(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Qn(t,e){return new w(t,e)}var Y=nt.extend({options:{position:"topright"},initialize:function(t){C(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return v(e,"leaflet-control"),i.indexOf("bottom")!==-1?n.insertBefore(e,n.firstChild):n.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(k(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),Rt=function(t){return new Y(t)};w.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",i=this._controlContainer=T("div",e+"control-container",this._container);function n(o,s){var r=e+o+" "+e+s;t[o+s]=T("div",r,i)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)k(this._controlCorners[t]);k(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Ai=Y.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(P(t.target)),i=e.overlay?t.type==="add"?"overlayadd":"overlayremove":t.type==="add"?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,e){var i='",n=document.createElement("div");return n.innerHTML=i,n.firstChild},_addItem:function(t){var e=document.createElement("label"),i=this._map.hasLayer(t.layer),n;t.overlay?(n=document.createElement("input"),n.type="checkbox",n.className="leaflet-control-layers-selector",n.defaultChecked=i):n=this._createRadioElement("leaflet-base-layers_"+P(this),i),this._layerControlInputs.push(n),n.layerId=P(t.layer),p(n,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var s=document.createElement("span");e.appendChild(s),s.appendChild(n),s.appendChild(o);var r=t.overlay?this._overlaysList:this._baseLayersList;return r.appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){if(!this._preventClick){var t=this._layerControlInputs,e,i,n=[],o=[];this._handlingClick=!0;for(var s=t.length-1;s>=0;s--)e=t[s],i=this._getLayer(e.layerId).layer,e.checked?n.push(i):e.checked||o.push(i);for(s=0;s=0;o--)e=t[o],i=this._getLayer(e.layerId).layer,e.disabled=i.options.minZoom!==void 0&&ni.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,p(t,"click",N),this.expand();var e=this;setTimeout(function(){M(t,"click",N),e._preventClick=!1})}}),to=function(t,e,i){return new Ai(t,e,i)},De=Y.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=T("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,o){var s=T("a",i,n);return s.innerHTML=t,s.href="#",s.title=e,s.setAttribute("role","button"),s.setAttribute("aria-label",e),Nt(s),p(s,"click",vt),p(s,"click",o,this),p(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";Z(this._zoomInButton,e),Z(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(v(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(v(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});w.mergeOptions({zoomControl:!0}),w.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new De,this.addControl(this.zoomControl))});var eo=function(t){return new De(t)},Bi=Y.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=T("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=T("div",e,i)),t.imperial&&(this._iScale=T("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},_updateImperial:function(t){var e=t*3.2808399,i,n,o;e>5280?(i=e/5280,n=this._getRoundNum(i),this._updateScale(this._iScale,n+" mi",n/i)):(o=this._getRoundNum(e),this._updateScale(this._iScale,o+" ft",o/e))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,e*i}}),io=function(t){return new Bi(t)},no='',Fe=Y.extend({options:{position:"bottomright",prefix:''+(f.inlineSvg?no+" ":"")+"Leaflet"},initialize:function(t){C(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=T("div","leaflet-control-attribution"),Nt(this._container);for(var e in t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(' ')}}});w.mergeOptions({attributionControl:!0}),w.addInitHook(function(){this.options.attributionControl&&new Fe().addTo(this)});var oo=function(t){return new Fe(t)};Y.Layers=Ai,Y.Zoom=De,Y.Scale=Bi,Y.Attribution=Fe,Rt.layers=to,Rt.zoom=eo,Rt.scale=io,Rt.attribution=oo;var tt=nt.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});tt.addTo=function(t,e){return t.addHandler(e,this),this};var so={Events:U},Ni=f.touch?"touchstart mousedown":"mousedown",ct=zt.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){C(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(p(this._dragStartTarget,Ni,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ct._dragging===this&&this.finishDrag(!0),M(this._dragStartTarget,Ni,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!Me(this._element,"leaflet-zoom-anim"))){if(t.touches&&t.touches.length!==1){ct._dragging===this&&this.finishDrag();return}if(!(ct._dragging||t.shiftKey||t.which!==1&&t.button!==1&&!t.touches)&&(ct._dragging=this,this._preventOutline&&Ze(this._element),ze(),It(),!this._moving)){this.fire("down");var e=t.touches?t.touches[0]:t,i=zi(this._element);this._startPoint=new m(e.clientX,e.clientY),this._startPos=mt(this._element),this._parentScale=Oe(i);var n=t.type==="mousedown";p(document,n?"mousemove":"touchmove",this._onMove,this),p(document,n?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(t){if(this._enabled){if(t.touches&&t.touches.length>1){this._moved=!0;return}var e=t.touches&&t.touches.length===1?t.touches[0]:t,i=new m(e.clientX,e.clientY)._subtract(this._startPoint);!i.x&&!i.y||Math.abs(i.x)+Math.abs(i.y)s&&(r=a,s=h);s>i&&(e[r]=1,We(t,e,i,n,r),We(t,e,i,r,o))}function uo(t,e){for(var i=[t[0]],n=1,o=0,s=t.length;ne&&(i.push(t[n]),o=n);return oe.max.x&&(i|=2),t.ye.max.y&&(i|=8),i}function lo(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}function Dt(t,e,i,n){var o=e.x,s=e.y,r=i.x-o,a=i.y-s,h=r*r+a*a,u;return h>0&&(u=((t.x-o)*r+(t.y-s)*a)/h,u>1?(o=i.x,s=i.y):u>0&&(o+=r*u,s+=a*u)),r=t.x-o,a=t.y-s,n?r*r+a*a:new m(o,s)}function q(t){return!K(t[0])||typeof t[0][0]!="object"&&typeof t[0][0]<"u"}function Gi(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),q(t)}function Vi(t,e){var i,n,o,s,r,a,h,u;if(!t||t.length===0)throw new Error("latlngs not passed");q(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var c=y([0,0]),d=O(t),g=d.getNorthWest().distanceTo(d.getSouthWest())*d.getNorthEast().distanceTo(d.getNorthWest());g<1700&&(c=He(t));var R=t.length,B=[];for(i=0;in){h=(s-n)/o,u=[a.x-h*(a.x-r.x),a.y-h*(a.y-r.y)];break}var W=e.unproject(_(u));return y([W.lat+c.lat,W.lng+c.lng])}var co={__proto__:null,simplify:Fi,pointToSegmentDistance:Hi,closestPointOnSegment:ao,clipSegment:Ui,_getEdgeIntersection:te,_getBitCode:gt,_sqClosestPointOnSegment:Dt,isFlat:q,_flat:Gi,polylineCenter:Vi},Ue={project:function(t){return new m(t.lng,t.lat)},unproject:function(t){return new b(t.y,t.x)},bounds:new z([-180,-90],[180,90])},Ge={R:6378137,R_MINOR:6356752314245179e-9,bounds:new z([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,o=this.R_MINOR/i,s=Math.sqrt(1-o*o),r=s*Math.sin(n),a=Math.tan(Math.PI/4-n/2)/Math.pow((1-r)/(1+r),s/2);return n=-i*Math.log(Math.max(a,1e-10)),new m(t.lng*e*i,n)},unproject:function(t){for(var e=180/Math.PI,i=this.R,n=this.R_MINOR/i,o=Math.sqrt(1-n*n),s=Math.exp(-t.y/i),r=Math.PI/2-2*Math.atan(s),a=0,h=.1,u;a<15&&Math.abs(h)>1e-7;a++)u=o*Math.sin(r),u=Math.pow((1-u)/(1+u),o/2),h=Math.PI/2-2*Math.atan(s*u)-r,r+=h;return new b(r*e,t.x*e/i)}},fo={__proto__:null,LonLat:Ue,Mercator:Ge,SphericalMercator:pe},_o=x({},lt,{code:"EPSG:3395",projection:Ge,transformation:function(){var t=.5/(Math.PI*Ge.R);return kt(t,.5,-t,.5)}()}),qi=x({},lt,{code:"EPSG:4326",projection:Ue,transformation:kt(1/180,1,-1/180,.5)}),mo=x({},ot,{projection:Ue,transformation:kt(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0});ot.Earth=lt,ot.EPSG3395=_o,ot.EPSG3857=ge,ot.EPSG900913=wn,ot.EPSG4326=qi,ot.Simple=mo;var X=zt.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[P(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[P(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",function(){e.off(i,this)},this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});w.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=P(t);return this._layers[e]?this:(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var e=P(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return P(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){t=t?K(t)?t:[t]:[];for(var e=0,i=t.length;ethis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&e[0]instanceof b&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){rt.prototype._setLatLngs.call(this,t),q(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return q(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new m(e,e);if(t=new z(t.min.subtract(i),t.max.add(i)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}for(var n=0,o=this._rings.length,s;nt.y!=o.y>t.y&&t.x<(o.x-n.x)*(t.y-n.y)/(o.y-n.y)+n.x&&(e=!e);return e||rt.prototype._containsPoint.call(this,t,!0)}});function Lo(t,e){return new Tt(t,e)}var at=st.extend({initialize:function(t,e){C(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e=K(t)?t:t.features,i,n,o;if(e){for(i=0,n=e.length;i0&&o.push(o[0].slice()),o}function bt(t,e){return t.feature?x({},t.feature,{geometry:e}):re(e)}function re(t){return t.type==="Feature"||t.type==="FeatureCollection"?t:{type:"Feature",properties:{},geometry:t}}var Ke={toGeoJSON:function(t){return bt(this,{type:"Point",coordinates:je(this.getLatLng(),t)})}};ee.include(Ke),Ve.include(Ke),ie.include(Ke),rt.include({toGeoJSON:function(t){var e=!q(this._latlngs),i=se(this._latlngs,e?1:0,!1,t);return bt(this,{type:(e?"Multi":"")+"LineString",coordinates:i})}}),Tt.include({toGeoJSON:function(t){var e=!q(this._latlngs),i=e&&!q(this._latlngs[0]),n=se(this._latlngs,i?2:e?1:0,!0,t);return e||(n=[n]),bt(this,{type:(i?"Multi":"")+"Polygon",coordinates:n})}}),Pt.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(i){e.push(i.toGeoJSON(t).geometry.coordinates)}),bt(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(e==="MultiPoint")return this.toMultiPoint(t);var i=e==="GeometryCollection",n=[];return this.eachLayer(function(o){if(o.toGeoJSON){var s=o.toGeoJSON(t);if(i)n.push(s.geometry);else{var r=re(s);r.type==="FeatureCollection"?n.push.apply(n,r.features):n.push(r)}}}),i?bt(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});function Yi(t,e){return new at(t,e)}var To=Yi,ae=X.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t,this._bounds=O(e),C(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(v(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){k(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&wt(this._image),this},bringToBack:function(){return this._map&&xt(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=O(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t=this._url.tagName==="IMG",e=this._image=t?this._url:T("img");if(v(e,"leaflet-image-layer"),this._zoomAnimated&&v(e,"leaflet-zoom-animated"),this.options.className&&v(e,this.options.className),e.onselectstart=E,e.onmousemove=E,e.onload=S(this.fire,this,"load"),e.onerror=S(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(e.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t){this._url=e.src;return}e.src=this._url,e.alt=this.options.alt},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;_t(this._image,i,e)},_reset:function(){var t=this._image,e=new z(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();I(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){V(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),bo=function(t,e,i){return new ae(t,e,i)},Xi=ae.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t=this._url.tagName==="VIDEO",e=this._image=t?this._url:T("video");if(v(e,"leaflet-image-layer"),this._zoomAnimated&&v(e,"leaflet-zoom-animated"),this.options.className&&v(e,this.options.className),e.onselectstart=E,e.onmousemove=E,e.onloadeddata=S(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),n=[],o=0;o0?n:[e.src];return}K(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var s=0;so?(e.height=o+"px",v(t,s)):Z(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();I(this._container,e.add(i))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var t=this._map,e=parseInt(Ot(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,o=new m(this._containerLeft,-i-this._containerBottom);o._add(mt(this._container));var s=t.layerPointToContainerPoint(o),r=_(this.options.autoPanPadding),a=_(this.options.autoPanPaddingTopLeft||r),h=_(this.options.autoPanPaddingBottomRight||r),u=t.getSize(),c=0,d=0;s.x+n+h.x>u.x&&(c=s.x+n-u.x+h.x),s.x-c-a.x<0&&(c=s.x-a.x),s.y+i+h.y>u.y&&(d=s.y+i-u.y+h.y),s.y-d-a.y<0&&(d=s.y-a.y),(c||d)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([c,d]))}},_getAnchor:function(){return _(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Co=function(t,e){return new he(t,e)};w.mergeOptions({closePopupOnClick:!0}),w.include({openPopup:function(t,e,i){return this._initOverlay(he,t,e,i).openOn(this),this},closePopup:function(t){return t=arguments.length?t:this._popup,t&&t.close(),this}}),X.include({bindPopup:function(t,e){return this._popup=this._initOverlay(he,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof st||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(!(!this._popup||!this._map)){vt(t);var e=t.layer||t.target;if(this._popup._source===e&&!(e instanceof ft)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng);return}this._popup._source=e,this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){t.originalEvent.keyCode===13&&this._openPopup(t)}});var ue=et.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){et.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){et.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=et.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip",e=t+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=T("div",e),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+P(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i,n=this._map,o=this._container,s=n.latLngToContainerPoint(n.getCenter()),r=n.layerPointToContainerPoint(t),a=this.options.direction,h=o.offsetWidth,u=o.offsetHeight,c=_(this.options.offset),d=this._getAnchor();a==="top"?(e=h/2,i=u):a==="bottom"?(e=h/2,i=0):a==="center"?(e=h/2,i=u/2):a==="right"?(e=0,i=u/2):a==="left"?(e=h,i=u/2):r.xthis.options.maxZoom||in?this._retainParent(o,s,r,n):!1)},_retainChildren:function(t,e,i,n){for(var o=2*t;o<2*t+2;o++)for(var s=2*e;s<2*e+2;s++){var r=new m(o,s);r.z=i+1;var a=this._tileCoordsToKey(r),h=this._tiles[a];if(h&&h.active){h.retain=!0;continue}else h&&h.loaded&&(h.retain=!0);i+1this.options.maxZoom||this.options.minZoom!==void 0&&o1){this._setView(t,i);return}for(var d=o.min.y;d<=o.max.y;d++)for(var g=o.min.x;g<=o.max.x;g++){var R=new m(g,d);if(R.z=this._tileZoom,!!this._isValidTile(R)){var B=this._tiles[this._tileCoordsToKey(R)];B?B.current=!0:r.push(R)}}if(r.sort(function(W,St){return W.distanceTo(s)-St.distanceTo(s)}),r.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var j=document.createDocumentFragment();for(g=0;gi.max.x)||!e.wrapLat&&(t.yi.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return O(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),o=n.add(i),s=e.unproject(n,t.z),r=e.unproject(o,t.z);return[s,r]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new H(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new m(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(k(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){v(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=E,t.onmousemove=E,f.ielt9&&this.options.opacity<1&&V(t,this.options.opacity)},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),S(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&D(S(this._tileReady,this,t,null,o)),I(o,i),this._tiles[n]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);i=this._tiles[n],i&&(i.loaded=+new Date,this._map._fadeAnimated?(V(i.el,0),G(this._fadeFrame),this._fadeFrame=D(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(v(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),f.ielt9||!this._map._fadeAnimated?D(this._pruneTiles,this):setTimeout(S(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new m(this._wrapX?Ct(t.x,this._wrapX):t.x,this._wrapY?Ct(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new z(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function Eo(t){return new Ht(t)}var Mt=Ht.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,e=C(this,e),e.detectRetina&&f.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),typeof e.subdomains=="string"&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&e===void 0&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var i=document.createElement("img");return p(i,"load",S(this._tileOnLoad,this,e,i)),p(i,"error",S(this._tileOnError,this,e,i)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(i.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(i.referrerPolicy=this.options.referrerPolicy),i.alt="",i.src=this.getTileUrl(t),i},getTileUrl:function(t){var e={r:f.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return ti(this._url,x(e,this.options))},_tileOnLoad:function(t,e){f.ielt9?setTimeout(S(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,i=this.options.zoomReverse,n=this.options.zoomOffset;return i&&(t=e-t),t+n},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&(e=this._tiles[t].el,e.onload=E,e.onerror=E,!e.complete)){e.src=qt;var i=this._tiles[t].coords;k(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:i})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",qt),Ht.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(!(!this._map||i&&i.getAttribute("src")===qt))return Ht.prototype._tileReady.call(this,t,e,i)}});function Qi(t,e){return new Mt(t,e)}var tn=Mt.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i=x({},this.defaultWmsParams);for(var n in e)n in this.options||(i[n]=e[n]);e=C(this,e);var o=e.detectRetina&&f.retina?2:1,s=this.getTileSize();i.width=s.x*o,i.height=s.y*o,this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,Mt.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,n=F(i.project(e[0]),i.project(e[1])),o=n.min,s=n.max,r=(this._wmsVersion>=1.3&&this._crs===qi?[o.y,o.x,s.y,s.x]:[o.x,o.y,s.x,s.y]).join(","),a=Mt.prototype.getTileUrl.call(this,t);return a+Qe(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,e){return x(this.wmsParams,t),e||this.redraw(),this}});function Zo(t,e){return new tn(t,e)}Mt.WMS=tn,Qi.wms=Zo;var ht=X.extend({options:{padding:.1},initialize:function(t){C(this,t),P(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),v(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var i=this._map.getZoomScale(e,this._zoom),n=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),s=n.multiplyBy(-i).add(o).subtract(this._map._getNewPixelOrigin(t,e));f.any3d?_t(this._container,s,i):I(this._container,s)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var t in this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new z(i,i.add(e.multiplyBy(1+t*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),en=ht.extend({options:{tolerance:0},getEvents:function(){var t=ht.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){ht.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");p(t,"mousemove",this._onMouseMove,this),p(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),p(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){G(this._redrawRequest),delete this._ctx,k(this._container),M(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var t;this._redrawBounds=null;for(var e in this._layers)t=this._layers[e],t._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ht.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=f.retina?2:1;I(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",f.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){ht.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[P(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,i=e.next,n=e.prev;i?i.prev=n:this._drawLast=n,n?n.next=i:this._drawFirst=i,delete t._order,delete this._layers[P(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if(typeof t.options.dashArray=="string"){var e=t.options.dashArray.split(/[, ]+/),i=[],n,o;for(o=0;o')}}catch{}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Oo={_initContainer:function(){this._container=T("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(ht.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Wt("shape");v(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Wt("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[P(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;k(e),t.removeInteractiveTarget(e),delete this._layers[P(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(e||(e=t._stroke=Wt("stroke")),o.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=K(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(o.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=Wt("fill")),o.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(o.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,"+65535*360)},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){wt(t._container)},_bringToBack:function(t){xt(t._container)}},le=f.vml?Wt:ri,Ut=ht.extend({_initContainer:function(){this._container=le("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=le("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){k(this._container),M(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ht.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;(!this._svgSize||!this._svgSize.equals(e))&&(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),I(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=le("path");t.options.className&&v(e,t.options.className),t.options.interactive&&v(e,"leaflet-interactive"),this._updateStyle(t),this._layers[P(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){k(t._path),t.removeInteractiveTarget(t._path),delete this._layers[P(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,ai(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n=Math.max(Math.round(t._radiusY),1)||i,o="a"+i+","+n+" 0 1,0 ",s=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+o+i*2+",0 "+o+-i*2+",0 ";this._setPath(t,s)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){wt(t._path)},_bringToBack:function(t){xt(t._path)}});f.vml&&Ut.include(Oo);function on(t){return f.svg||f.vml?new Ut(t):null}w.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if(t==="overlayPane"||t===void 0)return!1;var e=this._paneRenderers[t];return e===void 0&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&nn(t)||on(t)}});var sn=Tt.extend({initialize:function(t,e){Tt.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=O(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function Io(t,e){return new sn(t,e)}Ut.create=le,Ut.pointsToPath=ai,at.geometryToLayer=ne,at.coordsToLatLng=qe,at.coordsToLatLngs=oe,at.latLngToCoords=je,at.latLngsToCoords=se,at.getFeature=bt,at.asFeature=re,w.mergeOptions({boxZoom:!0});var rn=tt.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){p(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){M(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){k(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||t.which!==1&&t.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),It(),ze(),this._startPoint=this._map.mouseEventToContainerPoint(t),p(document,{contextmenu:vt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=T("div","leaflet-zoom-box",this._container),v(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new z(this._point,this._startPoint),i=e.getSize();I(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(k(this._box),Z(this._container,"leaflet-crosshair")),At(),ke(),M(document,{contextmenu:vt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if(!(t.which!==1&&t.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(S(this._resetState,this),0);var e=new H(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){t.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});w.addInitHook("addHandler","boxZoom",rn),w.mergeOptions({doubleClickZoom:!0});var an=tt.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,o=t.originalEvent.shiftKey?i-n:i+n;e.options.doubleClickZoom==="center"?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});w.addInitHook("addHandler","doubleClickZoom",an),w.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var hn=tt.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new ct(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}v(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Z(this._map._container,"leaflet-grab"),Z(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=O(this._map.options.maxBounds);this._offsetLimit=F(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.xe.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,s=(n+e+i)%t-e-i,r=Math.abs(o+i)0?s:-s))-e;this._delta=0,this._startTime=null,r&&(t.options.scrollWheelZoom==="center"?t.setZoom(e+r):t.setZoomAround(this._lastMousePos,e+r))}});w.addInitHook("addHandler","scrollWheelZoom",ln);var Ao=600;w.mergeOptions({tapHold:f.touchNative&&f.safari&&f.mobile,tapTolerance:15});var cn=tt.extend({addHooks:function(){p(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){M(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),t.touches.length===1){var e=t.touches[0];this._startPos=this._newPos=new m(e.clientX,e.clientY),this._holdTimeout=setTimeout(S(function(){this._cancel(),this._isTapValid()&&(p(document,"touchend",N),p(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))},this),Ao),p(document,"touchend touchcancel contextmenu",this._cancel,this),p(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){M(document,"touchend",N),M(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),M(document,"touchend touchcancel contextmenu",this._cancel,this),M(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new m(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var i=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});i._simulated=!0,e.target.dispatchEvent(i)}});w.addInitHook("addHandler","tapHold",cn),w.mergeOptions({touchZoom:f.touch,bounceAtZoomLimits:!0});var fn=tt.extend({addHooks:function(){v(this._map._container,"leaflet-touch-zoom"),p(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Z(this._map._container,"leaflet-touch-zoom"),M(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(!(!t.touches||t.touches.length!==2||e._animatingZoom||this._zooming)){var i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),e.options.touchZoom!=="center"&&(this._pinchStartLatLng=e.containerPointToLatLng(i.add(n)._divideBy(2))),this._startDist=i.distanceTo(n),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),p(document,"touchmove",this._onTouchMove,this),p(document,"touchend touchcancel",this._onTouchEnd,this),N(t)}},_onTouchMove:function(t){if(!(!t.touches||t.touches.length!==2||!this._zooming)){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),o=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoome.getMaxZoom()&&o>1)&&(this._zoom=e._limitZoom(this._zoom)),e.options.touchZoom==="center"){if(this._center=this._startLatLng,o===1)return}else{var s=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(o===1&&s.x===0&&s.y===0)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),G(this._animRequest);var r=S(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=D(r,this,!0),N(t)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,G(this._animRequest),M(document,"touchmove",this._onTouchMove,this),M(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});w.addInitHook("addHandler","touchZoom",fn),w.BoxZoom=rn,w.DoubleClickZoom=an,w.Drag=hn,w.Keyboard=un,w.ScrollWheelZoom=ln,w.TapHold=cn,w.TouchZoom=fn,l.Bounds=z,l.Browser=f,l.CRS=ot,l.Canvas=en,l.Circle=Ve,l.CircleMarker=ie,l.Class=nt,l.Control=Y,l.DivIcon=$i,l.DivOverlay=et,l.DomEvent=$n,l.DomUtil=Xn,l.Draggable=ct,l.Evented=zt,l.FeatureGroup=st,l.GeoJSON=at,l.GridLayer=Ht,l.Handler=tt,l.Icon=Lt,l.ImageOverlay=ae,l.LatLng=b,l.LatLngBounds=H,l.Layer=X,l.LayerGroup=Pt,l.LineUtil=co,l.Map=w,l.Marker=ee,l.Mixin=so,l.Path=ft,l.Point=m,l.PolyUtil=ro,l.Polygon=Tt,l.Polyline=rt,l.Popup=he,l.PosAnimation=Ii,l.Projection=fo,l.Rectangle=sn,l.Renderer=ht,l.SVG=Ut,l.SVGOverlay=Ji,l.TileLayer=Mt,l.Tooltip=ue,l.Transformation=ve,l.Util=gn,l.VideoOverlay=Xi,l.bind=S,l.bounds=F,l.canvas=nn,l.circle=xo,l.circleMarker=wo,l.control=Rt,l.divIcon=ko,l.extend=x,l.featureGroup=vo,l.geoJSON=Yi,l.geoJson=To,l.gridLayer=Eo,l.icon=go,l.imageOverlay=bo,l.latLng=y,l.latLngBounds=O,l.layerGroup=po,l.map=Qn,l.marker=yo,l.point=_,l.polygon=Lo,l.polyline=Po,l.popup=Co,l.rectangle=Io,l.setOptions=C,l.stamp=P,l.svg=on,l.svgOverlay=So,l.tileLayer=Qi,l.tooltip=zo,l.transformation=kt,l.version=it,l.videoOverlay=Mo;var Bo=window.L;l.noConflict=function(){return window.L=Bo,this},window.L=l})})(Xe,Xe.exports);var pn=Xe.exports;const Ko=qo(pn),Xo=jo({__proto__:null,default:Ko},[pn]);export{pn as a,Xo as l}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/leaflet-src.esm-HdBnhJze.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/leaflet-src.esm-HdBnhJze.js deleted file mode 100644 index 6f005d3..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/leaflet-src.esm-HdBnhJze.js +++ /dev/null @@ -1,4 +0,0 @@ -/* @preserve - * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com - * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade - */var fo="1.9.4";function T(t){var e,i,n,o;for(i=1,n=arguments.length;i"u"||!L||!L.Mixin)){t=j(t)?t:[t];for(var e=0;e0?Math.floor(t):Math.ceil(t)};m.prototype={clone:function(){return new m(this.x,this.y)},add:function(t){return this.clone()._add(d(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(d(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new m(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new m(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=Ke(this.x),this.y=Ke(this.y),this},distanceTo:function(t){t=d(t);var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return t=d(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=d(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+K(this.x)+", "+K(this.y)+")"}};function d(t,e,i){return t instanceof m?t:j(t)?new m(t[0],t[1]):t==null?t:typeof t=="object"&&"x"in t&&"y"in t?new m(t.x,t.y):new m(t,e,i)}function z(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=H(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>=e.x&&n.x<=i.x,r=o.y>=e.y&&n.y<=i.y;return s&&r},overlaps:function(t){t=H(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>e.x&&n.xe.y&&n.y=e.lat&&o.lat<=i.lat&&n.lng>=e.lng&&o.lng<=i.lng},intersects:function(t){t=I(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=e.lat&&n.lat<=i.lat,r=o.lng>=e.lng&&n.lng<=i.lng;return s&&r},overlaps:function(t){t=I(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>e.lat&&n.late.lng&&n.lng1,Tn=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",k,e),window.removeEventListener("testPassiveEventSupport",k,e)}catch{}return t}(),bn=function(){return!!document.createElement("canvas").getContext}(),Pe=!!(document.createElementNS&&ci("svg").createSVGRect),Mn=!!Pe&&function(){var t=document.createElement("div");return t.innerHTML="",(t.firstChild&&t.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),Cn=!Pe&&function(){try{var t=document.createElement("div");t.innerHTML='';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&typeof e.adj=="object"}catch{return!1}}(),Sn=navigator.platform.indexOf("Mac")===0,zn=navigator.platform.indexOf("Linux")===0;function X(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var c={ie:Xt,ielt9:fn,edge:di,webkit:ye,android:_i,android23:mi,androidStock:_n,opera:xe,chrome:pi,gecko:vi,safari:mn,phantom:gi,opera12:yi,win:pn,ie3d:xi,webkit3d:we,gecko3d:wi,any3d:vn,mobile:Ot,mobileWebkit:gn,mobileWebkit3d:yn,msPointer:Pi,pointer:Li,touch:xn,touchNative:Ti,mobileOpera:wn,mobileGecko:Pn,retina:Ln,passiveEvents:Tn,canvas:bn,svg:Pe,vml:Cn,inlineSvg:Mn,mac:Sn,linux:zn},bi=c.msPointer?"MSPointerDown":"pointerdown",Mi=c.msPointer?"MSPointerMove":"pointermove",Ci=c.msPointer?"MSPointerUp":"pointerup",Si=c.msPointer?"MSPointerCancel":"pointercancel",he={touchstart:bi,touchmove:Mi,touchend:Ci,touchcancel:Si},Xe={touchstart:An,touchmove:Rt,touchend:Rt,touchcancel:Rt},vt={},Je=!1;function kn(t,e,i){return e==="touchstart"&&In(),Xe[e]?(i=Xe[e].bind(this,i),t.addEventListener(he[e],i,!1),i):(console.warn("wrong event specified:",e),k)}function En(t,e,i){if(!he[e]){console.warn("wrong event specified:",e);return}t.removeEventListener(he[e],i,!1)}function Zn(t){vt[t.pointerId]=t}function On(t){vt[t.pointerId]&&(vt[t.pointerId]=t)}function $e(t){delete vt[t.pointerId]}function In(){Je||(document.addEventListener(bi,Zn,!0),document.addEventListener(Mi,On,!0),document.addEventListener(Ci,$e,!0),document.addEventListener(Si,$e,!0),Je=!0)}function Rt(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){e.touches=[];for(var i in vt)e.touches.push(vt[i]);e.changedTouches=[e],t(e)}}function An(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&B(e),Rt(t,e)}function Bn(t){var e={},i,n;for(n in t)i=t[n],e[n]=i&&i.bind?i.bind(t):i;return t=e,e.type="dblclick",e.detail=2,e.isTrusted=!1,e._simulated=!0,e}var Nn=200;function Rn(t,e){t.addEventListener("dblclick",e);var i=0,n;function o(s){if(s.detail!==1){n=s.detail;return}if(!(s.pointerType==="mouse"||s.sourceCapabilities&&!s.sourceCapabilities.firesTouchEvents)){var r=Zi(s);if(!(r.some(function(h){return h instanceof HTMLLabelElement&&h.attributes.for})&&!r.some(function(h){return h instanceof HTMLInputElement||h instanceof HTMLSelectElement}))){var a=Date.now();a-i<=Nn?(n++,n===2&&e(Bn(s))):n=1,i=a}}}return t.addEventListener("click",o),{dblclick:e,simDblclick:o}}function Dn(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}var Le=$t(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Lt=$t(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),zi=Lt==="webkitTransition"||Lt==="OTransition"?Lt+"End":"transitionend";function ki(t){return typeof t=="string"?document.getElementById(t):t}function St(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||i==="auto")&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return i==="auto"?null:i}function x(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n}function C(t){var e=t.parentNode;e&&e.removeChild(t)}function Ut(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function yt(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function xt(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function Te(t,e){if(t.classList!==void 0)return t.classList.contains(e);var i=Jt(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function p(t,e){if(t.classList!==void 0)for(var i=ut(e),n=0,o=i.length;n0?2*window.devicePixelRatio:1;function Ii(t){return c.edge?t.wheelDeltaY/2:t.deltaY&&t.deltaMode===0?-t.deltaY/Fn:t.deltaY&&t.deltaMode===1?-t.deltaY*20:t.deltaY&&t.deltaMode===2?-t.deltaY*60:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?-t.detail*20:t.detail?t.detail/-32765*60:0}function Ee(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch{return!1}return i!==t}var po={__proto__:null,on:_,off:b,stopPropagation:lt,disableScrollPropagation:ke,disableClickPropagation:It,preventDefault:B,stop:_t,getPropagationPath:Zi,getMousePosition:Oi,getWheelDelta:Ii,isExternalTarget:Ee,addListener:_,removeListener:b},Wn=Kt.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=dt(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=D(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=this._duration*1e3;ethis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,I(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},panInside:function(t,e){e=e||{};var i=d(e.paddingTopLeft||e.padding||[0,0]),n=d(e.paddingBottomRight||e.padding||[0,0]),o=this.project(this.getCenter()),s=this.project(t),r=this.getPixelBounds(),a=H([r.min.add(i),r.max.subtract(n)]),h=a.getSize();if(!a.contains(s)){this._enforcingBounds=!0;var u=s.subtract(a.getCenter()),l=a.extend(s).getSize().subtract(h);o.x+=u.x<0?-l.x:l.x,o.y+=u.y<0?-l.y:l.y,this.panTo(this.unproject(o),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=T({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),n=e.divideBy(2).round(),o=i.divideBy(2).round(),s=n.subtract(o);return!s.x&&!s.y?this:(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(M(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=T({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=M(this._handleGeolocationResponse,this),i=M(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var e=t.code,i=t.message||(e===1?"permission denied":e===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=t.coords.latitude,i=t.coords.longitude,n=new P(e,i),o=n.toBounds(t.coords.accuracy*2),s=this._locateOptions;if(s.setView){var r=this.getBoundsZoom(o);this.setView(n,s.maxZoom?Math.min(r,s.maxZoom):r)}var a={latlng:n,bounds:o,timestamp:t.timestamp};for(var h in t.coords)typeof t.coords[h]=="number"&&(a[h]=t.coords[h]);this.fire("locationfound",a)}},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),C(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(V(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var t;for(t in this._layers)this._layers[t].remove();for(t in this._panes)C(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),n=x("div",i,e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new F(e,i)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=I(t),i=d(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),h=this.getSize().subtract(i),u=H(this.project(a,n),this.project(r,n)).getSize(),l=c.any3d?this.options.zoomSnap:1,f=h.x/u.x,v=h.y/u.y,N=e?Math.max(f,v):Math.min(f,v);return n=this.getScaleZoom(N,n),l&&(n=Math.round(n/(l/100))*(l/100),n=e?Math.ceil(n/l)*l:Math.floor(n/l)*l),Math.max(o,Math.min(s,n))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new m(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new z(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(t===void 0?this.getZoom():t)},getPane:function(t){return typeof t=="string"?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=e===void 0?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=e===void 0?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},project:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.latLngToPoint(g(t),e)},unproject:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.pointToLatLng(d(t),e)},layerPointToLatLng:function(t){var e=d(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(g(t))._round();return e._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(g(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(I(t))},distance:function(t,e){return this.options.crs.distance(g(t),g(e))},containerPointToLayerPoint:function(t){return d(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return d(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(d(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(g(t)))},mouseEventToContainerPoint:function(t){return Oi(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=ki(t);if(e){if(e._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");_(e,"scroll",this._onScroll,this),this._containerId=w(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&c.any3d,p(t,"leaflet-container"+(c.touch?" leaflet-touch":"")+(c.retina?" leaflet-retina":"")+(c.ielt9?" leaflet-oldie":"")+(c.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=St(t,"position");e!=="absolute"&&e!=="relative"&&e!=="fixed"&&e!=="sticky"&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),O(this._mapPane,new m(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(p(t.markerPane,"leaflet-zoom-hide"),p(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,i){O(this._mapPane,new m(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var o=this._zoom!==e;this._moveStart(o,i)._move(t,e)._moveEnd(o),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i,n){e===void 0&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?i&&i.pinch&&this.fire("zoom",i):((o||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return V(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){O(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[w(this._container)]=this;var e=t?b:_;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),c.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){V(this._resizeRequest),this._resizeRequest=D(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i=[],n,o=e==="mouseout"||e==="mouseover",s=t.target||t.srcElement,r=!1;s;){if(n=this._targets[w(s)],n&&(e==="click"||e==="preclick")&&this._draggableMoved(n)){r=!0;break}if(n&&n.listens(e,!0)&&(o&&!Ee(s,t)||(i.push(n),o))||s===this._container)break;s=s.parentNode}return!i.length&&!r&&!o&&this.listens(e,!0)&&(i=[this]),i},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||t.type==="click"&&this._isClickDisabled(e))){var i=t.type;i==="mousedown"&&Se(e),this._fireDOMEvent(t,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if(t.type==="click"){var n=T({},t);n.type="preclick",this._fireDOMEvent(n,n.type,i)}var o=this._findEventTargets(t,e);if(i){for(var s=[],r=0;r0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=c.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){E(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._trunc();return(e&&e.animate)!==!0&&!this.getSize().contains(i)?!1:(this.panBy(i,e),!0)},_createAnimProxy:function(){var t=this._proxy=x("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(e){var i=Le,n=this._proxy.style[i];ft(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),n===this._proxy.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){C(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();ft(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n);return i.animate!==!0&&!this.getSize().contains(o)?!1:(D(function(){this._moveStart(!0,i.noMoveStart||!1)._animateZoom(t,e,!0)},this),!0)},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,p(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(M(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&E(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function vo(t,e){return new y(t,e)}var J=st.extend({options:{position:"topright"},initialize:function(t){S(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return p(e,"leaflet-control"),i.indexOf("bottom")!==-1?n.insertBefore(e,n.firstChild):n.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(C(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),Qt=function(t){return new J(t)};y.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",i=this._controlContainer=x("div",e+"control-container",this._container);function n(o,s){var r=e+o+" "+e+s;t[o+s]=x("div",r,i)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)C(this._controlCorners[t]);C(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Ai=J.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(w(t.target)),i=e.overlay?t.type==="add"?"overlayadd":"overlayremove":t.type==="add"?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,e){var i='",n=document.createElement("div");return n.innerHTML=i,n.firstChild},_addItem:function(t){var e=document.createElement("label"),i=this._map.hasLayer(t.layer),n;t.overlay?(n=document.createElement("input"),n.type="checkbox",n.className="leaflet-control-layers-selector",n.defaultChecked=i):n=this._createRadioElement("leaflet-base-layers_"+w(this),i),this._layerControlInputs.push(n),n.layerId=w(t.layer),_(n,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var s=document.createElement("span");e.appendChild(s),s.appendChild(n),s.appendChild(o);var r=t.overlay?this._overlaysList:this._baseLayersList;return r.appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){if(!this._preventClick){var t=this._layerControlInputs,e,i,n=[],o=[];this._handlingClick=!0;for(var s=t.length-1;s>=0;s--)e=t[s],i=this._getLayer(e.layerId).layer,e.checked?n.push(i):e.checked||o.push(i);for(s=0;s=0;o--)e=t[o],i=this._getLayer(e.layerId).layer,e.disabled=i.options.minZoom!==void 0&&ni.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,_(t,"click",B),this.expand();var e=this;setTimeout(function(){b(t,"click",B),e._preventClick=!1})}}),Un=function(t,e,i){return new Ai(t,e,i)},Ze=J.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=x("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,o){var s=x("a",i,n);return s.innerHTML=t,s.href="#",s.title=e,s.setAttribute("role","button"),s.setAttribute("aria-label",e),It(s),_(s,"click",_t),_(s,"click",o,this),_(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";E(this._zoomInButton,e),E(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(p(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(p(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});y.mergeOptions({zoomControl:!0});y.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Ze,this.addControl(this.zoomControl))});var qn=function(t){return new Ze(t)},Bi=J.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=x("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=x("div",e,i)),t.imperial&&(this._iScale=x("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},_updateImperial:function(t){var e=t*3.2808399,i,n,o;e>5280?(i=e/5280,n=this._getRoundNum(i),this._updateScale(this._iScale,n+" mi",n/i)):(o=this._getRoundNum(e),this._updateScale(this._iScale,o+" ft",o/e))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,e*i}}),Vn=function(t){return new Bi(t)},Gn='',Oe=J.extend({options:{position:"bottomright",prefix:''+(c.inlineSvg?Gn+" ":"")+"Leaflet"},initialize:function(t){S(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=x("div","leaflet-control-attribution"),It(this._container);for(var e in t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(' ')}}});y.mergeOptions({attributionControl:!0});y.addInitHook(function(){this.options.attributionControl&&new Oe().addTo(this)});var jn=function(t){return new Oe(t)};J.Layers=Ai;J.Zoom=Ze;J.Scale=Bi;J.Attribution=Oe;Qt.layers=Un;Qt.zoom=qn;Qt.scale=Vn;Qt.attribution=jn;var tt=st.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});tt.addTo=function(t,e){return t.addHandler(e,this),this};var go={Events:W},ti=c.touch?"touchstart mousedown":"mousedown",ht=Kt.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){S(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(_(this._dragStartTarget,ti,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ht._dragging===this&&this.finishDrag(!0),b(this._dragStartTarget,ti,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!Te(this._element,"leaflet-zoom-anim"))){if(t.touches&&t.touches.length!==1){ht._dragging===this&&this.finishDrag();return}if(!(ht._dragging||t.shiftKey||t.which!==1&&t.button!==1&&!t.touches)&&(ht._dragging=this,this._preventOutline&&Se(this._element),Me(),zt(),!this._moving)){this.fire("down");var e=t.touches?t.touches[0]:t,i=Ei(this._element);this._startPoint=new m(e.clientX,e.clientY),this._startPos=dt(this._element),this._parentScale=ze(i);var n=t.type==="mousedown";_(document,n?"mousemove":"touchmove",this._onMove,this),_(document,n?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(t){if(this._enabled){if(t.touches&&t.touches.length>1){this._moved=!0;return}var e=t.touches&&t.touches.length===1?t.touches[0]:t,i=new m(e.clientX,e.clientY)._subtract(this._startPoint);!i.x&&!i.y||Math.abs(i.x)+Math.abs(i.y)s&&(r=a,s=h);s>i&&(e[r]=1,de(t,e,i,n,r),de(t,e,i,r,o))}function Xn(t,e){for(var i=[t[0]],n=1,o=0,s=t.length;ne&&(i.push(t[n]),o=n);return oe.max.x&&(i|=2),t.ye.max.y&&(i|=8),i}function Jn(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}function At(t,e,i,n){var o=e.x,s=e.y,r=i.x-o,a=i.y-s,h=r*r+a*a,u;return h>0&&(u=((t.x-o)*r+(t.y-s)*a)/h,u>1?(o=i.x,s=i.y):u>0&&(o+=r*u,s+=a*u)),r=t.x-o,a=t.y-s,n?r*r+a*a:new m(o,s)}function G(t){return!j(t[0])||typeof t[0][0]!="object"&&typeof t[0][0]<"u"}function Wi(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),G(t)}function Ui(t,e){var i,n,o,s,r,a,h,u;if(!t||t.length===0)throw new Error("latlngs not passed");G(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var l=g([0,0]),f=I(t),v=f.getNorthWest().distanceTo(f.getSouthWest())*f.getNorthEast().distanceTo(f.getNorthWest());v<1700&&(l=Ie(t));var N=t.length,A=[];for(i=0;in){h=(s-n)/o,u=[a.x-h*(a.x-r.x),a.y-h*(a.y-r.y)];break}var R=e.unproject(d(u));return g([R.lat+l.lat,R.lng+l.lng])}var xo={__proto__:null,simplify:Di,pointToSegmentDistance:Hi,closestPointOnSegment:Kn,clipSegment:Fi,_getEdgeIntersection:Vt,_getBitCode:ct,_sqClosestPointOnSegment:At,isFlat:G,_flat:Wi,polylineCenter:Ui},Ae={project:function(t){return new m(t.lng,t.lat)},unproject:function(t){return new P(t.y,t.x)},bounds:new z([-180,-90],[180,90])},_e={R:6378137,R_MINOR:6356752314245179e-9,bounds:new z([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,o=this.R_MINOR/i,s=Math.sqrt(1-o*o),r=s*Math.sin(n),a=Math.tan(Math.PI/4-n/2)/Math.pow((1-r)/(1+r),s/2);return n=-i*Math.log(Math.max(a,1e-10)),new m(t.lng*e*i,n)},unproject:function(t){for(var e=180/Math.PI,i=this.R,n=this.R_MINOR/i,o=Math.sqrt(1-n*n),s=Math.exp(-t.y/i),r=Math.PI/2-2*Math.atan(s),a=0,h=.1,u;a<15&&Math.abs(h)>1e-7;a++)u=o*Math.sin(r),u=Math.pow((1-u)/(1+u),o/2),h=Math.PI/2-2*Math.atan(s*u)-r,r+=h;return new P(r*e,t.x*e/i)}},wo={__proto__:null,LonLat:Ae,Mercator:_e,SphericalMercator:ae},$n=T({},ot,{code:"EPSG:3395",projection:_e,transformation:function(){var t=.5/(Math.PI*_e.R);return Yt(t,.5,-t,.5)}()}),qi=T({},ot,{code:"EPSG:4326",projection:Ae,transformation:Yt(1/180,1,-1/180,.5)}),Qn=T({},rt,{projection:Ae,transformation:Yt(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0});rt.Earth=ot;rt.EPSG3395=$n;rt.EPSG3857=ve;rt.EPSG900913=cn;rt.EPSG4326=qi;rt.Simple=Qn;var $=Kt.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[w(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[w(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",function(){e.off(i,this)},this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});y.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=w(t);return this._layers[e]?this:(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var e=w(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return w(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){t=t?j(t)?t:[t]:[];for(var e=0,i=t.length;ethis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&e[0]instanceof P&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){it.prototype._setLatLngs.call(this,t),G(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return G(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new m(e,e);if(t=new z(t.min.subtract(i),t.max.add(i)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}for(var n=0,o=this._rings.length,s;nt.y!=o.y>t.y&&t.x<(o.x-n.x)*(t.y-n.y)/(o.y-n.y)+n.x&&(e=!e);return e||it.prototype._containsPoint.call(this,t,!0)}});function zo(t,e){return new Zt(t,e)}var at=nt.extend({initialize:function(t,e){S(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e=j(t)?t:t.features,i,n,o;if(e){for(i=0,n=e.length;i0&&o.push(o[0].slice()),o}function gt(t,e){return t.feature?T({},t.feature,{geometry:e}):ee(e)}function ee(t){return t.type==="Feature"||t.type==="FeatureCollection"?t:{type:"Feature",properties:{},geometry:t}}var He={toGeoJSON:function(t){return gt(this,{type:"Point",coordinates:De(this.getLatLng(),t)})}};Be.include(He);Vi.include(He);Ne.include(He);it.include({toGeoJSON:function(t){var e=!G(this._latlngs),i=te(this._latlngs,e?1:0,!1,t);return gt(this,{type:(e?"Multi":"")+"LineString",coordinates:i})}});Zt.include({toGeoJSON:function(t){var e=!G(this._latlngs),i=e&&!G(this._latlngs[0]),n=te(this._latlngs,i?2:e?1:0,!0,t);return e||(n=[n]),gt(this,{type:(i?"Multi":"")+"Polygon",coordinates:n})}});Tt.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(i){e.push(i.toGeoJSON(t).geometry.coordinates)}),gt(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(e==="MultiPoint")return this.toMultiPoint(t);var i=e==="GeometryCollection",n=[];return this.eachLayer(function(o){if(o.toGeoJSON){var s=o.toGeoJSON(t);if(i)n.push(s.geometry);else{var r=ee(s);r.type==="FeatureCollection"?n.push.apply(n,r.features):n.push(r)}}}),i?gt(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});function to(t,e){return new at(t,e)}var ko=to,Fe=$.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t,this._bounds=I(e),S(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(p(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){C(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&yt(this._image),this},bringToBack:function(){return this._map&&xt(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=I(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t=this._url.tagName==="IMG",e=this._image=t?this._url:x("img");if(p(e,"leaflet-image-layer"),this._zoomAnimated&&p(e,"leaflet-zoom-animated"),this.options.className&&p(e,this.options.className),e.onselectstart=k,e.onmousemove=k,e.onload=M(this.fire,this,"load"),e.onerror=M(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(e.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t){this._url=e.src;return}e.src=this._url,e.alt=this.options.alt},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;ft(this._image,i,e)},_reset:function(){var t=this._image,e=new z(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();O(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){q(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),Eo=function(t,e,i){return new Fe(t,e,i)},eo=Fe.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t=this._url.tagName==="VIDEO",e=this._image=t?this._url:x("video");if(p(e,"leaflet-image-layer"),this._zoomAnimated&&p(e,"leaflet-zoom-animated"),this.options.className&&p(e,this.options.className),e.onselectstart=k,e.onmousemove=k,e.onloadeddata=M(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),n=[],o=0;o0?n:[e.src];return}j(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var s=0;so?(e.height=o+"px",p(t,s)):E(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();O(this._container,e.add(i))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var t=this._map,e=parseInt(St(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,o=new m(this._containerLeft,-i-this._containerBottom);o._add(dt(this._container));var s=t.layerPointToContainerPoint(o),r=d(this.options.autoPanPadding),a=d(this.options.autoPanPaddingTopLeft||r),h=d(this.options.autoPanPaddingBottomRight||r),u=t.getSize(),l=0,f=0;s.x+n+h.x>u.x&&(l=s.x+n-u.x+h.x),s.x-l-a.x<0&&(l=s.x-a.x),s.y+i+h.y>u.y&&(f=s.y+i-u.y+h.y),s.y-f-a.y<0&&(f=s.y-a.y),(l||f)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([l,f]))}},_getAnchor:function(){return d(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Io=function(t,e){return new We(t,e)};y.mergeOptions({closePopupOnClick:!0});y.include({openPopup:function(t,e,i){return this._initOverlay(We,t,e,i).openOn(this),this},closePopup:function(t){return t=arguments.length?t:this._popup,t&&t.close(),this}});$.include({bindPopup:function(t,e){return this._popup=this._initOverlay(We,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof nt||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(!(!this._popup||!this._map)){_t(t);var e=t.layer||t.target;if(this._popup._source===e&&!(e instanceof mt)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng);return}this._popup._source=e,this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){t.originalEvent.keyCode===13&&this._openPopup(t)}});var Ue=Q.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Q.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Q.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Q.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip",e=t+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=x("div",e),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+w(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i,n=this._map,o=this._container,s=n.latLngToContainerPoint(n.getCenter()),r=n.layerPointToContainerPoint(t),a=this.options.direction,h=o.offsetWidth,u=o.offsetHeight,l=d(this.options.offset),f=this._getAnchor();a==="top"?(e=h/2,i=u):a==="bottom"?(e=h/2,i=0):a==="center"?(e=h/2,i=u/2):a==="right"?(e=0,i=u/2):a==="left"?(e=h,i=u/2):r.xthis.options.maxZoom||in?this._retainParent(o,s,r,n):!1)},_retainChildren:function(t,e,i,n){for(var o=2*t;o<2*t+2;o++)for(var s=2*e;s<2*e+2;s++){var r=new m(o,s);r.z=i+1;var a=this._tileCoordsToKey(r),h=this._tiles[a];if(h&&h.active){h.retain=!0;continue}else h&&h.loaded&&(h.retain=!0);i+1this.options.maxZoom||this.options.minZoom!==void 0&&o1){this._setView(t,i);return}for(var f=o.min.y;f<=o.max.y;f++)for(var v=o.min.x;v<=o.max.x;v++){var N=new m(v,f);if(N.z=this._tileZoom,!!this._isValidTile(N)){var A=this._tiles[this._tileCoordsToKey(N)];A?A.current=!0:r.push(N)}}if(r.sort(function(R,pt){return R.distanceTo(s)-pt.distanceTo(s)}),r.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var U=document.createDocumentFragment();for(v=0;vi.max.x)||!e.wrapLat&&(t.yi.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return I(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),o=n.add(i),s=e.unproject(n,t.z),r=e.unproject(o,t.z);return[s,r]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new F(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new m(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(C(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){p(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=k,t.onmousemove=k,c.ielt9&&this.options.opacity<1&&q(t,this.options.opacity)},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),M(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&D(M(this._tileReady,this,t,null,o)),O(o,i),this._tiles[n]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);i=this._tiles[n],i&&(i.loaded=+new Date,this._map._fadeAnimated?(q(i.el,0),V(this._fadeFrame),this._fadeFrame=D(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(p(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),c.ielt9||!this._map._fadeAnimated?D(this._pruneTiles,this):setTimeout(M(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new m(this._wrapX?Ct(t.x,this._wrapX):t.x,this._wrapY?Ct(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new z(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function No(t){return new Ht(t)}var Mt=Ht.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,e=S(this,e),e.detectRetina&&c.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),typeof e.subdomains=="string"&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&e===void 0&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var i=document.createElement("img");return _(i,"load",M(this._tileOnLoad,this,e,i)),_(i,"error",M(this._tileOnError,this,e,i)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(i.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(i.referrerPolicy=this.options.referrerPolicy),i.alt="",i.src=this.getTileUrl(t),i},getTileUrl:function(t){var e={r:c.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return ai(this._url,T(e,this.options))},_tileOnLoad:function(t,e){c.ielt9?setTimeout(M(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,i=this.options.zoomReverse,n=this.options.zoomOffset;return i&&(t=e-t),t+n},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&(e=this._tiles[t].el,e.onload=k,e.onerror=k,!e.complete)){e.src=Nt;var i=this._tiles[t].coords;C(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:i})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",Nt),Ht.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(!(!this._map||i&&i.getAttribute("src")===Nt))return Ht.prototype._tileReady.call(this,t,e,i)}});function oo(t,e){return new Mt(t,e)}var Gi=Mt.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i=T({},this.defaultWmsParams);for(var n in e)n in this.options||(i[n]=e[n]);e=S(this,e);var o=e.detectRetina&&c.retina?2:1,s=this.getTileSize();i.width=s.x*o,i.height=s.y*o,this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,Mt.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,n=H(i.project(e[0]),i.project(e[1])),o=n.min,s=n.max,r=(this._wmsVersion>=1.3&&this._crs===qi?[o.y,o.x,s.y,s.x]:[o.x,o.y,s.x,s.y]).join(","),a=Mt.prototype.getTileUrl.call(this,t);return a+ri(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,e){return T(this.wmsParams,t),e||this.redraw(),this}});function so(t,e){return new Gi(t,e)}Mt.WMS=Gi;oo.wms=so;var et=$.extend({options:{padding:.1},initialize:function(t){S(this,t),w(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),p(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var i=this._map.getZoomScale(e,this._zoom),n=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),s=n.multiplyBy(-i).add(o).subtract(this._map._getNewPixelOrigin(t,e));c.any3d?ft(this._container,s,i):O(this._container,s)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var t in this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new z(i,i.add(e.multiplyBy(1+t*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),ro=et.extend({options:{tolerance:0},getEvents:function(){var t=et.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){et.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");_(t,"mousemove",this._onMouseMove,this),_(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),_(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){V(this._redrawRequest),delete this._ctx,C(this._container),b(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var t;this._redrawBounds=null;for(var e in this._layers)t=this._layers[e],t._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){et.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=c.retina?2:1;O(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",c.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){et.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[w(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,i=e.next,n=e.prev;i?i.prev=n:this._drawLast=n,n?n.next=i:this._drawFirst=i,delete t._order,delete this._layers[w(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if(typeof t.options.dashArray=="string"){var e=t.options.dashArray.split(/[, ]+/),i=[],n,o;for(o=0;o')}}catch{}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),ho={_initContainer:function(){this._container=x("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(et.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Pt("shape");p(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Pt("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[w(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;C(e),t.removeInteractiveTarget(e),delete this._layers[w(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(e||(e=t._stroke=Pt("stroke")),o.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=j(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(o.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=Pt("fill")),o.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(o.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,"+65535*360)},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){yt(t._container)},_bringToBack:function(t){xt(t._container)}},Ft=c.vml?Pt:ci,ie=et.extend({_initContainer:function(){this._container=Ft("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Ft("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){C(this._container),b(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){et.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;(!this._svgSize||!this._svgSize.equals(e))&&(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),O(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=Ft("path");t.options.className&&p(e,t.options.className),t.options.interactive&&p(e,"leaflet-interactive"),this._updateStyle(t),this._layers[w(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){C(t._path),t.removeInteractiveTarget(t._path),delete this._layers[w(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,fi(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n=Math.max(Math.round(t._radiusY),1)||i,o="a"+i+","+n+" 0 1,0 ",s=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+o+i*2+",0 "+o+-i*2+",0 ";this._setPath(t,s)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){yt(t._path)},_bringToBack:function(t){xt(t._path)}});c.vml&&ie.include(ho);function uo(t){return c.svg||c.vml?new ie(t):null}y.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if(t==="overlayPane"||t===void 0)return!1;var e=this._paneRenderers[t];return e===void 0&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&ao(t)||uo(t)}});var lo=Zt.extend({initialize:function(t,e){Zt.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=I(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function Ro(t,e){return new lo(t,e)}ie.create=Ft;ie.pointsToPath=fi;at.geometryToLayer=Gt;at.coordsToLatLng=Re;at.coordsToLatLngs=jt;at.latLngToCoords=De;at.latLngsToCoords=te;at.getFeature=gt;at.asFeature=ee;y.mergeOptions({boxZoom:!0});var ji=tt.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){_(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){b(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){C(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||t.which!==1&&t.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),zt(),Me(),this._startPoint=this._map.mouseEventToContainerPoint(t),_(document,{contextmenu:_t,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=x("div","leaflet-zoom-box",this._container),p(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new z(this._point,this._startPoint),i=e.getSize();O(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(C(this._box),E(this._container,"leaflet-crosshair")),kt(),Ce(),b(document,{contextmenu:_t,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if(!(t.which!==1&&t.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(M(this._resetState,this),0);var e=new F(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){t.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});y.addInitHook("addHandler","boxZoom",ji);y.mergeOptions({doubleClickZoom:!0});var Ki=tt.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,o=t.originalEvent.shiftKey?i-n:i+n;e.options.doubleClickZoom==="center"?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});y.addInitHook("addHandler","doubleClickZoom",Ki);y.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Yi=tt.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new ht(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}p(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){E(this._map._container,"leaflet-grab"),E(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=I(this._map.options.maxBounds);this._offsetLimit=H(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.xe.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,s=(n+e+i)%t-e-i,r=Math.abs(o+i)0?s:-s))-e;this._delta=0,this._startTime=null,r&&(t.options.scrollWheelZoom==="center"?t.setZoom(e+r):t.setZoomAround(this._lastMousePos,e+r))}});y.addInitHook("addHandler","scrollWheelZoom",Ji);var co=600;y.mergeOptions({tapHold:c.touchNative&&c.safari&&c.mobile,tapTolerance:15});var $i=tt.extend({addHooks:function(){_(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){b(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),t.touches.length===1){var e=t.touches[0];this._startPos=this._newPos=new m(e.clientX,e.clientY),this._holdTimeout=setTimeout(M(function(){this._cancel(),this._isTapValid()&&(_(document,"touchend",B),_(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))},this),co),_(document,"touchend touchcancel contextmenu",this._cancel,this),_(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){b(document,"touchend",B),b(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),b(document,"touchend touchcancel contextmenu",this._cancel,this),b(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new m(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var i=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});i._simulated=!0,e.target.dispatchEvent(i)}});y.addInitHook("addHandler","tapHold",$i);y.mergeOptions({touchZoom:c.touch,bounceAtZoomLimits:!0});var Qi=tt.extend({addHooks:function(){p(this._map._container,"leaflet-touch-zoom"),_(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){E(this._map._container,"leaflet-touch-zoom"),b(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(!(!t.touches||t.touches.length!==2||e._animatingZoom||this._zooming)){var i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),e.options.touchZoom!=="center"&&(this._pinchStartLatLng=e.containerPointToLatLng(i.add(n)._divideBy(2))),this._startDist=i.distanceTo(n),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),_(document,"touchmove",this._onTouchMove,this),_(document,"touchend touchcancel",this._onTouchEnd,this),B(t)}},_onTouchMove:function(t){if(!(!t.touches||t.touches.length!==2||!this._zooming)){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),o=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoome.getMaxZoom()&&o>1)&&(this._zoom=e._limitZoom(this._zoom)),e.options.touchZoom==="center"){if(this._center=this._startLatLng,o===1)return}else{var s=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(o===1&&s.x===0&&s.y===0)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),V(this._animRequest);var r=M(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=D(r,this,!0),B(t)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,V(this._animRequest),b(document,"touchmove",this._onTouchMove,this),b(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});y.addInitHook("addHandler","touchZoom",Qi);y.BoxZoom=ji;y.DoubleClickZoom=Ki;y.Drag=Yi;y.Keyboard=Xi;y.ScrollWheelZoom=Ji;y.TapHold=$i;y.TouchZoom=Qi;export{z as Bounds,c as Browser,rt as CRS,ro as Canvas,Vi as Circle,Ne as CircleMarker,st as Class,J as Control,no as DivIcon,Q as DivOverlay,po as DomEvent,mo as DomUtil,ht as Draggable,Kt as Evented,nt as FeatureGroup,at as GeoJSON,Ht as GridLayer,tt as Handler,Et as Icon,Fe as ImageOverlay,P as LatLng,F as LatLngBounds,$ as Layer,Tt as LayerGroup,xo as LineUtil,y as Map,Be as Marker,go as Mixin,mt as Path,m as Point,yo as PolyUtil,Zt as Polygon,it as Polyline,We as Popup,Wn as PosAnimation,wo as Projection,lo as Rectangle,et as Renderer,ie as SVG,io as SVGOverlay,Mt as TileLayer,Ue as Tooltip,li as Transformation,_o as Util,eo as VideoOverlay,M as bind,H as bounds,ao as canvas,Co as circle,Mo as circleMarker,Qt as control,Bo as divIcon,T as extend,Lo as featureGroup,to as geoJSON,ko as geoJson,No as gridLayer,To as icon,Eo as imageOverlay,g as latLng,I as latLngBounds,Po as layerGroup,vo as map,bo as marker,d as point,zo as polygon,So as polyline,Io as popup,Ro as rectangle,S as setOptions,w as stamp,uo as svg,Oo as svgOverlay,oo as tileLayer,Ao as tooltip,Yt as transformation,fo as version,Zo as videoOverlay}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/mac-installed-app-settings-B9fFiuKk.png b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/mac-installed-app-settings-B9fFiuKk.png deleted file mode 100644 index c3afd4d..0000000 Binary files a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/mac-installed-app-settings-B9fFiuKk.png and /dev/null differ diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/main-D6gZ_dcu.css b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/main-D6gZ_dcu.css deleted file mode 100644 index bf897de..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/main-D6gZ_dcu.css +++ /dev/null @@ -1 +0,0 @@ -@import"https://fonts.googleapis.com/css2?family=Work+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap";*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}html{font-family:Work Sans,ui-sans-serif,system-ui,sans-serif!important}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}input:checked~.dot{transform:translate(100%);background-color:#fff!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.-left-2{left:-.5rem}.-top-1{top:-.25rem}.bottom-0{bottom:0}.bottom-1\/4{bottom:25%}.bottom-2{bottom:.5rem}.bottom-24{bottom:6rem}.bottom-\[1rem\]{bottom:1rem}.left-0{left:0}.left-1{left:.25rem}.left-1\/4{left:25%}.left-6{left:1.5rem}.left-\[1rem\]{left:1rem}.right-0{right:0}.right-1\/4{right:25%}.right-2{right:.5rem}.right-4{right:1rem}.right-5{right:1.25rem}.right-6{right:1.5rem}.right-\[1rem\]{right:1rem}.top-0{top:0}.top-1{top:.25rem}.top-1\/4{top:25%}.top-12{top:3rem}.top-2{top:.5rem}.top-24{top:6rem}.top-3{top:.75rem}.top-4{top:1rem}.\!z-40{z-index:40!important}.z-50{z-index:50}.z-\[100\]{z-index:100}.z-\[60\]{z-index:60}.col-span-1{grid-column:span 1 / span 1}.col-span-10{grid-column:span 10 / span 10}.col-span-11{grid-column:span 11 / span 11}.col-span-2{grid-column:span 2 / span 2}.col-span-5{grid-column:span 5 / span 5}.float-right{float:right}.m-1{margin:.25rem}.m-2{margin:.5rem}.m-4{margin:1rem}.m-auto{margin:auto}.mx-0\.5{margin-left:.125rem;margin-right:.125rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-0\.5{margin-top:.125rem;margin-bottom:.125rem}.my-4{margin-top:1rem;margin-bottom:1rem}.-mb-px{margin-bottom:-1px}.-ml-1\.5{margin-left:-.375rem}.-mt-1{margin-top:-.25rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-12{margin-left:3rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.ml-6{margin-left:1.5rem}.ml-8{margin-left:2rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mr-8{margin-right:2rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-12{margin-top:3rem}.mt-16{margin-top:4rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.aspect-\[3\/2\]{aspect-ratio:3/2}.aspect-video{aspect-ratio:16 / 9}.h-1\/4{height:25%}.h-10{height:2.5rem}.h-12{height:3rem}.h-16{height:4rem}.h-24{height:6rem}.h-32{height:8rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-96{height:24rem}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-12{max-height:3rem}.max-h-16{max-height:4rem}.max-h-\[90vh\]{max-height:90vh}.max-h-\[calc\(100vh-5rem\)\]{max-height:calc(100vh - 5rem)}.min-h-\[24px\]{min-height:24px}.min-h-screen{min-height:100vh}.w-1\/2{width:50%}.w-1\/3{width:33.333333%}.w-1\/4{width:25%}.w-11\/12{width:91.666667%}.w-12{width:3rem}.w-14{width:3.5rem}.w-20{width:5rem}.w-5{width:1.25rem}.w-5\/6{width:83.333333%}.w-56{width:14rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-\[1em\]{width:1em}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.min-w-\[24px\]{min-width:24px}.min-w-full{min-width:100%}.max-w-12{max-width:3rem}.max-w-16{max-width:4rem}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-\[90vw\]{max-width:90vw}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.basis-1\/5{flex-basis:20%}.table-auto{table-layout:auto}.translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-1\/2{--tw-translate-y: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-2{--tw-translate-y: .5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.list-outside{list-style-position:outside}.list-disc{list-style-type:disc}.columns-3{-moz-columns:3;columns:3}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-y-5{row-gap:1.25rem}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.justify-self-start{justify-self:start}.justify-self-end{justify-self:end}.justify-self-stretch{justify-self:stretch}.overflow-hidden{overflow:hidden}.overflow-x-scroll{overflow-x:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-l-md{border-top-left-radius:.375rem;border-bottom-left-radius:.375rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-r-md{border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-b-4{border-bottom-width:4px}.border-l{border-left-width:1px}.border-l-0{border-left-width:0px}.border-l-4{border-left-width:4px}.border-r-0{border-right-width:0px}.border-r-4{border-right-width:4px}.border-t{border-top-width:1px}.border-t-4{border-top-width:4px}.border-dashed{border-style:dashed}.border-amber-500{--tw-border-opacity: 1;border-color:rgb(245 158 11 / var(--tw-border-opacity, 1))}.border-black{--tw-border-opacity: 1;border-color:rgb(0 0 0 / var(--tw-border-opacity, 1))}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.border-blue-400{--tw-border-opacity: 1;border-color:rgb(96 165 250 / var(--tw-border-opacity, 1))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-green-400{--tw-border-opacity: 1;border-color:rgb(74 222 128 / var(--tw-border-opacity, 1))}.border-slate-300{--tw-border-opacity: 1;border-color:rgb(203 213 225 / var(--tw-border-opacity, 1))}.border-slate-400{--tw-border-opacity: 1;border-color:rgb(148 163 184 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity, 1))}.bg-amber-100{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / var(--tw-bg-opacity, 1))}.bg-amber-200{--tw-bg-opacity: 1;background-color:rgb(253 230 138 / var(--tw-bg-opacity, 1))}.bg-amber-600{--tw-bg-opacity: 1;background-color:rgb(217 119 6 / var(--tw-bg-opacity, 1))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\/50{background-color:#00000080}.bg-black\/90{background-color:#000000e6}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-200{--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity, 1))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-blue-700{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity, 1))}.bg-blue-800{--tw-bg-opacity: 1;background-color:rgb(30 64 175 / var(--tw-bg-opacity, 1))}.bg-emerald-100{--tw-bg-opacity: 1;background-color:rgb(209 250 229 / var(--tw-bg-opacity, 1))}.bg-emerald-200{--tw-bg-opacity: 1;background-color:rgb(167 243 208 / var(--tw-bg-opacity, 1))}.bg-emerald-600{--tw-bg-opacity: 1;background-color:rgb(5 150 105 / var(--tw-bg-opacity, 1))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity, 1))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-200{--tw-bg-opacity: 1;background-color:rgb(187 247 208 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity, 1))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-rose-100{--tw-bg-opacity: 1;background-color:rgb(255 228 230 / var(--tw-bg-opacity, 1))}.bg-rose-200{--tw-bg-opacity: 1;background-color:rgb(254 205 211 / var(--tw-bg-opacity, 1))}.bg-rose-600{--tw-bg-opacity: 1;background-color:rgb(225 29 72 / var(--tw-bg-opacity, 1))}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.bg-slate-200{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity, 1))}.bg-slate-400{--tw-bg-opacity: 1;background-color:rgb(148 163 184 / var(--tw-bg-opacity, 1))}.bg-slate-500{--tw-bg-opacity: 1;background-color:rgb(100 116 139 / var(--tw-bg-opacity, 1))}.bg-slate-600{--tw-bg-opacity: 1;background-color:rgb(71 85 105 / var(--tw-bg-opacity, 1))}.bg-slate-900{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity, 1))}.bg-slate-900\/50{background-color:#0f172a80}.bg-slate-900\/90{background-color:#0f172ae6}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.bg-yellow-600{--tw-bg-opacity: 1;background-color:rgb(202 138 4 / var(--tw-bg-opacity, 1))}.bg-opacity-50{--tw-bg-opacity: .5}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.from-blue-400{--tw-gradient-from: #60a5fa var(--tw-gradient-from-position);--tw-gradient-to: rgb(96 165 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-green-400{--tw-gradient-from: #4ade80 var(--tw-gradient-from-position);--tw-gradient-to: rgb(74 222 128 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-green-500{--tw-gradient-from: #22c55e var(--tw-gradient-from-position);--tw-gradient-to: rgb(34 197 94 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-400{--tw-gradient-from: #f87171 var(--tw-gradient-from-position);--tw-gradient-to: rgb(248 113 113 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-rose-500{--tw-gradient-from: #f43f5e var(--tw-gradient-from-position);--tw-gradient-to: rgb(244 63 94 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-slate-400{--tw-gradient-from: #94a3b8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(148 163 184 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-yellow-400{--tw-gradient-from: #facc15 var(--tw-gradient-from-position);--tw-gradient-to: rgb(250 204 21 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-blue-700{--tw-gradient-to: #1d4ed8 var(--tw-gradient-to-position)}.to-green-700{--tw-gradient-to: #15803d var(--tw-gradient-to-position)}.to-green-800{--tw-gradient-to: #166534 var(--tw-gradient-to-position)}.to-red-700{--tw-gradient-to: #b91c1c var(--tw-gradient-to-position)}.to-rose-800{--tw-gradient-to: #9f1239 var(--tw-gradient-to-position)}.to-slate-700{--tw-gradient-to: #334155 var(--tw-gradient-to-position)}.to-yellow-700{--tw-gradient-to: #a16207 var(--tw-gradient-to-position)}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-12{padding-left:3rem;padding-right:3rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-7{padding-left:1.75rem;padding-right:1.75rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pb-24{padding-bottom:6rem}.pb-4{padding-bottom:1rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pr-2{padding-right:.5rem}.pr-8{padding-right:2rem}.pt-1{padding-top:.25rem}.pt-2\.5{padding-top:.625rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.align-text-bottom{vertical-align:text-bottom}.text-2xl{font-size:1.5rem;line-height:2rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-6xl{font-size:3.75rem;line-height:1}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-light{font-weight:300}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-none{line-height:1}.text-amber-100{--tw-text-opacity: 1;color:rgb(254 243 199 / var(--tw-text-opacity, 1))}.text-amber-600{--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity, 1))}.text-amber-900{--tw-text-opacity: 1;color:rgb(120 53 15 / var(--tw-text-opacity, 1))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-emerald-100{--tw-text-opacity: 1;color:rgb(209 250 229 / var(--tw-text-opacity, 1))}.text-emerald-600{--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity, 1))}.text-emerald-900{--tw-text-opacity: 1;color:rgb(6 78 59 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-green-100{--tw-text-opacity: 1;color:rgb(220 252 231 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-orange-400{--tw-text-opacity: 1;color:rgb(251 146 60 / var(--tw-text-opacity, 1))}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.text-orange-600{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-rose-100{--tw-text-opacity: 1;color:rgb(255 228 230 / var(--tw-text-opacity, 1))}.text-rose-600{--tw-text-opacity: 1;color:rgb(225 29 72 / var(--tw-text-opacity, 1))}.text-rose-900{--tw-text-opacity: 1;color:rgb(136 19 55 / var(--tw-text-opacity, 1))}.text-slate-100{--tw-text-opacity: 1;color:rgb(241 245 249 / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-slate-900{--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-300{--tw-text-opacity: 1;color:rgb(253 224 71 / var(--tw-text-opacity, 1))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[inset_0_-1px_0_0_rgba\(0\,0\,0\,0\.5\)\]{--tw-shadow: inset 0 -1px 0 0 rgba(0,0,0,.5);--tw-shadow-colored: inset 0 -1px 0 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.delay-300{transition-delay:.3s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.hover\:border-slate-400:hover{--tw-border-opacity: 1;border-color:rgb(148 163 184 / var(--tw-border-opacity, 1))}.hover\:bg-blue-200:hover{--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-300:hover{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity, 1))}.hover\:bg-green-200:hover{--tw-bg-opacity: 1;background-color:rgb(187 247 208 / var(--tw-bg-opacity, 1))}.hover\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-200:hover{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-600:hover{--tw-bg-opacity: 1;background-color:rgb(71 85 105 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-700:hover{--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity, 1))}.hover\:bg-white\/10:hover{background-color:#ffffff1a}.hover\:from-green-500:hover{--tw-gradient-from: #22c55e var(--tw-gradient-from-position);--tw-gradient-to: rgb(34 197 94 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:to-green-800:hover{--tw-gradient-to: #166534 var(--tw-gradient-to-position)}.hover\:text-blue-800:hover{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.hover\:text-green-800:hover{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.hover\:text-red-700:hover{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.hover\:text-red-800:hover{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.hover\:text-slate-800:hover{--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity, 1))}.hover\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.focus\:border-indigo-500:focus{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity, 1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity, 1))}.group:hover .group-hover\:flex{display:flex}@media (min-width: 640px){.sm\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:translate-x-4{--tw-translate-x: 1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:translate-y-4{--tw-translate-y: 1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.sm\:text-base{font-size:1rem;line-height:1.5rem}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 768px){.md\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}@media (orientation: portrait){.portrait\:bottom-0{bottom:0}.portrait\:bottom-2{bottom:.5rem}.portrait\:left-0{left:0}.portrait\:right-0{right:0}.portrait\:right-16{right:4rem}.portrait\:pb-2{padding-bottom:.5rem}}@media (orientation: landscape){.landscape\:bottom-0{bottom:0}.landscape\:bottom-16{bottom:4rem}.landscape\:right-0{right:0}.landscape\:top-0{top:0}.landscape\:flex-row{flex-direction:row}.landscape\:pr-4{padding-right:1rem}} diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/main.capacitor-CiEwp7dR.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/main.capacitor-CiEwp7dR.js deleted file mode 100644 index 2160074..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/main.capacitor-CiEwp7dR.js +++ /dev/null @@ -1,2 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/web-DmsbVeCO.js","assets/main.common-DD7dqhZp.js","assets/index-BGoTPXII.js","assets/main-D6gZ_dcu.css"])))=>i.map(i=>d[i]); -var Pt=Object.defineProperty;var St=(r,e,t)=>e in r?Pt(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var Xe=(r,e,t)=>St(r,typeof e!="symbol"?e+"":e,t);import{l as ze,i as Zt,r as at}from"./main.common-DD7dqhZp.js";import{_ as jt}from"./index-BGoTPXII.js";/*! Capacitor: https://capacitorjs.com/ - MIT License */const Rt=r=>{const e=new Map;e.set("web",{name:"web"});const t=r.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:e},n=(a,o)=>{t.platforms.set(a,o)},s=a=>{t.platforms.has(a)&&(t.currentPlatform=t.platforms.get(a))};return t.addPlatform=n,t.setPlatform=s,t},It=r=>r.CapacitorPlatforms=Rt(r),it=It(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});it.addPlatform;it.setPlatform;var ae;(function(r){r.Unimplemented="UNIMPLEMENTED",r.Unavailable="UNAVAILABLE"})(ae||(ae={}));class Ve extends Error{constructor(e,t,n){super(e),this.message=e,this.code=t,this.data=n}}const Nt=r=>{var e,t;return r!=null&&r.androidBridge?"android":!((t=(e=r==null?void 0:r.webkit)===null||e===void 0?void 0:e.messageHandlers)===null||t===void 0)&&t.bridge?"ios":"web"},Lt=r=>{var e,t,n,s,a;const o=r.CapacitorCustomPlatform||null,i=r.Capacitor||{},l=i.Plugins=i.Plugins||{},d=r.CapacitorPlatforms,p=()=>o!==null?o.name:Nt(r),k=((e=d==null?void 0:d.currentPlatform)===null||e===void 0?void 0:e.getPlatform)||p,z=()=>k()!=="web",ce=((t=d==null?void 0:d.currentPlatform)===null||t===void 0?void 0:t.isNativePlatform)||z,_t=w=>{const T=$e.get(w);return!!(T!=null&&T.platforms.has(k())||Je(w))},bt=((n=d==null?void 0:d.currentPlatform)===null||n===void 0?void 0:n.isPluginAvailable)||_t,xt=w=>{var T;return(T=i.PluginHeaders)===null||T===void 0?void 0:T.find(ee=>ee.name===w)},Je=((s=d==null?void 0:d.currentPlatform)===null||s===void 0?void 0:s.getPluginHeader)||xt,kt=w=>r.console.error(w),wt=(w,T,ee)=>Promise.reject(`${ee} does not have an implementation of "${T}".`),$e=new Map,Tt=(w,T={})=>{const ee=$e.get(w);if(ee)return console.warn(`Capacitor plugin "${w}" already registered. Cannot register plugins twice.`),ee.proxy;const J=k(),te=Je(w);let M;const Et=async()=>(!M&&J in T?M=typeof T[J]=="function"?M=await T[J]():M=T[J]:o!==null&&!M&&"web"in T&&(M=typeof T.web=="function"?M=await T.web():M=T.web),M),At=(C,O)=>{var I,B;if(te){const F=te==null?void 0:te.methods.find(S=>O===S.name);if(F)return F.rtype==="promise"?S=>i.nativePromise(w,O.toString(),S):(S,Ee)=>i.nativeCallback(w,O.toString(),S,Ee);if(C)return(I=C[O])===null||I===void 0?void 0:I.bind(C)}else{if(C)return(B=C[O])===null||B===void 0?void 0:B.bind(C);throw new Ve(`"${w}" plugin is not implemented on ${J}`,ae.Unimplemented)}},Me=C=>{let O;const I=(...B)=>{const F=Et().then(S=>{const Ee=At(S,C);if(Ee){const Ae=Ee(...B);return O=Ae==null?void 0:Ae.remove,Ae}else throw new Ve(`"${w}.${C}()" is not implemented on ${J}`,ae.Unimplemented)});return C==="addListener"&&(F.remove=async()=>O()),F};return I.toString=()=>`${C.toString()}() { [capacitor code] }`,Object.defineProperty(I,"name",{value:C,writable:!1,configurable:!1}),I},Ye=Me("addListener"),Ke=Me("removeListener"),Ot=(C,O)=>{const I=Ye({eventName:C},O),B=async()=>{const S=await I;Ke({eventName:C,callbackId:S},O)},F=new Promise(S=>I.then(()=>S({remove:B})));return F.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await B()},F},De=new Proxy({},{get(C,O){switch(O){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return te?Ot:Ye;case"removeListener":return Ke;default:return Me(O)}}});return l[w]=De,$e.set(w,{name:w,proxy:De,platforms:new Set([...Object.keys(T),...te?[J]:[]])}),De},Ct=((a=d==null?void 0:d.currentPlatform)===null||a===void 0?void 0:a.registerPlugin)||Tt;return i.convertFileSrc||(i.convertFileSrc=w=>w),i.getPlatform=k,i.handleError=kt,i.isNativePlatform=ce,i.isPluginAvailable=bt,i.pluginMethodNoop=wt,i.registerPlugin=Ct,i.Exception=Ve,i.DEBUG=!!i.DEBUG,i.isLoggingEnabled=!!i.isLoggingEnabled,i.platform=i.getPlatform(),i.isNative=i.isNativePlatform(),i},$t=r=>r.Capacitor=Lt(r),Oe=$t(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),He=Oe.registerPlugin;Oe.Plugins;class ot{constructor(e){this.listeners={},this.retainedEventArguments={},this.windowListeners={},e&&(console.warn(`Capacitor WebPlugin "${e.name}" config object was deprecated in v3 and will be removed in v4.`),this.config=e)}addListener(e,t){let n=!1;this.listeners[e]||(this.listeners[e]=[],n=!0),this.listeners[e].push(t);const a=this.windowListeners[e];a&&!a.registered&&this.addWindowListener(a),n&&this.sendRetainedArgumentsForEvent(e);const o=async()=>this.removeListener(e,t);return Promise.resolve({remove:o})}async removeAllListeners(){this.listeners={};for(const e in this.windowListeners)this.removeWindowListener(this.windowListeners[e]);this.windowListeners={}}notifyListeners(e,t,n){const s=this.listeners[e];if(!s){if(n){let a=this.retainedEventArguments[e];a||(a=[]),a.push(t),this.retainedEventArguments[e]=a}return}s.forEach(a=>a(t))}hasListeners(e){return!!this.listeners[e].length}registerWindowListener(e,t){this.windowListeners[t]={registered:!1,windowEventName:e,pluginEventName:t,handler:n=>{this.notifyListeners(t,n)}}}unimplemented(e="not implemented"){return new Oe.Exception(e,ae.Unimplemented)}unavailable(e="not available"){return new Oe.Exception(e,ae.Unavailable)}async removeListener(e,t){const n=this.listeners[e];if(!n)return;const s=n.indexOf(t);this.listeners[e].splice(s,1),this.listeners[e].length||this.removeWindowListener(this.windowListeners[e])}addWindowListener(e){window.addEventListener(e.windowEventName,e.handler),e.registered=!0}removeWindowListener(e){e&&(window.removeEventListener(e.windowEventName,e.handler),e.registered=!1)}sendRetainedArgumentsForEvent(e){const t=this.retainedEventArguments[e];t&&(delete this.retainedEventArguments[e],t.forEach(n=>{this.notifyListeners(e,n)}))}}const Qe=r=>encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),et=r=>r.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class Mt extends ot{async getCookies(){const e=document.cookie,t={};return e.split(";").forEach(n=>{if(n.length<=0)return;let[s,a]=n.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");s=et(s).trim(),a=et(a).trim(),t[s]=a}),t}async setCookie(e){try{const t=Qe(e.key),n=Qe(e.value),s=`; expires=${(e.expires||"").replace("expires=","")}`,a=(e.path||"/").replace("path=",""),o=e.url!=null&&e.url.length>0?`domain=${e.url}`:"";document.cookie=`${t}=${n||""}${s}; path=${a}; ${o};`}catch(t){return Promise.reject(t)}}async deleteCookie(e){try{document.cookie=`${e.key}=; Max-Age=0`}catch(t){return Promise.reject(t)}}async clearCookies(){try{const e=document.cookie.split(";")||[];for(const t of e)document.cookie=t.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(e){return Promise.reject(e)}}async clearAllCookies(){try{await this.clearCookies()}catch(e){return Promise.reject(e)}}}He("CapacitorCookies",{web:()=>new Mt});const Dt=async r=>new Promise((e,t)=>{const n=new FileReader;n.onload=()=>{const s=n.result;e(s.indexOf(",")>=0?s.split(",")[1]:s)},n.onerror=s=>t(s),n.readAsDataURL(r)}),Vt=(r={})=>{const e=Object.keys(r);return Object.keys(r).map(s=>s.toLocaleLowerCase()).reduce((s,a,o)=>(s[a]=r[e[o]],s),{})},Ut=(r,e=!0)=>r?Object.entries(r).reduce((n,s)=>{const[a,o]=s;let i,l;return Array.isArray(o)?(l="",o.forEach(d=>{i=e?encodeURIComponent(d):d,l+=`${a}=${i}&`}),l.slice(0,-1)):(i=e?encodeURIComponent(o):o,l=`${a}=${i}`),`${n}&${l}`},"").substr(1):null,zt=(r,e={})=>{const t=Object.assign({method:r.method||"GET",headers:r.headers},e),s=Vt(r.headers)["content-type"]||"";if(typeof r.data=="string")t.body=r.data;else if(s.includes("application/x-www-form-urlencoded")){const a=new URLSearchParams;for(const[o,i]of Object.entries(r.data||{}))a.set(o,i);t.body=a.toString()}else if(s.includes("multipart/form-data")||r.data instanceof FormData){const a=new FormData;if(r.data instanceof FormData)r.data.forEach((i,l)=>{a.append(l,i)});else for(const i of Object.keys(r.data))a.append(i,r.data[i]);t.body=a;const o=new Headers(t.headers);o.delete("content-type"),t.headers=o}else(s.includes("application/json")||typeof r.data=="object")&&(t.body=JSON.stringify(r.data));return t};class Bt extends ot{async request(e){const t=zt(e,e.webFetchExtra),n=Ut(e.params,e.shouldEncodeUrlParams),s=n?`${e.url}?${n}`:e.url,a=await fetch(s,t),o=a.headers.get("content-type")||"";let{responseType:i="text"}=a.ok?e:{};o.includes("application/json")&&(i="json");let l,d;switch(i){case"arraybuffer":case"blob":d=await a.blob(),l=await Dt(d);break;case"json":l=await a.json();break;case"document":case"text":default:l=await a.text()}const p={};return a.headers.forEach((k,z)=>{p[z]=k}),{data:l,headers:p,status:a.status,url:a.url}}async get(e){return this.request(Object.assign(Object.assign({},e),{method:"GET"}))}async post(e){return this.request(Object.assign(Object.assign({},e),{method:"POST"}))}async put(e){return this.request(Object.assign(Object.assign({},e),{method:"PUT"}))}async patch(e){return this.request(Object.assign(Object.assign({},e),{method:"PATCH"}))}async delete(e){return this.request(Object.assign(Object.assign({},e),{method:"DELETE"}))}}He("CapacitorHttp",{web:()=>new Bt});const tt=He("App",{web:()=>jt(()=>import("./web-DmsbVeCO.js"),__vite__mapDeps([0,1,2,3])).then(r=>new r.AppWeb)}),Ft={addListener(r,e){return tt.addListener(r,e)}},dt=(r,e)=>{var t,n,s,a,o,i;if(console.error(`[Capacitor API Error] ${e}:`,{message:r.message,status:(t=r.response)==null?void 0:t.status,data:(n=r.response)==null?void 0:n.data,config:{url:(s=r.config)==null?void 0:s.url,method:(a=r.config)==null?void 0:a.method,headers:(o=r.config)==null?void 0:o.headers}}),((i=r.response)==null?void 0:i.status)===400)return console.warn(`[Rate Limit] ${e}`),null;throw r};var _;(function(r){r.assertEqual=s=>s;function e(s){}r.assertIs=e;function t(s){throw new Error}r.assertNever=t,r.arrayToEnum=s=>{const a={};for(const o of s)a[o]=o;return a},r.getValidEnumValues=s=>{const a=r.objectKeys(s).filter(i=>typeof s[s[i]]!="number"),o={};for(const i of a)o[i]=s[i];return r.objectValues(o)},r.objectValues=s=>r.objectKeys(s).map(function(a){return s[a]}),r.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const a=[];for(const o in s)Object.prototype.hasOwnProperty.call(s,o)&&a.push(o);return a},r.find=(s,a)=>{for(const o of s)if(a(o))return o},r.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function n(s,a=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}r.joinValues=n,r.jsonStringifyReplacer=(s,a)=>typeof a=="bigint"?a.toString():a})(_||(_={}));var Be;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(Be||(Be={}));const f=_.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),V=r=>{switch(typeof r){case"undefined":return f.undefined;case"string":return f.string;case"number":return isNaN(r)?f.nan:f.number;case"boolean":return f.boolean;case"function":return f.function;case"bigint":return f.bigint;case"symbol":return f.symbol;case"object":return Array.isArray(r)?f.array:r===null?f.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?f.promise:typeof Map<"u"&&r instanceof Map?f.map:typeof Set<"u"&&r instanceof Set?f.set:typeof Date<"u"&&r instanceof Date?f.date:f.object;default:return f.unknown}},c=_.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Wt=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");class P extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(a){return a.message},n={_errors:[]},s=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)n._errors.push(t(o));else{let i=n,l=0;for(;lt.message){const t={},n=[];for(const s of this.issues)s.path.length>0?(t[s.path[0]]=t[s.path[0]]||[],t[s.path[0]].push(e(s))):n.push(e(s));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}P.create=r=>new P(r);const ie=(r,e)=>{let t;switch(r.code){case c.invalid_type:r.received===f.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case c.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,_.jsonStringifyReplacer)}`;break;case c.unrecognized_keys:t=`Unrecognized key(s) in object: ${_.joinValues(r.keys,", ")}`;break;case c.invalid_union:t="Invalid input";break;case c.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${_.joinValues(r.options)}`;break;case c.invalid_enum_value:t=`Invalid enum value. Expected ${_.joinValues(r.options)}, received '${r.received}'`;break;case c.invalid_arguments:t="Invalid function arguments";break;case c.invalid_return_type:t="Invalid function return type";break;case c.invalid_date:t="Invalid date";break;case c.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:_.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case c.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case c.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case c.custom:t="Invalid input";break;case c.invalid_intersection_types:t="Intersection results could not be merged";break;case c.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case c.not_finite:t="Number must be finite";break;default:t=e.defaultError,_.assertNever(r)}return{message:t}};let ct=ie;function qt(r){ct=r}function Pe(){return ct}const Se=r=>{const{data:e,path:t,errorMaps:n,issueData:s}=r,a=[...t,...s.path||[]],o={...s,path:a};if(s.message!==void 0)return{...s,path:a,message:s.message};let i="";const l=n.filter(d=>!!d).slice().reverse();for(const d of l)i=d(o,{data:e,defaultError:i}).message;return{...s,path:a,message:i}},Ht=[];function u(r,e){const t=Pe(),n=Se({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===ie?void 0:ie].filter(s=>!!s)});r.common.issues.push(n)}class E{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const s of t){if(s.status==="aborted")return g;s.status==="dirty"&&e.dirty(),n.push(s.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const s of t){const a=await s.key,o=await s.value;n.push({key:a,value:o})}return E.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const s of t){const{key:a,value:o}=s;if(a.status==="aborted"||o.status==="aborted")return g;a.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(n[a.value]=o.value)}return{status:e.value,value:n}}}const g=Object.freeze({status:"aborted"}),ne=r=>({status:"dirty",value:r}),A=r=>({status:"valid",value:r}),Fe=r=>r.status==="aborted",We=r=>r.status==="dirty",K=r=>r.status==="valid",fe=r=>typeof Promise<"u"&&r instanceof Promise;function Ze(r,e,t,n){if(typeof e=="function"?r!==e||!0:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(r)}function lt(r,e,t,n,s){if(typeof e=="function"?r!==e||!0:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(r,t),t}var h;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(h||(h={}));var le,ue;class L{constructor(e,t,n,s){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const rt=(r,e)=>{if(K(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new P(r.common.issues);return this._error=t,this._error}}};function v(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:n,description:s}=r;if(e&&(t||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(o,i)=>{var l,d;const{message:p}=r;return o.code==="invalid_enum_value"?{message:p??i.defaultError}:typeof i.data>"u"?{message:(l=p??n)!==null&&l!==void 0?l:i.defaultError}:o.code!=="invalid_type"?{message:i.defaultError}:{message:(d=p??t)!==null&&d!==void 0?d:i.defaultError}},description:s}}class y{get description(){return this._def.description}_getType(e){return V(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:V(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new E,ctx:{common:e.parent.common,data:e.data,parsedType:V(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(fe(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;const s={common:{issues:[],async:(n=t==null?void 0:t.async)!==null&&n!==void 0?n:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:V(e)},a=this._parseSync({data:e,path:s.path,parent:s});return rt(s,a)}"~validate"(e){var t,n;const s={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:V(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:s});return K(a)?{value:a.value}:{issues:s.common.issues}}catch(a){!((n=(t=a==null?void 0:a.message)===null||t===void 0?void 0:t.toLowerCase())===null||n===void 0)&&n.includes("encountered")&&(this["~standard"].async=!0),s.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:s}).then(a=>K(a)?{value:a.value}:{issues:s.common.issues})}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:V(e)},s=this._parse({data:e,path:n.path,parent:n}),a=await(fe(s)?s:Promise.resolve(s));return rt(n,a)}refine(e,t){const n=s=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(s):t;return this._refinement((s,a)=>{const o=e(s),i=()=>a.addIssue({code:c.custom,...n(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(i(),!1)):o?!0:(i(),!1)})}refinement(e,t){return this._refinement((n,s)=>e(n)?!0:(s.addIssue(typeof t=="function"?t(n,s):t),!1))}_refinement(e){return new R({schema:this,typeName:m.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return N.create(this,this._def)}nullable(){return G.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return j.create(this)}promise(){return de.create(this,this._def)}or(e){return ge.create([this,e],this._def)}and(e){return ve.create(this,e,this._def)}transform(e){return new R({...v(this._def),schema:this,typeName:m.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new ke({...v(this._def),innerType:this,defaultValue:t,typeName:m.ZodDefault})}brand(){return new Ge({typeName:m.ZodBranded,type:this,...v(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new we({...v(this._def),innerType:this,catchValue:t,typeName:m.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Ce.create(this,e)}readonly(){return Te.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Gt=/^c[^\s-]{8,}$/i,Jt=/^[0-9a-z]+$/,Yt=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Kt=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Xt=/^[a-z0-9_-]{21}$/i,Qt=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,er=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,tr=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,rr="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ue;const nr=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,sr=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ar=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,ir=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,or=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,dr=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ut="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",cr=new RegExp(`^${ut}$`);function ft(r){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`),e}function lr(r){return new RegExp(`^${ft(r)}$`)}function ht(r){let e=`${ut}T${ft(r)}`;const t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function ur(r,e){return!!((e==="v4"||!e)&&nr.test(r)||(e==="v6"||!e)&&ar.test(r))}function fr(r,e){if(!Qt.test(r))return!1;try{const[t]=r.split("."),n=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||!s.typ||!s.alg||e&&s.alg!==e)}catch{return!1}}function hr(r,e){return!!((e==="v4"||!e)&&sr.test(r)||(e==="v6"||!e)&&ir.test(r))}class Z extends y{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==f.string){const a=this._getOrReturnCtx(e);return u(a,{code:c.invalid_type,expected:f.string,received:a.parsedType}),g}const n=new E;let s;for(const a of this._def.checks)if(a.kind==="min")e.data.lengtha.value&&(s=this._getOrReturnCtx(e,s),u(s,{code:c.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="length"){const o=e.data.length>a.value,i=e.data.lengthe.test(s),{validation:t,code:c.invalid_string,...h.errToObj(n)})}_addCheck(e){return new Z({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...h.errToObj(e)})}url(e){return this._addCheck({kind:"url",...h.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...h.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...h.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...h.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...h.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...h.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...h.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...h.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...h.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...h.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...h.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...h.errToObj(e)})}datetime(e){var t,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,local:(n=e==null?void 0:e.local)!==null&&n!==void 0?n:!1,...h.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...h.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...h.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...h.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...h.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...h.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...h.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...h.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...h.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...h.errToObj(t)})}nonempty(e){return this.min(1,h.errToObj(e))}trim(){return new Z({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Z({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Z({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value{var e;return new Z({checks:[],typeName:m.ZodString,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...v(r)})};function pr(r,e){const t=(r.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,s=t>n?t:n,a=parseInt(r.toFixed(s).replace(".","")),o=parseInt(e.toFixed(s).replace(".",""));return a%o/Math.pow(10,s)}class W extends y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==f.number){const a=this._getOrReturnCtx(e);return u(a,{code:c.invalid_type,expected:f.number,received:a.parsedType}),g}let n;const s=new E;for(const a of this._def.checks)a.kind==="int"?_.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{code:c.invalid_type,expected:"integer",received:"float",message:a.message}),s.dirty()):a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),u(n,{code:c.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="multipleOf"?pr(e.data,a.value)!==0&&(n=this._getOrReturnCtx(e,n),u(n,{code:c.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{code:c.not_finite,message:a.message}),s.dirty()):_.assertNever(a);return{status:s.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,n,s){return new W({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:h.toString(s)}]})}_addCheck(e){return new W({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:h.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:h.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:h.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:h.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuee.kind==="int"||e.kind==="multipleOf"&&_.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(t===null||n.value>t)&&(t=n.value):n.kind==="max"&&(e===null||n.valuenew W({checks:[],typeName:m.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...v(r)});class q extends y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==f.bigint)return this._getInvalidInput(e);let n;const s=new E;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),u(n,{code:c.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),u(n,{code:c.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):_.assertNever(a);return{status:s.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return u(t,{code:c.invalid_type,expected:f.bigint,received:t.parsedType}),g}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,n,s){return new q({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:h.toString(s)}]})}_addCheck(e){return new q({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value{var e;return new q({checks:[],typeName:m.ZodBigInt,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...v(r)})};class he extends y{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==f.boolean){const n=this._getOrReturnCtx(e);return u(n,{code:c.invalid_type,expected:f.boolean,received:n.parsedType}),g}return A(e.data)}}he.create=r=>new he({typeName:m.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...v(r)});class X extends y{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==f.date){const a=this._getOrReturnCtx(e);return u(a,{code:c.invalid_type,expected:f.date,received:a.parsedType}),g}if(isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return u(a,{code:c.invalid_date}),g}const n=new E;let s;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()a.value&&(s=this._getOrReturnCtx(e,s),u(s,{code:c.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):_.assertNever(a);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new X({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:h.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:h.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew X({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:m.ZodDate,...v(r)});class je extends y{_parse(e){if(this._getType(e)!==f.symbol){const n=this._getOrReturnCtx(e);return u(n,{code:c.invalid_type,expected:f.symbol,received:n.parsedType}),g}return A(e.data)}}je.create=r=>new je({typeName:m.ZodSymbol,...v(r)});class pe extends y{_parse(e){if(this._getType(e)!==f.undefined){const n=this._getOrReturnCtx(e);return u(n,{code:c.invalid_type,expected:f.undefined,received:n.parsedType}),g}return A(e.data)}}pe.create=r=>new pe({typeName:m.ZodUndefined,...v(r)});class me extends y{_parse(e){if(this._getType(e)!==f.null){const n=this._getOrReturnCtx(e);return u(n,{code:c.invalid_type,expected:f.null,received:n.parsedType}),g}return A(e.data)}}me.create=r=>new me({typeName:m.ZodNull,...v(r)});class oe extends y{constructor(){super(...arguments),this._any=!0}_parse(e){return A(e.data)}}oe.create=r=>new oe({typeName:m.ZodAny,...v(r)});class Y extends y{constructor(){super(...arguments),this._unknown=!0}_parse(e){return A(e.data)}}Y.create=r=>new Y({typeName:m.ZodUnknown,...v(r)});class U extends y{_parse(e){const t=this._getOrReturnCtx(e);return u(t,{code:c.invalid_type,expected:f.never,received:t.parsedType}),g}}U.create=r=>new U({typeName:m.ZodNever,...v(r)});class Re extends y{_parse(e){if(this._getType(e)!==f.undefined){const n=this._getOrReturnCtx(e);return u(n,{code:c.invalid_type,expected:f.void,received:n.parsedType}),g}return A(e.data)}}Re.create=r=>new Re({typeName:m.ZodVoid,...v(r)});class j extends y{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),s=this._def;if(t.parsedType!==f.array)return u(t,{code:c.invalid_type,expected:f.array,received:t.parsedType}),g;if(s.exactLength!==null){const o=t.data.length>s.exactLength.value,i=t.data.lengths.maxLength.value&&(u(t,{code:c.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((o,i)=>s.type._parseAsync(new L(t,o,t.path,i)))).then(o=>E.mergeArray(n,o));const a=[...t.data].map((o,i)=>s.type._parseSync(new L(t,o,t.path,i)));return E.mergeArray(n,a)}get element(){return this._def.type}min(e,t){return new j({...this._def,minLength:{value:e,message:h.toString(t)}})}max(e,t){return new j({...this._def,maxLength:{value:e,message:h.toString(t)}})}length(e,t){return new j({...this._def,exactLength:{value:e,message:h.toString(t)}})}nonempty(e){return this.min(1,e)}}j.create=(r,e)=>new j({type:r,minLength:null,maxLength:null,exactLength:null,typeName:m.ZodArray,...v(e)});function re(r){if(r instanceof x){const e={};for(const t in r.shape){const n=r.shape[t];e[t]=N.create(re(n))}return new x({...r._def,shape:()=>e})}else return r instanceof j?new j({...r._def,type:re(r.element)}):r instanceof N?N.create(re(r.unwrap())):r instanceof G?G.create(re(r.unwrap())):r instanceof $?$.create(r.items.map(e=>re(e))):r}class x extends y{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=_.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==f.object){const d=this._getOrReturnCtx(e);return u(d,{code:c.invalid_type,expected:f.object,received:d.parsedType}),g}const{status:n,ctx:s}=this._processInputParams(e),{shape:a,keys:o}=this._getCached(),i=[];if(!(this._def.catchall instanceof U&&this._def.unknownKeys==="strip"))for(const d in s.data)o.includes(d)||i.push(d);const l=[];for(const d of o){const p=a[d],k=s.data[d];l.push({key:{status:"valid",value:d},value:p._parse(new L(s,k,s.path,d)),alwaysSet:d in s.data})}if(this._def.catchall instanceof U){const d=this._def.unknownKeys;if(d==="passthrough")for(const p of i)l.push({key:{status:"valid",value:p},value:{status:"valid",value:s.data[p]}});else if(d==="strict")i.length>0&&(u(s,{code:c.unrecognized_keys,keys:i}),n.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const d=this._def.catchall;for(const p of i){const k=s.data[p];l.push({key:{status:"valid",value:p},value:d._parse(new L(s,k,s.path,p)),alwaysSet:p in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const d=[];for(const p of l){const k=await p.key,z=await p.value;d.push({key:k,value:z,alwaysSet:p.alwaysSet})}return d}).then(d=>E.mergeObjectSync(n,d)):E.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(e){return h.errToObj,new x({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,n)=>{var s,a,o,i;const l=(o=(a=(s=this._def).errorMap)===null||a===void 0?void 0:a.call(s,t,n).message)!==null&&o!==void 0?o:n.defaultError;return t.code==="unrecognized_keys"?{message:(i=h.errToObj(e).message)!==null&&i!==void 0?i:l}:{message:l}}}:{}})}strip(){return new x({...this._def,unknownKeys:"strip"})}passthrough(){return new x({...this._def,unknownKeys:"passthrough"})}extend(e){return new x({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new x({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:m.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new x({...this._def,catchall:e})}pick(e){const t={};return _.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])}),new x({...this._def,shape:()=>t})}omit(e){const t={};return _.objectKeys(this.shape).forEach(n=>{e[n]||(t[n]=this.shape[n])}),new x({...this._def,shape:()=>t})}deepPartial(){return re(this)}partial(e){const t={};return _.objectKeys(this.shape).forEach(n=>{const s=this.shape[n];e&&!e[n]?t[n]=s:t[n]=s.optional()}),new x({...this._def,shape:()=>t})}required(e){const t={};return _.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])t[n]=this.shape[n];else{let a=this.shape[n];for(;a instanceof N;)a=a._def.innerType;t[n]=a}}),new x({...this._def,shape:()=>t})}keyof(){return pt(_.objectKeys(this.shape))}}x.create=(r,e)=>new x({shape:()=>r,unknownKeys:"strip",catchall:U.create(),typeName:m.ZodObject,...v(e)});x.strictCreate=(r,e)=>new x({shape:()=>r,unknownKeys:"strict",catchall:U.create(),typeName:m.ZodObject,...v(e)});x.lazycreate=(r,e)=>new x({shape:r,unknownKeys:"strip",catchall:U.create(),typeName:m.ZodObject,...v(e)});class ge extends y{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;function s(a){for(const i of a)if(i.result.status==="valid")return i.result;for(const i of a)if(i.result.status==="dirty")return t.common.issues.push(...i.ctx.common.issues),i.result;const o=a.map(i=>new P(i.ctx.common.issues));return u(t,{code:c.invalid_union,unionErrors:o}),g}if(t.common.async)return Promise.all(n.map(async a=>{const o={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:o}),ctx:o}})).then(s);{let a;const o=[];for(const l of n){const d={...t,common:{...t.common,issues:[]},parent:null},p=l._parseSync({data:t.data,path:t.path,parent:d});if(p.status==="valid")return p;p.status==="dirty"&&!a&&(a={result:p,ctx:d}),d.common.issues.length&&o.push(d.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;const i=o.map(l=>new P(l));return u(t,{code:c.invalid_union,unionErrors:i}),g}}get options(){return this._def.options}}ge.create=(r,e)=>new ge({options:r,typeName:m.ZodUnion,...v(e)});const D=r=>r instanceof _e?D(r.schema):r instanceof R?D(r.innerType()):r instanceof be?[r.value]:r instanceof H?r.options:r instanceof xe?_.objectValues(r.enum):r instanceof ke?D(r._def.innerType):r instanceof pe?[void 0]:r instanceof me?[null]:r instanceof N?[void 0,...D(r.unwrap())]:r instanceof G?[null,...D(r.unwrap())]:r instanceof Ge||r instanceof Te?D(r.unwrap()):r instanceof we?D(r._def.innerType):[];class Le extends y{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==f.object)return u(t,{code:c.invalid_type,expected:f.object,received:t.parsedType}),g;const n=this.discriminator,s=t.data[n],a=this.optionsMap.get(s);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(u(t,{code:c.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),g)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const s=new Map;for(const a of t){const o=D(a.shape[e]);if(!o.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const i of o){if(s.has(i))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(i)}`);s.set(i,a)}}return new Le({typeName:m.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:s,...v(n)})}}function qe(r,e){const t=V(r),n=V(e);if(r===e)return{valid:!0,data:r};if(t===f.object&&n===f.object){const s=_.objectKeys(e),a=_.objectKeys(r).filter(i=>s.indexOf(i)!==-1),o={...r,...e};for(const i of a){const l=qe(r[i],e[i]);if(!l.valid)return{valid:!1};o[i]=l.data}return{valid:!0,data:o}}else if(t===f.array&&n===f.array){if(r.length!==e.length)return{valid:!1};const s=[];for(let a=0;a{if(Fe(a)||Fe(o))return g;const i=qe(a.value,o.value);return i.valid?((We(a)||We(o))&&t.dirty(),{status:t.value,value:i.data}):(u(n,{code:c.invalid_intersection_types}),g)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([a,o])=>s(a,o)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}ve.create=(r,e,t)=>new ve({left:r,right:e,typeName:m.ZodIntersection,...v(t)});class $ extends y{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==f.array)return u(n,{code:c.invalid_type,expected:f.array,received:n.parsedType}),g;if(n.data.lengththis._def.items.length&&(u(n,{code:c.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const a=[...n.data].map((o,i)=>{const l=this._def.items[i]||this._def.rest;return l?l._parse(new L(n,o,n.path,i)):null}).filter(o=>!!o);return n.common.async?Promise.all(a).then(o=>E.mergeArray(t,o)):E.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new $({...this._def,rest:e})}}$.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new $({items:r,typeName:m.ZodTuple,rest:null,...v(e)})};class ye extends y{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==f.object)return u(n,{code:c.invalid_type,expected:f.object,received:n.parsedType}),g;const s=[],a=this._def.keyType,o=this._def.valueType;for(const i in n.data)s.push({key:a._parse(new L(n,i,n.path,i)),value:o._parse(new L(n,n.data[i],n.path,i)),alwaysSet:i in n.data});return n.common.async?E.mergeObjectAsync(t,s):E.mergeObjectSync(t,s)}get element(){return this._def.valueType}static create(e,t,n){return t instanceof y?new ye({keyType:e,valueType:t,typeName:m.ZodRecord,...v(n)}):new ye({keyType:Z.create(),valueType:e,typeName:m.ZodRecord,...v(t)})}}class Ie extends y{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==f.map)return u(n,{code:c.invalid_type,expected:f.map,received:n.parsedType}),g;const s=this._def.keyType,a=this._def.valueType,o=[...n.data.entries()].map(([i,l],d)=>({key:s._parse(new L(n,i,n.path,[d,"key"])),value:a._parse(new L(n,l,n.path,[d,"value"]))}));if(n.common.async){const i=new Map;return Promise.resolve().then(async()=>{for(const l of o){const d=await l.key,p=await l.value;if(d.status==="aborted"||p.status==="aborted")return g;(d.status==="dirty"||p.status==="dirty")&&t.dirty(),i.set(d.value,p.value)}return{status:t.value,value:i}})}else{const i=new Map;for(const l of o){const d=l.key,p=l.value;if(d.status==="aborted"||p.status==="aborted")return g;(d.status==="dirty"||p.status==="dirty")&&t.dirty(),i.set(d.value,p.value)}return{status:t.value,value:i}}}}Ie.create=(r,e,t)=>new Ie({valueType:e,keyType:r,typeName:m.ZodMap,...v(t)});class Q extends y{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==f.set)return u(n,{code:c.invalid_type,expected:f.set,received:n.parsedType}),g;const s=this._def;s.minSize!==null&&n.data.sizes.maxSize.value&&(u(n,{code:c.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),t.dirty());const a=this._def.valueType;function o(l){const d=new Set;for(const p of l){if(p.status==="aborted")return g;p.status==="dirty"&&t.dirty(),d.add(p.value)}return{status:t.value,value:d}}const i=[...n.data.values()].map((l,d)=>a._parse(new L(n,l,n.path,d)));return n.common.async?Promise.all(i).then(l=>o(l)):o(i)}min(e,t){return new Q({...this._def,minSize:{value:e,message:h.toString(t)}})}max(e,t){return new Q({...this._def,maxSize:{value:e,message:h.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Q.create=(r,e)=>new Q({valueType:r,minSize:null,maxSize:null,typeName:m.ZodSet,...v(e)});class se extends y{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==f.function)return u(t,{code:c.invalid_type,expected:f.function,received:t.parsedType}),g;function n(i,l){return Se({data:i,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Pe(),ie].filter(d=>!!d),issueData:{code:c.invalid_arguments,argumentsError:l}})}function s(i,l){return Se({data:i,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Pe(),ie].filter(d=>!!d),issueData:{code:c.invalid_return_type,returnTypeError:l}})}const a={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof de){const i=this;return A(async function(...l){const d=new P([]),p=await i._def.args.parseAsync(l,a).catch(ce=>{throw d.addIssue(n(l,ce)),d}),k=await Reflect.apply(o,this,p);return await i._def.returns._def.type.parseAsync(k,a).catch(ce=>{throw d.addIssue(s(k,ce)),d})})}else{const i=this;return A(function(...l){const d=i._def.args.safeParse(l,a);if(!d.success)throw new P([n(l,d.error)]);const p=Reflect.apply(o,this,d.data),k=i._def.returns.safeParse(p,a);if(!k.success)throw new P([s(p,k.error)]);return k.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new se({...this._def,args:$.create(e).rest(Y.create())})}returns(e){return new se({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new se({args:e||$.create([]).rest(Y.create()),returns:t||Y.create(),typeName:m.ZodFunction,...v(n)})}}class _e extends y{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}_e.create=(r,e)=>new _e({getter:r,typeName:m.ZodLazy,...v(e)});class be extends y{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return u(t,{received:t.data,code:c.invalid_literal,expected:this._def.value}),g}return{status:"valid",value:e.data}}get value(){return this._def.value}}be.create=(r,e)=>new be({value:r,typeName:m.ZodLiteral,...v(e)});function pt(r,e){return new H({values:r,typeName:m.ZodEnum,...v(e)})}class H extends y{constructor(){super(...arguments),le.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),n=this._def.values;return u(t,{expected:_.joinValues(n),received:t.parsedType,code:c.invalid_type}),g}if(Ze(this,le)||lt(this,le,new Set(this._def.values)),!Ze(this,le).has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return u(t,{received:t.data,code:c.invalid_enum_value,options:n}),g}return A(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return H.create(e,{...this._def,...t})}exclude(e,t=this._def){return H.create(this.options.filter(n=>!e.includes(n)),{...this._def,...t})}}le=new WeakMap;H.create=pt;class xe extends y{constructor(){super(...arguments),ue.set(this,void 0)}_parse(e){const t=_.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==f.string&&n.parsedType!==f.number){const s=_.objectValues(t);return u(n,{expected:_.joinValues(s),received:n.parsedType,code:c.invalid_type}),g}if(Ze(this,ue)||lt(this,ue,new Set(_.getValidEnumValues(this._def.values))),!Ze(this,ue).has(e.data)){const s=_.objectValues(t);return u(n,{received:n.data,code:c.invalid_enum_value,options:s}),g}return A(e.data)}get enum(){return this._def.values}}ue=new WeakMap;xe.create=(r,e)=>new xe({values:r,typeName:m.ZodNativeEnum,...v(e)});class de extends y{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==f.promise&&t.common.async===!1)return u(t,{code:c.invalid_type,expected:f.promise,received:t.parsedType}),g;const n=t.parsedType===f.promise?t.data:Promise.resolve(t.data);return A(n.then(s=>this._def.type.parseAsync(s,{path:t.path,errorMap:t.common.contextualErrorMap})))}}de.create=(r,e)=>new de({type:r,typeName:m.ZodPromise,...v(e)});class R extends y{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===m.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),s=this._def.effect||null,a={addIssue:o=>{u(n,o),o.fatal?t.abort():t.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),s.type==="preprocess"){const o=s.transform(n.data,a);if(n.common.async)return Promise.resolve(o).then(async i=>{if(t.value==="aborted")return g;const l=await this._def.schema._parseAsync({data:i,path:n.path,parent:n});return l.status==="aborted"?g:l.status==="dirty"||t.value==="dirty"?ne(l.value):l});{if(t.value==="aborted")return g;const i=this._def.schema._parseSync({data:o,path:n.path,parent:n});return i.status==="aborted"?g:i.status==="dirty"||t.value==="dirty"?ne(i.value):i}}if(s.type==="refinement"){const o=i=>{const l=s.refinement(i,a);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return i};if(n.common.async===!1){const i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?g:(i.status==="dirty"&&t.dirty(),o(i.value),{status:t.value,value:i.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>i.status==="aborted"?g:(i.status==="dirty"&&t.dirty(),o(i.value).then(()=>({status:t.value,value:i.value}))))}if(s.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!K(o))return o;const i=s.transform(o.value,a);if(i instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:i}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>K(o)?Promise.resolve(s.transform(o.value,a)).then(i=>({status:t.value,value:i})):o);_.assertNever(s)}}R.create=(r,e,t)=>new R({schema:r,typeName:m.ZodEffects,effect:e,...v(t)});R.createWithPreprocess=(r,e,t)=>new R({schema:e,effect:{type:"preprocess",transform:r},typeName:m.ZodEffects,...v(t)});class N extends y{_parse(e){return this._getType(e)===f.undefined?A(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}N.create=(r,e)=>new N({innerType:r,typeName:m.ZodOptional,...v(e)});class G extends y{_parse(e){return this._getType(e)===f.null?A(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}G.create=(r,e)=>new G({innerType:r,typeName:m.ZodNullable,...v(e)});class ke extends y{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===f.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ke.create=(r,e)=>new ke({innerType:r,typeName:m.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...v(e)});class we extends y{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return fe(s)?s.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new P(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new P(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}we.create=(r,e)=>new we({innerType:r,typeName:m.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...v(e)});class Ne extends y{_parse(e){if(this._getType(e)!==f.nan){const n=this._getOrReturnCtx(e);return u(n,{code:c.invalid_type,expected:f.nan,received:n.parsedType}),g}return{status:"valid",value:e.data}}}Ne.create=r=>new Ne({typeName:m.ZodNaN,...v(r)});const mr=Symbol("zod_brand");class Ge extends y{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class Ce extends y{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?g:a.status==="dirty"?(t.dirty(),ne(a.value)):this._def.out._parseAsync({data:a.value,path:n.path,parent:n})})();{const s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?g:s.status==="dirty"?(t.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(e,t){return new Ce({in:e,out:t,typeName:m.ZodPipeline})}}class Te extends y{_parse(e){const t=this._def.innerType._parse(e),n=s=>(K(s)&&(s.value=Object.freeze(s.value)),s);return fe(t)?t.then(s=>n(s)):n(t)}unwrap(){return this._def.innerType}}Te.create=(r,e)=>new Te({innerType:r,typeName:m.ZodReadonly,...v(e)});function nt(r,e){const t=typeof r=="function"?r(e):typeof r=="string"?{message:r}:r;return typeof t=="string"?{message:t}:t}function mt(r,e={},t){return r?oe.create().superRefine((n,s)=>{var a,o;const i=r(n);if(i instanceof Promise)return i.then(l=>{var d,p;if(!l){const k=nt(e,n),z=(p=(d=k.fatal)!==null&&d!==void 0?d:t)!==null&&p!==void 0?p:!0;s.addIssue({code:"custom",...k,fatal:z})}});if(!i){const l=nt(e,n),d=(o=(a=l.fatal)!==null&&a!==void 0?a:t)!==null&&o!==void 0?o:!0;s.addIssue({code:"custom",...l,fatal:d})}}):oe.create()}const gr={object:x.lazycreate};var m;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(m||(m={}));const vr=(r,e={message:`Input not instance of ${r.name}`})=>mt(t=>t instanceof r,e),gt=Z.create,vt=W.create,yr=Ne.create,_r=q.create,yt=he.create,br=X.create,xr=je.create,kr=pe.create,wr=me.create,Tr=oe.create,Cr=Y.create,Er=U.create,Ar=Re.create,Or=j.create,Pr=x.create,Sr=x.strictCreate,Zr=ge.create,jr=Le.create,Rr=ve.create,Ir=$.create,Nr=ye.create,Lr=Ie.create,$r=Q.create,Mr=se.create,Dr=_e.create,Vr=be.create,Ur=H.create,zr=xe.create,Br=de.create,st=R.create,Fr=N.create,Wr=G.create,qr=R.createWithPreprocess,Hr=Ce.create,Gr=()=>gt().optional(),Jr=()=>vt().optional(),Yr=()=>yt().optional(),Kr={string:r=>Z.create({...r,coerce:!0}),number:r=>W.create({...r,coerce:!0}),boolean:r=>he.create({...r,coerce:!0}),bigint:r=>q.create({...r,coerce:!0}),date:r=>X.create({...r,coerce:!0})},Xr=g;var b=Object.freeze({__proto__:null,defaultErrorMap:ie,setErrorMap:qt,getErrorMap:Pe,makeIssue:Se,EMPTY_PATH:Ht,addIssueToContext:u,ParseStatus:E,INVALID:g,DIRTY:ne,OK:A,isAborted:Fe,isDirty:We,isValid:K,isAsync:fe,get util(){return _},get objectUtil(){return Be},ZodParsedType:f,getParsedType:V,ZodType:y,datetimeRegex:ht,ZodString:Z,ZodNumber:W,ZodBigInt:q,ZodBoolean:he,ZodDate:X,ZodSymbol:je,ZodUndefined:pe,ZodNull:me,ZodAny:oe,ZodUnknown:Y,ZodNever:U,ZodVoid:Re,ZodArray:j,ZodObject:x,ZodUnion:ge,ZodDiscriminatedUnion:Le,ZodIntersection:ve,ZodTuple:$,ZodRecord:ye,ZodMap:Ie,ZodSet:Q,ZodFunction:se,ZodLazy:_e,ZodLiteral:be,ZodEnum:H,ZodNativeEnum:xe,ZodPromise:de,ZodEffects:R,ZodTransformer:R,ZodOptional:N,ZodNullable:G,ZodDefault:ke,ZodCatch:we,ZodNaN:Ne,BRAND:mr,ZodBranded:Ge,ZodPipeline:Ce,ZodReadonly:Te,custom:mt,Schema:y,ZodSchema:y,late:gr,get ZodFirstPartyTypeKind(){return m},coerce:Kr,any:Tr,array:Or,bigint:_r,boolean:yt,date:br,discriminatedUnion:jr,effect:st,enum:Ur,function:Mr,instanceof:vr,intersection:Rr,lazy:Dr,literal:Vr,map:Lr,nan:yr,nativeEnum:zr,never:Er,null:wr,nullable:Wr,number:vt,object:Pr,oboolean:Yr,onumber:Jr,optional:Fr,ostring:Gr,pipeline:Hr,preprocess:qr,promise:Br,record:Nr,set:$r,strictObject:Sr,string:gt,symbol:xr,transformer:st,tuple:Ir,undefined:kr,union:Zr,unknown:Cr,void:Ar,NEVER:Xr,ZodIssueCode:c,quotelessJson:Wt,ZodError:P});const Qr=b.object({scheme:b.literal("timesafari"),path:b.string(),queryParams:b.record(b.string()).optional()}),en={claim:b.object({id:b.string().min(1),view:b.enum(["details","certificate","raw"]).optional()}),contact:b.object({did:b.string().regex(/^did:/),action:b.enum(["edit","import"]).optional(),jwt:b.string().optional()}),project:b.object({id:b.string().min(1),view:b.enum(["details","edit"]).optional()}),invite:b.object({jwt:b.string().min(1),type:b.enum(["one","many"]).optional()}),gift:b.object({id:b.string().min(1),action:b.enum(["confirm","details"]).optional()}),offer:b.object({id:b.string().min(1),view:b.enum(["details"]).optional()})};class tn{constructor(e){Xe(this,"router");this.router=e}parseDeepLink(e){const t=e.split("://");if(t.length!==2)throw{code:"INVALID_URL",message:"Invalid URL format"};Qr.parse({scheme:t[0],path:t[1],queryParams:{}});const[n,s]=t[1].split("?"),[a,o]=n.split("/"),i={};return s&&new URLSearchParams(s).forEach((l,d)=>{i[d]=l}),{path:a,params:o?{id:o}:{},query:i}}async handleDeepLink(e){try{ze("[DeepLink] Processing URL: "+e,!1);const{path:t,params:n,query:s}=this.parseDeepLink(e),a=Object.fromEntries(Object.entries(n).map(([o,i])=>[o,i??""]));await this.validateAndRoute(t,a,s)}catch(t){const n=t;throw ze(`[DeepLink] Error (${n.code}): ${n.message}`,!0),{code:n.code||"UNKNOWN_ERROR",message:n.message,details:n.details}}}async validateAndRoute(e,t,n){const a={claim:"claim","claim-cert":"claim-cert","claim-add-raw":"claim-add-raw","contact-edit":"contact-edit","contact-import":"contact-import",project:"project","invite-one-accept":"invite-one-accept","offer-details":"offer-details","confirm-gift":"confirm-gift"}[e];if(!a)throw{code:"INVALID_ROUTE",message:`Unsupported route: ${e}`};const i=await en[e].parseAsync({...t,...n});await this.router.replace({name:a,params:i,query:n})}}console.log("[Capacitor] Starting initialization");console.log("[Capacitor] Platform:","capacitor");const rn=Zt();window.addEventListener("unhandledrejection",r=>{var e,t;(e=r.reason)!=null&&e.response&&dt(r.reason,((t=r.reason.config)==null?void 0:t.url)||"unknown")});const nn=new tn(at),sn=async r=>{try{await at.isReady(),await nn.handleDeepLink(r.url)}catch(e){ze("[DeepLink] Error handling deep link: "+e,!0),dt({message:e instanceof Error?e.message:String(e)},"deep-link")}};Ft.addListener("appUrlOpen",sn);console.log("[Capacitor] Mounting app");rn.mount("#app");console.log("[Capacitor] App mounted");const cn=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));export{ot as W,cn as m}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/main.common-DD7dqhZp.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/main.common-DD7dqhZp.js deleted file mode 100644 index db9dbd0..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/main.common-DD7dqhZp.js +++ /dev/null @@ -1,639 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AccountViewView-BvsLGx3g.js","assets/index-ryzpKtgI.js","assets/index-CZnn7ED5.js","assets/_isString-B7bbuhPA.js","assets/dexie-export-import-aIN45iyB.js","assets/leaflet-src-Dm7ILaeL.js","assets/vue-leaflet.es-DQekxOGR.js","assets/index-BGoTPXII.js","assets/EntityIcon-DciUb57i.js","assets/ImageMethodDialog-zrU-VGNm.js","assets/PhotoDialog-DZbf20A6.js","assets/PhotoDialog-VFFukDsZ.css","assets/ImageMethodDialog-CTvzd81h.css","assets/PushNotificationPermission-BPu7cCY7.js","assets/PushNotificationPermission-tn0RQdqM.css","assets/QuickNav-C8jPGtUY.js","assets/TopMessage-ZWDDjman.js","assets/UserNameDialog-BV49F4GW.js","assets/DIDView-CYsX9_-v.css","assets/leaflet-Dgihpmma.css","assets/ClaimView-c0v_AehR.js","assets/js-yaml-CxlQHuPU.js","assets/index-BtEdi1q-.js","assets/concat-Ro2w9qwP.js","assets/set-BrilI7kO.js","assets/sort-DzTCGCnH.js","assets/GiftedDialog-DmRkVexW.js","assets/ClaimView-BUQRK2PH.css","assets/ClaimAddRawView-MjnUQPZ5.js","assets/ClaimCertificateView-WsWhMks_.js","assets/ConfirmContactView-CXS4FvMu.js","assets/ConfirmGiftView-BDAczKwI.js","assets/ContactAmountsView-Bsd4-O6A.js","assets/ContactEditView-Dw42tFmc.js","assets/ContactGiftingView-CgQUVeDX.js","assets/blank-square-D9dGgMJw.js","assets/ContactImportView-CH0ouLM8.js","assets/OfferDialog-DDi7ax_Z.js","assets/ContactQRScanShowView-wtOPMc0J.js","assets/ContactsView-CiB3UJEn.js","assets/ContactNameDialog-B32CzJRA.js","assets/DIDView-DsYtCrHy.js","assets/InfiniteScroll-DZwFAI4R.js","assets/DiscoverView-DkKWeZ06.js","assets/ProjectIcon-ChPLhl-Y.js","assets/OnboardingDialog-DKHXNqS_.js","assets/OnboardingDialog-DBDPRnmU.css","assets/DiscoverView-DB9VWQSd.css","assets/GiftedDetailsView-Biz6UhaP.js","assets/HelpView-pr-0AKMM.js","assets/HelpNotificationsView-BOcgCbHz.js","assets/HelpNotificationTypesView-76lSXFAL.js","assets/HelpOnboardingView-CcWgFmX6.js","assets/HomeView-BUammUSs.js","assets/HomeView-D3AT-qTA.css","assets/IdentitySwitcherView-BYk59nuq.js","assets/ImportAccountView-Ceo5D7dW.js","assets/ImportDerivedAccountView-CtHBjHll.js","assets/InviteOneView-BeYvBmK8.js","assets/InviteOneAcceptView-B4mm6cID.js","assets/NewActivityView-DGm2GpQB.js","assets/NewEditAccountView-B1OhdTIn.js","assets/NewEditProjectView-DeSG79Yx.js","assets/datetime-BDQ5ptpc.js","assets/NewIdentifierView-BYGrWVRA.js","assets/OfferDetailsView-DojQCzul.js","assets/OnboardMeetingListView-d6saebIJ.js","assets/OnboardMeetingMembersView-BWzSX9QC.js","assets/MembersList-BOHRjd7y.js","assets/OnboardMeetingSetupView-BbhzMP8b.js","assets/ProjectViewView-BqC9uWSO.js","assets/ProjectsView-qIPma1jV.js","assets/QuickActionBvcView-DsgRspIO.js","assets/QuickActionBvcBeginView-BOihmGgs.js","assets/QuickActionBvcEndView-D8eLkuZh.js","assets/RecentOffersToUserView-DFvU7HF3.js","assets/RecentOffersToUserProjectsView-DXDjfx6v.js","assets/ContactScanView-C0FSjMaw.js","assets/SearchAreaView-lyPWi-VO.js","assets/SeedBackupView-BDz7XsWF.js","assets/ShareMyContactInfoView-BFOKyt7V.js","assets/SharedPhotoView-FMHGExnU.js","assets/StartView-vHoI6X9y.js","assets/StatisticsView-CerH3Xe1.js","assets/TestView-Dd6x8bkM.js","assets/UserProfileView-B0lMeHcj.js"])))=>i.map(i=>d[i]); -var gg=Object.defineProperty;var yg=(e,t,n)=>t in e?gg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var el=(e,t,n)=>yg(e,typeof t!="symbol"?t+"":t,n);import{_ as Be}from"./index-BGoTPXII.js";/** -* @vue/shared v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**//*! #__NO_SIDE_EFFECTS__ */function mc(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const ut={},oo=[],Un=()=>{},bg=()=>!1,Ni=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ou=e=>e.startsWith("onUpdate:"),wt=Object.assign,iu=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},vg=Object.prototype.hasOwnProperty,mt=(e,t)=>vg.call(e,t),Ce=Array.isArray,io=e=>Co(e)==="[object Map]",zs=e=>Co(e)==="[object Set]",Ed=e=>Co(e)==="[object Date]",_g=e=>Co(e)==="[object RegExp]",De=e=>typeof e=="function",St=e=>typeof e=="string",Xn=e=>typeof e=="symbol",vt=e=>e!==null&&typeof e=="object",au=e=>(vt(e)||De(e))&&De(e.then)&&De(e.catch),$0=Object.prototype.toString,Co=e=>$0.call(e),xg=e=>Co(e).slice(8,-1),gc=e=>Co(e)==="[object Object]",cu=e=>St(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ao=mc(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),yc=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},wg=/-(\w)/g,cn=yc(e=>e.replace(wg,(t,n)=>n?n.toUpperCase():"")),Eg=/\B([A-Z])/g,kn=yc(e=>e.replace(Eg,"-$1").toLowerCase()),Li=yc(e=>e.charAt(0).toUpperCase()+e.slice(1)),Go=yc(e=>e?`on${Li(e)}`:""),_n=(e,t)=>!Object.is(e,t),co=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},Da=e=>{const t=parseFloat(e);return isNaN(t)?e:t},ja=e=>{const t=St(e)?Number(e):NaN;return isNaN(t)?e:t};let Ad;const bc=()=>Ad||(Ad=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),Ag="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",Sg=mc(Ag);function Ii(e){if(Ce(e)){const t={};for(let n=0;n{if(n){const r=n.split(Og);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function Di(e){let t="";if(St(e))t=e;else if(Ce(e))for(let n=0;nrs(n,t))}const K0=e=>!!(e&&e.__v_isRef===!0),an=e=>St(e)?e:e==null?"":Ce(e)||vt(e)&&(e.toString===$0||!De(e.toString))?K0(e)?an(e.value):JSON.stringify(e,H0,2):String(e),H0=(e,t)=>K0(t)?H0(e,t.value):io(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,s],o)=>(n[tl(r,o)+" =>"]=s,n),{})}:zs(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>tl(n))}:Xn(t)?tl(t):vt(t)&&!Ce(t)&&!gc(t)?String(t):t,tl=(e,t="")=>{var n;return Xn(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** -* @vue/reactivity v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let vn;class lu{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=vn,!t&&vn&&(this.index=(vn.scopes||(vn.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0)return;if(Jo){let t=Jo;for(Jo=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Xo;){let t=Xo;for(Xo=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function X0(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function J0(e){let t,n=e.depsTail,r=n;for(;r;){const s=r.prevDep;r.version===-1?(r===n&&(n=s),du(r),Ig(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}e.deps=t,e.depsTail=n}function Il(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Q0(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Q0(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===di))return;e.globalVersion=di;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!Il(e)){e.flags&=-3;return}const n=At,r=Wn;At=e,Wn=!0;try{X0(e);const s=e.fn(e._value);(t.version===0||_n(s,e._value))&&(e._value=s,t.version++)}catch(s){throw t.version++,s}finally{At=n,Wn=r,J0(e),e.flags&=-3}}function du(e,t=!1){const{dep:n,prevSub:r,nextSub:s}=e;if(r&&(r.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)du(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Ig(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function Dg(e,t){e.effect instanceof ui&&(e=e.effect.fn);const n=new ui(e);t&&wt(n,t);try{n.run()}catch(s){throw n.stop(),s}const r=n.run.bind(n);return r.effect=n,r}function jg(e){e.effect.stop()}let Wn=!0;const Z0=[];function ds(){Z0.push(Wn),Wn=!1}function hs(){const e=Z0.pop();Wn=e===void 0?!0:e}function Sd(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=At;At=void 0;try{t()}finally{At=n}}}let di=0;class Fg{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class _c{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(t){if(!At||!Wn||At===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==At)n=this.activeLink=new Fg(At,this),At.deps?(n.prevDep=At.depsTail,At.depsTail.nextDep=n,At.depsTail=n):At.deps=At.depsTail=n,e1(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=At.depsTail,n.nextDep=void 0,At.depsTail.nextDep=n,At.depsTail=n,At.deps===n&&(At.deps=r)}return n}trigger(t){this.version++,di++,this.notify(t)}notify(t){fu();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{uu()}}}function e1(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)e1(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Fa=new WeakMap,Cs=Symbol(""),Dl=Symbol(""),hi=Symbol("");function ln(e,t,n){if(Wn&&At){let r=Fa.get(e);r||Fa.set(e,r=new Map);let s=r.get(n);s||(r.set(n,s=new _c),s.map=r,s.key=n),s.track()}}function xr(e,t,n,r,s,o){const i=Fa.get(e);if(!i){di++;return}const a=c=>{c&&c.trigger()};if(fu(),t==="clear")i.forEach(a);else{const c=Ce(e),f=c&&cu(n);if(c&&n==="length"){const l=Number(r);i.forEach((d,h)=>{(h==="length"||h===hi||!Xn(h)&&h>=l)&&a(d)})}else switch((n!==void 0||i.has(void 0))&&a(i.get(n)),f&&a(i.get(hi)),t){case"add":c?f&&a(i.get("length")):(a(i.get(Cs)),io(e)&&a(i.get(Dl)));break;case"delete":c||(a(i.get(Cs)),io(e)&&a(i.get(Dl)));break;case"set":io(e)&&a(i.get(Cs));break}}uu()}function Bg(e,t){const n=Fa.get(e);return n&&n.get(t)}function Ys(e){const t=dt(e);return t===e?t:(ln(t,"iterate",hi),Ln(e)?t:t.map(fn))}function xc(e){return ln(e=dt(e),"iterate",hi),e}const Ug={__proto__:null,[Symbol.iterator](){return rl(this,Symbol.iterator,fn)},concat(...e){return Ys(this).concat(...e.map(t=>Ce(t)?Ys(t):t))},entries(){return rl(this,"entries",e=>(e[1]=fn(e[1]),e))},every(e,t){return mr(this,"every",e,t,void 0,arguments)},filter(e,t){return mr(this,"filter",e,t,n=>n.map(fn),arguments)},find(e,t){return mr(this,"find",e,t,fn,arguments)},findIndex(e,t){return mr(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return mr(this,"findLast",e,t,fn,arguments)},findLastIndex(e,t){return mr(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return mr(this,"forEach",e,t,void 0,arguments)},includes(...e){return sl(this,"includes",e)},indexOf(...e){return sl(this,"indexOf",e)},join(e){return Ys(this).join(e)},lastIndexOf(...e){return sl(this,"lastIndexOf",e)},map(e,t){return mr(this,"map",e,t,void 0,arguments)},pop(){return jo(this,"pop")},push(...e){return jo(this,"push",e)},reduce(e,...t){return Cd(this,"reduce",e,t)},reduceRight(e,...t){return Cd(this,"reduceRight",e,t)},shift(){return jo(this,"shift")},some(e,t){return mr(this,"some",e,t,void 0,arguments)},splice(...e){return jo(this,"splice",e)},toReversed(){return Ys(this).toReversed()},toSorted(e){return Ys(this).toSorted(e)},toSpliced(...e){return Ys(this).toSpliced(...e)},unshift(...e){return jo(this,"unshift",e)},values(){return rl(this,"values",fn)}};function rl(e,t,n){const r=xc(e),s=r[t]();return r!==e&&!Ln(e)&&(s._next=s.next,s.next=()=>{const o=s._next();return o.value&&(o.value=n(o.value)),o}),s}const $g=Array.prototype;function mr(e,t,n,r,s,o){const i=xc(e),a=i!==e&&!Ln(e),c=i[t];if(c!==$g[t]){const d=c.apply(e,o);return a?fn(d):d}let f=n;i!==e&&(a?f=function(d,h){return n.call(this,fn(d),h,e)}:n.length>2&&(f=function(d,h){return n.call(this,d,h,e)}));const l=c.call(i,f,r);return a&&s?s(l):l}function Cd(e,t,n,r){const s=xc(e);let o=n;return s!==e&&(Ln(e)?n.length>3&&(o=function(i,a,c){return n.call(this,i,a,c,e)}):o=function(i,a,c){return n.call(this,i,fn(a),c,e)}),s[t](o,...r)}function sl(e,t,n){const r=dt(e);ln(r,"iterate",hi);const s=r[t](...n);return(s===-1||s===!1)&&Ac(n[0])?(n[0]=dt(n[0]),r[t](...n)):s}function jo(e,t,n=[]){ds(),fu();const r=dt(e)[t].apply(e,n);return uu(),hs(),r}const zg=mc("__proto__,__v_isRef,__isVue"),t1=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Xn));function Vg(e){Xn(e)||(e=String(e));const t=dt(this);return ln(t,"has",e),t.hasOwnProperty(e)}class n1{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){if(n==="__v_skip")return t.__v_skip;const s=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return o;if(n==="__v_raw")return r===(s?o?c1:a1:o?i1:o1).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const i=Ce(t);if(!s){let c;if(i&&(c=Ug[n]))return c;if(n==="hasOwnProperty")return Vg}const a=Reflect.get(t,n,Yt(t)?t:r);return(Xn(n)?t1.has(n):zg(n))||(s||ln(t,"get",n),o)?a:Yt(a)?i&&cu(n)?a:a.value:vt(a)?s?pu(a):Oo(a):a}}class r1 extends n1{constructor(t=!1){super(!1,t)}set(t,n,r,s){let o=t[n];if(!this._isShallow){const c=ss(o);if(!Ln(r)&&!ss(r)&&(o=dt(o),r=dt(r)),!Ce(t)&&Yt(o)&&!Yt(r))return c?!1:(o.value=r,!0)}const i=Ce(t)&&cu(n)?Number(n)e,Zi=e=>Reflect.getPrototypeOf(e);function Yg(e,t,n){return function(...r){const s=this.__v_raw,o=dt(s),i=io(o),a=e==="entries"||e===Symbol.iterator&&i,c=e==="keys"&&i,f=s[e](...r),l=n?jl:t?Fl:fn;return!t&&ln(o,"iterate",c?Dl:Cs),{next(){const{value:d,done:h}=f.next();return h?{value:d,done:h}:{value:a?[l(d[0]),l(d[1])]:l(d),done:h}},[Symbol.iterator](){return this}}}}function ea(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Gg(e,t){const n={get(s){const o=this.__v_raw,i=dt(o),a=dt(s);e||(_n(s,a)&&ln(i,"get",s),ln(i,"get",a));const{has:c}=Zi(i),f=t?jl:e?Fl:fn;if(c.call(i,s))return f(o.get(s));if(c.call(i,a))return f(o.get(a));o!==i&&o.get(s)},get size(){const s=this.__v_raw;return!e&&ln(dt(s),"iterate",Cs),Reflect.get(s,"size",s)},has(s){const o=this.__v_raw,i=dt(o),a=dt(s);return e||(_n(s,a)&&ln(i,"has",s),ln(i,"has",a)),s===a?o.has(s):o.has(s)||o.has(a)},forEach(s,o){const i=this,a=i.__v_raw,c=dt(a),f=t?jl:e?Fl:fn;return!e&&ln(c,"iterate",Cs),a.forEach((l,d)=>s.call(o,f(l),f(d),i))}};return wt(n,e?{add:ea("add"),set:ea("set"),delete:ea("delete"),clear:ea("clear")}:{add(s){!t&&!Ln(s)&&!ss(s)&&(s=dt(s));const o=dt(this);return Zi(o).has.call(o,s)||(o.add(s),xr(o,"add",s,s)),this},set(s,o){!t&&!Ln(o)&&!ss(o)&&(o=dt(o));const i=dt(this),{has:a,get:c}=Zi(i);let f=a.call(i,s);f||(s=dt(s),f=a.call(i,s));const l=c.call(i,s);return i.set(s,o),f?_n(o,l)&&xr(i,"set",s,o):xr(i,"add",s,o),this},delete(s){const o=dt(this),{has:i,get:a}=Zi(o);let c=i.call(o,s);c||(s=dt(s),c=i.call(o,s)),a&&a.call(o,s);const f=o.delete(s);return c&&xr(o,"delete",s,void 0),f},clear(){const s=dt(this),o=s.size!==0,i=s.clear();return o&&xr(s,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=Yg(s,e,t)}),n}function wc(e,t){const n=Gg(e,t);return(r,s,o)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?r:Reflect.get(mt(n,s)&&s in r?n:r,s,o)}const Xg={get:wc(!1,!1)},Jg={get:wc(!1,!0)},Qg={get:wc(!0,!1)},Zg={get:wc(!0,!0)},o1=new WeakMap,i1=new WeakMap,a1=new WeakMap,c1=new WeakMap;function e3(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function t3(e){return e.__v_skip||!Object.isExtensible(e)?0:e3(xg(e))}function Oo(e){return ss(e)?e:Ec(e,!1,Kg,Xg,o1)}function hu(e){return Ec(e,!1,qg,Jg,i1)}function pu(e){return Ec(e,!0,Hg,Qg,a1)}function n3(e){return Ec(e,!0,Wg,Zg,c1)}function Ec(e,t,n,r,s){if(!vt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=s.get(e);if(o)return o;const i=t3(e);if(i===0)return e;const a=new Proxy(e,i===2?r:n);return s.set(e,a),a}function Zr(e){return ss(e)?Zr(e.__v_raw):!!(e&&e.__v_isReactive)}function ss(e){return!!(e&&e.__v_isReadonly)}function Ln(e){return!!(e&&e.__v_isShallow)}function Ac(e){return e?!!e.__v_raw:!1}function dt(e){const t=e&&e.__v_raw;return t?dt(t):e}function mu(e){return!mt(e,"__v_skip")&&Object.isExtensible(e)&&z0(e,"__v_skip",!0),e}const fn=e=>vt(e)?Oo(e):e,Fl=e=>vt(e)?pu(e):e;function Yt(e){return e?e.__v_isRef===!0:!1}function Os(e){return l1(e,!1)}function gu(e){return l1(e,!0)}function l1(e,t){return Yt(e)?e:new r3(e,t)}class r3{constructor(t,n){this.dep=new _c,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:dt(t),this._value=n?t:fn(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||Ln(t)||ss(t);t=r?t:dt(t),_n(t,n)&&(this._rawValue=t,this._value=r?t:fn(t),this.dep.trigger())}}function s3(e){e.dep&&e.dep.trigger()}function Or(e){return Yt(e)?e.value:e}function o3(e){return De(e)?e():Or(e)}const i3={get:(e,t,n)=>t==="__v_raw"?e:Or(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const s=e[t];return Yt(s)&&!Yt(n)?(s.value=n,!0):Reflect.set(e,t,n,r)}};function yu(e){return Zr(e)?e:new Proxy(e,i3)}class a3{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new _c,{get:r,set:s}=t(n.track.bind(n),n.trigger.bind(n));this._get=r,this._set=s}get value(){return this._value=this._get()}set value(t){this._set(t)}}function f1(e){return new a3(e)}function c3(e){const t=Ce(e)?new Array(e.length):{};for(const n in e)t[n]=u1(e,n);return t}class l3{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return Bg(dt(this._object),this._key)}}class f3{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function u3(e,t,n){return Yt(e)?e:De(e)?new f3(e):vt(e)&&arguments.length>1?u1(e,t,n):Os(e)}function u1(e,t,n){const r=e[t];return Yt(r)?r:new l3(e,t,n)}class d3{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new _c(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=di-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&At!==this)return G0(this,!0),!0}get value(){const t=this.dep.track();return Q0(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function h3(e,t,n=!1){let r,s;return De(e)?r=e:(r=e.get,s=e.set),new d3(r,s,n)}const p3={GET:"get",HAS:"has",ITERATE:"iterate"},m3={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},ta={},Ba=new WeakMap;let Hr;function g3(){return Hr}function d1(e,t=!1,n=Hr){if(n){let r=Ba.get(n);r||Ba.set(n,r=[]),r.push(e)}}function y3(e,t,n=ut){const{immediate:r,deep:s,once:o,scheduler:i,augmentJob:a,call:c}=n,f=S=>s?S:Ln(S)||s===!1||s===0?wr(S,1):wr(S);let l,d,h,m,x=!1,_=!1;if(Yt(e)?(d=()=>e.value,x=Ln(e)):Zr(e)?(d=()=>f(e),x=!0):Ce(e)?(_=!0,x=e.some(S=>Zr(S)||Ln(S)),d=()=>e.map(S=>{if(Yt(S))return S.value;if(Zr(S))return f(S);if(De(S))return c?c(S,2):S()})):De(e)?t?d=c?()=>c(e,2):e:d=()=>{if(h){ds();try{h()}finally{hs()}}const S=Hr;Hr=l;try{return c?c(e,3,[m]):e(m)}finally{Hr=S}}:d=Un,t&&s){const S=d,P=s===!0?1/0:s;d=()=>wr(S(),P)}const C=W0(),w=()=>{l.stop(),C&&C.active&&iu(C.effects,l)};if(o&&t){const S=t;t=(...P)=>{S(...P),w()}}let g=_?new Array(e.length).fill(ta):ta;const v=S=>{if(!(!(l.flags&1)||!l.dirty&&!S))if(t){const P=l.run();if(s||x||(_?P.some((k,M)=>_n(k,g[M])):_n(P,g))){h&&h();const k=Hr;Hr=l;try{const M=[P,g===ta?void 0:_&&g[0]===ta?[]:g,m];c?c(t,3,M):t(...M),g=P}finally{Hr=k}}}else l.run()};return a&&a(v),l=new ui(d),l.scheduler=i?()=>i(v,!1):v,m=S=>d1(S,!1,l),h=l.onStop=()=>{const S=Ba.get(l);if(S){if(c)c(S,4);else for(const P of S)P();Ba.delete(l)}},t?r?v(!0):g=l.run():i?i(v.bind(null,!0),!0):l.run(),w.pause=l.pause.bind(l),w.resume=l.resume.bind(l),w.stop=w,w}function wr(e,t=1/0,n){if(t<=0||!vt(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,Yt(e))wr(e.value,t,n);else if(Ce(e))for(let r=0;r{wr(r,t,n)});else if(gc(e)){for(const r in e)wr(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&wr(e[r],t,n)}return e}/** -* @vue/runtime-core v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/const h1=[];function b3(e){h1.push(e)}function v3(){h1.pop()}function _3(e,t){}const x3={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},w3={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function To(e,t,n,r){try{return r?e(...r):e()}catch(s){Vs(s,t,n)}}function zn(e,t,n,r){if(De(e)){const s=To(e,t,n,r);return s&&au(s)&&s.catch(o=>{Vs(o,t,n)}),s}if(Ce(e)){const s=[];for(let o=0;o>>1,s=xn[r],o=mi(s);o=mi(n)?xn.push(e):xn.splice(A3(t),0,e),e.flags|=1,m1()}}function m1(){Ua||(Ua=p1.then(g1))}function pi(e){Ce(e)?lo.push(...e):qr&&e.id===-1?qr.splice(Qs+1,0,e):e.flags&1||(lo.push(e),e.flags|=1),m1()}function Od(e,t,n=rr+1){for(;nmi(n)-mi(r));if(lo.length=0,qr){qr.push(...t);return}for(qr=t,Qs=0;Qse.id==null?e.flags&2?-1:1/0:e.id;function g1(e){try{for(rr=0;rrZs.emit(s,...o)),na=[]):typeof window<"u"&&window.HTMLElement&&!((r=(n=window.navigator)==null?void 0:n.userAgent)!=null&&r.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(o=>{y1(o,t)}),setTimeout(()=>{Zs||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,na=[])},3e3)):na=[]}let Wt=null,Sc=null;function gi(e){const t=Wt;return Wt=e,Sc=e&&e.type.__scopeId||null,t}function S3(e){Sc=e}function C3(){Sc=null}const O3=e=>Qr;function Qr(e,t=Wt,n){if(!t||e._n)return e;const r=(...s)=>{r._d&&Wl(-1);const o=gi(t);let i;try{i=e(...s)}finally{gi(o),r._d&&Wl(1)}return i};return r._n=!0,r._c=!0,r._d=!0,r}function b1(e,t){if(Wt===null)return e;const n=Ui(Wt),r=e.dirs||(e.dirs=[]);for(let s=0;se.__isTeleport,Qo=e=>e&&(e.disabled||e.disabled===""),Td=e=>e&&(e.defer||e.defer===""),Pd=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Rd=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Bl=(e,t)=>{const n=e&&e.to;return St(n)?t?t(n):null:n},x1={name:"Teleport",__isTeleport:!0,process(e,t,n,r,s,o,i,a,c,f){const{mc:l,pc:d,pbc:h,o:{insert:m,querySelector:x,createText:_,createComment:C}}=f,w=Qo(t.props);let{shapeFlag:g,children:v,dynamicChildren:S}=t;if(e==null){const P=t.el=_(""),k=t.anchor=_("");m(P,n,r),m(k,n,r);const M=(N,$)=>{g&16&&(s&&s.isCE&&(s.ce._teleportTarget=N),l(v,N,$,s,o,i,a,c))},V=()=>{const N=t.target=Bl(t.props,x),$=w1(N,t,_,m);N&&(i!=="svg"&&Pd(N)?i="svg":i!=="mathml"&&Rd(N)&&(i="mathml"),w||(M(N,$),va(t,!1)))};w&&(M(n,k),va(t,!0)),Td(t.props)?Ht(()=>{V(),t.el.__isMounted=!0},o):V()}else{if(Td(t.props)&&!e.el.__isMounted){Ht(()=>{x1.process(e,t,n,r,s,o,i,a,c,f),delete e.el.__isMounted},o);return}t.el=e.el,t.targetStart=e.targetStart;const P=t.anchor=e.anchor,k=t.target=e.target,M=t.targetAnchor=e.targetAnchor,V=Qo(e.props),N=V?n:k,$=V?P:M;if(i==="svg"||Pd(k)?i="svg":(i==="mathml"||Rd(k))&&(i="mathml"),S?(h(e.dynamicChildren,S,N,s,o,i,a),Pu(e,t,!0)):c||d(e,t,N,$,s,o,i,a,!1),w)V?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):ra(t,n,P,f,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const Z=t.target=Bl(t.props,x);Z&&ra(t,Z,null,f,0)}else V&&ra(t,k,M,f,1);va(t,w)}},remove(e,t,n,{um:r,o:{remove:s}},o){const{shapeFlag:i,children:a,anchor:c,targetStart:f,targetAnchor:l,target:d,props:h}=e;if(d&&(s(f),s(l)),o&&s(c),i&16){const m=o||!Qo(h);for(let x=0;x{e.isMounted=!0}),Pc(()=>{e.isUnmounting=!0}),e}const Fn=[Function,Array],_u={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Fn,onEnter:Fn,onAfterEnter:Fn,onEnterCancelled:Fn,onBeforeLeave:Fn,onLeave:Fn,onAfterLeave:Fn,onLeaveCancelled:Fn,onBeforeAppear:Fn,onAppear:Fn,onAfterAppear:Fn,onAppearCancelled:Fn},E1=e=>{const t=e.subTree;return t.component?E1(t.component):t},R3={name:"BaseTransition",props:_u,setup(e,{slots:t}){const n=Vn(),r=vu();return()=>{const s=t.default&&Cc(t.default(),!0);if(!s||!s.length)return;const o=A1(s),i=dt(e),{mode:a}=i;if(r.isLeaving)return ol(o);const c=kd(o);if(!c)return ol(o);let f=yo(c,i,r,n,d=>f=d);c.type!==zt&&Rr(c,f);let l=n.subTree&&kd(n.subTree);if(l&&l.type!==zt&&!qn(c,l)&&E1(n).type!==zt){let d=yo(l,i,r,n);if(Rr(l,d),a==="out-in"&&c.type!==zt)return r.isLeaving=!0,d.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,l=void 0},ol(o);a==="in-out"&&c.type!==zt?d.delayLeave=(h,m,x)=>{const _=C1(r,l);_[String(l.key)]=l,h[Wr]=()=>{m(),h[Wr]=void 0,delete f.delayedLeave,l=void 0},f.delayedLeave=()=>{x(),delete f.delayedLeave,l=void 0}}:l=void 0}else l&&(l=void 0);return o}}};function A1(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==zt){t=n;break}}return t}const S1=R3;function C1(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function yo(e,t,n,r,s){const{appear:o,mode:i,persisted:a=!1,onBeforeEnter:c,onEnter:f,onAfterEnter:l,onEnterCancelled:d,onBeforeLeave:h,onLeave:m,onAfterLeave:x,onLeaveCancelled:_,onBeforeAppear:C,onAppear:w,onAfterAppear:g,onAppearCancelled:v}=t,S=String(e.key),P=C1(n,e),k=(N,$)=>{N&&zn(N,r,9,$)},M=(N,$)=>{const Z=$[1];k(N,$),Ce(N)?N.every(K=>K.length<=1)&&Z():N.length<=1&&Z()},V={mode:i,persisted:a,beforeEnter(N){let $=c;if(!n.isMounted)if(o)$=C||c;else return;N[Wr]&&N[Wr](!0);const Z=P[S];Z&&qn(e,Z)&&Z.el[Wr]&&Z.el[Wr](),k($,[N])},enter(N){let $=f,Z=l,K=d;if(!n.isMounted)if(o)$=w||f,Z=g||l,K=v||d;else return;let G=!1;const fe=N[sa]=Me=>{G||(G=!0,Me?k(K,[N]):k(Z,[N]),V.delayedLeave&&V.delayedLeave(),N[sa]=void 0)};$?M($,[N,fe]):fe()},leave(N,$){const Z=String(e.key);if(N[sa]&&N[sa](!0),n.isUnmounting)return $();k(h,[N]);let K=!1;const G=N[Wr]=fe=>{K||(K=!0,$(),fe?k(_,[N]):k(x,[N]),N[Wr]=void 0,P[Z]===e&&delete P[Z])};P[Z]=e,m?M(m,[N,G]):G()},clone(N){const $=yo(N,t,n,r,s);return s&&s($),$}};return V}function ol(e){if(Fi(e))return e=cr(e),e.children=null,e}function kd(e){if(!Fi(e))return _1(e.type)&&e.children?A1(e.children):e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&De(n.default))return n.default()}}function Rr(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Rr(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Cc(e,t=!1,n){let r=[],s=0;for(let o=0;o1)for(let o=0;on.value,set:o=>n.value=o})}return n}function yi(e,t,n,r,s=!1){if(Ce(e)){e.forEach((x,_)=>yi(x,t&&(Ce(t)?t[_]:t),n,r,s));return}if(es(r)&&!s){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&yi(e,t,n,r.component.subTree);return}const o=r.shapeFlag&4?Ui(r.component):r.el,i=s?null:o,{i:a,r:c}=e,f=t&&t.r,l=a.refs===ut?a.refs={}:a.refs,d=a.setupState,h=dt(d),m=d===ut?()=>!1:x=>mt(h,x);if(f!=null&&f!==c&&(St(f)?(l[f]=null,m(f)&&(d[f]=null)):Yt(f)&&(f.value=null)),De(c))To(c,a,12,[i,l]);else{const x=St(c),_=Yt(c);if(x||_){const C=()=>{if(e.f){const w=x?m(c)?d[c]:l[c]:c.value;s?Ce(w)&&iu(w,o):Ce(w)?w.includes(o)||w.push(o):x?(l[c]=[o],m(c)&&(d[c]=l[c])):(c.value=[o],e.k&&(l[e.k]=c.value))}else x?(l[c]=i,m(c)&&(d[c]=i)):_&&(c.value=i,e.k&&(l[e.k]=i))};i?(C.id=-1,Ht(C,n)):C()}}}let Md=!1;const Gs=()=>{Md||(console.error("Hydration completed but contains mismatches."),Md=!0)},N3=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",L3=e=>e.namespaceURI.includes("MathML"),oa=e=>{if(e.nodeType===1){if(N3(e))return"svg";if(L3(e))return"mathml"}},ro=e=>e.nodeType===8;function I3(e){const{mt:t,p:n,o:{patchProp:r,createText:s,nextSibling:o,parentNode:i,remove:a,insert:c,createComment:f}}=e,l=(v,S)=>{if(!S.hasChildNodes()){n(null,v,S),$a(),S._vnode=v;return}d(S.firstChild,v,null,null,null),$a(),S._vnode=v},d=(v,S,P,k,M,V=!1)=>{V=V||!!S.dynamicChildren;const N=ro(v)&&v.data==="[",$=()=>_(v,S,P,k,M,N),{type:Z,ref:K,shapeFlag:G,patchFlag:fe}=S;let Me=v.nodeType;S.el=v,fe===-2&&(V=!1,S.dynamicChildren=null);let ae=null;switch(Z){case ns:Me!==3?S.children===""?(c(S.el=s(""),i(v),v),ae=v):ae=$():(v.data!==S.children&&(Gs(),v.data=S.children),ae=o(v));break;case zt:g(v)?(ae=o(v),w(S.el=v.content.firstChild,v,P)):Me!==8||N?ae=$():ae=o(v);break;case Ps:if(N&&(v=o(v),Me=v.nodeType),Me===1||Me===3){ae=v;const _e=!S.children.length;for(let de=0;de{V=V||!!S.dynamicChildren;const{type:N,props:$,patchFlag:Z,shapeFlag:K,dirs:G,transition:fe}=S,Me=N==="input"||N==="option";if(Me||Z!==-1){G&&sr(S,null,P,"created");let ae=!1;if(g(v)){ae=J1(null,fe)&&P&&P.vnode.props&&P.vnode.props.appear;const de=v.content.firstChild;ae&&fe.beforeEnter(de),w(de,v,P),S.el=v=de}if(K&16&&!($&&($.innerHTML||$.textContent))){let de=m(v.firstChild,S,v,P,k,M,V);for(;de;){ia(v,1)||Gs();const nt=de;de=de.nextSibling,a(nt)}}else if(K&8){let de=S.children;de[0]===` -`&&(v.tagName==="PRE"||v.tagName==="TEXTAREA")&&(de=de.slice(1)),v.textContent!==de&&(ia(v,0)||Gs(),v.textContent=S.children)}if($){if(Me||!V||Z&48){const de=v.tagName.includes("-");for(const nt in $)(Me&&(nt.endsWith("value")||nt==="indeterminate")||Ni(nt)&&!ao(nt)||nt[0]==="."||de)&&r(v,nt,null,$[nt],void 0,P)}else if($.onClick)r(v,"onClick",null,$.onClick,void 0,P);else if(Z&4&&Zr($.style))for(const de in $.style)$.style[de]}let _e;(_e=$&&$.onVnodeBeforeMount)&&Pn(_e,P,S),G&&sr(S,null,P,"beforeMount"),((_e=$&&$.onVnodeMounted)||G||ae)&&ip(()=>{_e&&Pn(_e,P,S),ae&&fe.enter(v),G&&sr(S,null,P,"mounted")},k)}return v.nextSibling},m=(v,S,P,k,M,V,N)=>{N=N||!!S.dynamicChildren;const $=S.children,Z=$.length;for(let K=0;K{const{slotScopeIds:N}=S;N&&(M=M?M.concat(N):N);const $=i(v),Z=m(o(v),S,$,P,k,M,V);return Z&&ro(Z)&&Z.data==="]"?o(S.anchor=Z):(Gs(),c(S.anchor=f("]"),$,Z),Z)},_=(v,S,P,k,M,V)=>{if(ia(v.parentElement,1)||Gs(),S.el=null,V){const Z=C(v);for(;;){const K=o(v);if(K&&K!==Z)a(K);else break}}const N=o(v),$=i(v);return a(v),n(null,S,$,N,P,k,oa($),M),P&&(P.vnode.el=S.el,Mc(P,S.el)),N},C=(v,S="[",P="]")=>{let k=0;for(;v;)if(v=o(v),v&&ro(v)&&(v.data===S&&k++,v.data===P)){if(k===0)return o(v);k--}return v},w=(v,S,P)=>{const k=S.parentNode;k&&k.replaceChild(v,S);let M=P;for(;M;)M.vnode.el===S&&(M.vnode.el=M.subTree.el=v),M=M.parent},g=v=>v.nodeType===1&&v.tagName==="TEMPLATE";return[l,d]}const Nd="data-allow-mismatch",D3={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function ia(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(Nd);)e=e.parentElement;const n=e&&e.getAttribute(Nd);if(n==null)return!1;if(n==="")return!0;{const r=n.split(",");return t===0&&r.includes("children")?!0:n.split(",").includes(D3[t])}}const j3=bc().requestIdleCallback||(e=>setTimeout(e,1)),F3=bc().cancelIdleCallback||(e=>clearTimeout(e)),B3=(e=1e4)=>t=>{const n=j3(t,{timeout:e});return()=>F3(n)};function U3(e){const{top:t,left:n,bottom:r,right:s}=e.getBoundingClientRect(),{innerHeight:o,innerWidth:i}=window;return(t>0&&t0&&r0&&n0&&s(t,n)=>{const r=new IntersectionObserver(s=>{for(const o of s)if(o.isIntersecting){r.disconnect(),t();break}},e);return n(s=>{if(s instanceof Element){if(U3(s))return t(),r.disconnect(),!1;r.observe(s)}}),()=>r.disconnect()},z3=e=>t=>{if(e){const n=matchMedia(e);if(n.matches)t();else return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t)}},V3=(e=[])=>(t,n)=>{St(e)&&(e=[e]);let r=!1;const s=i=>{r||(r=!0,o(),t(),i.target.dispatchEvent(new i.constructor(i.type,i)))},o=()=>{n(i=>{for(const a of e)i.removeEventListener(a,s)})};return n(i=>{for(const a of e)i.addEventListener(a,s,{once:!0})}),o};function K3(e,t){if(ro(e)&&e.data==="["){let n=1,r=e.nextSibling;for(;r;){if(r.nodeType===1){if(t(r)===!1)break}else if(ro(r))if(r.data==="]"){if(--n===0)break}else r.data==="["&&n++;r=r.nextSibling}}else t(e)}const es=e=>!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function H3(e){De(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:s=200,hydrate:o,timeout:i,suspensible:a=!0,onError:c}=e;let f=null,l,d=0;const h=()=>(d++,f=null,m()),m=()=>{let x;return f||(x=f=t().catch(_=>{if(_=_ instanceof Error?_:new Error(String(_)),c)return new Promise((C,w)=>{c(_,()=>C(h()),()=>w(_),d+1)});throw _}).then(_=>x!==f&&f?f:(_&&(_.__esModule||_[Symbol.toStringTag]==="Module")&&(_=_.default),l=_,_)))};return Ir({name:"AsyncComponentWrapper",__asyncLoader:m,__asyncHydrate(x,_,C){const w=o?()=>{const g=o(C,v=>K3(x,v));g&&(_.bum||(_.bum=[])).push(g)}:C;l?w():m().then(()=>!_.isUnmounted&&w())},get __asyncResolved(){return l},setup(){const x=qt;if(xu(x),l)return()=>il(l,x);const _=v=>{f=null,Vs(v,x,13,!r)};if(a&&x.suspense||bo)return m().then(v=>()=>il(v,x)).catch(v=>(_(v),()=>r?tt(r,{error:v}):null));const C=Os(!1),w=Os(),g=Os(!!s);return s&&setTimeout(()=>{g.value=!1},s),i!=null&&setTimeout(()=>{if(!C.value&&!w.value){const v=new Error(`Async component timed out after ${i}ms.`);_(v),w.value=v}},i),m().then(()=>{C.value=!0,x.parent&&Fi(x.parent.vnode)&&x.parent.update()}).catch(v=>{_(v),w.value=v}),()=>{if(C.value&&l)return il(l,x);if(w.value&&r)return tt(r,{error:w.value});if(n&&!g.value)return tt(n)}}})}function il(e,t){const{ref:n,props:r,children:s,ce:o}=t.vnode,i=tt(e,r,s);return i.ref=n,i.ce=o,delete t.vnode.ce,i}const Fi=e=>e.type.__isKeepAlive,q3={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=Vn(),r=n.ctx;if(!r.renderer)return()=>{const g=t.default&&t.default();return g&&g.length===1?g[0]:g};const s=new Map,o=new Set;let i=null;const a=n.suspense,{renderer:{p:c,m:f,um:l,o:{createElement:d}}}=r,h=d("div");r.activate=(g,v,S,P,k)=>{const M=g.component;f(g,v,S,0,a),c(M.vnode,g,v,S,M,a,P,g.slotScopeIds,k),Ht(()=>{M.isDeactivated=!1,M.a&&co(M.a);const V=g.props&&g.props.onVnodeMounted;V&&Pn(V,M.parent,g)},a)},r.deactivate=g=>{const v=g.component;Va(v.m),Va(v.a),f(g,h,null,1,a),Ht(()=>{v.da&&co(v.da);const S=g.props&&g.props.onVnodeUnmounted;S&&Pn(S,v.parent,g),v.isDeactivated=!0},a)};function m(g){al(g),l(g,n,a,!0)}function x(g){s.forEach((v,S)=>{const P=Ql(v.type);P&&!g(P)&&_(S)})}function _(g){const v=s.get(g);v&&(!i||!qn(v,i))?m(v):i&&al(i),s.delete(g),o.delete(g)}ts(()=>[e.include,e.exclude],([g,v])=>{g&&x(S=>Vo(g,S)),v&&x(S=>!Vo(v,S))},{flush:"post",deep:!0});let C=null;const w=()=>{C!=null&&(Ka(n.subTree.type)?Ht(()=>{s.set(C,aa(n.subTree))},n.subTree.suspense):s.set(C,aa(n.subTree)))};return Po(w),Tc(w),Pc(()=>{s.forEach(g=>{const{subTree:v,suspense:S}=n,P=aa(v);if(g.type===P.type&&g.key===P.key){al(P);const k=P.component.da;k&&Ht(k,S);return}m(g)})}),()=>{if(C=null,!t.default)return i=null;const g=t.default(),v=g[0];if(g.length>1)return i=null,g;if(!kr(v)||!(v.shapeFlag&4)&&!(v.shapeFlag&128))return i=null,v;let S=aa(v);if(S.type===zt)return i=null,S;const P=S.type,k=Ql(es(S)?S.type.__asyncResolved||{}:P),{include:M,exclude:V,max:N}=e;if(M&&(!k||!Vo(M,k))||V&&k&&Vo(V,k))return S.shapeFlag&=-257,i=S,v;const $=S.key==null?P:S.key,Z=s.get($);return S.el&&(S=cr(S),v.shapeFlag&128&&(v.ssContent=S)),C=$,Z?(S.el=Z.el,S.component=Z.component,S.transition&&Rr(S,S.transition),S.shapeFlag|=512,o.delete($),o.add($)):(o.add($),N&&o.size>parseInt(N,10)&&_(o.values().next().value)),S.shapeFlag|=256,i=S,Ka(v.type)?v:S}}},W3=q3;function Vo(e,t){return Ce(e)?e.some(n=>Vo(n,t)):St(e)?e.split(",").includes(t):_g(e)?(e.lastIndex=0,e.test(t)):!1}function O1(e,t){P1(e,"a",t)}function T1(e,t){P1(e,"da",t)}function P1(e,t,n=qt){const r=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(Oc(t,r,n),n){let s=n.parent;for(;s&&s.parent;)Fi(s.parent.vnode)&&Y3(r,t,n,s),s=s.parent}}function Y3(e,t,n,r){const s=Oc(t,e,r,!0);Rc(()=>{iu(r[t],s)},n)}function al(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function aa(e){return e.shapeFlag&128?e.ssContent:e}function Oc(e,t,n=qt,r=!1){if(n){const s=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{ds();const a=Ds(n),c=zn(t,n,e,i);return a(),hs(),c});return r?s.unshift(o):s.push(o),o}}const Dr=e=>(t,n=qt)=>{(!bo||e==="sp")&&Oc(e,(...r)=>t(...r),n)},R1=Dr("bm"),Po=Dr("m"),wu=Dr("bu"),Tc=Dr("u"),Pc=Dr("bum"),Rc=Dr("um"),k1=Dr("sp"),M1=Dr("rtg"),N1=Dr("rtc");function L1(e,t=qt){Oc("ec",e,t)}const Eu="components",G3="directives";function Ko(e,t){return Au(Eu,e,!0,t)||e}const I1=Symbol.for("v-ndc");function X3(e){return St(e)?Au(Eu,e,!1)||e:e||I1}function J3(e){return Au(G3,e)}function Au(e,t,n=!0,r=!1){const s=Wt||qt;if(s){const o=s.type;if(e===Eu){const a=Ql(o,!1);if(a&&(a===t||a===cn(t)||a===Li(cn(t))))return o}const i=Ld(s[e]||o[e],t)||Ld(s.appContext[e],t);return!i&&r?o:i}}function Ld(e,t){return e&&(e[t]||e[cn(t)]||e[Li(cn(t))])}function Ul(e,t,n,r){let s;const o=n&&n[r],i=Ce(e);if(i||St(e)){const a=i&&Zr(e);let c=!1;a&&(c=!Ln(e),e=xc(e)),s=new Array(e.length);for(let f=0,l=e.length;ft(a,c,void 0,o&&o[c]));else{const a=Object.keys(e);s=new Array(a.length);for(let c=0,f=a.length;c{const o=r.fn(...s);return o&&(o.key=r.key),o}:r.fn)}return e}function Su(e,t,n={},r,s){if(Wt.ce||Wt.parent&&es(Wt.parent)&&Wt.parent.ce)return t!=="default"&&(n.name=t),Nt(),_i(jt,null,[tt("slot",n,r&&r())],64);let o=e[t];o&&o._c&&(o._d=!1),Nt();const i=o&&Cu(o(n)),a=n.key||i&&i.key,c=_i(jt,{key:(a&&!Xn(a)?a:`_${t}`)+(!i&&r?"_fb":"")},i||(r?r():[]),i&&e._===1?64:-2);return!s&&c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),o&&o._c&&(o._d=!0),c}function Cu(e){return e.some(t=>kr(t)?!(t.type===zt||t.type===jt&&!Cu(t.children)):!0)?e:null}function Z3(e,t){const n={};for(const r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:Go(r)]=e[r];return n}const $l=e=>e?hp(e)?Ui(e):$l(e.parent):null,Zo=wt(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>$l(e.parent),$root:e=>$l(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Ou(e),$forceUpdate:e=>e.f||(e.f=()=>{bu(e.update)}),$nextTick:e=>e.n||(e.n=ji.bind(e.proxy)),$watch:e=>k6.bind(e)}),cl=(e,t)=>e!==ut&&!e.__isScriptSetup&&mt(e,t),zl={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:s,props:o,accessCache:i,type:a,appContext:c}=e;let f;if(t[0]!=="$"){const m=i[t];if(m!==void 0)switch(m){case 1:return r[t];case 2:return s[t];case 4:return n[t];case 3:return o[t]}else{if(cl(r,t))return i[t]=1,r[t];if(s!==ut&&mt(s,t))return i[t]=2,s[t];if((f=e.propsOptions[0])&&mt(f,t))return i[t]=3,o[t];if(n!==ut&&mt(n,t))return i[t]=4,n[t];Vl&&(i[t]=0)}}const l=Zo[t];let d,h;if(l)return t==="$attrs"&&ln(e.attrs,"get",""),l(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(n!==ut&&mt(n,t))return i[t]=4,n[t];if(h=c.config.globalProperties,mt(h,t))return h[t]},set({_:e},t,n){const{data:r,setupState:s,ctx:o}=e;return cl(s,t)?(s[t]=n,!0):r!==ut&&mt(r,t)?(r[t]=n,!0):mt(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:s,propsOptions:o}},i){let a;return!!n[i]||e!==ut&&mt(e,i)||cl(t,i)||(a=o[0])&&mt(a,i)||mt(r,i)||mt(Zo,i)||mt(s.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:mt(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},e6=wt({},zl,{get(e,t){if(t!==Symbol.unscopables)return zl.get(e,t,e)},has(e,t){return t[0]!=="_"&&!Sg(t)}});function t6(){return null}function n6(){return null}function r6(e){}function s6(e){}function o6(){return null}function i6(){}function a6(e,t){return null}function c6(){return D1().slots}function l6(){return D1().attrs}function D1(){const e=Vn();return e.setupContext||(e.setupContext=gp(e))}function bi(e){return Ce(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function f6(e,t){const n=bi(e);for(const r in t){if(r.startsWith("__skip"))continue;let s=n[r];s?Ce(s)||De(s)?s=n[r]={type:s,default:t[r]}:s.default=t[r]:s===null&&(s=n[r]={default:t[r]}),s&&t[`__skip_${r}`]&&(s.skipFactory=!0)}return n}function u6(e,t){return!e||!t?e||t:Ce(e)&&Ce(t)?e.concat(t):wt({},bi(e),bi(t))}function d6(e,t){const n={};for(const r in e)t.includes(r)||Object.defineProperty(n,r,{enumerable:!0,get:()=>e[r]});return n}function h6(e){const t=Vn();let n=e();return Gl(),au(n)&&(n=n.catch(r=>{throw Ds(t),r})),[n,()=>Ds(t)]}let Vl=!0;function p6(e){const t=Ou(e),n=e.proxy,r=e.ctx;Vl=!1,t.beforeCreate&&Id(t.beforeCreate,e,"bc");const{data:s,computed:o,methods:i,watch:a,provide:c,inject:f,created:l,beforeMount:d,mounted:h,beforeUpdate:m,updated:x,activated:_,deactivated:C,beforeDestroy:w,beforeUnmount:g,destroyed:v,unmounted:S,render:P,renderTracked:k,renderTriggered:M,errorCaptured:V,serverPrefetch:N,expose:$,inheritAttrs:Z,components:K,directives:G,filters:fe}=t;if(f&&m6(f,r,null),i)for(const _e in i){const de=i[_e];De(de)&&(r[_e]=de.bind(n))}if(s){const _e=s.call(n,n);vt(_e)&&(e.data=Oo(_e))}if(Vl=!0,o)for(const _e in o){const de=o[_e],nt=De(de)?de.bind(n,n):De(de.get)?de.get.bind(n,n):Un,He=!De(de)&&De(de.set)?de.set.bind(n):Un,Xt=Ft({get:nt,set:He});Object.defineProperty(r,_e,{enumerable:!0,configurable:!0,get:()=>Xt.value,set:Ut=>Xt.value=Ut})}if(a)for(const _e in a)j1(a[_e],r,n,_e);if(c){const _e=De(c)?c.call(n):c;Reflect.ownKeys(_e).forEach(de=>{fo(de,_e[de])})}l&&Id(l,e,"c");function ae(_e,de){Ce(de)?de.forEach(nt=>_e(nt.bind(n))):de&&_e(de.bind(n))}if(ae(R1,d),ae(Po,h),ae(wu,m),ae(Tc,x),ae(O1,_),ae(T1,C),ae(L1,V),ae(N1,k),ae(M1,M),ae(Pc,g),ae(Rc,S),ae(k1,N),Ce($))if($.length){const _e=e.exposed||(e.exposed={});$.forEach(de=>{Object.defineProperty(_e,de,{get:()=>n[de],set:nt=>n[de]=nt})})}else e.exposed||(e.exposed={});P&&e.render===Un&&(e.render=P),Z!=null&&(e.inheritAttrs=Z),K&&(e.components=K),G&&(e.directives=G),N&&xu(e)}function m6(e,t,n=Un){Ce(e)&&(e=Kl(e));for(const r in e){const s=e[r];let o;vt(s)?"default"in s?o=Yn(s.from||r,s.default,!0):o=Yn(s.from||r):o=Yn(s),Yt(o)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[r]=o}}function Id(e,t,n){zn(Ce(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function j1(e,t,n,r){let s=r.includes(".")?np(n,r):()=>n[r];if(St(e)){const o=t[e];De(o)&&ts(s,o)}else if(De(e))ts(s,e.bind(n));else if(vt(e))if(Ce(e))e.forEach(o=>j1(o,t,n,r));else{const o=De(e.handler)?e.handler.bind(n):t[e.handler];De(o)&&ts(s,o,e)}}function Ou(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:s,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,a=o.get(t);let c;return a?c=a:!s.length&&!n&&!r?c=t:(c={},s.length&&s.forEach(f=>za(c,f,i,!0)),za(c,t,i)),vt(t)&&o.set(t,c),c}function za(e,t,n,r=!1){const{mixins:s,extends:o}=t;o&&za(e,o,n,!0),s&&s.forEach(i=>za(e,i,n,!0));for(const i in t)if(!(r&&i==="expose")){const a=g6[i]||n&&n[i];e[i]=a?a(e[i],t[i]):t[i]}return e}const g6={data:Dd,props:jd,emits:jd,methods:Ho,computed:Ho,beforeCreate:bn,created:bn,beforeMount:bn,mounted:bn,beforeUpdate:bn,updated:bn,beforeDestroy:bn,beforeUnmount:bn,destroyed:bn,unmounted:bn,activated:bn,deactivated:bn,errorCaptured:bn,serverPrefetch:bn,components:Ho,directives:Ho,watch:b6,provide:Dd,inject:y6};function Dd(e,t){return t?e?function(){return wt(De(e)?e.call(this,this):e,De(t)?t.call(this,this):t)}:t:e}function y6(e,t){return Ho(Kl(e),Kl(t))}function Kl(e){if(Ce(e)){const t={};for(let n=0;n1)return n&&De(t)?t.call(r&&r.proxy):t}}function x6(){return!!(qt||Wt||Ts)}const B1={},U1=()=>Object.create(B1),$1=e=>Object.getPrototypeOf(e)===B1;function w6(e,t,n,r=!1){const s={},o=U1();e.propsDefaults=Object.create(null),z1(e,t,s,o);for(const i in e.propsOptions[0])i in s||(s[i]=void 0);n?e.props=r?s:hu(s):e.type.props?e.props=s:e.props=o,e.attrs=o}function E6(e,t,n,r){const{props:s,attrs:o,vnode:{patchFlag:i}}=e,a=dt(s),[c]=e.propsOptions;let f=!1;if((r||i>0)&&!(i&16)){if(i&8){const l=e.vnode.dynamicProps;for(let d=0;d{c=!0;const[h,m]=V1(d,t,!0);wt(i,h),m&&a.push(...m)};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}if(!o&&!c)return vt(e)&&r.set(e,oo),oo;if(Ce(o))for(let l=0;le[0]==="_"||e==="$stable",Tu=e=>Ce(e)?e.map(Rn):[Rn(e)],S6=(e,t,n)=>{if(t._n)return t;const r=Qr((...s)=>Tu(t(...s)),n);return r._c=!1,r},H1=(e,t,n)=>{const r=e._ctx;for(const s in e){if(K1(s))continue;const o=e[s];if(De(o))t[s]=S6(s,o,r);else if(o!=null){const i=Tu(o);t[s]=()=>i}}},q1=(e,t)=>{const n=Tu(t);e.slots.default=()=>n},W1=(e,t,n)=>{for(const r in t)(n||r!=="_")&&(e[r]=t[r])},C6=(e,t,n)=>{const r=e.slots=U1();if(e.vnode.shapeFlag&32){const s=t._;s?(W1(r,t,n),n&&z0(r,"_",s,!0)):H1(t,r)}else t&&q1(e,t)},O6=(e,t,n)=>{const{vnode:r,slots:s}=e;let o=!0,i=ut;if(r.shapeFlag&32){const a=t._;a?n&&a===1?o=!1:W1(s,t,n):(o=!t.$stable,H1(t,s)),i=t}else t&&(q1(e,t),i={default:1});if(o)for(const a in s)!K1(a)&&i[a]==null&&delete s[a]},Ht=ip;function Y1(e){return X1(e)}function G1(e){return X1(e,I3)}function X1(e,t){const n=bc();n.__VUE__=!0;const{insert:r,remove:s,patchProp:o,createElement:i,createText:a,createComment:c,setText:f,setElementText:l,parentNode:d,nextSibling:h,setScopeId:m=Un,insertStaticContent:x}=e,_=(O,R,D,J=null,z=null,ee=null,ce=void 0,oe=null,ie=!!R.dynamicChildren)=>{if(O===R)return;O&&!qn(O,R)&&(J=H(O),Ut(O,z,ee,!0),O=null),R.patchFlag===-2&&(ie=!1,R.dynamicChildren=null);const{type:te,ref:Re,shapeFlag:le}=R;switch(te){case ns:C(O,R,D,J);break;case zt:w(O,R,D,J);break;case Ps:O==null&&g(R,D,J,ce);break;case jt:K(O,R,D,J,z,ee,ce,oe,ie);break;default:le&1?P(O,R,D,J,z,ee,ce,oe,ie):le&6?G(O,R,D,J,z,ee,ce,oe,ie):(le&64||le&128)&&te.process(O,R,D,J,z,ee,ce,oe,ie,Ee)}Re!=null&&z&&yi(Re,O&&O.ref,ee,R||O,!R)},C=(O,R,D,J)=>{if(O==null)r(R.el=a(R.children),D,J);else{const z=R.el=O.el;R.children!==O.children&&f(z,R.children)}},w=(O,R,D,J)=>{O==null?r(R.el=c(R.children||""),D,J):R.el=O.el},g=(O,R,D,J)=>{[O.el,O.anchor]=x(O.children,R,D,J,O.el,O.anchor)},v=({el:O,anchor:R},D,J)=>{let z;for(;O&&O!==R;)z=h(O),r(O,D,J),O=z;r(R,D,J)},S=({el:O,anchor:R})=>{let D;for(;O&&O!==R;)D=h(O),s(O),O=D;s(R)},P=(O,R,D,J,z,ee,ce,oe,ie)=>{R.type==="svg"?ce="svg":R.type==="math"&&(ce="mathml"),O==null?k(R,D,J,z,ee,ce,oe,ie):N(O,R,z,ee,ce,oe,ie)},k=(O,R,D,J,z,ee,ce,oe)=>{let ie,te;const{props:Re,shapeFlag:le,transition:Ae,dirs:Le}=O;if(ie=O.el=i(O.type,ee,Re&&Re.is,Re),le&8?l(ie,O.children):le&16&&V(O.children,ie,null,J,z,ll(O,ee),ce,oe),Le&&sr(O,null,J,"created"),M(ie,O,O.scopeId,ce,J),Re){for(const ht in Re)ht!=="value"&&!ao(ht)&&o(ie,ht,null,Re[ht],ee,J);"value"in Re&&o(ie,"value",null,Re.value,ee),(te=Re.onVnodeBeforeMount)&&Pn(te,J,O)}Le&&sr(O,null,J,"beforeMount");const Ze=J1(z,Ae);Ze&&Ae.beforeEnter(ie),r(ie,R,D),((te=Re&&Re.onVnodeMounted)||Ze||Le)&&Ht(()=>{te&&Pn(te,J,O),Ze&&Ae.enter(ie),Le&&sr(O,null,J,"mounted")},z)},M=(O,R,D,J,z)=>{if(D&&m(O,D),J)for(let ee=0;ee{for(let te=ie;te{const oe=R.el=O.el;let{patchFlag:ie,dynamicChildren:te,dirs:Re}=R;ie|=O.patchFlag&16;const le=O.props||ut,Ae=R.props||ut;let Le;if(D&&ys(D,!1),(Le=Ae.onVnodeBeforeUpdate)&&Pn(Le,D,R,O),Re&&sr(R,O,D,"beforeUpdate"),D&&ys(D,!0),(le.innerHTML&&Ae.innerHTML==null||le.textContent&&Ae.textContent==null)&&l(oe,""),te?$(O.dynamicChildren,te,oe,D,J,ll(R,z),ee):ce||de(O,R,oe,null,D,J,ll(R,z),ee,!1),ie>0){if(ie&16)Z(oe,le,Ae,D,z);else if(ie&2&&le.class!==Ae.class&&o(oe,"class",null,Ae.class,z),ie&4&&o(oe,"style",le.style,Ae.style,z),ie&8){const Ze=R.dynamicProps;for(let ht=0;ht{Le&&Pn(Le,D,R,O),Re&&sr(R,O,D,"updated")},J)},$=(O,R,D,J,z,ee,ce)=>{for(let oe=0;oe{if(R!==D){if(R!==ut)for(const ee in R)!ao(ee)&&!(ee in D)&&o(O,ee,R[ee],null,z,J);for(const ee in D){if(ao(ee))continue;const ce=D[ee],oe=R[ee];ce!==oe&&ee!=="value"&&o(O,ee,oe,ce,z,J)}"value"in D&&o(O,"value",R.value,D.value,z)}},K=(O,R,D,J,z,ee,ce,oe,ie)=>{const te=R.el=O?O.el:a(""),Re=R.anchor=O?O.anchor:a("");let{patchFlag:le,dynamicChildren:Ae,slotScopeIds:Le}=R;Le&&(oe=oe?oe.concat(Le):Le),O==null?(r(te,D,J),r(Re,D,J),V(R.children||[],D,Re,z,ee,ce,oe,ie)):le>0&&le&64&&Ae&&O.dynamicChildren?($(O.dynamicChildren,Ae,D,z,ee,ce,oe),(R.key!=null||z&&R===z.subTree)&&Pu(O,R,!0)):de(O,R,D,Re,z,ee,ce,oe,ie)},G=(O,R,D,J,z,ee,ce,oe,ie)=>{R.slotScopeIds=oe,O==null?R.shapeFlag&512?z.ctx.activate(R,D,J,ce,ie):fe(R,D,J,z,ee,ce,ie):Me(O,R,ie)},fe=(O,R,D,J,z,ee,ce)=>{const oe=O.component=dp(O,J,z);if(Fi(O)&&(oe.ctx.renderer=Ee),pp(oe,!1,ce),oe.asyncDep){if(z&&z.registerDep(oe,ae,ce),!O.el){const ie=oe.subTree=tt(zt);w(null,ie,R,D)}}else ae(oe,O,R,D,z,ee,ce)},Me=(O,R,D)=>{const J=R.component=O.component;if(j6(O,R,D))if(J.asyncDep&&!J.asyncResolved){_e(J,R,D);return}else J.next=R,J.update();else R.el=O.el,J.vnode=R},ae=(O,R,D,J,z,ee,ce)=>{const oe=()=>{if(O.isMounted){let{next:le,bu:Ae,u:Le,parent:Ze,vnode:ht}=O;{const $t=Q1(O);if($t){le&&(le.el=ht.el,_e(O,le,ce)),$t.asyncDep.then(()=>{O.isUnmounted||oe()});return}}let at=le,nn;ys(O,!1),le?(le.el=ht.el,_e(O,le,ce)):le=ht,Ae&&co(Ae),(nn=le.props&&le.props.onVnodeBeforeUpdate)&&Pn(nn,Ze,le,ht),ys(O,!0);const Mt=_a(O),rn=O.subTree;O.subTree=Mt,_(rn,Mt,d(rn.el),H(rn),O,z,ee),le.el=Mt.el,at===null&&Mc(O,Mt.el),Le&&Ht(Le,z),(nn=le.props&&le.props.onVnodeUpdated)&&Ht(()=>Pn(nn,Ze,le,ht),z)}else{let le;const{el:Ae,props:Le}=R,{bm:Ze,m:ht,parent:at,root:nn,type:Mt}=O,rn=es(R);if(ys(O,!1),Ze&&co(Ze),!rn&&(le=Le&&Le.onVnodeBeforeMount)&&Pn(le,at,R),ys(O,!0),Ae&&pt){const $t=()=>{O.subTree=_a(O),pt(Ae,O.subTree,O,z,null)};rn&&Mt.__asyncHydrate?Mt.__asyncHydrate(Ae,O,$t):$t()}else{nn.ce&&nn.ce._injectChildStyle(Mt);const $t=O.subTree=_a(O);_(null,$t,D,J,O,z,ee),R.el=$t.el}if(ht&&Ht(ht,z),!rn&&(le=Le&&Le.onVnodeMounted)){const $t=R;Ht(()=>Pn(le,at,$t),z)}(R.shapeFlag&256||at&&es(at.vnode)&&at.vnode.shapeFlag&256)&&O.a&&Ht(O.a,z),O.isMounted=!0,R=D=J=null}};O.scope.on();const ie=O.effect=new ui(oe);O.scope.off();const te=O.update=ie.run.bind(ie),Re=O.job=ie.runIfDirty.bind(ie);Re.i=O,Re.id=O.uid,ie.scheduler=()=>bu(Re),ys(O,!0),te()},_e=(O,R,D)=>{R.component=O;const J=O.vnode.props;O.vnode=R,O.next=null,E6(O,R.props,J,D),O6(O,R.children,D),ds(),Od(O),hs()},de=(O,R,D,J,z,ee,ce,oe,ie=!1)=>{const te=O&&O.children,Re=O?O.shapeFlag:0,le=R.children,{patchFlag:Ae,shapeFlag:Le}=R;if(Ae>0){if(Ae&128){He(te,le,D,J,z,ee,ce,oe,ie);return}else if(Ae&256){nt(te,le,D,J,z,ee,ce,oe,ie);return}}Le&8?(Re&16&&_t(te,z,ee),le!==te&&l(D,le)):Re&16?Le&16?He(te,le,D,J,z,ee,ce,oe,ie):_t(te,z,ee,!0):(Re&8&&l(D,""),Le&16&&V(le,D,J,z,ee,ce,oe,ie))},nt=(O,R,D,J,z,ee,ce,oe,ie)=>{O=O||oo,R=R||oo;const te=O.length,Re=R.length,le=Math.min(te,Re);let Ae;for(Ae=0;AeRe?_t(O,z,ee,!0,!1,le):V(R,D,J,z,ee,ce,oe,ie,le)},He=(O,R,D,J,z,ee,ce,oe,ie)=>{let te=0;const Re=R.length;let le=O.length-1,Ae=Re-1;for(;te<=le&&te<=Ae;){const Le=O[te],Ze=R[te]=ie?Yr(R[te]):Rn(R[te]);if(qn(Le,Ze))_(Le,Ze,D,null,z,ee,ce,oe,ie);else break;te++}for(;te<=le&&te<=Ae;){const Le=O[le],Ze=R[Ae]=ie?Yr(R[Ae]):Rn(R[Ae]);if(qn(Le,Ze))_(Le,Ze,D,null,z,ee,ce,oe,ie);else break;le--,Ae--}if(te>le){if(te<=Ae){const Le=Ae+1,Ze=LeAe)for(;te<=le;)Ut(O[te],z,ee,!0),te++;else{const Le=te,Ze=te,ht=new Map;for(te=Ze;te<=Ae;te++){const It=R[te]=ie?Yr(R[te]):Rn(R[te]);It.key!=null&&ht.set(It.key,te)}let at,nn=0;const Mt=Ae-Ze+1;let rn=!1,$t=0;const An=new Array(Mt);for(te=0;te=Mt){Ut(It,z,ee,!0);continue}let Kt;if(It.key!=null)Kt=ht.get(It.key);else for(at=Ze;at<=Ae;at++)if(An[at-Ze]===0&&qn(It,R[at])){Kt=at;break}Kt===void 0?Ut(It,z,ee,!0):(An[Kt-Ze]=te+1,Kt>=$t?$t=Kt:rn=!0,_(It,R[Kt],D,null,z,ee,ce,oe,ie),nn++)}const Kn=rn?T6(An):oo;for(at=Kn.length-1,te=Mt-1;te>=0;te--){const It=Ze+te,Kt=R[It],Sn=It+1{const{el:ee,type:ce,transition:oe,children:ie,shapeFlag:te}=O;if(te&6){Xt(O.component.subTree,R,D,J);return}if(te&128){O.suspense.move(R,D,J);return}if(te&64){ce.move(O,R,D,Ee);return}if(ce===jt){r(ee,R,D);for(let le=0;leoe.enter(ee),z);else{const{leave:le,delayLeave:Ae,afterLeave:Le}=oe,Ze=()=>r(ee,R,D),ht=()=>{le(ee,()=>{Ze(),Le&&Le()})};Ae?Ae(ee,Ze,ht):ht()}else r(ee,R,D)},Ut=(O,R,D,J=!1,z=!1)=>{const{type:ee,props:ce,ref:oe,children:ie,dynamicChildren:te,shapeFlag:Re,patchFlag:le,dirs:Ae,cacheIndex:Le}=O;if(le===-2&&(z=!1),oe!=null&&yi(oe,null,D,O,!0),Le!=null&&(R.renderCache[Le]=void 0),Re&256){R.ctx.deactivate(O);return}const Ze=Re&1&&Ae,ht=!es(O);let at;if(ht&&(at=ce&&ce.onVnodeBeforeUnmount)&&Pn(at,R,O),Re&6)Ge(O.component,D,J);else{if(Re&128){O.suspense.unmount(D,J);return}Ze&&sr(O,null,R,"beforeUnmount"),Re&64?O.type.remove(O,R,D,Ee,J):te&&!te.hasOnce&&(ee!==jt||le>0&&le&64)?_t(te,R,D,!1,!0):(ee===jt&&le&384||!z&&Re&16)&&_t(ie,R,D),J&&bt(O)}(ht&&(at=ce&&ce.onVnodeUnmounted)||Ze)&&Ht(()=>{at&&Pn(at,R,O),Ze&&sr(O,null,R,"unmounted")},D)},bt=O=>{const{type:R,el:D,anchor:J,transition:z}=O;if(R===jt){Lt(D,J);return}if(R===Ps){S(O);return}const ee=()=>{s(D),z&&!z.persisted&&z.afterLeave&&z.afterLeave()};if(O.shapeFlag&1&&z&&!z.persisted){const{leave:ce,delayLeave:oe}=z,ie=()=>ce(D,ee);oe?oe(O.el,ee,ie):ie()}else ee()},Lt=(O,R)=>{let D;for(;O!==R;)D=h(O),s(O),O=D;s(R)},Ge=(O,R,D)=>{const{bum:J,scope:z,job:ee,subTree:ce,um:oe,m:ie,a:te}=O;Va(ie),Va(te),J&&co(J),z.stop(),ee&&(ee.flags|=8,Ut(ce,O,R,D)),oe&&Ht(oe,R),Ht(()=>{O.isUnmounted=!0},R),R&&R.pendingBranch&&!R.isUnmounted&&O.asyncDep&&!O.asyncResolved&&O.suspenseId===R.pendingId&&(R.deps--,R.deps===0&&R.resolve())},_t=(O,R,D,J=!1,z=!1,ee=0)=>{for(let ce=ee;ce{if(O.shapeFlag&6)return H(O.component.subTree);if(O.shapeFlag&128)return O.suspense.next();const R=h(O.anchor||O.el),D=R&&R[v1];return D?h(D):R};let ge=!1;const ue=(O,R,D)=>{O==null?R._vnode&&Ut(R._vnode,null,null,!0):_(R._vnode||null,O,R,null,null,null,D),R._vnode=O,ge||(ge=!0,Od(),$a(),ge=!1)},Ee={p:_,um:Ut,m:Xt,r:bt,mt:fe,mc:V,pc:de,pbc:$,n:H,o:e};let rt,pt;return t&&([rt,pt]=t(Ee)),{render:ue,hydrate:rt,createApp:_6(ue,rt)}}function ll({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function ys({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function J1(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Pu(e,t,n=!1){const r=e.children,s=t.children;if(Ce(r)&&Ce(s))for(let o=0;o>1,e[n[a]]0&&(t[r]=n[o-1]),n[o]=r)}}for(o=n.length,i=n[o-1];o-- >0;)n[o]=i,i=t[i];return n}function Q1(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Q1(t)}function Va(e){if(e)for(let t=0;tYn(Z1);function P6(e,t){return Bi(e,null,t)}function R6(e,t){return Bi(e,null,{flush:"post"})}function tp(e,t){return Bi(e,null,{flush:"sync"})}function ts(e,t,n){return Bi(e,t,n)}function Bi(e,t,n=ut){const{immediate:r,deep:s,flush:o,once:i}=n,a=wt({},n),c=t&&r||!t&&o!=="post";let f;if(bo){if(o==="sync"){const m=ep();f=m.__watcherHandles||(m.__watcherHandles=[])}else if(!c){const m=()=>{};return m.stop=Un,m.resume=Un,m.pause=Un,m}}const l=qt;a.call=(m,x,_)=>zn(m,l,x,_);let d=!1;o==="post"?a.scheduler=m=>{Ht(m,l&&l.suspense)}:o!=="sync"&&(d=!0,a.scheduler=(m,x)=>{x?m():bu(m)}),a.augmentJob=m=>{t&&(m.flags|=4),d&&(m.flags|=2,l&&(m.id=l.uid,m.i=l))};const h=y3(e,t,a);return bo&&(f?f.push(h):c&&h()),h}function k6(e,t,n){const r=this.proxy,s=St(e)?e.includes(".")?np(r,e):()=>r[e]:e.bind(r,r);let o;De(t)?o=t:(o=t.handler,n=t);const i=Ds(this),a=Bi(s,o.bind(r),n);return i(),a}function np(e,t){const n=t.split(".");return()=>{let r=e;for(let s=0;s{let l,d=ut,h;return tp(()=>{const m=e[s];_n(l,m)&&(l=m,f())}),{get(){return c(),n.get?n.get(l):l},set(m){const x=n.set?n.set(m):m;if(!_n(x,l)&&!(d!==ut&&_n(m,d)))return;const _=r.vnode.props;_&&(t in _||s in _||o in _)&&(`onUpdate:${t}`in _||`onUpdate:${s}`in _||`onUpdate:${o}`in _)||(l=m,f()),r.emit(`update:${t}`,x),_n(m,x)&&_n(m,d)&&!_n(x,h)&&f(),d=m,h=x}}});return a[Symbol.iterator]=()=>{let c=0;return{next(){return c<2?{value:c++?i||ut:a,done:!1}:{done:!0}}}},a}const rp=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${cn(t)}Modifiers`]||e[`${kn(t)}Modifiers`];function N6(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||ut;let s=n;const o=t.startsWith("update:"),i=o&&rp(r,t.slice(7));i&&(i.trim&&(s=n.map(l=>St(l)?l.trim():l)),i.number&&(s=n.map(Da)));let a,c=r[a=Go(t)]||r[a=Go(cn(t))];!c&&o&&(c=r[a=Go(kn(t))]),c&&zn(c,e,6,s);const f=r[a+"Once"];if(f){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,zn(f,e,6,s)}}function sp(e,t,n=!1){const r=t.emitsCache,s=r.get(e);if(s!==void 0)return s;const o=e.emits;let i={},a=!1;if(!De(e)){const c=f=>{const l=sp(f,t,!0);l&&(a=!0,wt(i,l))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!o&&!a?(vt(e)&&r.set(e,null),null):(Ce(o)?o.forEach(c=>i[c]=null):wt(i,o),vt(e)&&r.set(e,i),i)}function kc(e,t){return!e||!Ni(t)?!1:(t=t.slice(2).replace(/Once$/,""),mt(e,t[0].toLowerCase()+t.slice(1))||mt(e,kn(t))||mt(e,t))}function _a(e){const{type:t,vnode:n,proxy:r,withProxy:s,propsOptions:[o],slots:i,attrs:a,emit:c,render:f,renderCache:l,props:d,data:h,setupState:m,ctx:x,inheritAttrs:_}=e,C=gi(e);let w,g;try{if(n.shapeFlag&4){const S=s||r,P=S;w=Rn(f.call(P,S,l,d,m,h,x)),g=a}else{const S=t;w=Rn(S.length>1?S(d,{attrs:a,slots:i,emit:c}):S(d,null)),g=t.props?a:I6(a)}}catch(S){ei.length=0,Vs(S,e,1),w=tt(zt)}let v=w;if(g&&_!==!1){const S=Object.keys(g),{shapeFlag:P}=v;S.length&&P&7&&(o&&S.some(ou)&&(g=D6(g,o)),v=cr(v,g,!1,!0))}return n.dirs&&(v=cr(v,null,!1,!0),v.dirs=v.dirs?v.dirs.concat(n.dirs):n.dirs),n.transition&&Rr(v,n.transition),w=v,gi(C),w}function L6(e,t=!0){let n;for(let r=0;r{let t;for(const n in e)(n==="class"||n==="style"||Ni(n))&&((t||(t={}))[n]=e[n]);return t},D6=(e,t)=>{const n={};for(const r in e)(!ou(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function j6(e,t,n){const{props:r,children:s,component:o}=e,{props:i,children:a,patchFlag:c}=t,f=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?Bd(r,i,f):!!i;if(c&8){const l=t.dynamicProps;for(let d=0;de.__isSuspense;let ql=0;const F6={name:"Suspense",__isSuspense:!0,process(e,t,n,r,s,o,i,a,c,f){if(e==null)U6(t,n,r,s,o,i,a,c,f);else{if(o&&o.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}$6(e,t,n,r,s,i,a,c,f)}},hydrate:z6,normalize:V6},B6=F6;function vi(e,t){const n=e.props&&e.props[t];De(n)&&n()}function U6(e,t,n,r,s,o,i,a,c){const{p:f,o:{createElement:l}}=c,d=l("div"),h=e.suspense=op(e,s,r,t,d,n,o,i,a,c);f(null,h.pendingBranch=e.ssContent,d,null,r,h,o,i),h.deps>0?(vi(e,"onPending"),vi(e,"onFallback"),f(null,e.ssFallback,t,n,r,null,o,i),uo(h,e.ssFallback)):h.resolve(!1,!0)}function $6(e,t,n,r,s,o,i,a,{p:c,um:f,o:{createElement:l}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const h=t.ssContent,m=t.ssFallback,{activeBranch:x,pendingBranch:_,isInFallback:C,isHydrating:w}=d;if(_)d.pendingBranch=h,qn(h,_)?(c(_,h,d.hiddenContainer,null,s,d,o,i,a),d.deps<=0?d.resolve():C&&(w||(c(x,m,n,r,s,null,o,i,a),uo(d,m)))):(d.pendingId=ql++,w?(d.isHydrating=!1,d.activeBranch=_):f(_,s,d),d.deps=0,d.effects.length=0,d.hiddenContainer=l("div"),C?(c(null,h,d.hiddenContainer,null,s,d,o,i,a),d.deps<=0?d.resolve():(c(x,m,n,r,s,null,o,i,a),uo(d,m))):x&&qn(h,x)?(c(x,h,n,r,s,d,o,i,a),d.resolve(!0)):(c(null,h,d.hiddenContainer,null,s,d,o,i,a),d.deps<=0&&d.resolve()));else if(x&&qn(h,x))c(x,h,n,r,s,d,o,i,a),uo(d,h);else if(vi(t,"onPending"),d.pendingBranch=h,h.shapeFlag&512?d.pendingId=h.component.suspenseId:d.pendingId=ql++,c(null,h,d.hiddenContainer,null,s,d,o,i,a),d.deps<=0)d.resolve();else{const{timeout:g,pendingId:v}=d;g>0?setTimeout(()=>{d.pendingId===v&&d.fallback(m)},g):g===0&&d.fallback(m)}}function op(e,t,n,r,s,o,i,a,c,f,l=!1){const{p:d,m:h,um:m,n:x,o:{parentNode:_,remove:C}}=f;let w;const g=K6(e);g&&t&&t.pendingBranch&&(w=t.pendingId,t.deps++);const v=e.props?ja(e.props.timeout):void 0,S=o,P={vnode:e,parent:t,parentComponent:n,namespace:i,container:r,hiddenContainer:s,deps:0,pendingId:ql++,timeout:typeof v=="number"?v:-1,activeBranch:null,pendingBranch:null,isInFallback:!l,isHydrating:l,isUnmounted:!1,effects:[],resolve(k=!1,M=!1){const{vnode:V,activeBranch:N,pendingBranch:$,pendingId:Z,effects:K,parentComponent:G,container:fe}=P;let Me=!1;P.isHydrating?P.isHydrating=!1:k||(Me=N&&$.transition&&$.transition.mode==="out-in",Me&&(N.transition.afterLeave=()=>{Z===P.pendingId&&(h($,fe,o===S?x(N):o,0),pi(K))}),N&&(_(N.el)===fe&&(o=x(N)),m(N,G,P,!0)),Me||h($,fe,o,0)),uo(P,$),P.pendingBranch=null,P.isInFallback=!1;let ae=P.parent,_e=!1;for(;ae;){if(ae.pendingBranch){ae.effects.push(...K),_e=!0;break}ae=ae.parent}!_e&&!Me&&pi(K),P.effects=[],g&&t&&t.pendingBranch&&w===t.pendingId&&(t.deps--,t.deps===0&&!M&&t.resolve()),vi(V,"onResolve")},fallback(k){if(!P.pendingBranch)return;const{vnode:M,activeBranch:V,parentComponent:N,container:$,namespace:Z}=P;vi(M,"onFallback");const K=x(V),G=()=>{P.isInFallback&&(d(null,k,$,K,N,null,Z,a,c),uo(P,k))},fe=k.transition&&k.transition.mode==="out-in";fe&&(V.transition.afterLeave=G),P.isInFallback=!0,m(V,N,null,!0),fe||G()},move(k,M,V){P.activeBranch&&h(P.activeBranch,k,M,V),P.container=k},next(){return P.activeBranch&&x(P.activeBranch)},registerDep(k,M,V){const N=!!P.pendingBranch;N&&P.deps++;const $=k.vnode.el;k.asyncDep.catch(Z=>{Vs(Z,k,0)}).then(Z=>{if(k.isUnmounted||P.isUnmounted||P.pendingId!==k.suspenseId)return;k.asyncResolved=!0;const{vnode:K}=k;Xl(k,Z,!1),$&&(K.el=$);const G=!$&&k.subTree.el;M(k,K,_($||k.subTree.el),$?null:x(k.subTree),P,i,V),G&&C(G),Mc(k,K.el),N&&--P.deps===0&&P.resolve()})},unmount(k,M){P.isUnmounted=!0,P.activeBranch&&m(P.activeBranch,n,k,M),P.pendingBranch&&m(P.pendingBranch,n,k,M)}};return P}function z6(e,t,n,r,s,o,i,a,c){const f=t.suspense=op(t,r,n,e.parentNode,document.createElement("div"),null,s,o,i,a,!0),l=c(e,f.pendingBranch=t.ssContent,n,f,o,i);return f.deps===0&&f.resolve(!1,!0),l}function V6(e){const{shapeFlag:t,children:n}=e,r=t&32;e.ssContent=Ud(r?n.default:n),e.ssFallback=r?Ud(n.fallback):tt(zt)}function Ud(e){let t;if(De(e)){const n=Is&&e._c;n&&(e._d=!1,Nt()),e=e(),n&&(e._d=!0,t=hn,ap())}return Ce(e)&&(e=L6(e)),e=Rn(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function ip(e,t){t&&t.pendingBranch?Ce(e)?t.effects.push(...e):t.effects.push(e):pi(e)}function uo(e,t){e.activeBranch=t;const{vnode:n,parentComponent:r}=e;let s=t.el;for(;!s&&t.component;)t=t.component.subTree,s=t.el;n.el=s,r&&r.subTree===n&&(r.vnode.el=s,Mc(r,s))}function K6(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const jt=Symbol.for("v-fgt"),ns=Symbol.for("v-txt"),zt=Symbol.for("v-cmt"),Ps=Symbol.for("v-stc"),ei=[];let hn=null;function Nt(e=!1){ei.push(hn=e?null:[])}function ap(){ei.pop(),hn=ei[ei.length-1]||null}let Is=1;function Wl(e,t=!1){Is+=e,e<0&&hn&&t&&(hn.hasOnce=!0)}function cp(e){return e.dynamicChildren=Is>0?hn||oo:null,ap(),Is>0&&hn&&hn.push(e),e}function on(e,t,n,r,s,o){return cp(Ie(e,t,n,r,s,o,!0))}function _i(e,t,n,r,s){return cp(tt(e,t,n,r,s,!0))}function kr(e){return e?e.__v_isVNode===!0:!1}function qn(e,t){return e.type===t.type&&e.key===t.key}function H6(e){}const lp=({key:e})=>e??null,xa=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?St(e)||Yt(e)||De(e)?{i:Wt,r:e,k:t,f:!!n}:e:null);function Ie(e,t=null,n=null,r=0,s=null,o=e===jt?0:1,i=!1,a=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&lp(t),ref:t&&xa(t),scopeId:Sc,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:Wt};return a?(Ru(c,n),o&128&&e.normalize(c)):n&&(c.shapeFlag|=St(n)?8:16),Is>0&&!i&&hn&&(c.patchFlag>0||o&6)&&c.patchFlag!==32&&hn.push(c),c}const tt=q6;function q6(e,t=null,n=null,r=0,s=null,o=!1){if((!e||e===I1)&&(e=zt),kr(e)){const a=cr(e,t,!0);return n&&Ru(a,n),Is>0&&!o&&hn&&(a.shapeFlag&6?hn[hn.indexOf(e)]=a:hn.push(a)),a.patchFlag=-2,a}if(ey(e)&&(e=e.__vccOpts),t){t=fp(t);let{class:a,style:c}=t;a&&!St(a)&&(t.class=Di(a)),vt(c)&&(Ac(c)&&!Ce(c)&&(c=wt({},c)),t.style=Ii(c))}const i=St(e)?1:Ka(e)?128:_1(e)?64:vt(e)?4:De(e)?2:0;return Ie(e,t,n,r,s,i,o,!0)}function fp(e){return e?Ac(e)||$1(e)?wt({},e):e:null}function cr(e,t,n=!1,r=!1){const{props:s,ref:o,patchFlag:i,children:a,transition:c}=e,f=t?up(s||{},t):s,l={__v_isVNode:!0,__v_skip:!0,type:e.type,props:f,key:f&&lp(f),ref:t&&t.ref?n&&o?Ce(o)?o.concat(xa(t)):[o,xa(t)]:xa(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==jt?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&cr(e.ssContent),ssFallback:e.ssFallback&&cr(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&Rr(l,c.clone(l)),l}function xi(e=" ",t=0){return tt(ns,null,e,t)}function W6(e,t){const n=tt(Ps,null,e);return n.staticCount=t,n}function Bn(e="",t=!1){return t?(Nt(),_i(zt,null,e)):tt(zt,null,e)}function Rn(e){return e==null||typeof e=="boolean"?tt(zt):Ce(e)?tt(jt,null,e.slice()):kr(e)?Yr(e):tt(ns,null,String(e))}function Yr(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:cr(e)}function Ru(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(Ce(t))n=16;else if(typeof t=="object")if(r&65){const s=t.default;s&&(s._c&&(s._d=!1),Ru(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!$1(t)?t._ctx=Wt:s===3&&Wt&&(Wt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else De(t)?(t={default:t,_ctx:Wt},n=32):(t=String(t),r&64?(n=16,t=[xi(t)]):n=8);e.children=t,e.shapeFlag|=n}function up(...e){const t={};for(let n=0;nqt||Wt;let Ha,Yl;{const e=bc(),t=(n,r)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(r),o=>{s.length>1?s.forEach(i=>i(o)):s[0](o)}};Ha=t("__VUE_INSTANCE_SETTERS__",n=>qt=n),Yl=t("__VUE_SSR_SETTERS__",n=>bo=n)}const Ds=e=>{const t=qt;return Ha(e),e.scope.on(),()=>{e.scope.off(),Ha(t)}},Gl=()=>{qt&&qt.scope.off(),Ha(null)};function hp(e){return e.vnode.shapeFlag&4}let bo=!1;function pp(e,t=!1,n=!1){t&&Yl(t);const{props:r,children:s}=e.vnode,o=hp(e);w6(e,r,o,t),C6(e,s,n);const i=o?X6(e,t):void 0;return t&&Yl(!1),i}function X6(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,zl);const{setup:r}=n;if(r){ds();const s=e.setupContext=r.length>1?gp(e):null,o=Ds(e),i=To(r,e,0,[e.props,s]),a=au(i);if(hs(),o(),(a||e.sp)&&!es(e)&&xu(e),a){if(i.then(Gl,Gl),t)return i.then(c=>{Xl(e,c,t)}).catch(c=>{Vs(c,e,0)});e.asyncDep=i}else Xl(e,i,t)}else mp(e,t)}function Xl(e,t,n){De(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:vt(t)&&(e.setupState=yu(t)),mp(e,n)}let qa,Jl;function J6(e){qa=e,Jl=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,e6))}}const Q6=()=>!qa;function mp(e,t,n){const r=e.type;if(!e.render){if(!t&&qa&&!r.render){const s=r.template||Ou(e).template;if(s){const{isCustomElement:o,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:c}=r,f=wt(wt({isCustomElement:o,delimiters:a},i),c);r.render=qa(s,f)}}e.render=r.render||Un,Jl&&Jl(e)}{const s=Ds(e);ds();try{p6(e)}finally{hs(),s()}}}const Z6={get(e,t){return ln(e,"get",""),e[t]}};function gp(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Z6),slots:e.slots,emit:e.emit,expose:t}}function Ui(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(yu(mu(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Zo)return Zo[n](e)},has(t,n){return n in t||n in Zo}})):e.proxy}function Ql(e,t=!0){return De(e)?e.displayName||e.name:e.name||t&&e.__name}function ey(e){return De(e)&&"__vccOpts"in e}const Ft=(e,t)=>h3(e,t,bo);function $i(e,t,n){const r=arguments.length;return r===2?vt(t)&&!Ce(t)?kr(t)?tt(e,null,[t]):tt(e,t):tt(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&kr(n)&&(n=[n]),tt(e,t,n))}function ty(){}function ny(e,t,n,r){const s=n[r];if(s&&yp(s,e))return s;const o=t();return o.memo=e.slice(),o.cacheIndex=r,n[r]=o}function yp(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let r=0;r0&&hn&&hn.push(e),!0}const bp="3.5.13",ry=Un,sy=w3,oy=Zs,iy=y1,ay={createComponentInstance:dp,setupComponent:pp,renderComponentRoot:_a,setCurrentRenderingInstance:gi,isVNode:kr,normalizeVNode:Rn,getComponentPublicInstance:Ui,ensureValidVNode:Cu,pushWarningContext:b3,popWarningContext:v3},cy=ay,ly=null,fy=null,uy=null;/** -* @vue/runtime-dom v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let Zl;const $d=typeof window<"u"&&window.trustedTypes;if($d)try{Zl=$d.createPolicy("vue",{createHTML:e=>e})}catch{}const vp=Zl?e=>Zl.createHTML(e):e=>e,dy="http://www.w3.org/2000/svg",hy="http://www.w3.org/1998/Math/MathML",vr=typeof document<"u"?document:null,zd=vr&&vr.createElement("template"),py={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const s=t==="svg"?vr.createElementNS(dy,e):t==="mathml"?vr.createElementNS(hy,e):n?vr.createElement(e,{is:n}):vr.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>vr.createTextNode(e),createComment:e=>vr.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>vr.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,s,o){const i=n?n.previousSibling:t.lastChild;if(s&&(s===o||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===o||!(s=s.nextSibling)););else{zd.innerHTML=vp(r==="svg"?`${e}`:r==="mathml"?`${e}`:e);const a=zd.content;if(r==="svg"||r==="mathml"){const c=a.firstChild;for(;c.firstChild;)a.appendChild(c.firstChild);a.removeChild(c)}t.insertBefore(a,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Br="transition",Fo="animation",vo=Symbol("_vtc"),_p={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},xp=wt({},_u,_p),my=e=>(e.displayName="Transition",e.props=xp,e),gy=my((e,{slots:t})=>$i(S1,wp(e),t)),bs=(e,t=[])=>{Ce(e)?e.forEach(n=>n(...t)):e&&e(...t)},Vd=e=>e?Ce(e)?e.some(t=>t.length>1):e.length>1:!1;function wp(e){const t={};for(const K in e)K in _p||(t[K]=e[K]);if(e.css===!1)return t;const{name:n="v",type:r,duration:s,enterFromClass:o=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:c=o,appearActiveClass:f=i,appearToClass:l=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:h=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,x=yy(s),_=x&&x[0],C=x&&x[1],{onBeforeEnter:w,onEnter:g,onEnterCancelled:v,onLeave:S,onLeaveCancelled:P,onBeforeAppear:k=w,onAppear:M=g,onAppearCancelled:V=v}=t,N=(K,G,fe,Me)=>{K._enterCancelled=Me,Vr(K,G?l:a),Vr(K,G?f:i),fe&&fe()},$=(K,G)=>{K._isLeaving=!1,Vr(K,d),Vr(K,m),Vr(K,h),G&&G()},Z=K=>(G,fe)=>{const Me=K?M:g,ae=()=>N(G,K,fe);bs(Me,[G,ae]),Kd(()=>{Vr(G,K?c:o),tr(G,K?l:a),Vd(Me)||Hd(G,r,_,ae)})};return wt(t,{onBeforeEnter(K){bs(w,[K]),tr(K,o),tr(K,i)},onBeforeAppear(K){bs(k,[K]),tr(K,c),tr(K,f)},onEnter:Z(!1),onAppear:Z(!0),onLeave(K,G){K._isLeaving=!0;const fe=()=>$(K,G);tr(K,d),K._enterCancelled?(tr(K,h),ef()):(ef(),tr(K,h)),Kd(()=>{K._isLeaving&&(Vr(K,d),tr(K,m),Vd(S)||Hd(K,r,C,fe))}),bs(S,[K,fe])},onEnterCancelled(K){N(K,!1,void 0,!0),bs(v,[K])},onAppearCancelled(K){N(K,!0,void 0,!0),bs(V,[K])},onLeaveCancelled(K){$(K),bs(P,[K])}})}function yy(e){if(e==null)return null;if(vt(e))return[fl(e.enter),fl(e.leave)];{const t=fl(e);return[t,t]}}function fl(e){return ja(e)}function tr(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[vo]||(e[vo]=new Set)).add(t)}function Vr(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[vo];n&&(n.delete(t),n.size||(e[vo]=void 0))}function Kd(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let by=0;function Hd(e,t,n,r){const s=e._endId=++by,o=()=>{s===e._endId&&r()};if(n!=null)return setTimeout(o,n);const{type:i,timeout:a,propCount:c}=Ep(e,t);if(!i)return r();const f=i+"end";let l=0;const d=()=>{e.removeEventListener(f,h),o()},h=m=>{m.target===e&&++l>=c&&d()};setTimeout(()=>{l(n[x]||"").split(", "),s=r(`${Br}Delay`),o=r(`${Br}Duration`),i=qd(s,o),a=r(`${Fo}Delay`),c=r(`${Fo}Duration`),f=qd(a,c);let l=null,d=0,h=0;t===Br?i>0&&(l=Br,d=i,h=o.length):t===Fo?f>0&&(l=Fo,d=f,h=c.length):(d=Math.max(i,f),l=d>0?i>f?Br:Fo:null,h=l?l===Br?o.length:c.length:0);const m=l===Br&&/\b(transform|all)(,|$)/.test(r(`${Br}Property`).toString());return{type:l,timeout:d,propCount:h,hasTransform:m}}function qd(e,t){for(;e.lengthWd(n)+Wd(e[r])))}function Wd(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function ef(){return document.body.offsetHeight}function vy(e,t,n){const r=e[vo];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Wa=Symbol("_vod"),Ap=Symbol("_vsh"),Sp={beforeMount(e,{value:t},{transition:n}){e[Wa]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Bo(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Bo(e,!0),r.enter(e)):r.leave(e,()=>{Bo(e,!1)}):Bo(e,t))},beforeUnmount(e,{value:t}){Bo(e,t)}};function Bo(e,t){e.style.display=t?e[Wa]:"none",e[Ap]=!t}function _y(){Sp.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const Cp=Symbol("");function xy(e){const t=Vn();if(!t)return;const n=t.ut=(s=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(o=>Ya(o,s))},r=()=>{const s=e(t.proxy);t.ce?Ya(t.ce,s):tf(t.subTree,s),n(s)};wu(()=>{pi(r)}),Po(()=>{ts(r,Un,{flush:"post"});const s=new MutationObserver(r);s.observe(t.subTree.el.parentNode,{childList:!0}),Rc(()=>s.disconnect())})}function tf(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{tf(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)Ya(e.el,t);else if(e.type===jt)e.children.forEach(n=>tf(n,t));else if(e.type===Ps){let{el:n,anchor:r}=e;for(;n&&(Ya(n,t),n!==r);)n=n.nextSibling}}function Ya(e,t){if(e.nodeType===1){const n=e.style;let r="";for(const s in t)n.setProperty(`--${s}`,t[s]),r+=`--${s}: ${t[s]};`;n[Cp]=r}}const wy=/(^|;)\s*display\s*:/;function Ey(e,t,n){const r=e.style,s=St(n);let o=!1;if(n&&!s){if(t)if(St(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();n[a]==null&&wa(r,a,"")}else for(const i in t)n[i]==null&&wa(r,i,"");for(const i in n)i==="display"&&(o=!0),wa(r,i,n[i])}else if(s){if(t!==n){const i=r[Cp];i&&(n+=";"+i),r.cssText=n,o=wy.test(n)}}else t&&e.removeAttribute("style");Wa in e&&(e[Wa]=o?r.display:"",e[Ap]&&(r.display="none"))}const Yd=/\s*!important$/;function wa(e,t,n){if(Ce(n))n.forEach(r=>wa(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=Ay(e,t);Yd.test(n)?e.setProperty(kn(r),n.replace(Yd,""),"important"):e[r]=n}}const Gd=["Webkit","Moz","ms"],ul={};function Ay(e,t){const n=ul[t];if(n)return n;let r=cn(t);if(r!=="filter"&&r in e)return ul[t]=r;r=Li(r);for(let s=0;sdl||(Ty.then(()=>dl=0),dl=Date.now());function Ry(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;zn(ky(r,n.value),t,5,[r])};return n.value=e,n.attached=Py(),n}function ky(e,t){if(Ce(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>s=>!s._stopped&&r&&r(s))}else return t}const th=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,My=(e,t,n,r,s,o)=>{const i=s==="svg";t==="class"?vy(e,r,i):t==="style"?Ey(e,n,r):Ni(t)?ou(t)||Cy(e,t,n,r,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Ny(e,t,r,i))?(Qd(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Jd(e,t,r,i,o,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!St(r))?Qd(e,cn(t),r,o,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Jd(e,t,r,i))};function Ny(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&th(t)&&De(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return th(t)&&St(n)?!1:t in e}const nh={};/*! #__NO_SIDE_EFFECTS__ */function Op(e,t,n){const r=Ir(e,t);gc(r)&&wt(r,t);class s extends Nc{constructor(i){super(r,i,n)}}return s.def=r,s}/*! #__NO_SIDE_EFFECTS__ */const Ly=(e,t)=>Op(e,t,Up),Iy=typeof HTMLElement<"u"?HTMLElement:class{};class Nc extends Iy{constructor(t,n={},r=Ja){super(),this._def=t,this._props=n,this._createApp=r,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&r!==Ja?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow({mode:"open"}),this._root=this.shadowRoot):this._root=this,this._def.__asyncLoader||this._resolveProps(this._def)}connectedCallback(){if(!this.isConnected)return;this.shadowRoot||this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof Nc){this._parent=t;break}this._instance||(this._resolved?(this._setParent(),this._update()):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._instance.provides=t._instance.provides)}disconnectedCallback(){this._connected=!1,ji(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null)})}_resolveDef(){if(this._pendingResolve)return;for(let r=0;r{for(const s of r)this._setAttr(s.attributeName)}),this._ob.observe(this,{attributes:!0});const t=(r,s=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:o,styles:i}=r;let a;if(o&&!Ce(o))for(const c in o){const f=o[c];(f===Number||f&&f.type===Number)&&(c in this._props&&(this._props[c]=ja(this._props[c])),(a||(a=Object.create(null)))[cn(c)]=!0)}this._numberProps=a,s&&this._resolveProps(r),this.shadowRoot&&this._applyStyles(i),this._mount(r)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(r=>t(this._def=r,!0)):t(this._def)}_mount(t){this._app=this._createApp(t),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const n=this._instance&&this._instance.exposed;if(n)for(const r in n)mt(this,r)||Object.defineProperty(this,r,{get:()=>Or(n[r])})}_resolveProps(t){const{props:n}=t,r=Ce(n)?n:Object.keys(n||{});for(const s of Object.keys(this))s[0]!=="_"&&r.includes(s)&&this._setProp(s,this[s]);for(const s of r.map(cn))Object.defineProperty(this,s,{get(){return this._getProp(s)},set(o){this._setProp(s,o,!0,!0)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const n=this.hasAttribute(t);let r=n?this.getAttribute(t):nh;const s=cn(t);n&&this._numberProps&&this._numberProps[s]&&(r=ja(r)),this._setProp(s,r,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,n,r=!0,s=!1){if(n!==this._props[t]&&(n===nh?delete this._props[t]:(this._props[t]=n,t==="key"&&this._app&&(this._app._ceVNode.key=n)),s&&this._instance&&this._update(),r)){const o=this._ob;o&&o.disconnect(),n===!0?this.setAttribute(kn(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(kn(t),n+""):n||this.removeAttribute(kn(t)),o&&o.observe(this,{attributes:!0})}}_update(){Bp(this._createVNode(),this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const n=tt(this._def,wt(t,this._props));return this._instance||(n.ce=r=>{this._instance=r,r.ce=this,r.isCE=!0;const s=(o,i)=>{this.dispatchEvent(new CustomEvent(o,gc(i[0])?wt({detail:i},i[0]):{detail:i}))};r.emit=(o,...i)=>{s(o,i),kn(o)!==o&&s(kn(o),i)},this._setParent()}),n}_applyStyles(t,n){if(!t)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const r=this._nonce;for(let s=t.length-1;s>=0;s--){const o=document.createElement("style");r&&o.setAttribute("nonce",r),o.textContent=t[s],this.shadowRoot.prepend(o)}}_parseSlots(){const t=this._slots={};let n;for(;n=this.firstChild;){const r=n.nodeType===1&&n.getAttribute("slot")||"default";(t[r]||(t[r]=[])).push(n),this.removeChild(n)}}_renderSlots(){const t=(this._teleportTarget||this).querySelectorAll("slot"),n=this._instance.type.__scopeId;for(let r=0;r(delete e.props.mode,e),By=Fy({name:"TransitionGroup",props:wt({},xp,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Vn(),r=vu();let s,o;return Tc(()=>{if(!s.length)return;const i=e.moveClass||`${e.name||"v"}-move`;if(!Vy(s[0].el,n.vnode.el,i))return;s.forEach(Uy),s.forEach($y);const a=s.filter(zy);ef(),a.forEach(c=>{const f=c.el,l=f.style;tr(f,i),l.transform=l.webkitTransform=l.transitionDuration="";const d=f[Ga]=h=>{h&&h.target!==f||(!h||/transform$/.test(h.propertyName))&&(f.removeEventListener("transitionend",d),f[Ga]=null,Vr(f,i))};f.addEventListener("transitionend",d)})}),()=>{const i=dt(e),a=wp(i);let c=i.tag||jt;if(s=[],o)for(let f=0;f{a.split(/\s+/).forEach(c=>c&&r.classList.remove(c))}),n.split(/\s+/).forEach(a=>a&&r.classList.add(a)),r.style.display="none";const o=t.nodeType===1?t:t.parentNode;o.appendChild(r);const{hasTransform:i}=Ep(r);return o.removeChild(r),i}const os=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Ce(t)?n=>co(t,n):t};function Ky(e){e.target.composing=!0}function sh(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const $n=Symbol("_assign"),Xa={created(e,{modifiers:{lazy:t,trim:n,number:r}},s){e[$n]=os(s);const o=r||s.props&&s.props.type==="number";Er(e,t?"change":"input",i=>{if(i.target.composing)return;let a=e.value;n&&(a=a.trim()),o&&(a=Da(a)),e[$n](a)}),n&&Er(e,"change",()=>{e.value=e.value.trim()}),t||(Er(e,"compositionstart",Ky),Er(e,"compositionend",sh),Er(e,"change",sh))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:s,number:o}},i){if(e[$n]=os(i),e.composing)return;const a=(o||e.type==="number")&&!/^0\d/.test(e.value)?Da(e.value):e.value,c=t??"";a!==c&&(document.activeElement===e&&e.type!=="range"&&(r&&t===n||s&&e.value.trim()===c)||(e.value=c))}},Lc={deep:!0,created(e,t,n){e[$n]=os(n),Er(e,"change",()=>{const r=e._modelValue,s=_o(e),o=e.checked,i=e[$n];if(Ce(r)){const a=vc(r,s),c=a!==-1;if(o&&!c)i(r.concat(s));else if(!o&&c){const f=[...r];f.splice(a,1),i(f)}}else if(zs(r)){const a=new Set(r);o?a.add(s):a.delete(s),i(a)}else i(Np(e,o))})},mounted:oh,beforeUpdate(e,t,n){e[$n]=os(n),oh(e,t,n)}};function oh(e,{value:t,oldValue:n},r){e._modelValue=t;let s;if(Ce(t))s=vc(t,r.props.value)>-1;else if(zs(t))s=t.has(r.props.value);else{if(t===n)return;s=rs(t,Np(e,!0))}e.checked!==s&&(e.checked=s)}const ku={created(e,{value:t},n){e.checked=rs(t,n.props.value),e[$n]=os(n),Er(e,"change",()=>{e[$n](_o(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[$n]=os(r),t!==n&&(e.checked=rs(t,r.props.value))}},Mp={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const s=zs(t);Er(e,"change",()=>{const o=Array.prototype.filter.call(e.options,i=>i.selected).map(i=>n?Da(_o(i)):_o(i));e[$n](e.multiple?s?new Set(o):o:o[0]),e._assigning=!0,ji(()=>{e._assigning=!1})}),e[$n]=os(r)},mounted(e,{value:t}){ih(e,t)},beforeUpdate(e,t,n){e[$n]=os(n)},updated(e,{value:t}){e._assigning||ih(e,t)}};function ih(e,t){const n=e.multiple,r=Ce(t);if(!(n&&!r&&!zs(t))){for(let s=0,o=e.options.length;sString(f)===String(a)):i.selected=vc(t,a)>-1}else i.selected=t.has(a);else if(rs(_o(i),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function _o(e){return"_value"in e?e._value:e.value}function Np(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Lp={created(e,t,n){ca(e,t,n,null,"created")},mounted(e,t,n){ca(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){ca(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){ca(e,t,n,r,"updated")}};function Ip(e,t){switch(e){case"SELECT":return Mp;case"TEXTAREA":return Xa;default:switch(t){case"checkbox":return Lc;case"radio":return ku;default:return Xa}}}function ca(e,t,n,r,s){const i=Ip(e.tagName,n.props&&n.props.type)[s];i&&i(e,t,n,r)}function Hy(){Xa.getSSRProps=({value:e})=>({value:e}),ku.getSSRProps=({value:e},t)=>{if(t.props&&rs(t.props.value,e))return{checked:!0}},Lc.getSSRProps=({value:e},t)=>{if(Ce(e)){if(t.props&&vc(e,t.props.value)>-1)return{checked:!0}}else if(zs(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},Lp.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=Ip(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const qy=["ctrl","shift","alt","meta"],Wy={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>qy.some(n=>e[`${n}Key`]&&!t.includes(n))},Yy=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(s,...o)=>{for(let i=0;i{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=s=>{if(!("key"in s))return;const o=kn(s.key);if(t.some(i=>i===o||Gy[i]===o))return e(s)})},Dp=wt({patchProp:My},py);let ti,ah=!1;function jp(){return ti||(ti=Y1(Dp))}function Fp(){return ti=ah?ti:G1(Dp),ah=!0,ti}const Bp=(...e)=>{jp().render(...e)},Jy=(...e)=>{Fp().hydrate(...e)},Ja=(...e)=>{const t=jp().createApp(...e),{mount:n}=t;return t.mount=r=>{const s=zp(r);if(!s)return;const o=t._component;!De(o)&&!o.render&&!o.template&&(o.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const i=n(s,!1,$p(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),i},t},Up=(...e)=>{const t=Fp().createApp(...e),{mount:n}=t;return t.mount=r=>{const s=zp(r);if(s)return n(s,!0,$p(s))},t};function $p(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function zp(e){return St(e)?document.querySelector(e):e}let ch=!1;const Qy=()=>{ch||(ch=!0,Hy(),_y())};/** -* vue v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/const Zy=()=>{},e4=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:S1,BaseTransitionPropsValidators:_u,Comment:zt,DeprecationTypes:uy,EffectScope:lu,ErrorCodes:x3,ErrorTypeStrings:sy,Fragment:jt,KeepAlive:W3,ReactiveEffect:ui,Static:Ps,Suspense:B6,Teleport:P3,Text:ns,TrackOpTypes:p3,Transition:gy,TransitionGroup:kp,TriggerOpTypes:m3,VueElement:Nc,assertNumber:_3,callWithAsyncErrorHandling:zn,callWithErrorHandling:To,camelize:cn,capitalize:Li,cloneVNode:cr,compatUtils:fy,compile:Zy,computed:Ft,createApp:Ja,createBlock:_i,createCommentVNode:Bn,createElementBlock:on,createElementVNode:Ie,createHydrationRenderer:G1,createPropsRestProxy:d6,createRenderer:Y1,createSSRApp:Up,createSlots:Q3,createStaticVNode:W6,createTextVNode:xi,createVNode:tt,customRef:f1,defineAsyncComponent:H3,defineComponent:Ir,defineCustomElement:Op,defineEmits:n6,defineExpose:r6,defineModel:i6,defineOptions:s6,defineProps:t6,defineSSRCustomElement:Ly,defineSlots:o6,devtools:oy,effect:Dg,effectScope:q0,getCurrentInstance:Vn,getCurrentScope:W0,getCurrentWatcher:g3,getTransitionRawChildren:Cc,guardReactiveProps:fp,h:$i,handleError:Vs,hasInjectionContext:x6,hydrate:Jy,hydrateOnIdle:B3,hydrateOnInteraction:V3,hydrateOnMediaQuery:z3,hydrateOnVisible:$3,initCustomFormatter:ty,initDirectivesForSSR:Qy,inject:Yn,isMemoSame:yp,isProxy:Ac,isReactive:Zr,isReadonly:ss,isRef:Yt,isRuntimeOnly:Q6,isShallow:Ln,isVNode:kr,markRaw:mu,mergeDefaults:f6,mergeModels:u6,mergeProps:up,nextTick:ji,normalizeClass:Di,normalizeProps:Rg,normalizeStyle:Ii,onActivated:O1,onBeforeMount:R1,onBeforeUnmount:Pc,onBeforeUpdate:wu,onDeactivated:T1,onErrorCaptured:L1,onMounted:Po,onRenderTracked:N1,onRenderTriggered:M1,onScopeDispose:Lg,onServerPrefetch:k1,onUnmounted:Rc,onUpdated:Tc,onWatcherCleanup:d1,openBlock:Nt,popScopeId:C3,provide:fo,proxyRefs:yu,pushScopeId:S3,queuePostFlushCb:pi,reactive:Oo,readonly:pu,ref:Os,registerRuntimeCompiler:J6,render:Bp,renderList:Ul,renderSlot:Su,resolveComponent:Ko,resolveDirective:J3,resolveDynamicComponent:X3,resolveFilter:ly,resolveTransitionHooks:yo,setBlockTracking:Wl,setDevtoolsHook:iy,setTransitionHooks:Rr,shallowReactive:hu,shallowReadonly:n3,shallowRef:gu,ssrContextKey:Z1,ssrUtils:cy,stop:jg,toDisplayString:an,toHandlerKey:Go,toHandlers:Z3,toRaw:dt,toRef:u3,toRefs:c3,toValue:o3,transformVNodeArgs:H6,triggerRef:s3,unref:Or,useAttrs:l6,useCssModule:jy,useCssVars:xy,useHost:Tp,useId:k3,useModel:M6,useSSRContext:ep,useShadowRoot:Dy,useSlots:c6,useTemplateRef:M3,useTransitionState:vu,vModelCheckbox:Lc,vModelDynamic:Lp,vModelRadio:ku,vModelSelect:Mp,vModelText:Xa,vShow:Sp,version:bp,warn:ry,watch:ts,watchEffect:P6,watchPostEffect:R6,watchSyncEffect:tp,withAsyncContext:h6,withCtx:Qr,withDefaults:a6,withDirectives:b1,withKeys:Xy,withMemo:ny,withModifiers:Yy,withScopeId:O3},Symbol.toStringTag,{value:"Module"}));/*! - * pinia v2.3.1 - * (c) 2025 Eduardo San Martin Morote - * @license MIT - */const t4=Symbol();var lh;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(lh||(lh={}));function n4(){const e=q0(!0),t=e.run(()=>Os({}));let n=[],r=[];const s=mu({install(o){s._a=o,o.provide(t4,s),o.config.globalProperties.$pinia=s,r.forEach(i=>n.push(i)),r=[]},use(o){return this._a?n.push(o):r.push(o),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return s}const ni={};function fh(e){return function(t,n){var r;if(n){if(n.kind!=="class")throw"deco stage 3 class";const s=(r=ni.fakePrototype)!==null&&r!==void 0?r:ni.fakePrototype={},o=tn(s);return delete ni.fakePrototype,tn(t.prototype,o),e(t)}else return e(t)}}function uh(e){return function(t,n){var r;if(typeof n=="object"){const s=(r=ni.fakePrototype)!==null&&r!==void 0?r:ni.fakePrototype={};return s[n.name]=t,e(s,n.name)}else return e(t,n)}}const Vp=Symbol("vue-facing-decorator-slot");class r4{constructor(t){this.names=new Map,this.inComponent=!1,this.cachedVueComponent=null,this.master=t}obtainMap(t){let n=this.getMap(t);return n||(n=new Map,this.names.set(t,n)),n}getMap(t){return this.names.get(t)}}function s4(e,t){if(Ic(e))throw"";t&&(t.master=e);const n=t??new r4(e);return Object.defineProperty(e,Vp,{enumerable:!1,value:n}),n}function Ic(e){var t;return(t=Object.getOwnPropertyDescriptor(e,Vp))===null||t===void 0?void 0:t.value}function tn(e,t){const n=Ic(e);return n||s4(e,t)}function o4(e,t){return e.reduce((n,r)=>(n[r]=t[r],n),{})}function Mu(e){const t=[];let n=e;do t.unshift(n),n=Object.getPrototypeOf(n);while(n.constructor!==Lu&&!Ic(n));return t}function Kp(e){let t=Object.getPrototypeOf(e);for(;t.constructor!==Lu;){const n=Ic(t);if(n)return n;t=Object.getPrototypeOf(t)}return null}function Hp(e,t,n){return e.filter(r=>{let s=t;for(;s!=null;){for(const o of s.names.keys()){if(n&&!n(o))continue;if(o==="customDecorator"){const a=s.obtainMap("customDecorator");if(a.has(r)){if(a.get(r).every(c=>!c.preserve))return!1;continue}}if(s.names.get(o).has(r))return!1}s=Kp(s.master)}return!0})}function Nu(e,t){const n=Object.getOwnPropertyDescriptors(e);return Object.keys(n).filter(r=>t(n[r],r))}function qp(e){function t(n,r){if(r)uh(function(s,o){e(s,o)})(n,r);else return uh(function(s,o){e(s,o,n)})}return t}function dh(e){return typeof e=="function"?e:function(){return e||{}}}const i4=e=>e instanceof Promise;function a4(e,t){const r=tn(e.prototype).getMap("setup");if(!r||r.size===0)return;const s=function(o,i){const a={};let c=null;for(const f of r.keys()){const l=r.get(f).setupFunction(o,i);i4(l)?(c??(c=[]),c.push(l.then(d=>{a[f]=d}))):a[f]=l}return Array.isArray(c)?Promise.all(c).then(()=>a):a};t.setup=s}function c4(e,t){var n;(n=t.computed)!==null&&n!==void 0||(t.computed={});const r=tn(e.prototype),s=r.obtainMap("computed"),o=r.obtainMap("vanilla");Mu(e.prototype).forEach(a=>{Nu(a,(c,f)=>(typeof c.get=="function"||typeof c.set=="function")&&!o.has(f)).forEach(c=>{s.set(c,!0);const f=Object.getOwnPropertyDescriptor(a,c);t.computed[c]={get:typeof f.get=="function"?f.get:void 0,set:typeof f.set=="function"?f.set:void 0}})})}function l4(e,t,n){var r;(r=t.data)!==null&&r!==void 0||(t.data={});const s=new e(t,n);let o=Nu(s,(a,c)=>{var f,l;return!!a.enumerable&&!(!((f=t.methods)===null||f===void 0)&&f[c])&&!(!((l=t.props)===null||l===void 0)&&l[c])});const i=tn(e.prototype);o=Hp(o,i,a=>!["provide"].includes(a)),Object.assign(t.data,o4(o,s))}const f4=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","activated","deactivated","beforeDestroy","beforeUnmount","destroyed","unmounted","renderTracked","renderTriggered","errorCaptured","serverPrefetch","render"];function u4(e,t){var n,r,s;const o=tn(e.prototype),i=Mu(e.prototype),a=o.obtainMap("hooks");(n=t.hooks)!==null&&n!==void 0||(t.hooks={}),(r=t.methods)!==null&&r!==void 0||(t.methods={});const c={},f={};i.forEach(d=>{let h=Nu(d,(m,x)=>typeof m.value=="function"&&x!=="constructor");h=Hp(h,o,m=>!["watch","hooks","emits","provide"].includes(m)),h.forEach(m=>{f4.includes(m)||a.has(m)?c[m]=d[m]:f[m]=d[m]})}),Object.assign(t.methods,f);const l=[...(s=t.beforeCreateCallbacks)!==null&&s!==void 0?s:[]];if(l&&l.length>0){const d=c.beforeCreate;c.beforeCreate=function(){l.forEach(h=>h.apply(this,arguments)),d&&d.apply(this,arguments)}}Object.assign(t.hooks,c)}function Wp(e,t){var n;(n=e.beforeCreateCallbacks)!==null&&n!==void 0||(e.beforeCreateCallbacks=[]),e.beforeCreateCallbacks.push(function(){const r=this;t(r).forEach((o,i)=>{Object.defineProperty(r,i,o)})})}function d4(e,t){const r=tn(e.prototype).getMap("ref");!r||r.size===0||Wp(t,s=>{const o=new Map;return r.forEach((i,a)=>{const c=i===null?a:i;o.set(a,{get:function(){return s.$refs[c]},set:void 0})}),o})}function h4(e,t){var n;(n=t.watch)!==null&&n!==void 0||(t.watch={});const s=tn(e.prototype).getMap("watch");!s||s.size===0||s.forEach((o,i)=>{(Array.isArray(o)?o:[o]).forEach(c=>{if(!t.watch[c.key])t.watch[c.key]=c;else{const f=t.watch[c.key];Array.isArray(f)?f.push(c):t.watch[c.key]=[f,c]}})})}const JE=qp(function(e,t,n){const s=tn(e).obtainMap("props"),o=Object.assign({},n??{});s.set(t,o)});function p4(e,t){var n;(n=t.props)!==null&&n!==void 0||(t.props={});const s=tn(e.prototype).getMap("props");!s||s.size===0||s.forEach((o,i)=>{t.props[i]=o})}function m4(e,t){var n;(n=t.inject)!==null&&n!==void 0||(t.inject={});const s=tn(e.prototype).getMap("inject");!s||s.size===0||s.forEach((o,i)=>{t.inject[i]=o})}function g4(e,t,n){var r;(r=t.provide)!==null&&r!==void 0||(t.provide={});const o=tn(e.prototype).obtainMap("provide");if(!o)return null;o.forEach((i,a)=>{const c=i===null?a:i;t.provide[c]=Ft(()=>n[a])})}var y4=function(e,t,n,r){function s(o){return o instanceof n?o:new n(function(i){i(o)})}return new(n||(n=Promise))(function(o,i){function a(l){try{f(r.next(l))}catch(d){i(d)}}function c(l){try{f(r.throw(l))}catch(d){i(d)}}function f(l){l.done?o(l.value):s(l.value).then(a,c)}f((r=r.apply(e,t||[])).next())})};const QE=qp(function(e,t,n){tn(e).obtainMap("emit").set(t,typeof n>"u"?null:n)});function b4(e,t){var n;(n=t.methods)!==null&&n!==void 0||(t.methods={});const r=e.prototype,s=tn(r),o=s.getMap("emit");if(!o||o.size===0)return;const i=s.obtainMap("emits");o.forEach((a,c)=>{const f=a===null?c:a;i.set(f,!0),t.methods[c]=function(){return y4(this,arguments,void 0,function*(){const l=r[c].apply(this,arguments);if(l instanceof Promise){const d=yield l;this.$emit(f,d)}else l===void 0?this.$emit(f):this.$emit(f,l)})}})}function v4(e,t){var n;(n=t.computed)!==null&&n!==void 0||(t.computed={});const r=tn(e.prototype),s=r.getMap("v-model");if(!s||s.size===0)return;const o=r.obtainMap("emits");s.forEach((i,a)=>{var c;const f=(c=i&&i.name)!==null&&c!==void 0?c:"modelValue",l=`update:${f}`;t.computed[a]={get:function(){return this[f]},set:function(d){this.$emit(l,d)}},o.set(l,!0)})}function _4(e,t){const r=tn(e.prototype).getMap("vanilla");if(!r||r.size===0)return;const s=Mu(e.prototype),o=new Map;Wp(t,i=>(s.forEach(a=>{const c=Object.getOwnPropertyDescriptors(a);for(const f in c){const l=c[f];l&&r.has(f)&&(typeof l.get=="function"||typeof l.set=="function")&&o.set(f,{set:typeof l.set=="function"?l.set.bind(i):void 0,get:typeof l.get=="function"?l.get.bind(i):void 0})}}),o))}function x4(e,t){const n={};return a4(e,n),v4(e,n),c4(e,n),h4(e,n),p4(e,n),m4(e,n),b4(e,n),d4(e,n),_4(e,n),u4(e,n),Object.assign(Object.assign({name:e.name,setup:n.setup,data(){var s;return delete n.data,l4(e,n,this),(s=n.data)!==null&&s!==void 0?s:{}},methods:n.methods,computed:n.computed,watch:n.watch,props:n.props,inject:n.inject,provide(){var s;return g4(e,n,this),(s=n.provide)!==null&&s!==void 0?s:{}}},n.hooks),{extends:t})}function w4(e,t,n){var r,s;const o=x4(e,n),i=tn(e.prototype);Object.keys(t).reduce((d,h)=>(["options","modifier","methods","emits","setup","provide"].includes(h)||(d[h]=t[h]),d),o);let a=Array.from(i.obtainMap("emits").keys());if(Array.isArray(t.emits)&&(a=Array.from(new Set([...a,...t.emits]))),o.emits=a,typeof t.methods=="object"&&!Array.isArray(t.methods)&&t.methods!==null&&((r=o.methods)!==null&&r!==void 0||(o.methods={}),Object.assign(o.methods,t.methods)),!o.setup)o.setup=t.setup;else{const d=o.setup,h=(s=t.setup)!==null&&s!==void 0?s:function(){return{}},m=function(x,_){const C=h(x,_),w=d(x,_);return w instanceof Promise||C instanceof Promise?Promise.all([C,w]).then(g=>Object.assign({},g[0],g[1])):Object.assign({},C,w)};o.setup=m}const c=dh(o.provide),f=dh(t.provide);o.provide=function(){return Object.assign({},c.call(this),f.call(this))};const l=i.getMap("customDecorator");return l&&l.size>0&&l.forEach(d=>{d.forEach(h=>h.creator.apply({},[o,h.key]))}),t.options&&Object.assign(o,t.options),t.modifier&&t.modifier(o),Ir(o)}function E4(e,t){const n=tn(e.prototype);n.inComponent=!0;const r=Kp(e.prototype);if(r){if(!r.inComponent)throw"Class should be decorated by Component or ComponentBase: "+n.master;if(r.cachedVueComponent===null)throw"Component decorator 1"}const s=w4(e,t,r===null?void 0:r.cachedVueComponent);s.__vfdConstructor=e,n.cachedVueComponent=s,e.__vccOpts=s}function A4(e,t,n){return typeof t=="function"?fh(function(r){return e(r,{})})(t,n):fh(function(r){return e(r,t)})}function S4(e,t){return A4(function(n,r){return E4(n,r),n},e,t)}const C4=S4,Lu=class{constructor(e,t){const n=e.props;n&&Object.keys(n).forEach(s=>{this[s]=t[s]});const r=e.methods;r&&Object.keys(r).forEach(s=>{this[s]=r[s].bind(t)})}},O4=Lu,Ot=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Vt=Object.keys,pn=Array.isArray;function En(e,t){return typeof t!="object"||Vt(t).forEach(function(n){e[n]=t[n]}),e}typeof Promise>"u"||Ot.Promise||(Ot.Promise=Promise);const wi=Object.getPrototypeOf,T4={}.hasOwnProperty;function Dn(e,t){return T4.call(e,t)}function xo(e,t){typeof t=="function"&&(t=t(wi(e))),(typeof Reflect>"u"?Vt:Reflect.ownKeys)(t).forEach(n=>{Tr(e,n,t[n])})}const Yp=Object.defineProperty;function Tr(e,t,n,r){Yp(e,t,En(n&&Dn(n,"get")&&typeof n.get=="function"?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function ho(e){return{from:function(t){return e.prototype=Object.create(t.prototype),Tr(e.prototype,"constructor",e),{extend:xo.bind(null,e.prototype)}}}}const P4=Object.getOwnPropertyDescriptor;function Iu(e,t){let n;return P4(e,t)||(n=wi(e))&&Iu(n,t)}const R4=[].slice;function Qa(e,t,n){return R4.call(e,t,n)}function Gp(e,t){return t(e)}function qo(e){if(!e)throw new Error("Assertion Failed")}function Xp(e){Ot.setImmediate?setImmediate(e):setTimeout(e,0)}function Jp(e,t){return e.reduce((n,r,s)=>{var o=t(r,s);return o&&(n[o[0]]=o[1]),n},{})}function Pr(e,t){if(typeof t=="string"&&Dn(e,t))return e[t];if(!t)return e;if(typeof t!="string"){for(var n=[],r=0,s=t.length;r["Int","Uint","Float"].map(t=>t+e+"Array")))).filter(e=>Ot[e]),M4=e2.map(e=>Ot[e]);Jp(e2,e=>[e,!0]);let Gr=null;function zi(e){Gr=typeof WeakMap<"u"&&new WeakMap;const t=nf(e);return Gr=null,t}function nf(e){if(!e||typeof e!="object")return e;let t=Gr&&Gr.get(e);if(t)return t;if(pn(e)){t=[],Gr&&Gr.set(e,t);for(var n=0,r=e.length;n=0)t=e;else{const o=wi(e);for(var s in t=o===Object.prototype?{}:Object.create(o),Gr&&Gr.set(e,t),e)Dn(e,s)&&(t[s]=nf(e[s]))}return t}const{toString:N4}={};function rf(e){return N4.call(e).slice(8,-1)}const sf=typeof Symbol<"u"?Symbol.iterator:"@@iterator",L4=typeof sf=="symbol"?function(e){var t;return e!=null&&(t=e[sf])&&t.apply(e)}:function(){return null},eo={};function Ar(e){var t,n,r,s;if(arguments.length===1){if(pn(e))return e.slice();if(this===eo&&typeof e=="string")return[e];if(s=L4(e)){for(n=[];!(r=s.next()).done;)n.push(r.value);return n}if(e==null)return[e];if(typeof(t=e.length)=="number"){for(n=new Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n}const Du=typeof Symbol<"u"?e=>e[Symbol.toStringTag]==="AsyncFunction":()=>!1;var lr=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function t2(e,t){lr=e,n2=t}var n2=()=>!0;const I4=!new Error("").stack;function Ks(){if(I4)try{throw Ks.arguments,new Error}catch(e){return e}return new Error}function of(e,t){var n=e.stack;return n?(t=t||0,n.indexOf(e.name)===0&&(t+=(e.name+e.message).split(` -`).length),n.split(` -`).slice(t).filter(n2).map(r=>` -`+r).join("")):""}var r2=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],ju=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(r2),D4={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function po(e,t){this._e=Ks(),this.name=e,this.message=t}function s2(e,t){return e+". Errors: "+Object.keys(t).map(n=>t[n].toString()).filter((n,r,s)=>s.indexOf(n)===r).join(` -`)}function Za(e,t,n,r){this._e=Ks(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=s2(e,t)}function ri(e,t){this._e=Ks(),this.name="BulkError",this.failures=Object.keys(t).map(n=>t[n]),this.failuresByPos=t,this.message=s2(e,t)}ho(po).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+of(this._e,2))}},toString:function(){return this.name+": "+this.message}}),ho(Za).from(po),ho(ri).from(po);var Fu=ju.reduce((e,t)=>(e[t]=t+"Error",e),{});const j4=po;var Ve=ju.reduce((e,t)=>{var n=t+"Error";function r(s,o){this._e=Ks(),this.name=n,s?typeof s=="string"?(this.message=`${s}${o?` - `+o:""}`,this.inner=o||null):typeof s=="object"&&(this.message=`${s.name} ${s.message}`,this.inner=s):(this.message=D4[t]||n,this.inner=null)}return ho(r).from(j4),e[t]=r,e},{});Ve.Syntax=SyntaxError,Ve.Type=TypeError,Ve.Range=RangeError;var hh=r2.reduce((e,t)=>(e[t+"Error"]=Ve[t],e),{}),Ea=ju.reduce((e,t)=>(["Syntax","Type","Range"].indexOf(t)===-1&&(e[t+"Error"]=Ve[t]),e),{});function xt(){}function Ei(e){return e}function F4(e,t){return e==null||e===Ei?t:function(n){return t(e(n))}}function js(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function B4(e,t){return e===xt?t:function(){var n=e.apply(this,arguments);n!==void 0&&(arguments[0]=n);var r=this.onsuccess,s=this.onerror;this.onsuccess=null,this.onerror=null;var o=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?js(r,this.onsuccess):r),s&&(this.onerror=this.onerror?js(s,this.onerror):s),o!==void 0?o:n}}function U4(e,t){return e===xt?t:function(){e.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?js(n,this.onsuccess):n),r&&(this.onerror=this.onerror?js(r,this.onerror):r)}}function $4(e,t){return e===xt?t:function(n){var r=e.apply(this,arguments);En(n,r);var s=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=t.apply(this,arguments);return s&&(this.onsuccess=this.onsuccess?js(s,this.onsuccess):s),o&&(this.onerror=this.onerror?js(o,this.onerror):o),r===void 0?i===void 0?void 0:i:En(r,i)}}function z4(e,t){return e===xt?t:function(){return t.apply(this,arguments)!==!1&&e.apply(this,arguments)}}function Bu(e,t){return e===xt?t:function(){var n=e.apply(this,arguments);if(n&&typeof n.then=="function"){for(var r=this,s=arguments.length,o=new Array(s);s--;)o[s]=arguments[s];return n.then(function(){return t.apply(r,o)})}return t.apply(this,arguments)}}Ea.ModifyError=Za,Ea.DexieError=po,Ea.BulkError=ri;var Ai={};const o2=100,[af,ec,cf]=typeof Promise>"u"?[]:(()=>{let e=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[e,wi(e),e];const t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,wi(t),e]})(),i2=ec&&ec.then,Aa=af&&af.constructor,Uu=!!cf;var lf=!1,V4=cf?()=>{cf.then(la)}:Ot.setImmediate?setImmediate.bind(null,la):Ot.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver(()=>{la(),e=null}).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(la,0)},si=function(e,t){Wo.push([e,t]),tc&&(V4(),tc=!1)},ff=!0,tc=!0,Rs=[],Sa=[],uf=null,df=Ei,mo={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:gh,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(e=>{try{gh(e[0],e[1])}catch{}})}},Ne=mo,Wo=[],ks=0,Ca=[];function we(e){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=xt,this._lib=!1;var t=this._PSD=Ne;if(lr&&(this._stackHolder=Ks(),this._prev=null,this._numPrev=0),typeof e!="function"){if(e!==Ai)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&pf(this,this._value))}this._state=null,this._value=null,++t.ref,c2(this,e)}const hf={get:function(){var e=Ne,t=nc;function n(r,s){var o=!e.global&&(e!==Ne||t!==nc);const i=o&&!Mr();var a=new we((c,f)=>{$u(this,new a2(rc(r,e,o,i),rc(s,e,o,i),c,f,e))});return lr&&u2(a,this),a}return n.prototype=Ai,n},set:function(e){Tr(this,"then",e&&e.prototype===Ai?hf:{get:function(){return e},set:hf.set})}};function a2(e,t,n,r,s){this.onFulfilled=typeof e=="function"?e:null,this.onRejected=typeof t=="function"?t:null,this.resolve=n,this.reject=r,this.psd=s}function c2(e,t){try{t(n=>{if(e._state===null){if(n===e)throw new TypeError("A promise cannot be resolved with itself.");var r=e._lib&&Vi();n&&typeof n.then=="function"?c2(e,(s,o)=>{n instanceof we?n._then(s,o):n.then(s,o)}):(e._state=!0,e._value=n,l2(e)),r&&Ki()}},pf.bind(null,e))}catch(n){pf(e,n)}}function pf(e,t){if(Sa.push(t),e._state===null){var n=e._lib&&Vi();t=df(t),e._state=!1,e._value=t,lr&&t!==null&&typeof t=="object"&&!t._promise&&function(r,s,o){try{r.apply(null,o)}catch{}}(()=>{var r=Iu(t,"stack");t._promise=e,Tr(t,"stack",{get:()=>lf?r&&(r.get?r.get.apply(t):r.value):e.stack})}),function(r){Rs.some(s=>s._value===r._value)||Rs.push(r)}(e),l2(e),n&&Ki()}}function l2(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n{--ks==0&&zu()},[]))}function $u(e,t){if(e._state!==null){var n=e._state?t.onFulfilled:t.onRejected;if(n===null)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++ks,si(K4,[n,e,t])}else e._listeners.push(t)}function K4(e,t,n){try{uf=t;var r,s=t._value;t._state?r=e(s):(Sa.length&&(Sa=[]),r=e(s),Sa.indexOf(s)===-1&&function(o){for(var i=Rs.length;i;)if(Rs[--i]._value===o._value)return void Rs.splice(i,1)}(t)),n.resolve(r)}catch(o){n.reject(o)}finally{uf=null,--ks==0&&zu(),--n.psd.ref||n.psd.finalize()}}function f2(e,t,n){if(t.length===n)return t;var r="";if(e._state===!1){var s,o,i=e._value;i!=null?(s=i.name||"Error",o=i.message||i,r=of(i,0)):(s=i,o=""),t.push(s+(o?": "+o:"")+r)}return lr&&((r=of(e._stackHolder,2))&&t.indexOf(r)===-1&&t.push(r),e._prev&&f2(e._prev,t,n)),t}function u2(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)}function la(){Vi()&&Ki()}function Vi(){var e=ff;return ff=!1,tc=!1,e}function Ki(){var e,t,n;do for(;Wo.length>0;)for(e=Wo,Wo=[],n=e.length,t=0;t0);ff=!0,tc=!0}function zu(){var e=Rs;Rs=[],e.forEach(r=>{r._PSD.onunhandled.call(null,r._value,r)});for(var t=Ca.slice(0),n=t.length;n;)t[--n]()}function fa(e){return new we(Ai,!1,e)}function Rt(e,t){var n=Ne;return function(){var r=Vi(),s=Ne;try{return as(n,!0),e.apply(this,arguments)}catch(o){t&&t(o)}finally{as(s,!1),r&&Ki()}}}xo(we.prototype,{then:hf,_then:function(e,t){$u(this,new a2(null,null,e,t,Ne))},catch:function(e){if(arguments.length===1)return this.then(null,e);var t=arguments[0],n=arguments[1];return typeof t=="function"?this.then(null,r=>r instanceof t?n(r):fa(r)):this.then(null,r=>r&&r.name===t?n(r):fa(r))},finally:function(e){return this.then(t=>(e(),t),t=>(e(),fa(t)))},stack:{get:function(){if(this._stack)return this._stack;try{lf=!0;var e=f2(this,[],20).join(` -From previous: `);return this._state!==null&&(this._stack=e),e}finally{lf=!1}}},timeout:function(e,t){return e<1/0?new we((n,r)=>{var s=setTimeout(()=>r(new Ve.Timeout(t)),e);this.then(n,r).finally(clearTimeout.bind(null,s))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&Tr(we.prototype,Symbol.toStringTag,"Dexie.Promise"),mo.env=d2(),xo(we,{all:function(){var e=Ar.apply(null,arguments).map(ua);return new we(function(t,n){e.length===0&&t([]);var r=e.length;e.forEach((s,o)=>we.resolve(s).then(i=>{e[o]=i,--r||t(e)},n))})},resolve:e=>{if(e instanceof we)return e;if(e&&typeof e.then=="function")return new we((n,r)=>{e.then(n,r)});var t=new we(Ai,!0,e);return u2(t,uf),t},reject:fa,race:function(){var e=Ar.apply(null,arguments).map(ua);return new we((t,n)=>{e.map(r=>we.resolve(r).then(t,n))})},PSD:{get:()=>Ne,set:e=>Ne=e},totalEchoes:{get:()=>nc},newPSD:is,usePSD:ko,scheduler:{get:()=>si,set:e=>{si=e}},rejectionMapper:{get:()=>df,set:e=>{df=e}},follow:(e,t)=>new we((n,r)=>is((s,o)=>{var i=Ne;i.unhandleds=[],i.onunhandled=o,i.finalize=js(function(){(function(a){function c(){a(),Ca.splice(Ca.indexOf(c),1)}Ca.push(c),++ks,si(()=>{--ks==0&&zu()},[])})(()=>{this.unhandleds.length===0?s():o(this.unhandleds[0])})},i.finalize),e()},t,n,r))}),Aa&&(Aa.allSettled&&Tr(we,"allSettled",function(){const e=Ar.apply(null,arguments).map(ua);return new we(t=>{e.length===0&&t([]);let n=e.length;const r=new Array(n);e.forEach((s,o)=>we.resolve(s).then(i=>r[o]={status:"fulfilled",value:i},i=>r[o]={status:"rejected",reason:i}).then(()=>--n||t(r)))})}),Aa.any&&typeof AggregateError<"u"&&Tr(we,"any",function(){const e=Ar.apply(null,arguments).map(ua);return new we((t,n)=>{e.length===0&&n(new AggregateError([]));let r=e.length;const s=new Array(r);e.forEach((o,i)=>we.resolve(o).then(a=>t(a),a=>{s[i]=a,--r||n(new AggregateError(s))}))})}));const un={awaits:0,echoes:0,id:0};var H4=0,Oa=[],hl=0,nc=0,q4=0;function is(e,t,n,r){var s=Ne,o=Object.create(s);o.parent=s,o.ref=0,o.global=!1,o.id=++q4;var i=mo.env;o.env=Uu?{Promise:we,PromiseProp:{value:we,configurable:!0,writable:!0},all:we.all,race:we.race,allSettled:we.allSettled,any:we.any,resolve:we.resolve,reject:we.reject,nthen:ph(i.nthen,o),gthen:ph(i.gthen,o)}:{},t&&En(o,t),++s.ref,o.finalize=function(){--this.parent.ref||this.parent.finalize()};var a=ko(o,e,n,r);return o.ref===0&&o.finalize(),a}function Ro(){return un.id||(un.id=++H4),++un.awaits,un.echoes+=o2,un.id}function Mr(){return!!un.awaits&&(--un.awaits==0&&(un.id=0),un.echoes=un.awaits*o2,!0)}function ua(e){return un.echoes&&e&&e.constructor===Aa?(Ro(),e.then(t=>(Mr(),t),t=>(Mr(),Gt(t)))):e}function W4(e){++nc,un.echoes&&--un.echoes!=0||(un.echoes=un.id=0),Oa.push(Ne),as(e,!0)}function Y4(){var e=Oa[Oa.length-1];Oa.pop(),as(e,!1)}function as(e,t){var n=Ne;if((t?!un.echoes||hl++&&e===Ne:!hl||--hl&&e===Ne)||h2(t?W4.bind(null,e):Y4),e!==Ne&&(Ne=e,n===mo&&(mo.env=d2()),Uu)){var r=mo.env.Promise,s=e.env;ec.then=s.nthen,r.prototype.then=s.gthen,(n.global||e.global)&&(Object.defineProperty(Ot,"Promise",s.PromiseProp),r.all=s.all,r.race=s.race,r.resolve=s.resolve,r.reject=s.reject,s.allSettled&&(r.allSettled=s.allSettled),s.any&&(r.any=s.any))}}function d2(){var e=Ot.Promise;return Uu?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(Ot,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:ec.then,gthen:e.prototype.then}:{}}function ko(e,t,n,r,s){var o=Ne;try{return as(e,!0),t(n,r,s)}finally{as(o,!1)}}function h2(e){i2.call(af,e)}function rc(e,t,n,r){return typeof e!="function"?e:function(){var s=Ne;n&&Ro(),as(t,!0);try{return e.apply(this,arguments)}finally{as(s,!1),r&&h2(Mr)}}}function ph(e,t){return function(n,r){return e.call(this,rc(n,t),rc(r,t))}}(""+i2).indexOf("[native code]")===-1&&(Ro=Mr=xt);const mh="unhandledrejection";function gh(e,t){var n;try{n=t.onuncatched(e)}catch{}if(n!==!1)try{var r,s={promise:t,reason:e};if(Ot.document&&document.createEvent?((r=document.createEvent("Event")).initEvent(mh,!0,!0),En(r,s)):Ot.CustomEvent&&En(r=new CustomEvent(mh,{detail:s}),s),r&&Ot.dispatchEvent&&(dispatchEvent(r),!Ot.PromiseRejectionEvent&&Ot.onunhandledrejection))try{Ot.onunhandledrejection(r)}catch{}lr&&r&&!r.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch{}}var Gt=we.reject;function mf(e,t,n,r){if(e.idbdb&&(e._state.openComplete||Ne.letThrough||e._vip)){var s=e._createTransaction(t,n,e._dbSchema);try{s.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===Fu.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then(()=>mf(e,t,n,r))):Gt(o)}return s._promise(t,(o,i)=>is(()=>(Ne.trans=s,r(o,i,s)))).then(o=>s._completion.then(()=>o))}if(e._state.openComplete)return Gt(new Ve.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return Gt(new Ve.DatabaseClosed);e.open().catch(xt)}return e._state.dbReadyPromise.then(()=>mf(e,t,n,r))}const yh="3.2.7",xs="￿",gf=-1/0,gr="Invalid key provided. Keys must be of type string, number, Date or Array.",p2="String expected.",oi=[],Dc=typeof navigator<"u"&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),G4=Dc,X4=Dc,m2=e=>!/(dexie\.js|dexie\.min\.js)/.test(e),jc="__dbnames",pl="readonly",ml="readwrite";function Fs(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}const g2={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function da(e){return typeof e!="string"||/\./.test(e)?t=>t:t=>(t[e]===void 0&&e in t&&delete(t=zi(t))[e],t)}class J4{_trans(t,n,r){const s=this._tx||Ne.trans,o=this.name;function i(c,f,l){if(!l.schema[o])throw new Ve.NotFound("Table "+o+" not part of transaction");return n(l.idbtrans,l)}const a=Vi();try{return s&&s.db===this.db?s===Ne.trans?s._promise(t,i,r):is(()=>s._promise(t,i,r),{trans:s,transless:Ne.transless||Ne}):mf(this.db,t,[this.name],i)}finally{a&&Ki()}}get(t,n){return t&&t.constructor===Object?this.where(t).first(n):this._trans("readonly",r=>this.core.get({trans:r,key:t}).then(s=>this.hook.reading.fire(s))).then(n)}where(t){if(typeof t=="string")return new this.db.WhereClause(this,t);if(pn(t))return new this.db.WhereClause(this,`[${t.join("+")}]`);const n=Vt(t);if(n.length===1)return this.where(n[0]).equals(t[n[0]]);const r=this.schema.indexes.concat(this.schema.primKey).filter(f=>{if(f.compound&&n.every(l=>f.keyPath.indexOf(l)>=0)){for(let l=0;lf.keyPath.length-l.keyPath.length)[0];if(r&&this.db._maxKey!==xs){const f=r.keyPath.slice(0,n.length);return this.where(f).equals(f.map(l=>t[l]))}!r&&lr&&console.warn(`The query ${JSON.stringify(t)} on ${this.name} would benefit of a compound index [${n.join("+")}]`);const{idxByName:s}=this.schema,o=this.db._deps.indexedDB;function i(f,l){try{return o.cmp(f,l)===0}catch{return!1}}const[a,c]=n.reduce(([f,l],d)=>{const h=s[d],m=t[d];return[f||h,f||!h?Fs(l,h&&h.multi?x=>{const _=Pr(x,d);return pn(_)&&_.some(C=>i(m,C))}:x=>i(m,Pr(x,d))):l]},[null,null]);return a?this.where(a.name).equals(t[a.keyPath]).filter(c):r?this.filter(c):this.where(n).equals("")}filter(t){return this.toCollection().and(t)}count(t){return this.toCollection().count(t)}offset(t){return this.toCollection().offset(t)}limit(t){return this.toCollection().limit(t)}each(t){return this.toCollection().each(t)}toArray(t){return this.toCollection().toArray(t)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(t){return new this.db.Collection(new this.db.WhereClause(this,pn(t)?`[${t.join("+")}]`:t))}reverse(){return this.toCollection().reverse()}mapToClass(t){this.schema.mappedClass=t;const n=r=>{if(!r)return r;const s=Object.create(t.prototype);for(var o in r)if(Dn(r,o))try{s[o]=r[o]}catch{}return s};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=n,this.hook("reading",n),t}defineClass(){return this.mapToClass(function(t){En(this,t)})}add(t,n){const{auto:r,keyPath:s}=this.schema.primKey;let o=t;return s&&r&&(o=da(s)(t)),this._trans("readwrite",i=>this.core.mutate({trans:i,type:"add",keys:n!=null?[n]:null,values:[o]})).then(i=>i.numFailures?we.reject(i.failures[0]):i.lastResult).then(i=>{if(s)try{Gn(t,s,i)}catch{}return i})}update(t,n){if(typeof t!="object"||pn(t))return this.where(":id").equals(t).modify(n);{const r=Pr(t,this.schema.primKey.keyPath);if(r===void 0)return Gt(new Ve.InvalidArgument("Given object does not contain its primary key"));try{typeof n!="function"?Vt(n).forEach(s=>{Gn(t,s,n[s])}):n(t,{value:t,primKey:r})}catch{}return this.where(":id").equals(r).modify(n)}}put(t,n){const{auto:r,keyPath:s}=this.schema.primKey;let o=t;return s&&r&&(o=da(s)(t)),this._trans("readwrite",i=>this.core.mutate({trans:i,type:"put",values:[o],keys:n!=null?[n]:null})).then(i=>i.numFailures?we.reject(i.failures[0]):i.lastResult).then(i=>{if(s)try{Gn(t,s,i)}catch{}return i})}delete(t){return this._trans("readwrite",n=>this.core.mutate({trans:n,type:"delete",keys:[t]})).then(n=>n.numFailures?we.reject(n.failures[0]):void 0)}clear(){return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"deleteRange",range:g2})).then(t=>t.numFailures?we.reject(t.failures[0]):void 0)}bulkGet(t){return this._trans("readonly",n=>this.core.getMany({keys:t,trans:n}).then(r=>r.map(s=>this.hook.reading.fire(s))))}bulkAdd(t,n,r){const s=Array.isArray(n)?n:void 0,o=(r=r||(s?void 0:n))?r.allKeys:void 0;return this._trans("readwrite",i=>{const{auto:a,keyPath:c}=this.schema.primKey;if(c&&s)throw new Ve.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(s&&s.length!==t.length)throw new Ve.InvalidArgument("Arguments objects and keys must have the same length");const f=t.length;let l=c&&a?t.map(da(c)):t;return this.core.mutate({trans:i,type:"add",keys:s,values:l,wantResults:o}).then(({numFailures:d,results:h,lastResult:m,failures:x})=>{if(d===0)return o?h:m;throw new ri(`${this.name}.bulkAdd(): ${d} of ${f} operations failed`,x)})})}bulkPut(t,n,r){const s=Array.isArray(n)?n:void 0,o=(r=r||(s?void 0:n))?r.allKeys:void 0;return this._trans("readwrite",i=>{const{auto:a,keyPath:c}=this.schema.primKey;if(c&&s)throw new Ve.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(s&&s.length!==t.length)throw new Ve.InvalidArgument("Arguments objects and keys must have the same length");const f=t.length;let l=c&&a?t.map(da(c)):t;return this.core.mutate({trans:i,type:"put",keys:s,values:l,wantResults:o}).then(({numFailures:d,results:h,lastResult:m,failures:x})=>{if(d===0)return o?h:m;throw new ri(`${this.name}.bulkPut(): ${d} of ${f} operations failed`,x)})})}bulkDelete(t){const n=t.length;return this._trans("readwrite",r=>this.core.mutate({trans:r,type:"delete",keys:t})).then(({numFailures:r,lastResult:s,failures:o})=>{if(r===0)return s;throw new ri(`${this.name}.bulkDelete(): ${r} of ${n} operations failed`,o)})}}function ii(e){var t={},n=function(i,a){if(a){for(var c=arguments.length,f=new Array(c-1);--c;)f[c-1]=arguments[c];return t[i].subscribe.apply(null,f),e}if(typeof i=="string")return t[i]};n.addEventType=o;for(var r=1,s=arguments.length;rFs(r(),t()):t,e.justLimit=n&&!r}function Ta(e,t){if(e.isPrimKey)return t.primaryKey;const n=t.getIndexByKeyPath(e.index);if(!n)throw new Ve.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n}function bh(e,t,n){const r=Ta(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:e.dir==="prev",unique:!!e.unique,query:{index:r,range:e.range}})}function ha(e,t,n,r){const s=e.replayFilter?Fs(e.filter,e.replayFilter()):e.filter;if(e.or){const o={},i=(a,c,f)=>{if(!s||s(c,f,h=>c.stop(h),h=>c.fail(h))){var l=c.primaryKey,d=""+l;d==="[object ArrayBuffer]"&&(d=""+new Uint8Array(l)),Dn(o,d)||(o[d]=!0,t(a,c,f))}};return Promise.all([e.or._iterate(i,n),vh(bh(e,r,n),e.algorithm,i,!e.keysOnly&&e.valueMapper)])}return vh(bh(e,r,n),Fs(e.algorithm,s),t,!e.keysOnly&&e.valueMapper)}function vh(e,t,n,r){var s=Rt(r?(o,i,a)=>n(r(o),i,a):n);return e.then(o=>{if(o)return o.start(()=>{var i=()=>o.continue();t&&!t(o,a=>i=a,a=>{o.stop(a),i=xt},a=>{o.fail(a),i=xt})||s(o.value,o,a=>i=a),i()})})}function wn(e,t){try{const n=_h(e),r=_h(t);if(n!==r)return n==="Array"?1:r==="Array"?-1:n==="binary"?1:r==="binary"?-1:n==="string"?1:r==="string"?-1:n==="Date"?1:r!=="Date"?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:eha(n,t,r,n.table.core))}count(t){return this._read(n=>{const r=this._ctx,s=r.table.core;if(Xs(r,!0))return s.count({trans:n,query:{index:Ta(r,s.schema),range:r.range}}).then(i=>Math.min(i,r.limit));var o=0;return ha(r,()=>(++o,!1),n,s).then(()=>o)}).then(t)}sortBy(t,n){const r=t.split(".").reverse(),s=r[0],o=r.length-1;function i(f,l){return l?i(f[r[l]],l-1):f[s]}var a=this._ctx.dir==="next"?1:-1;function c(f,l){var d=i(f,o),h=i(l,o);return dh?a:0}return this.toArray(function(f){return f.sort(c)}).then(n)}toArray(t){return this._read(n=>{var r=this._ctx;if(r.dir==="next"&&Xs(r,!0)&&r.limit>0){const{valueMapper:s}=r,o=Ta(r,r.table.core.schema);return r.table.core.query({trans:n,limit:r.limit,values:!0,query:{index:o,range:r.range}}).then(({result:i})=>s?i.map(s):i)}{const s=[];return ha(r,o=>s.push(o),n,r.table.core).then(()=>s)}},t)}offset(t){var n=this._ctx;return t<=0||(n.offset+=t,Xs(n)?yl(n,()=>{var r=t;return(s,o)=>r===0||(r===1?(--r,!1):(o(()=>{s.advance(r),r=0}),!1))}):yl(n,()=>{var r=t;return()=>--r<0})),this}limit(t){return this._ctx.limit=Math.min(this._ctx.limit,t),yl(this._ctx,()=>{var n=t;return function(r,s,o){return--n<=0&&s(o),n>=0}},!0),this}until(t,n){return gl(this._ctx,function(r,s,o){return!t(r.value)||(s(o),n)}),this}first(t){return this.limit(1).toArray(function(n){return n[0]}).then(t)}last(t){return this.reverse().first(t)}filter(t){var n,r;return gl(this._ctx,function(s){return t(s.value)}),n=this._ctx,r=t,n.isMatch=Fs(n.isMatch,r),this}and(t){return this.filter(t)}or(t){return new this.db.WhereClause(this._ctx.table,t,this)}reverse(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(t){var n=this._ctx;return n.keysOnly=!n.isMatch,this.each(function(r,s){t(s.key,s)})}eachUniqueKey(t){return this._ctx.unique="unique",this.eachKey(t)}eachPrimaryKey(t){var n=this._ctx;return n.keysOnly=!n.isMatch,this.each(function(r,s){t(s.primaryKey,s)})}keys(t){var n=this._ctx;n.keysOnly=!n.isMatch;var r=[];return this.each(function(s,o){r.push(o.key)}).then(function(){return r}).then(t)}primaryKeys(t){var n=this._ctx;if(n.dir==="next"&&Xs(n,!0)&&n.limit>0)return this._read(s=>{var o=Ta(n,n.table.core.schema);return n.table.core.query({trans:s,values:!1,limit:n.limit,query:{index:o,range:n.range}})}).then(({result:s})=>s).then(t);n.keysOnly=!n.isMatch;var r=[];return this.each(function(s,o){r.push(o.primaryKey)}).then(function(){return r}).then(t)}uniqueKeys(t){return this._ctx.unique="unique",this.keys(t)}firstKey(t){return this.limit(1).keys(function(n){return n[0]}).then(t)}lastKey(t){return this.reverse().firstKey(t)}distinct(){var t=this._ctx,n=t.index&&t.table.schema.idxByName[t.index];if(!n||!n.multi)return this;var r={};return gl(this._ctx,function(s){var o=s.primaryKey.toString(),i=Dn(r,o);return r[o]=!0,!i}),this}modify(t){var n=this._ctx;return this._write(r=>{var s;if(typeof t=="function")s=t;else{var o=Vt(t),i=o.length;s=function(_){for(var C=!1,w=0;w{const{failures:w,numFailures:g}=C;h+=_-g;for(let v of Vt(w))d.push(w[v])};return this.clone().primaryKeys().then(_=>{const C=w=>{const g=Math.min(l,_.length-w);return a.getMany({trans:r,keys:_.slice(w,w+g),cache:"immutable"}).then(v=>{const S=[],P=[],k=c?[]:null,M=[];for(let N=0;N0&&a.mutate({trans:r,type:"add",values:S}).then(N=>{for(let $ in N.failures)M.splice(parseInt($),1);x(S.length,N)})).then(()=>(P.length>0||V&&typeof t=="object")&&a.mutate({trans:r,type:"put",keys:k,values:P,criteria:V,changeSpec:typeof t!="function"&&t}).then(N=>x(P.length,N))).then(()=>(M.length>0||V&&t===bl)&&a.mutate({trans:r,type:"delete",keys:M,criteria:V}).then(N=>x(M.length,N))).then(()=>_.length>w+g&&C(w+l))})};return C(0).then(()=>{if(d.length>0)throw new Za("Error modifying one or more objects",d,h,m);return _.length})})})}delete(){var t=this._ctx,n=t.range;return Xs(t)&&(t.isPrimKey&&!X4||n.type===3)?this._write(r=>{const{primaryKey:s}=t.table.core.schema,o=n;return t.table.core.count({trans:r,query:{index:s,range:o}}).then(i=>t.table.core.mutate({trans:r,type:"deleteRange",range:o}).then(({failures:a,lastResult:c,results:f,numFailures:l})=>{if(l)throw new Za("Could not delete some values",Object.keys(a).map(d=>a[d]),i-l);return i-l}))}):this.modify(bl)}}const bl=(e,t)=>t.value=null;function Z4(e,t){return et?-1:e===t?0:1}function Nn(e,t,n){var r=e instanceof b2?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r}function Js(e){return new e.Collection(e,()=>y2("")).limit(0)}function tb(e,t,n,r,s,o){for(var i=Math.min(e.length,r.length),a=-1,c=0;c=0?e.substr(0,a)+t[a]+n.substr(a+1):null;s(e[c],f)<0&&(a=c)}return itypeof _=="string"))return Nn(e,p2);function h(_){s=function(w){return w==="next"?g=>g.toUpperCase():g=>g.toLowerCase()}(_),o=function(w){return w==="next"?g=>g.toLowerCase():g=>g.toUpperCase()}(_),i=_==="next"?Z4:eb;var C=n.map(function(w){return{lower:o(w),upper:s(w)}}).sort(function(w,g){return i(w.lower,g.lower)});a=C.map(function(w){return w.upper}),c=C.map(function(w){return w.lower}),f=_,l=_==="next"?"":r}h("next");var m=new e.Collection(e,()=>Kr(a[0],c[d-1]+r));m._ondirectionchange=function(_){h(_)};var x=0;return m._addAlgorithm(function(_,C,w){var g=_.key;if(typeof g!="string")return!1;var v=o(g);if(t(v,c,x))return!0;for(var S=null,P=x;P0)&&(S=k)}return C(S!==null?function(){_.continue(S+l)}:w),!1}),m}function Kr(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}}function y2(e){return{type:1,lower:e,upper:e}}class b2{get Collection(){return this._ctx.table.db.Collection}between(t,n,r,s){r=r!==!1,s=s===!0;try{return this._cmp(t,n)>0||this._cmp(t,n)===0&&(r||s)&&(!r||!s)?Js(this):new this.Collection(this,()=>Kr(t,n,!r,!s))}catch{return Nn(this,gr)}}equals(t){return t==null?Nn(this,gr):new this.Collection(this,()=>y2(t))}above(t){return t==null?Nn(this,gr):new this.Collection(this,()=>Kr(t,void 0,!0))}aboveOrEqual(t){return t==null?Nn(this,gr):new this.Collection(this,()=>Kr(t,void 0,!1))}below(t){return t==null?Nn(this,gr):new this.Collection(this,()=>Kr(void 0,t,!1,!0))}belowOrEqual(t){return t==null?Nn(this,gr):new this.Collection(this,()=>Kr(void 0,t))}startsWith(t){return typeof t!="string"?Nn(this,p2):this.between(t,t+xs,!0,!0)}startsWithIgnoreCase(t){return t===""?this.startsWith(t):pa(this,(n,r)=>n.indexOf(r[0])===0,[t],xs)}equalsIgnoreCase(t){return pa(this,(n,r)=>n===r[0],[t],"")}anyOfIgnoreCase(){var t=Ar.apply(eo,arguments);return t.length===0?Js(this):pa(this,(n,r)=>r.indexOf(n)!==-1,t,"")}startsWithAnyOfIgnoreCase(){var t=Ar.apply(eo,arguments);return t.length===0?Js(this):pa(this,(n,r)=>r.some(s=>n.indexOf(s)===0),t,xs)}anyOf(){const t=Ar.apply(eo,arguments);let n=this._cmp;try{t.sort(n)}catch{return Nn(this,gr)}if(t.length===0)return Js(this);const r=new this.Collection(this,()=>Kr(t[0],t[t.length-1]));r._ondirectionchange=o=>{n=o==="next"?this._ascending:this._descending,t.sort(n)};let s=0;return r._addAlgorithm((o,i,a)=>{const c=o.key;for(;n(c,t[s])>0;)if(++s,s===t.length)return i(a),!1;return n(c,t[s])===0||(i(()=>{o.continue(t[s])}),!1)}),r}notEqual(t){return this.inAnyRange([[gf,t],[t,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){const t=Ar.apply(eo,arguments);if(t.length===0)return new this.Collection(this);try{t.sort(this._ascending)}catch{return Nn(this,gr)}const n=t.reduce((r,s)=>r?r.concat([[r[r.length-1][1],s]]):[[gf,s]],null);return n.push([t[t.length-1],this.db._maxKey]),this.inAnyRange(n,{includeLowers:!1,includeUppers:!1})}inAnyRange(t,n){const r=this._cmp,s=this._ascending,o=this._descending,i=this._min,a=this._max;if(t.length===0)return Js(this);if(!t.every(g=>g[0]!==void 0&&g[1]!==void 0&&s(g[0],g[1])<=0))return Nn(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Ve.InvalidArgument);const c=!n||n.includeLowers!==!1,f=n&&n.includeUppers===!0;let l,d=s;function h(g,v){return d(g[0],v[0])}try{l=t.reduce(function(g,v){let S=0,P=g.length;for(;S0){k[0]=i(k[0],v[0]),k[1]=a(k[1],v[1]);break}}return S===P&&g.push(v),g},[]),l.sort(h)}catch{return Nn(this,gr)}let m=0;const x=f?g=>s(g,l[m][1])>0:g=>s(g,l[m][1])>=0,_=c?g=>o(g,l[m][0])>0:g=>o(g,l[m][0])>=0;let C=x;const w=new this.Collection(this,()=>Kr(l[0][0],l[l.length-1][1],!c,!f));return w._ondirectionchange=g=>{g==="next"?(C=x,d=s):(C=_,d=o),l.sort(h)},w._addAlgorithm((g,v,S)=>{for(var P=g.key;C(P);)if(++m,m===l.length)return v(S),!1;return!!function(k){return!x(k)&&!_(k)}(P)||(this._cmp(P,l[m][1])===0||this._cmp(P,l[m][0])===0||v(()=>{d===s?g.continue(l[m][0]):g.continue(l[m][1])}),!1)}),w}startsWithAnyOf(){const t=Ar.apply(eo,arguments);return t.every(n=>typeof n=="string")?t.length===0?Js(this):this.inAnyRange(t.map(n=>[n,n+xs])):Nn(this,"startsWithAnyOf() only works with strings")}}function or(e){return Rt(function(t){return Si(t),e(t.target.error),!1})}function Si(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}const Ci="storagemutated",Jr="x-storagemutated-1",cs=ii(null,Ci);class nb{_lock(){return qo(!Ne.global),++this._reculock,this._reculock!==1||Ne.global||(Ne.lockOwnerFor=this),this}_unlock(){if(qo(!Ne.global),--this._reculock==0)for(Ne.global||(Ne.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var t=this._blockedFuncs.shift();try{ko(t[1],t[0])}catch{}}return this}_locked(){return this._reculock&&Ne.lockOwnerFor!==this}create(t){if(!this.mode)return this;const n=this.db.idbdb,r=this.db._state.dbOpenError;if(qo(!this.idbtrans),!t&&!n)switch(r&&r.name){case"DatabaseClosedError":throw new Ve.DatabaseClosed(r);case"MissingAPIError":throw new Ve.MissingAPI(r.message,r);default:throw new Ve.OpenFailed(r)}if(!this.active)throw new Ve.TransactionInactive;return qo(this._completion._state===null),(t=this.idbtrans=t||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):n.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=Rt(s=>{Si(s),this._reject(t.error)}),t.onabort=Rt(s=>{Si(s),this.active&&this._reject(new Ve.Abort(t.error)),this.active=!1,this.on("abort").fire(s)}),t.oncomplete=Rt(()=>{this.active=!1,this._resolve(),"mutatedParts"in t&&cs.storagemutated.fire(t.mutatedParts)}),this}_promise(t,n,r){if(t==="readwrite"&&this.mode!=="readwrite")return Gt(new Ve.ReadOnly("Transaction is readonly"));if(!this.active)return Gt(new Ve.TransactionInactive);if(this._locked())return new we((o,i)=>{this._blockedFuncs.push([()=>{this._promise(t,n,r).then(o,i)},Ne])});if(r)return is(()=>{var o=new we((i,a)=>{this._lock();const c=n(i,a,this);c&&c.then&&c.then(i,a)});return o.finally(()=>this._unlock()),o._lib=!0,o});var s=new we((o,i)=>{var a=n(o,i,this);a&&a.then&&a.then(o,i)});return s._lib=!0,s}_root(){return this.parent?this.parent._root():this}waitFor(t){var n=this._root();const r=we.resolve(t);if(n._waitingFor)n._waitingFor=n._waitingFor.then(()=>r);else{n._waitingFor=r,n._waitingQueue=[];var s=n.idbtrans.objectStore(n.storeNames[0]);(function i(){for(++n._spinCount;n._waitingQueue.length;)n._waitingQueue.shift()();n._waitingFor&&(s.get(-1/0).onsuccess=i)})()}var o=n._waitingFor;return new we((i,a)=>{r.then(c=>n._waitingQueue.push(Rt(i.bind(null,c))),c=>n._waitingQueue.push(Rt(a.bind(null,c)))).finally(()=>{n._waitingFor===o&&(n._waitingFor=null)})})}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Ve.Abort))}table(t){const n=this._memoizedTables||(this._memoizedTables={});if(Dn(n,t))return n[t];const r=this.schema[t];if(!r)throw new Ve.NotFound("Table "+t+" not part of transaction");const s=new this.db.Table(t,r,this);return s.core=this.db.core.table(t),n[t]=s,s}}function yf(e,t,n,r,s,o,i){return{name:e,keyPath:t,unique:n,multi:r,auto:s,compound:o,src:(n&&!i?"&":"")+(r?"*":"")+(s?"++":"")+v2(t)}}function v2(e){return typeof e=="string"?e:e?"["+[].join.call(e,"+")+"]":""}function _2(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:Jp(n,r=>[r.name,r])}}let Oi=e=>{try{return e.only([[]]),Oi=()=>[[]],[[]]}catch{return Oi=()=>xs,xs}};function bf(e){return e==null?()=>{}:typeof e=="string"?function(t){return t.split(".").length===1?r=>r[t]:r=>Pr(r,t)}(e):t=>Pr(t,e)}function wh(e){return[].slice.call(e)}let rb=0;function ai(e){return e==null?":id":typeof e=="string"?e:`[${e.join("+")}]`}function sb(e,t,n){function r(c){if(c.type===3)return null;if(c.type===4)throw new Error("Cannot convert never type to IDBKeyRange");const{lower:f,upper:l,lowerOpen:d,upperOpen:h}=c;return f===void 0?l===void 0?null:t.upperBound(l,!!h):l===void 0?t.lowerBound(f,!!d):t.bound(f,l,!!d,!!h)}const{schema:s,hasGetAll:o}=function(c,f){const l=wh(c.objectStoreNames);return{schema:{name:c.name,tables:l.map(d=>f.objectStore(d)).map(d=>{const{keyPath:h,autoIncrement:m}=d,x=pn(h),_=h==null,C={},w={name:d.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:_,compound:x,keyPath:h,autoIncrement:m,unique:!0,extractKey:bf(h)},indexes:wh(d.indexNames).map(g=>d.index(g)).map(g=>{const{name:v,unique:S,multiEntry:P,keyPath:k}=g,M={name:v,compound:pn(k),keyPath:k,unique:S,multiEntry:P,extractKey:bf(k)};return C[ai(k)]=M,M}),getIndexByKeyPath:g=>C[ai(g)]};return C[":id"]=w.primaryKey,h!=null&&(C[ai(h)]=w.primaryKey),w})},hasGetAll:l.length>0&&"getAll"in f.objectStore(l[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,n),i=s.tables.map(c=>function(f){const l=f.name;return{name:l,schema:f,mutate:function({trans:d,type:h,keys:m,values:x,range:_}){return new Promise((C,w)=>{C=Rt(C);const g=d.objectStore(l),v=g.keyPath==null,S=h==="put"||h==="add";if(!S&&h!=="delete"&&h!=="deleteRange")throw new Error("Invalid operation type: "+h);const{length:P}=m||x||{length:1};if(m&&x&&m.length!==x.length)throw new Error("Given keys array must have same length as given values array.");if(P===0)return C({numFailures:0,failures:{},results:[],lastResult:void 0});let k;const M=[],V=[];let N=0;const $=K=>{++N,Si(K)};if(h==="deleteRange"){if(_.type===4)return C({numFailures:N,failures:V,results:[],lastResult:void 0});_.type===3?M.push(k=g.clear()):M.push(k=g.delete(r(_)))}else{const[K,G]=S?v?[x,m]:[x,null]:[m,null];if(S)for(let fe=0;fe{const G=K.target.result;M.forEach((fe,Me)=>fe.error!=null&&(V[Me]=fe.error)),C({numFailures:N,failures:V,results:h==="delete"?m:M.map(fe=>fe.result),lastResult:G})};k.onerror=K=>{$(K),Z(K)},k.onsuccess=Z})},getMany:({trans:d,keys:h})=>new Promise((m,x)=>{m=Rt(m);const _=d.objectStore(l),C=h.length,w=new Array(C);let g,v=0,S=0;const P=M=>{const V=M.target;w[V._pos]=V.result,++S===v&&m(w)},k=or(x);for(let M=0;Mnew Promise((m,x)=>{m=Rt(m);const _=d.objectStore(l).get(h);_.onsuccess=C=>m(C.target.result),_.onerror=or(x)}),query:function(d){return h=>new Promise((m,x)=>{m=Rt(m);const{trans:_,values:C,limit:w,query:g}=h,v=w===1/0?void 0:w,{index:S,range:P}=g,k=_.objectStore(l),M=S.isPrimaryKey?k:k.index(S.name),V=r(P);if(w===0)return m({result:[]});if(d){const N=C?M.getAll(V,v):M.getAllKeys(V,v);N.onsuccess=$=>m({result:$.target.result}),N.onerror=or(x)}else{let N=0;const $=C||!("openKeyCursor"in M)?M.openCursor(V):M.openKeyCursor(V),Z=[];$.onsuccess=K=>{const G=$.result;return G?(Z.push(C?G.value:G.primaryKey),++N===w?m({result:Z}):void G.continue()):m({result:Z})},$.onerror=or(x)}})}(o),openCursor:function({trans:d,values:h,query:m,reverse:x,unique:_}){return new Promise((C,w)=>{C=Rt(C);const{index:g,range:v}=m,S=d.objectStore(l),P=g.isPrimaryKey?S:S.index(g.name),k=x?_?"prevunique":"prev":_?"nextunique":"next",M=h||!("openKeyCursor"in P)?P.openCursor(r(v),k):P.openKeyCursor(r(v),k);M.onerror=or(w),M.onsuccess=Rt(V=>{const N=M.result;if(!N)return void C(null);N.___id=++rb,N.done=!1;const $=N.continue.bind(N);let Z=N.continuePrimaryKey;Z&&(Z=Z.bind(N));const K=N.advance.bind(N),G=()=>{throw new Error("Cursor not stopped")};N.trans=d,N.stop=N.continue=N.continuePrimaryKey=N.advance=()=>{throw new Error("Cursor not started")},N.fail=Rt(w),N.next=function(){let fe=1;return this.start(()=>fe--?this.continue():this.stop()).then(()=>this)},N.start=fe=>{const Me=new Promise((_e,de)=>{_e=Rt(_e),M.onerror=or(de),N.fail=de,N.stop=nt=>{N.stop=N.continue=N.continuePrimaryKey=N.advance=G,_e(nt)}}),ae=()=>{if(M.result)try{fe()}catch(_e){N.fail(_e)}else N.done=!0,N.start=()=>{throw new Error("Cursor behind last entry")},N.stop()};return M.onsuccess=Rt(_e=>{M.onsuccess=ae,ae()}),N.continue=$,N.continuePrimaryKey=Z,N.advance=K,ae(),Me},C(N)},w)})},count({query:d,trans:h}){const{index:m,range:x}=d;return new Promise((_,C)=>{const w=h.objectStore(l),g=m.isPrimaryKey?w:w.index(m.name),v=r(x),S=v?g.count(v):g.count();S.onsuccess=Rt(P=>_(P.target.result)),S.onerror=or(C)})}}}(c)),a={};return i.forEach(c=>a[c.name]=c),{stack:"dbcore",transaction:e.transaction.bind(e),table(c){if(!a[c])throw new Error(`Table '${c}' not found`);return a[c]},MIN_KEY:-1/0,MAX_KEY:Oi(t),schema:s}}function vf({_novip:e},t){const n=t.db,r=function(s,o,{IDBKeyRange:i,indexedDB:a},c){return{dbcore:function(l,d){return d.reduce((h,{create:m})=>({...h,...m(h)}),l)}(sb(o,i,c),s.dbcore)}}(e._middlewares,n,e._deps,t);e.core=r.dbcore,e.tables.forEach(s=>{const o=s.name;e.core.schema.tables.some(i=>i.name===o)&&(s.core=e.core.table(o),e[o]instanceof e.Table&&(e[o].core=s.core))})}function sc({_novip:e},t,n,r){n.forEach(s=>{const o=r[s];t.forEach(i=>{const a=Iu(i,s);(!a||"value"in a&&a.value===void 0)&&(i===e.Transaction.prototype||i instanceof e.Transaction?Tr(i,s,{get(){return this.table(s)},set(c){Yp(this,s,{value:c,writable:!0,configurable:!0,enumerable:!0})}}):i[s]=new e.Table(s,o))})})}function _f({_novip:e},t){t.forEach(n=>{for(let r in n)n[r]instanceof e.Table&&delete n[r]})}function ob(e,t){return e._cfg.version-t._cfg.version}function ib(e,t,n,r){const s=e._dbSchema,o=e._createTransaction("readwrite",e._storeNames,s);o.create(n),o._completion.catch(r);const i=o._reject.bind(o),a=Ne.transless||Ne;is(()=>{Ne.trans=o,Ne.transless=a,t===0?(Vt(s).forEach(c=>{vl(n,c,s[c].primKey,s[c].indexes)}),vf(e,n),we.follow(()=>e.on.populate.fire(o)).catch(i)):function({_novip:c},f,l,d){const h=[],m=c._versions;let x=c._dbSchema=wf(c,c.idbdb,d),_=!1;const C=m.filter(g=>g._cfg.version>=f);function w(){return h.length?we.resolve(h.shift()(l.idbtrans)).then(w):we.resolve()}return C.forEach(g=>{h.push(()=>{const v=x,S=g._cfg.dbschema;Ef(c,v,d),Ef(c,S,d),x=c._dbSchema=S;const P=x2(v,S);P.add.forEach(M=>{vl(d,M[0],M[1].primKey,M[1].indexes)}),P.change.forEach(M=>{if(M.recreate)throw new Ve.Upgrade("Not yet support for changing primary key");{const V=d.objectStore(M.name);M.add.forEach(N=>xf(V,N)),M.change.forEach(N=>{V.deleteIndex(N.name),xf(V,N)}),M.del.forEach(N=>V.deleteIndex(N))}});const k=g._cfg.contentUpgrade;if(k&&g._cfg.version>f){vf(c,d),l._memoizedTables={},_=!0;let M=Qp(S);P.del.forEach(Z=>{M[Z]=v[Z]}),_f(c,[c.Transaction.prototype]),sc(c,[c.Transaction.prototype],Vt(M),M),l.schema=M;const V=Du(k);let N;V&&Ro();const $=we.follow(()=>{if(N=k(l),N&&V){var Z=Mr.bind(null,null);N.then(Z,Z)}});return N&&typeof N.then=="function"?we.resolve(N):$.then(()=>N)}}),h.push(v=>{(!_||!G4)&&function(S,P){[].slice.call(P.db.objectStoreNames).forEach(k=>S[k]==null&&P.db.deleteObjectStore(k))}(g._cfg.dbschema,v),_f(c,[c.Transaction.prototype]),sc(c,[c.Transaction.prototype],c._storeNames,c._dbSchema),l.schema=c._dbSchema})}),w().then(()=>{var g,v;v=d,Vt(g=x).forEach(S=>{v.db.objectStoreNames.contains(S)||vl(v,S,g[S].primKey,g[S].indexes)})})}(e,t,o,n).catch(i)})}function x2(e,t){const n={del:[],add:[],change:[]};let r;for(r in e)t[r]||n.del.push(r);for(r in t){const s=e[r],o=t[r];if(s){const i={name:r,def:o,recreate:!1,del:[],add:[],change:[]};if(""+(s.primKey.keyPath||"")!=""+(o.primKey.keyPath||"")||s.primKey.auto!==o.primKey.auto&&!Dc)i.recreate=!0,n.change.push(i);else{const a=s.idxByName,c=o.idxByName;let f;for(f in a)c[f]||i.del.push(f);for(f in c){const l=a[f],d=c[f];l?l.src!==d.src&&i.change.push(d):i.add.push(d)}(i.del.length>0||i.add.length>0||i.change.length>0)&&n.change.push(i)}}else n.add.push([r,o])}return n}function vl(e,t,n,r){const s=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach(o=>xf(s,o)),s}function xf(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function wf(e,t,n){const r={};return Qa(t.objectStoreNames,0).forEach(s=>{const o=n.objectStore(s);let i=o.keyPath;const a=yf(v2(i),i||"",!1,!1,!!o.autoIncrement,i&&typeof i!="string",!0),c=[];for(let l=0;l{if(t[r]!==null){var s=t[r].split(",").map((i,a)=>{const c=(i=i.trim()).replace(/([&*]|\+\+)/g,""),f=/^\[/.test(c)?c.match(/^\[(.*)\]$/)[1].split("+"):c;return yf(c,f||null,/\&/.test(i),/\*/.test(i),/\+\+/.test(i),pn(f),a===0)}),o=s.shift();if(o.multi)throw new Ve.Schema("Primary key cannot be multi-valued");s.forEach(i=>{if(i.auto)throw new Ve.Schema("Only primary key can be marked as autoIncrement (++)");if(!i.keyPath)throw new Ve.Schema("Index must have a name and cannot be an empty string")}),n[r]=_2(r,o,s)}})}stores(t){const n=this.db;this._cfg.storesSource=this._cfg.storesSource?En(this._cfg.storesSource,t):t;const r=n._versions,s={};let o={};return r.forEach(i=>{En(s,i._cfg.storesSource),o=i._cfg.dbschema={},i._parseStoresSpec(s,o)}),n._dbSchema=o,_f(n,[n._allTables,n,n.Transaction.prototype]),sc(n,[n._allTables,n,n.Transaction.prototype,this._cfg.tables],Vt(o),o),n._storeNames=Vt(o),this}upgrade(t){return this._cfg.contentUpgrade=Bu(this._cfg.contentUpgrade||xt,t),this}}function Vu(e,t){let n=e._dbNamesDB;return n||(n=e._dbNamesDB=new en(jc,{addons:[],indexedDB:e,IDBKeyRange:t}),n.version(1).stores({dbnames:"name"})),n.table("dbnames")}function Ku(e){return e&&typeof e.databases=="function"}function Af(e){return is(function(){return Ne.letThrough=!0,e()})}function cb(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(t){var n=function(){return indexedDB.databases().finally(t)};e=setInterval(n,100),n()}).finally(function(){return clearInterval(e)}):Promise.resolve()}function lb(e){const t=e._state,{indexedDB:n}=e._deps;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then(()=>t.dbOpenError?Gt(t.dbOpenError):e);lr&&(t.openCanceller._stackHolder=Ks()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;const r=t.openCanceller;function s(){if(t.openCanceller!==r)throw new Ve.DatabaseClosed("db.open() was cancelled")}let o=t.dbReadyResolve,i=null,a=!1;const c=()=>new we((f,l)=>{if(s(),!n)throw new Ve.MissingAPI;const d=e.name,h=t.autoSchema?n.open(d):n.open(d,Math.round(10*e.verno));if(!h)throw new Ve.MissingAPI;h.onerror=or(l),h.onblocked=Rt(e._fireOnBlocked),h.onupgradeneeded=Rt(m=>{if(i=h.transaction,t.autoSchema&&!e._options.allowEmptyDB){h.onerror=Si,i.abort(),h.result.close();const _=n.deleteDatabase(d);_.onsuccess=_.onerror=Rt(()=>{l(new Ve.NoSuchDatabase(`Database ${d} doesnt exist`))})}else{i.onerror=or(l);var x=m.oldVersion>Math.pow(2,62)?0:m.oldVersion;a=x<1,e._novip.idbdb=h.result,ib(e,x/10,i,l)}},l),h.onsuccess=Rt(()=>{i=null;const m=e._novip.idbdb=h.result,x=Qa(m.objectStoreNames);if(x.length>0)try{const C=m.transaction((_=x).length===1?_[0]:_,"readonly");t.autoSchema?function({_novip:w},g,v){w.verno=g.version/10;const S=w._dbSchema=wf(0,g,v);w._storeNames=Qa(g.objectStoreNames,0),sc(w,[w._allTables],Vt(S),S)}(e,m,C):(Ef(e,e._dbSchema,C),function(w,g){const v=x2(wf(0,w.idbdb,g),w._dbSchema);return!(v.add.length||v.change.some(S=>S.add.length||S.change.length))}(e,C)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),vf(e,C)}catch{}var _;oi.push(e),m.onversionchange=Rt(C=>{t.vcFired=!0,e.on("versionchange").fire(C)}),m.onclose=Rt(C=>{e.on("close").fire(C)}),a&&function({indexedDB:C,IDBKeyRange:w},g){!Ku(C)&&g!==jc&&Vu(C,w).put({name:g}).catch(xt)}(e._deps,d),f()},l)}).catch(f=>f&&f.name==="UnknownError"&&t.PR1398_maxLoop>0?(t.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),c()):we.reject(f));return we.race([r,(typeof navigator>"u"?we.resolve():cb()).then(c)]).then(()=>(s(),t.onReadyBeingFired=[],we.resolve(Af(()=>e.on.ready.fire(e.vip))).then(function f(){if(t.onReadyBeingFired.length>0){let l=t.onReadyBeingFired.reduce(Bu,xt);return t.onReadyBeingFired=[],we.resolve(Af(()=>l(e.vip))).then(f)}}))).finally(()=>{t.onReadyBeingFired=null,t.isBeingOpened=!1}).then(()=>e).catch(f=>{t.dbOpenError=f;try{i&&i.abort()}catch{}return r===t.openCanceller&&e._close(),Gt(f)}).finally(()=>{t.openComplete=!0,o()})}function Sf(e){var t=o=>e.next(o),n=s(t),r=s(o=>e.throw(o));function s(o){return i=>{var a=o(i),c=a.value;return a.done?c:c&&typeof c.then=="function"?c.then(n,r):pn(c)?Promise.all(c).then(n,r):n(c)}}return s(t)()}function fb(e,t,n){var r=arguments.length;if(r<2)throw new Ve.InvalidArgument("Too few arguments");for(var s=new Array(r-1);--r;)s[r-1]=arguments[r];return n=s.pop(),[e,Zp(s),n]}function w2(e,t,n,r,s){return we.resolve().then(()=>{const o=Ne.transless||Ne,i=e._createTransaction(t,n,e._dbSchema,r),a={trans:i,transless:o};if(r)i.idbtrans=r.idbtrans;else try{i.create(),e._state.PR1398_maxLoop=3}catch(d){return d.name===Fu.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then(()=>w2(e,t,n,null,s))):Gt(d)}const c=Du(s);let f;c&&Ro();const l=we.follow(()=>{if(f=s.call(i,i),f)if(c){var d=Mr.bind(null,null);f.then(d,d)}else typeof f.next=="function"&&typeof f.throw=="function"&&(f=Sf(f))},a);return(f&&typeof f.then=="function"?we.resolve(f).then(d=>i.active?d:Gt(new Ve.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))):l.then(()=>f)).then(d=>(r&&i._resolve(),i._completion.then(()=>d))).catch(d=>(i._reject(d),Gt(d)))})}function ma(e,t,n){const r=pn(e)?e.slice():[e];for(let s=0;s0,w={...h,isVirtual:C,keyTail:d,keyLength:_,extractKey:bf(l),unique:!C&&h.unique};return x.push(w),w.isPrimaryKey||o.push(w),_>1&&i(_===2?l[0]:l.slice(0,_-1),d+1,h),x.sort((g,v)=>g.keyTail-v.keyTail),w}const a=i(r.primaryKey.keyPath,0,r.primaryKey);s[":id"]=[a];for(const l of r.indexes)i(l.keyPath,0,l);function c(l){const d=l.query.index;return d.isVirtual?{...l,query:{index:d,range:(h=l.query.range,m=d.keyTail,{type:h.type===1?2:h.type,lower:ma(h.lower,h.lowerOpen?e.MAX_KEY:e.MIN_KEY,m),lowerOpen:!0,upper:ma(h.upper,h.upperOpen?e.MIN_KEY:e.MAX_KEY,m),upperOpen:!0})}}:l;var h,m}return{...n,schema:{...r,primaryKey:a,indexes:o,getIndexByKeyPath:function(l){const d=s[ai(l)];return d&&d[0]}},count:l=>n.count(c(l)),query:l=>n.query(c(l)),openCursor(l){const{keyTail:d,isVirtual:h,keyLength:m}=l.query.index;return h?n.openCursor(c(l)).then(x=>x&&function(_){return Object.create(_,{continue:{value:function(w){w!=null?_.continue(ma(w,l.reverse?e.MAX_KEY:e.MIN_KEY,d)):l.unique?_.continue(_.key.slice(0,m).concat(l.reverse?e.MIN_KEY:e.MAX_KEY,d)):_.continue()}},continuePrimaryKey:{value(w,g){_.continuePrimaryKey(ma(w,e.MAX_KEY,d),g)}},primaryKey:{get:()=>_.primaryKey},key:{get(){const w=_.key;return m===1?w[0]:w.slice(0,m)}},value:{get:()=>_.value}})}(x)):n.openCursor(l)}}}}}};function Hu(e,t,n,r){return n=n||{},r=r||"",Vt(e).forEach(s=>{if(Dn(t,s)){var o=e[s],i=t[s];if(typeof o=="object"&&typeof i=="object"&&o&&i){const a=rf(o);a!==rf(i)?n[r+s]=t[s]:a==="Object"?Hu(o,i,n,r+s+"."):o!==i&&(n[r+s]=t[s])}else o!==i&&(n[r+s]=t[s])}else n[r+s]=void 0}),Vt(t).forEach(s=>{Dn(e,s)||(n[r+s]=t[s])}),n}const db={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){const n=e.table(t),{primaryKey:r}=n.schema;return{...n,mutate(o){const i=Ne.trans,{deleting:a,creating:c,updating:f}=i.table(t).hook;switch(o.type){case"add":if(c.fire===xt)break;return i._promise("readwrite",()=>l(o),!0);case"put":if(c.fire===xt&&f.fire===xt)break;return i._promise("readwrite",()=>l(o),!0);case"delete":if(a.fire===xt)break;return i._promise("readwrite",()=>l(o),!0);case"deleteRange":if(a.fire===xt)break;return i._promise("readwrite",()=>function(h){return d(h.trans,h.range,1e4)}(o),!0)}return n.mutate(o);function l(h){const m=Ne.trans,x=h.keys||function(_,C){return C.type==="delete"?C.keys:C.keys||C.values.map(_.extractKey)}(r,h);if(!x)throw new Error("Keys missing");return(h=h.type==="add"||h.type==="put"?{...h,keys:x}:{...h}).type!=="delete"&&(h.values=[...h.values]),h.keys&&(h.keys=[...h.keys]),function(_,C,w){return C.type==="add"?Promise.resolve([]):_.getMany({trans:C.trans,keys:w,cache:"immutable"})}(n,h,x).then(_=>{const C=x.map((w,g)=>{const v=_[g],S={onerror:null,onsuccess:null};if(h.type==="delete")a.fire.call(S,w,v,m);else if(h.type==="add"||v===void 0){const P=c.fire.call(S,w,h.values[g],m);w==null&&P!=null&&(w=P,h.keys[g]=w,r.outbound||Gn(h.values[g],r.keyPath,w))}else{const P=Hu(v,h.values[g]),k=f.fire.call(S,P,w,v,m);if(k){const M=h.values[g];Object.keys(k).forEach(V=>{Dn(M,V)?M[V]=k[V]:Gn(M,V,k[V])})}}return S});return n.mutate(h).then(({failures:w,results:g,numFailures:v,lastResult:S})=>{for(let P=0;P(C.forEach(g=>g.onerror&&g.onerror(w)),Promise.reject(w)))})}function d(h,m,x){return n.query({trans:h,values:!1,query:{index:r,range:m},limit:x}).then(({result:_})=>l({type:"delete",keys:_,trans:h}).then(C=>C.numFailures>0?Promise.reject(C.failures[0]):_.length({table:t=>{const n=e.table(t);return{...n,getMany:r=>{if(!r.cache)return n.getMany(r);const s=E2(r.keys,r.trans._cache,r.cache==="clone");return s?we.resolve(s):n.getMany(r).then(o=>(r.trans._cache={keys:r.keys,values:r.cache==="clone"?zi(o):o},o))},mutate:r=>(r.type!=="add"&&(r.trans._cache=null),n.mutate(r))}}})};function qu(e){return!("from"in e)}const _r=function(e,t){if(!this){const n=new _r;return e&&"d"in e&&En(n,e),n}En(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function Ti(e,t,n){const r=wn(t,n);if(isNaN(r))return;if(r>0)throw RangeError();if(qu(e))return En(e,{from:t,to:n,d:1});const s=e.l,o=e.r;if(wn(n,e.from)<0)return s?Ti(s,t,n):e.l={from:t,to:n,d:1,l:null,r:null},Eh(e);if(wn(t,e.to)>0)return o?Ti(o,t,n):e.r={from:t,to:n,d:1,l:null,r:null},Eh(e);wn(t,e.from)<0&&(e.from=t,e.l=null,e.d=o?o.d+1:1),wn(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);const i=!e.r;s&&!e.l&&oc(e,s),o&&i&&oc(e,o)}function oc(e,t){qu(t)||function n(r,{from:s,to:o,l:i,r:a}){Ti(r,s,o),i&&n(r,i),a&&n(r,a)}(e,t)}function pb(e,t){const n=Cf(t);let r=n.next();if(r.done)return!1;let s=r.value;const o=Cf(e);let i=o.next(s.from),a=i.value;for(;!r.done&&!i.done;){if(wn(a.from,s.to)<=0&&wn(a.to,s.from)>=0)return!0;wn(s.from,a.from)<0?s=(r=n.next(a.from)).value:a=(i=o.next(s.from)).value}return!1}function Cf(e){let t=qu(e)?null:{s:0,n:e};return{next(n){const r=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,r)for(;t.n.l&&wn(n,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!r||wn(n,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function Eh(e){var t,n;const r=(((t=e.r)===null||t===void 0?void 0:t.d)||0)-(((n=e.l)===null||n===void 0?void 0:n.d)||0),s=r>1?"r":r<-1?"l":"";if(s){const o=s==="r"?"l":"r",i={...e},a=e[s];e.from=a.from,e.to=a.to,e[s]=a[s],i[s]=a[o],e[o]=i,i.d=Ah(i)}e.d=Ah(e)}function Ah({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}xo(_r.prototype,{add(e){return oc(this,e),this},addKey(e){return Ti(this,e,e),this},addKeys(e){return e.forEach(t=>Ti(this,t,t)),this},[sf](){return Cf(this)}});const mb={stack:"dbcore",level:0,create:e=>{const t=e.schema.name,n=new _r(e.MIN_KEY,e.MAX_KEY);return{...e,table:r=>{const s=e.table(r),{schema:o}=s,{primaryKey:i}=o,{extractKey:a,outbound:c}=i,f={...s,mutate:h=>{const m=h.trans,x=m.mutatedParts||(m.mutatedParts={}),_=k=>{const M=`idb://${t}/${r}/${k}`;return x[M]||(x[M]=new _r)},C=_(""),w=_(":dels"),{type:g}=h;let[v,S]=h.type==="deleteRange"?[h.range]:h.type==="delete"?[h.keys]:h.values.length<50?[[],h.values]:[];const P=h.trans._cache;return s.mutate(h).then(k=>{if(pn(v)){g!=="delete"&&(v=k.results),C.addKeys(v);const M=E2(v,P);M||g==="add"||w.addKeys(v),(M||S)&&function(V,N,$,Z){function K(G){const fe=V(G.name||"");function Me(_e){return _e!=null?G.extractKey(_e):null}const ae=_e=>G.multiEntry&&pn(_e)?_e.forEach(de=>fe.addKey(de)):fe.addKey(_e);($||Z).forEach((_e,de)=>{const nt=$&&Me($[de]),He=Z&&Me(Z[de]);wn(nt,He)!==0&&(nt!=null&&ae(nt),He!=null&&ae(He))})}N.indexes.forEach(K)}(_,o,M,S)}else if(v){const M={from:v.lower,to:v.upper};w.add(M),C.add(M)}else C.add(n),w.add(n),o.indexes.forEach(M=>_(M.name).add(n));return k})}},l=({query:{index:h,range:m}})=>{var x,_;return[h,new _r((x=m.lower)!==null&&x!==void 0?x:e.MIN_KEY,(_=m.upper)!==null&&_!==void 0?_:e.MAX_KEY)]},d={get:h=>[i,new _r(h.key)],getMany:h=>[i,new _r().addKeys(h.keys)],count:l,query:l,openCursor:l};return Vt(d).forEach(h=>{f[h]=function(m){const{subscr:x}=Ne;if(x){const _=S=>{const P=`idb://${t}/${r}/${S}`;return x[P]||(x[P]=new _r)},C=_(""),w=_(":dels"),[g,v]=d[h](m);if(_(g.name||"").add(v),!g.isPrimaryKey){if(h!=="count"){const S=h==="query"&&c&&m.values&&s.query({...m,values:!1});return s[h].apply(this,arguments).then(P=>{if(h==="query"){if(c&&m.values)return S.then(({result:M})=>(C.addKeys(M),P));const k=m.values?P.result.map(a):P.result;m.values?C.addKeys(k):w.addKeys(k)}else if(h==="openCursor"){const k=P,M=m.values;return k&&Object.create(k,{key:{get:()=>(w.addKey(k.primaryKey),k.key)},primaryKey:{get(){const V=k.primaryKey;return w.addKey(V),V}},value:{get:()=>(M&&C.addKey(k.primaryKey),k.value)}})}return P})}w.add(n)}}return s[h].apply(this,arguments)}}),f}}}};class en{constructor(t,n){this._middlewares={},this.verno=0;const r=en.dependencies;this._options=n={addons:en.addons,autoOpen:!0,indexedDB:r.indexedDB,IDBKeyRange:r.IDBKeyRange,...n},this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange};const{addons:s}=n;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const o={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:xt,dbReadyPromise:null,cancelOpen:xt,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var i;o.dbReadyPromise=new we(a=>{o.dbReadyResolve=a}),o.openCanceller=new we((a,c)=>{o.cancelOpen=c}),this._state=o,this.name=t,this.on=ii(this,"populate","blocked","versionchange","close",{ready:[Bu,xt]}),this.on.ready.subscribe=Gp(this.on.ready.subscribe,a=>(c,f)=>{en.vip(()=>{const l=this._state;if(l.openComplete)l.dbOpenError||we.resolve().then(c),f&&a(c);else if(l.onReadyBeingFired)l.onReadyBeingFired.push(c),f&&a(c);else{a(c);const d=this;f||a(function h(){d.on.ready.unsubscribe(c),d.on.ready.unsubscribe(h)})}})}),this.Collection=(i=this,Uo(Q4.prototype,function(a,c){this.db=i;let f=g2,l=null;if(c)try{f=c()}catch(x){l=x}const d=a._ctx,h=d.table,m=h.hook.reading.fire;this._ctx={table:h,index:d.index,isPrimKey:!d.index||h.schema.primKey.keyPath&&d.index===h.schema.primKey.name,range:f,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:l,or:d.or,valueMapper:m!==Ei?m:null}})),this.Table=function(a){return Uo(J4.prototype,function(c,f,l){this.db=a,this._tx=l,this.name=c,this.schema=f,this.hook=a._allTables[c]?a._allTables[c].hook:ii(null,{creating:[B4,xt],reading:[F4,Ei],updating:[$4,xt],deleting:[U4,xt]})})}(this),this.Transaction=function(a){return Uo(nb.prototype,function(c,f,l,d,h){this.db=a,this.mode=c,this.storeNames=f,this.schema=l,this.chromeTransactionDurability=d,this.idbtrans=null,this.on=ii(this,"complete","error","abort"),this.parent=h||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new we((m,x)=>{this._resolve=m,this._reject=x}),this._completion.then(()=>{this.active=!1,this.on.complete.fire()},m=>{var x=this.active;return this.active=!1,this.on.error.fire(m),this.parent?this.parent._reject(m):x&&this.idbtrans&&this.idbtrans.abort(),Gt(m)})})}(this),this.Version=function(a){return Uo(ab.prototype,function(c){this.db=a,this._cfg={version:c,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})}(this),this.WhereClause=function(a){return Uo(b2.prototype,function(c,f,l){this.db=a,this._ctx={table:c,index:f===":id"?null:f,or:l};const d=a._deps.indexedDB;if(!d)throw new Ve.MissingAPI;this._cmp=this._ascending=d.cmp.bind(d),this._descending=(h,m)=>d.cmp(m,h),this._max=(h,m)=>d.cmp(h,m)>0?h:m,this._min=(h,m)=>d.cmp(h,m)<0?h:m,this._IDBKeyRange=a._deps.IDBKeyRange})}(this),this.on("versionchange",a=>{a.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()}),this.on("blocked",a=>{!a.newVersion||a.newVersionnew this.Transaction(a,c,f,this._options.chromeTransactionDurability,l),this._fireOnBlocked=a=>{this.on("blocked").fire(a),oi.filter(c=>c.name===this.name&&c!==this&&!c._state.vcFired).map(c=>c.on("versionchange").fire(a))},this.use(ub),this.use(db),this.use(mb),this.use(hb),this.vip=Object.create(this,{_vip:{value:!0}}),s.forEach(a=>a(this))}version(t){if(isNaN(t)||t<.1)throw new Ve.Type("Given version is not a positive number");if(t=Math.round(10*t)/10,this.idbdb||this._state.isBeingOpened)throw new Ve.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,t);const n=this._versions;var r=n.filter(s=>s._cfg.version===t)[0];return r||(r=new this.Version(t),n.push(r),n.sort(ob),r.stores({}),this._state.autoSchema=!1,r)}_whenReady(t){return this.idbdb&&(this._state.openComplete||Ne.letThrough||this._vip)?t():new we((n,r)=>{if(this._state.openComplete)return r(new Ve.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void r(new Ve.DatabaseClosed);this.open().catch(xt)}this._state.dbReadyPromise.then(n,r)}).then(t)}use({stack:t,create:n,level:r,name:s}){s&&this.unuse({stack:t,name:s});const o=this._middlewares[t]||(this._middlewares[t]=[]);return o.push({stack:t,create:n,level:r??10,name:s}),o.sort((i,a)=>i.level-a.level),this}unuse({stack:t,name:n,create:r}){return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter(s=>r?s.create!==r:!!n&&s.name!==n)),this}open(){return lb(this)}_close(){const t=this._state,n=oi.indexOf(this);if(n>=0&&oi.splice(n,1),this.idbdb){try{this.idbdb.close()}catch{}this._novip.idbdb=null}t.dbReadyPromise=new we(r=>{t.dbReadyResolve=r}),t.openCanceller=new we((r,s)=>{t.cancelOpen=s})}close(){this._close();const t=this._state;this._options.autoOpen=!1,t.dbOpenError=new Ve.DatabaseClosed,t.isBeingOpened&&t.cancelOpen(t.dbOpenError)}delete(){const t=arguments.length>0,n=this._state;return new we((r,s)=>{const o=()=>{this.close();var i=this._deps.indexedDB.deleteDatabase(this.name);i.onsuccess=Rt(()=>{(function({indexedDB:a,IDBKeyRange:c},f){!Ku(a)&&f!==jc&&Vu(a,c).delete(f).catch(xt)})(this._deps,this.name),r()}),i.onerror=or(s),i.onblocked=this._fireOnBlocked};if(t)throw new Ve.InvalidArgument("Arguments not allowed in db.delete()");n.isBeingOpened?n.dbReadyPromise.then(o):o()})}backendDB(){return this.idbdb}isOpen(){return this.idbdb!==null}hasBeenClosed(){const t=this._state.dbOpenError;return t&&t.name==="DatabaseClosed"}hasFailed(){return this._state.dbOpenError!==null}dynamicallyOpened(){return this._state.autoSchema}get tables(){return Vt(this._allTables).map(t=>this._allTables[t])}transaction(){const t=fb.apply(this,arguments);return this._transaction.apply(this,t)}_transaction(t,n,r){let s=Ne.trans;s&&s.db===this&&t.indexOf("!")===-1||(s=null);const o=t.indexOf("?")!==-1;let i,a;t=t.replace("!","").replace("?","");try{if(a=n.map(f=>{var l=f instanceof this.Table?f.name:f;if(typeof l!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return l}),t=="r"||t===pl)i=pl;else{if(t!="rw"&&t!=ml)throw new Ve.InvalidArgument("Invalid transaction mode: "+t);i=ml}if(s){if(s.mode===pl&&i===ml){if(!o)throw new Ve.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");s=null}s&&a.forEach(f=>{if(s&&s.storeNames.indexOf(f)===-1){if(!o)throw new Ve.SubTransaction("Table "+f+" not included in parent transaction.");s=null}}),o&&s&&!s.active&&(s=null)}}catch(f){return s?s._promise(null,(l,d)=>{d(f)}):Gt(f)}const c=w2.bind(null,this,i,a,s,r);return s?s._promise(i,c,"lock"):Ne.trans?ko(Ne.transless,()=>this._whenReady(c)):this._whenReady(c)}table(t){if(!Dn(this._allTables,t))throw new Ve.InvalidTable(`Table ${t} does not exist`);return this._allTables[t]}}const gb=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable";class yb{constructor(t){this._subscribe=t}subscribe(t,n,r){return this._subscribe(t&&typeof t!="function"?t:{next:t,error:n,complete:r})}[gb](){return this}}function A2(e,t){return Vt(t).forEach(n=>{oc(e[n]||(e[n]=new _r),t[n])}),e}function bb(e){let t,n=!1;const r=new yb(s=>{const o=Du(e);let i=!1,a={},c={};const f={get closed(){return i},unsubscribe:()=>{i=!0,cs.storagemutated.unsubscribe(m)}};s.start&&s.start(f);let l=!1,d=!1;function h(){return Vt(c).some(_=>a[_]&&pb(a[_],c[_]))}const m=_=>{A2(a,_),h()&&x()},x=()=>{if(l||i)return;a={};const _={},C=function(w){o&&Ro();const g=()=>is(e,{subscr:w,trans:null}),v=Ne.trans?ko(Ne.transless,g):g();return o&&v.then(Mr,Mr),v}(_);d||(cs(Ci,m),d=!0),l=!0,Promise.resolve(C).then(w=>{n=!0,t=w,l=!1,i||(h()?x():(a={},c=_,s.next&&s.next(w)))},w=>{l=!1,n=!1,s.error&&s.error(w),f.unsubscribe()})};return x(),f});return r.hasValue=()=>n,r.getValue=()=>t,r}let Of;try{Of={indexedDB:Ot.indexedDB||Ot.mozIndexedDB||Ot.webkitIndexedDB||Ot.msIndexedDB,IDBKeyRange:Ot.IDBKeyRange||Ot.webkitIDBKeyRange}}catch{Of={indexedDB:null,IDBKeyRange:null}}const vs=en;function Pa(e){let t=Cr;try{Cr=!0,cs.storagemutated.fire(e)}finally{Cr=t}}xo(vs,{...Ea,delete:e=>new vs(e,{addons:[]}).delete(),exists:e=>new vs(e,{addons:[]}).open().then(t=>(t.close(),!0)).catch("NoSuchDatabaseError",()=>!1),getDatabaseNames(e){try{return function({indexedDB:t,IDBKeyRange:n}){return Ku(t)?Promise.resolve(t.databases()).then(r=>r.map(s=>s.name).filter(s=>s!==jc)):Vu(t,n).toCollection().primaryKeys()}(vs.dependencies).then(e)}catch{return Gt(new Ve.MissingAPI)}},defineClass:()=>function(e){En(this,e)},ignoreTransaction:e=>Ne.trans?ko(Ne.transless,e):e(),vip:Af,async:function(e){return function(){try{var t=Sf(e.apply(this,arguments));return t&&typeof t.then=="function"?t:we.resolve(t)}catch(n){return Gt(n)}}},spawn:function(e,t,n){try{var r=Sf(e.apply(n,t||[]));return r&&typeof r.then=="function"?r:we.resolve(r)}catch(s){return Gt(s)}},currentTransaction:{get:()=>Ne.trans||null},waitFor:function(e,t){const n=we.resolve(typeof e=="function"?vs.ignoreTransaction(e):e).timeout(t||6e4);return Ne.trans?Ne.trans.waitFor(n):n},Promise:we,debug:{get:()=>lr,set:e=>{t2(e,e==="dexie"?()=>!0:m2)}},derive:ho,extend:En,props:xo,override:Gp,Events:ii,on:cs,liveQuery:bb,extendObservabilitySet:A2,getByKeyPath:Pr,setByKeyPath:Gn,delByKeyPath:function(e,t){typeof t=="string"?Gn(e,t,void 0):"length"in t&&[].map.call(t,function(n){Gn(e,n,void 0)})},shallowClone:Qp,deepClone:zi,getObjectDiff:Hu,cmp:wn,asap:Xp,minKey:gf,addons:[],connections:oi,errnames:Fu,dependencies:Of,semVer:yh,version:yh.split(".").map(e=>parseInt(e)).reduce((e,t,n)=>e+t/Math.pow(10,2*n))}),vs.maxKey=Oi(vs.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(cs(Ci,e=>{if(!Cr){let t;Dc?(t=document.createEvent("CustomEvent"),t.initCustomEvent(Jr,!0,!0,e)):t=new CustomEvent(Jr,{detail:e}),Cr=!0,dispatchEvent(t),Cr=!1}}),addEventListener(Jr,({detail:e})=>{Cr||Pa(e)}));let Cr=!1;if(typeof BroadcastChannel<"u"){const e=new BroadcastChannel(Jr);typeof e.unref=="function"&&e.unref(),cs(Ci,t=>{Cr||e.postMessage(t)}),e.onmessage=t=>{t.data&&Pa(t.data)}}else if(typeof self<"u"&&typeof navigator<"u"){cs(Ci,t=>{try{Cr||(typeof localStorage<"u"&&localStorage.setItem(Jr,JSON.stringify({trig:Math.random(),changedParts:t})),typeof self.clients=="object"&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach(n=>n.postMessage({type:Jr,changedParts:t})))}catch{}}),typeof addEventListener<"u"&&addEventListener("storage",t=>{if(t.key===Jr){const n=JSON.parse(t.newValue);n&&Pa(n.changedParts)}});const e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",function({data:t}){t&&t.type===Jr&&Pa(t.changedParts)})}we.rejectionMapper=function(e,t){if(!e||e instanceof po||e instanceof TypeError||e instanceof SyntaxError||!e.name||!hh[e.name])return e;var n=new hh[e.name](t||e.message,e);return"stack"in e&&Tr(n,"stack",{get:function(){return this.inner.stack}}),n},t2(lr,m2);var ws=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function S2(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function C2(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}),n}var ic={exports:{}};ic.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",s=9007199254740991,o="[object Arguments]",i="[object Array]",a="[object Boolean]",c="[object Date]",f="[object Error]",l="[object Function]",d="[object GeneratorFunction]",h="[object Map]",m="[object Number]",x="[object Object]",_="[object Promise]",C="[object RegExp]",w="[object Set]",g="[object String]",v="[object Symbol]",S="[object WeakMap]",P="[object ArrayBuffer]",k="[object DataView]",M="[object Float32Array]",V="[object Float64Array]",N="[object Int8Array]",$="[object Int16Array]",Z="[object Int32Array]",K="[object Uint8Array]",G="[object Uint8ClampedArray]",fe="[object Uint16Array]",Me="[object Uint32Array]",ae=/[\\^$.*+?()[\]{}|]/g,_e=/\w*$/,de=/^\[object .+?Constructor\]$/,nt=/^(?:0|[1-9]\d*)$/,He={};He[o]=He[i]=He[P]=He[k]=He[a]=He[c]=He[M]=He[V]=He[N]=He[$]=He[Z]=He[h]=He[m]=He[x]=He[C]=He[w]=He[g]=He[v]=He[K]=He[G]=He[fe]=He[Me]=!0,He[f]=He[l]=He[S]=!1;var Xt=typeof ws=="object"&&ws&&ws.Object===Object&&ws,Ut=typeof self=="object"&&self&&self.Object===Object&&self,bt=Xt||Ut||Function("return this")(),Lt=t&&!t.nodeType&&t,Ge=Lt&&!0&&e&&!e.nodeType&&e,_t=Ge&&Ge.exports===Lt;function H(A,j){return A.set(j[0],j[1]),A}function ge(A,j){return A.add(j),A}function ue(A,j){for(var X=-1,Te=A?A.length:0;++X-1}function se(A,j){var X=this.__data__,Te=be(X,A);return Te<0?X.push([A,j]):X[Te][1]=j,this}u.prototype.clear=E,u.prototype.delete=L,u.prototype.get=I,u.prototype.has=W,u.prototype.set=se;function ve(A){var j=-1,X=A?A.length:0;for(this.clear();++j-1&&A%1==0&&A-1&&A%1==0&&A<=s}function Ji(A){var j=typeof A;return!!A&&(j=="object"||j=="function")}function hg(A){return!!A&&typeof A=="object"}function Qc(A){return yd(A)?Oe(A):Y(A)}function pg(){return[]}function mg(){return!1}e.exports=cg})(ic,ic.exports);var vb=ic.exports;const Zn=S2(vb);var _b=Object.defineProperty,xb=Object.defineProperties,wb=Object.getOwnPropertyDescriptors,Sh=Object.getOwnPropertySymbols,Eb=Object.prototype.hasOwnProperty,Ab=Object.prototype.propertyIsEnumerable,Ch=(e,t,n)=>t in e?_b(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Sb=(e,t)=>{for(var n in t||(t={}))Eb.call(t,n)&&Ch(e,n,t[n]);if(Sh)for(var n of Sh(t))Ab.call(t,n)&&Ch(e,n,t[n]);return e},Cb=(e,t)=>xb(e,wb(t));function Ob(e){var t;const n=e;(t=n.pVermeerAddonsRegistered)!=null&&t.immutable||(n.pVermeerAddonsRegistered=Cb(Sb({},n.pVermeerAddonsRegistered),{immutable:!0}),e.Table.prototype.add=en.override(e.Table.prototype.add,r=>function(s,o){if(this.name.startsWith("_"))return r.call(this,s,o);const i=Zn(s),a=Zn(o);return r.call(this,i,a)}),e.Table.prototype.bulkAdd=en.override(e.Table.prototype.bulkAdd,r=>function(s,o){if(this.name.startsWith("_"))return r.call(this,s,o);const i=Zn(s),a=Zn(o);return r.call(this,i,a)}),e.Table.prototype.put=en.override(e.Table.prototype.put,r=>function(s,o){if(this.name.startsWith("_"))return r.call(this,s,o);const i=Zn(s),a=Zn(o);return r.call(this,i,a)}),e.Table.prototype.bulkPut=en.override(e.Table.prototype.bulkPut,r=>function(s,o){if(this.name.startsWith("_"))return r.call(this,s,o);const i=Zn(s),a=Zn(o);return r.call(this,i,a)}),e.Table.prototype.update=en.override(e.Table.prototype.update,r=>function(s,o){if(this.name.startsWith("_"))return r.call(this,s,o);const i=Zn(s),a=Zn(o);return r.call(this,i,a)}))}var fr={},Tb=ws&&ws.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var o in s)s.hasOwnProperty(o)&&(r[o]=s[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(fr,"__esModule",{value:!0});var nr=256,Wu=function(){function e(t){t===void 0&&(t="="),this._paddingCharacter=t}return e.prototype.encodedLength=function(t){return this._paddingCharacter?(t+2)/3*4|0:(t*8+5)/6|0},e.prototype.encode=function(t){for(var n="",r=0;r>>3*6&63),n+=this._encodeByte(s>>>2*6&63),n+=this._encodeByte(s>>>1*6&63),n+=this._encodeByte(s>>>0*6&63)}var o=t.length-r;if(o>0){var s=t[r]<<16|(o===2?t[r+1]<<8:0);n+=this._encodeByte(s>>>3*6&63),n+=this._encodeByte(s>>>2*6&63),o===2?n+=this._encodeByte(s>>>1*6&63):n+=this._paddingCharacter||"",n+=this._paddingCharacter||""}return n},e.prototype.maxDecodedLength=function(t){return this._paddingCharacter?t/4*3|0:(t*6+7)/8|0},e.prototype.decodedLength=function(t){return this.maxDecodedLength(t.length-this._getPaddingLength(t))},e.prototype.decode=function(t){if(t.length===0)return new Uint8Array(0);for(var n=this._getPaddingLength(t),r=t.length-n,s=new Uint8Array(this.maxDecodedLength(r)),o=0,i=0,a=0,c=0,f=0,l=0,d=0;i>>4,s[o++]=f<<4|l>>>2,s[o++]=l<<6|d,a|=c&nr,a|=f&nr,a|=l&nr,a|=d&nr;if(i>>4,a|=c&nr,a|=f&nr),i>>2,a|=l&nr),i>>8&6,n+=51-t>>>8&-75,n+=61-t>>>8&-15,n+=62-t>>>8&3,String.fromCharCode(n)},e.prototype._decodeChar=function(t){var n=nr;return n+=(42-t&t-44)>>>8&-256+t-43+62,n+=(46-t&t-48)>>>8&-256+t-47+63,n+=(47-t&t-58)>>>8&-256+t-48+52,n+=(64-t&t-91)>>>8&-256+t-65+0,n+=(96-t&t-123)>>>8&-256+t-97+26,n},e.prototype._getPaddingLength=function(t){var n=0;if(this._paddingCharacter){for(var r=t.length-1;r>=0&&t[r]===this._paddingCharacter;r--)n++;if(t.length<4||n>2)throw new Error("Base64Coder: incorrect padding")}return n},e}();fr.Coder=Wu;var Hi=new Wu;function Pb(e){return Hi.encode(e)}var _l=fr.encode=Pb;function Rb(e){return Hi.decode(e)}var Oh=fr.decode=Rb,O2=function(e){Tb(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype._encodeByte=function(n){var r=n;return r+=65,r+=25-n>>>8&6,r+=51-n>>>8&-75,r+=61-n>>>8&-13,r+=62-n>>>8&49,String.fromCharCode(r)},t.prototype._decodeChar=function(n){var r=nr;return r+=(44-n&n-46)>>>8&-256+n-45+62,r+=(94-n&n-96)>>>8&-256+n-95+63,r+=(47-n&n-58)>>>8&-256+n-48+52,r+=(64-n&n-91)>>>8&-256+n-65+0,r+=(96-n&n-123)>>>8&-256+n-97+26,r},t}(Wu);fr.URLSafeCoder=O2;var T2=new O2;function kb(e){return T2.encode(e)}fr.encodeURLSafe=kb;function Mb(e){return T2.decode(e)}fr.decodeURLSafe=Mb;fr.encodedLength=function(e){return Hi.encodedLength(e)};fr.maxDecodedLength=function(e){return Hi.maxDecodedLength(e)};fr.decodedLength=function(e){return Hi.decodedLength(e)};var Ms={};Object.defineProperty(Ms,"__esModule",{value:!0});var P2=Ms.decode=Ms.encodedLength=Tf=Ms.encode=void 0;const Th="utf8: invalid string",yr="utf8: invalid source encoding";function Nb(e){const t=new Uint8Array(R2(e));let n=0;for(let r=0;r=55296&&s<=56319&&(s=(s-55296<<10)+(e.charCodeAt(++r)-56320)+65536),s<128?t[n++]=s:s<2048?(t[n++]=192|s>>6,t[n++]=128|s&63):s<65536?(t[n++]=224|s>>12,t[n++]=128|s>>6&63,t[n++]=128|s&63):(t[n++]=240|s>>18,t[n++]=128|s>>12&63,t[n++]=128|s>>6&63,t[n++]=128|s&63)}return t}var Tf=Ms.encode=Nb;function R2(e){let t=0;for(let n=0;n=55296&&r<=56319){if(n===e.length-1)throw new Error(Th);n++;const s=e.charCodeAt(n);if(s<56320||s>57343)throw new Error(Th);r=(r-55296<<10)+(s-56320)+65536}r<128?t+=1:r<2048?t+=2:r<65536?t+=3:t+=4}return t}Ms.encodedLength=R2;function Lb(e){const t=[];for(let n=0;n=e.length)throw new Error(yr);const o=e[++n];if((o&192)!==128)throw new Error(yr);r=(r&31)<<6|o&63,s=128}else if(r<240){if(n>=e.length-1)throw new Error(yr);const o=e[++n],i=e[++n];if((o&192)!==128||(i&192)!==128)throw new Error(yr);r=(r&15)<<12|(o&63)<<6|i&63,s=2048}else if(r<248){if(n>=e.length-2)throw new Error(yr);const o=e[++n],i=e[++n],a=e[++n];if((o&192)!==128||(i&192)!==128||(a&192)!==128)throw new Error(yr);r=(r&15)<<18|(o&63)<<12|(i&63)<<6|a&63,s=65536}else throw new Error(yr);if(r=55296&&r<=57343)throw new Error(yr);if(r>=65536){if(r>1114111)throw new Error(yr);r-=65536,t.push(String.fromCharCode(55296|r>>10)),r=56320|r&1023}}t.push(String.fromCharCode(r))}return t.join("")}P2=Ms.decode=Lb;function Ib(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var k2={exports:{}};const Db={},jb=Object.freeze(Object.defineProperty({__proto__:null,default:Db},Symbol.toStringTag,{value:"Module"})),Fb=C2(jb);(function(e){(function(t){var n=function(p){var b,y=new Float64Array(16);if(p)for(b=0;b>24&255,p[b+1]=y>>16&255,p[b+2]=y>>8&255,p[b+3]=y&255,p[b+4]=u>>24&255,p[b+5]=u>>16&255,p[b+6]=u>>8&255,p[b+7]=u&255}function _(p,b,y,u,E){var L,I=0;for(L=0;L>>8)-1}function C(p,b,y,u){return _(p,b,y,u,16)}function w(p,b,y,u){return _(p,b,y,u,32)}function g(p,b,y,u){for(var E=u[0]&255|(u[1]&255)<<8|(u[2]&255)<<16|(u[3]&255)<<24,L=y[0]&255|(y[1]&255)<<8|(y[2]&255)<<16|(y[3]&255)<<24,I=y[4]&255|(y[5]&255)<<8|(y[6]&255)<<16|(y[7]&255)<<24,W=y[8]&255|(y[9]&255)<<8|(y[10]&255)<<16|(y[11]&255)<<24,se=y[12]&255|(y[13]&255)<<8|(y[14]&255)<<16|(y[15]&255)<<24,ve=u[4]&255|(u[5]&255)<<8|(u[6]&255)<<16|(u[7]&255)<<24,pe=b[0]&255|(b[1]&255)<<8|(b[2]&255)<<16|(b[3]&255)<<24,ct=b[4]&255|(b[5]&255)<<8|(b[6]&255)<<16|(b[7]&255)<<24,ye=b[8]&255|(b[9]&255)<<8|(b[10]&255)<<16|(b[11]&255)<<24,je=b[12]&255|(b[13]&255)<<8|(b[14]&255)<<16|(b[15]&255)<<24,Ue=u[8]&255|(u[9]&255)<<8|(u[10]&255)<<16|(u[11]&255)<<24,Fe=y[16]&255|(y[17]&255)<<8|(y[18]&255)<<16|(y[19]&255)<<24,qe=y[20]&255|(y[21]&255)<<8|(y[22]&255)<<16|(y[23]&255)<<24,$e=y[24]&255|(y[25]&255)<<8|(y[26]&255)<<16|(y[27]&255)<<24,Ke=y[28]&255|(y[29]&255)<<8|(y[30]&255)<<16|(y[31]&255)<<24,ze=u[12]&255|(u[13]&255)<<8|(u[14]&255)<<16|(u[15]&255)<<24,xe=E,Oe=L,me=I,be=W,Se=se,he=ve,F=pe,B=ct,Q=ye,q=je,Y=Ue,ne=Fe,ke=qe,We=$e,Xe=Ke,Ye=ze,T,et=0;et<20;et+=2)T=xe+ke|0,Se^=T<<7|T>>>25,T=Se+xe|0,Q^=T<<9|T>>>23,T=Q+Se|0,ke^=T<<13|T>>>19,T=ke+Q|0,xe^=T<<18|T>>>14,T=he+Oe|0,q^=T<<7|T>>>25,T=q+he|0,We^=T<<9|T>>>23,T=We+q|0,Oe^=T<<13|T>>>19,T=Oe+We|0,he^=T<<18|T>>>14,T=Y+F|0,Xe^=T<<7|T>>>25,T=Xe+Y|0,me^=T<<9|T>>>23,T=me+Xe|0,F^=T<<13|T>>>19,T=F+me|0,Y^=T<<18|T>>>14,T=Ye+ne|0,be^=T<<7|T>>>25,T=be+Ye|0,B^=T<<9|T>>>23,T=B+be|0,ne^=T<<13|T>>>19,T=ne+B|0,Ye^=T<<18|T>>>14,T=xe+be|0,Oe^=T<<7|T>>>25,T=Oe+xe|0,me^=T<<9|T>>>23,T=me+Oe|0,be^=T<<13|T>>>19,T=be+me|0,xe^=T<<18|T>>>14,T=he+Se|0,F^=T<<7|T>>>25,T=F+he|0,B^=T<<9|T>>>23,T=B+F|0,Se^=T<<13|T>>>19,T=Se+B|0,he^=T<<18|T>>>14,T=Y+q|0,ne^=T<<7|T>>>25,T=ne+Y|0,Q^=T<<9|T>>>23,T=Q+ne|0,q^=T<<13|T>>>19,T=q+Q|0,Y^=T<<18|T>>>14,T=Ye+Xe|0,ke^=T<<7|T>>>25,T=ke+Ye|0,We^=T<<9|T>>>23,T=We+ke|0,Xe^=T<<13|T>>>19,T=Xe+We|0,Ye^=T<<18|T>>>14;xe=xe+E|0,Oe=Oe+L|0,me=me+I|0,be=be+W|0,Se=Se+se|0,he=he+ve|0,F=F+pe|0,B=B+ct|0,Q=Q+ye|0,q=q+je|0,Y=Y+Ue|0,ne=ne+Fe|0,ke=ke+qe|0,We=We+$e|0,Xe=Xe+Ke|0,Ye=Ye+ze|0,p[0]=xe>>>0&255,p[1]=xe>>>8&255,p[2]=xe>>>16&255,p[3]=xe>>>24&255,p[4]=Oe>>>0&255,p[5]=Oe>>>8&255,p[6]=Oe>>>16&255,p[7]=Oe>>>24&255,p[8]=me>>>0&255,p[9]=me>>>8&255,p[10]=me>>>16&255,p[11]=me>>>24&255,p[12]=be>>>0&255,p[13]=be>>>8&255,p[14]=be>>>16&255,p[15]=be>>>24&255,p[16]=Se>>>0&255,p[17]=Se>>>8&255,p[18]=Se>>>16&255,p[19]=Se>>>24&255,p[20]=he>>>0&255,p[21]=he>>>8&255,p[22]=he>>>16&255,p[23]=he>>>24&255,p[24]=F>>>0&255,p[25]=F>>>8&255,p[26]=F>>>16&255,p[27]=F>>>24&255,p[28]=B>>>0&255,p[29]=B>>>8&255,p[30]=B>>>16&255,p[31]=B>>>24&255,p[32]=Q>>>0&255,p[33]=Q>>>8&255,p[34]=Q>>>16&255,p[35]=Q>>>24&255,p[36]=q>>>0&255,p[37]=q>>>8&255,p[38]=q>>>16&255,p[39]=q>>>24&255,p[40]=Y>>>0&255,p[41]=Y>>>8&255,p[42]=Y>>>16&255,p[43]=Y>>>24&255,p[44]=ne>>>0&255,p[45]=ne>>>8&255,p[46]=ne>>>16&255,p[47]=ne>>>24&255,p[48]=ke>>>0&255,p[49]=ke>>>8&255,p[50]=ke>>>16&255,p[51]=ke>>>24&255,p[52]=We>>>0&255,p[53]=We>>>8&255,p[54]=We>>>16&255,p[55]=We>>>24&255,p[56]=Xe>>>0&255,p[57]=Xe>>>8&255,p[58]=Xe>>>16&255,p[59]=Xe>>>24&255,p[60]=Ye>>>0&255,p[61]=Ye>>>8&255,p[62]=Ye>>>16&255,p[63]=Ye>>>24&255}function v(p,b,y,u){for(var E=u[0]&255|(u[1]&255)<<8|(u[2]&255)<<16|(u[3]&255)<<24,L=y[0]&255|(y[1]&255)<<8|(y[2]&255)<<16|(y[3]&255)<<24,I=y[4]&255|(y[5]&255)<<8|(y[6]&255)<<16|(y[7]&255)<<24,W=y[8]&255|(y[9]&255)<<8|(y[10]&255)<<16|(y[11]&255)<<24,se=y[12]&255|(y[13]&255)<<8|(y[14]&255)<<16|(y[15]&255)<<24,ve=u[4]&255|(u[5]&255)<<8|(u[6]&255)<<16|(u[7]&255)<<24,pe=b[0]&255|(b[1]&255)<<8|(b[2]&255)<<16|(b[3]&255)<<24,ct=b[4]&255|(b[5]&255)<<8|(b[6]&255)<<16|(b[7]&255)<<24,ye=b[8]&255|(b[9]&255)<<8|(b[10]&255)<<16|(b[11]&255)<<24,je=b[12]&255|(b[13]&255)<<8|(b[14]&255)<<16|(b[15]&255)<<24,Ue=u[8]&255|(u[9]&255)<<8|(u[10]&255)<<16|(u[11]&255)<<24,Fe=y[16]&255|(y[17]&255)<<8|(y[18]&255)<<16|(y[19]&255)<<24,qe=y[20]&255|(y[21]&255)<<8|(y[22]&255)<<16|(y[23]&255)<<24,$e=y[24]&255|(y[25]&255)<<8|(y[26]&255)<<16|(y[27]&255)<<24,Ke=y[28]&255|(y[29]&255)<<8|(y[30]&255)<<16|(y[31]&255)<<24,ze=u[12]&255|(u[13]&255)<<8|(u[14]&255)<<16|(u[15]&255)<<24,xe=E,Oe=L,me=I,be=W,Se=se,he=ve,F=pe,B=ct,Q=ye,q=je,Y=Ue,ne=Fe,ke=qe,We=$e,Xe=Ke,Ye=ze,T,et=0;et<20;et+=2)T=xe+ke|0,Se^=T<<7|T>>>25,T=Se+xe|0,Q^=T<<9|T>>>23,T=Q+Se|0,ke^=T<<13|T>>>19,T=ke+Q|0,xe^=T<<18|T>>>14,T=he+Oe|0,q^=T<<7|T>>>25,T=q+he|0,We^=T<<9|T>>>23,T=We+q|0,Oe^=T<<13|T>>>19,T=Oe+We|0,he^=T<<18|T>>>14,T=Y+F|0,Xe^=T<<7|T>>>25,T=Xe+Y|0,me^=T<<9|T>>>23,T=me+Xe|0,F^=T<<13|T>>>19,T=F+me|0,Y^=T<<18|T>>>14,T=Ye+ne|0,be^=T<<7|T>>>25,T=be+Ye|0,B^=T<<9|T>>>23,T=B+be|0,ne^=T<<13|T>>>19,T=ne+B|0,Ye^=T<<18|T>>>14,T=xe+be|0,Oe^=T<<7|T>>>25,T=Oe+xe|0,me^=T<<9|T>>>23,T=me+Oe|0,be^=T<<13|T>>>19,T=be+me|0,xe^=T<<18|T>>>14,T=he+Se|0,F^=T<<7|T>>>25,T=F+he|0,B^=T<<9|T>>>23,T=B+F|0,Se^=T<<13|T>>>19,T=Se+B|0,he^=T<<18|T>>>14,T=Y+q|0,ne^=T<<7|T>>>25,T=ne+Y|0,Q^=T<<9|T>>>23,T=Q+ne|0,q^=T<<13|T>>>19,T=q+Q|0,Y^=T<<18|T>>>14,T=Ye+Xe|0,ke^=T<<7|T>>>25,T=ke+Ye|0,We^=T<<9|T>>>23,T=We+ke|0,Xe^=T<<13|T>>>19,T=Xe+We|0,Ye^=T<<18|T>>>14;p[0]=xe>>>0&255,p[1]=xe>>>8&255,p[2]=xe>>>16&255,p[3]=xe>>>24&255,p[4]=he>>>0&255,p[5]=he>>>8&255,p[6]=he>>>16&255,p[7]=he>>>24&255,p[8]=Y>>>0&255,p[9]=Y>>>8&255,p[10]=Y>>>16&255,p[11]=Y>>>24&255,p[12]=Ye>>>0&255,p[13]=Ye>>>8&255,p[14]=Ye>>>16&255,p[15]=Ye>>>24&255,p[16]=F>>>0&255,p[17]=F>>>8&255,p[18]=F>>>16&255,p[19]=F>>>24&255,p[20]=B>>>0&255,p[21]=B>>>8&255,p[22]=B>>>16&255,p[23]=B>>>24&255,p[24]=Q>>>0&255,p[25]=Q>>>8&255,p[26]=Q>>>16&255,p[27]=Q>>>24&255,p[28]=q>>>0&255,p[29]=q>>>8&255,p[30]=q>>>16&255,p[31]=q>>>24&255}function S(p,b,y,u){g(p,b,y,u)}function P(p,b,y,u){v(p,b,y,u)}var k=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function M(p,b,y,u,E,L,I){var W=new Uint8Array(16),se=new Uint8Array(64),ve,pe;for(pe=0;pe<16;pe++)W[pe]=0;for(pe=0;pe<8;pe++)W[pe]=L[pe];for(;E>=64;){for(S(se,W,I,k),pe=0;pe<64;pe++)p[b+pe]=y[u+pe]^se[pe];for(ve=1,pe=8;pe<16;pe++)ve=ve+(W[pe]&255)|0,W[pe]=ve&255,ve>>>=8;E-=64,b+=64,u+=64}if(E>0)for(S(se,W,I,k),pe=0;pe=64;){for(S(I,L,E,k),se=0;se<64;se++)p[b+se]=I[se];for(W=1,se=8;se<16;se++)W=W+(L[se]&255)|0,L[se]=W&255,W>>>=8;y-=64,b+=64}if(y>0)for(S(I,L,E,k),se=0;se>>13|y<<3)&8191,u=p[4]&255|(p[5]&255)<<8,this.r[2]=(y>>>10|u<<6)&7939,E=p[6]&255|(p[7]&255)<<8,this.r[3]=(u>>>7|E<<9)&8191,L=p[8]&255|(p[9]&255)<<8,this.r[4]=(E>>>4|L<<12)&255,this.r[5]=L>>>1&8190,I=p[10]&255|(p[11]&255)<<8,this.r[6]=(L>>>14|I<<2)&8191,W=p[12]&255|(p[13]&255)<<8,this.r[7]=(I>>>11|W<<5)&8065,se=p[14]&255|(p[15]&255)<<8,this.r[8]=(W>>>8|se<<8)&8191,this.r[9]=se>>>5&127,this.pad[0]=p[16]&255|(p[17]&255)<<8,this.pad[1]=p[18]&255|(p[19]&255)<<8,this.pad[2]=p[20]&255|(p[21]&255)<<8,this.pad[3]=p[22]&255|(p[23]&255)<<8,this.pad[4]=p[24]&255|(p[25]&255)<<8,this.pad[5]=p[26]&255|(p[27]&255)<<8,this.pad[6]=p[28]&255|(p[29]&255)<<8,this.pad[7]=p[30]&255|(p[31]&255)<<8};Z.prototype.blocks=function(p,b,y){for(var u=this.fin?0:2048,E,L,I,W,se,ve,pe,ct,ye,je,Ue,Fe,qe,$e,Ke,ze,xe,Oe,me,be=this.h[0],Se=this.h[1],he=this.h[2],F=this.h[3],B=this.h[4],Q=this.h[5],q=this.h[6],Y=this.h[7],ne=this.h[8],ke=this.h[9],We=this.r[0],Xe=this.r[1],Ye=this.r[2],T=this.r[3],et=this.r[4],lt=this.r[5],ft=this.r[6],Je=this.r[7],st=this.r[8],ot=this.r[9];y>=16;)E=p[b+0]&255|(p[b+1]&255)<<8,be+=E&8191,L=p[b+2]&255|(p[b+3]&255)<<8,Se+=(E>>>13|L<<3)&8191,I=p[b+4]&255|(p[b+5]&255)<<8,he+=(L>>>10|I<<6)&8191,W=p[b+6]&255|(p[b+7]&255)<<8,F+=(I>>>7|W<<9)&8191,se=p[b+8]&255|(p[b+9]&255)<<8,B+=(W>>>4|se<<12)&8191,Q+=se>>>1&8191,ve=p[b+10]&255|(p[b+11]&255)<<8,q+=(se>>>14|ve<<2)&8191,pe=p[b+12]&255|(p[b+13]&255)<<8,Y+=(ve>>>11|pe<<5)&8191,ct=p[b+14]&255|(p[b+15]&255)<<8,ne+=(pe>>>8|ct<<8)&8191,ke+=ct>>>5|u,ye=0,je=ye,je+=be*We,je+=Se*(5*ot),je+=he*(5*st),je+=F*(5*Je),je+=B*(5*ft),ye=je>>>13,je&=8191,je+=Q*(5*lt),je+=q*(5*et),je+=Y*(5*T),je+=ne*(5*Ye),je+=ke*(5*Xe),ye+=je>>>13,je&=8191,Ue=ye,Ue+=be*Xe,Ue+=Se*We,Ue+=he*(5*ot),Ue+=F*(5*st),Ue+=B*(5*Je),ye=Ue>>>13,Ue&=8191,Ue+=Q*(5*ft),Ue+=q*(5*lt),Ue+=Y*(5*et),Ue+=ne*(5*T),Ue+=ke*(5*Ye),ye+=Ue>>>13,Ue&=8191,Fe=ye,Fe+=be*Ye,Fe+=Se*Xe,Fe+=he*We,Fe+=F*(5*ot),Fe+=B*(5*st),ye=Fe>>>13,Fe&=8191,Fe+=Q*(5*Je),Fe+=q*(5*ft),Fe+=Y*(5*lt),Fe+=ne*(5*et),Fe+=ke*(5*T),ye+=Fe>>>13,Fe&=8191,qe=ye,qe+=be*T,qe+=Se*Ye,qe+=he*Xe,qe+=F*We,qe+=B*(5*ot),ye=qe>>>13,qe&=8191,qe+=Q*(5*st),qe+=q*(5*Je),qe+=Y*(5*ft),qe+=ne*(5*lt),qe+=ke*(5*et),ye+=qe>>>13,qe&=8191,$e=ye,$e+=be*et,$e+=Se*T,$e+=he*Ye,$e+=F*Xe,$e+=B*We,ye=$e>>>13,$e&=8191,$e+=Q*(5*ot),$e+=q*(5*st),$e+=Y*(5*Je),$e+=ne*(5*ft),$e+=ke*(5*lt),ye+=$e>>>13,$e&=8191,Ke=ye,Ke+=be*lt,Ke+=Se*et,Ke+=he*T,Ke+=F*Ye,Ke+=B*Xe,ye=Ke>>>13,Ke&=8191,Ke+=Q*We,Ke+=q*(5*ot),Ke+=Y*(5*st),Ke+=ne*(5*Je),Ke+=ke*(5*ft),ye+=Ke>>>13,Ke&=8191,ze=ye,ze+=be*ft,ze+=Se*lt,ze+=he*et,ze+=F*T,ze+=B*Ye,ye=ze>>>13,ze&=8191,ze+=Q*Xe,ze+=q*We,ze+=Y*(5*ot),ze+=ne*(5*st),ze+=ke*(5*Je),ye+=ze>>>13,ze&=8191,xe=ye,xe+=be*Je,xe+=Se*ft,xe+=he*lt,xe+=F*et,xe+=B*T,ye=xe>>>13,xe&=8191,xe+=Q*Ye,xe+=q*Xe,xe+=Y*We,xe+=ne*(5*ot),xe+=ke*(5*st),ye+=xe>>>13,xe&=8191,Oe=ye,Oe+=be*st,Oe+=Se*Je,Oe+=he*ft,Oe+=F*lt,Oe+=B*et,ye=Oe>>>13,Oe&=8191,Oe+=Q*T,Oe+=q*Ye,Oe+=Y*Xe,Oe+=ne*We,Oe+=ke*(5*ot),ye+=Oe>>>13,Oe&=8191,me=ye,me+=be*ot,me+=Se*st,me+=he*Je,me+=F*ft,me+=B*lt,ye=me>>>13,me&=8191,me+=Q*et,me+=q*T,me+=Y*Ye,me+=ne*Xe,me+=ke*We,ye+=me>>>13,me&=8191,ye=(ye<<2)+ye|0,ye=ye+je|0,je=ye&8191,ye=ye>>>13,Ue+=ye,be=je,Se=Ue,he=Fe,F=qe,B=$e,Q=Ke,q=ze,Y=xe,ne=Oe,ke=me,b+=16,y-=16;this.h[0]=be,this.h[1]=Se,this.h[2]=he,this.h[3]=F,this.h[4]=B,this.h[5]=Q,this.h[6]=q,this.h[7]=Y,this.h[8]=ne,this.h[9]=ke},Z.prototype.finish=function(p,b){var y=new Uint16Array(10),u,E,L,I;if(this.leftover){for(I=this.leftover,this.buffer[I++]=1;I<16;I++)this.buffer[I]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(u=this.h[1]>>>13,this.h[1]&=8191,I=2;I<10;I++)this.h[I]+=u,u=this.h[I]>>>13,this.h[I]&=8191;for(this.h[0]+=u*5,u=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=u,u=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=u,y[0]=this.h[0]+5,u=y[0]>>>13,y[0]&=8191,I=1;I<10;I++)y[I]=this.h[I]+u,u=y[I]>>>13,y[I]&=8191;for(y[9]-=8192,E=(u^1)-1,I=0;I<10;I++)y[I]&=E;for(E=~E,I=0;I<10;I++)this.h[I]=this.h[I]&E|y[I];for(this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535,L=this.h[0]+this.pad[0],this.h[0]=L&65535,I=1;I<8;I++)L=(this.h[I]+this.pad[I]|0)+(L>>>16)|0,this.h[I]=L&65535;p[b+0]=this.h[0]>>>0&255,p[b+1]=this.h[0]>>>8&255,p[b+2]=this.h[1]>>>0&255,p[b+3]=this.h[1]>>>8&255,p[b+4]=this.h[2]>>>0&255,p[b+5]=this.h[2]>>>8&255,p[b+6]=this.h[3]>>>0&255,p[b+7]=this.h[3]>>>8&255,p[b+8]=this.h[4]>>>0&255,p[b+9]=this.h[4]>>>8&255,p[b+10]=this.h[5]>>>0&255,p[b+11]=this.h[5]>>>8&255,p[b+12]=this.h[6]>>>0&255,p[b+13]=this.h[6]>>>8&255,p[b+14]=this.h[7]>>>0&255,p[b+15]=this.h[7]>>>8&255},Z.prototype.update=function(p,b,y){var u,E;if(this.leftover){for(E=16-this.leftover,E>y&&(E=y),u=0;u=16&&(E=y-y%16,this.blocks(p,b,E),b+=E,y-=E),y){for(u=0;u>16&1),L[y-1]&=65535;L[15]=I[15]-32767-(L[14]>>16&1),E=L[15]>>16&1,L[14]&=65535,de(I,L,1-E)}for(y=0;y<16;y++)p[2*y]=I[y]&255,p[2*y+1]=I[y]>>8}function He(p,b){var y=new Uint8Array(32),u=new Uint8Array(32);return nt(y,p),nt(u,b),w(y,0,u,0)}function Xt(p){var b=new Uint8Array(32);return nt(b,p),b[0]&1}function Ut(p,b){var y;for(y=0;y<16;y++)p[y]=b[2*y]+(b[2*y+1]<<8);p[15]&=32767}function bt(p,b,y){for(var u=0;u<16;u++)p[u]=b[u]+y[u]}function Lt(p,b,y){for(var u=0;u<16;u++)p[u]=b[u]-y[u]}function Ge(p,b,y){var u,E,L=0,I=0,W=0,se=0,ve=0,pe=0,ct=0,ye=0,je=0,Ue=0,Fe=0,qe=0,$e=0,Ke=0,ze=0,xe=0,Oe=0,me=0,be=0,Se=0,he=0,F=0,B=0,Q=0,q=0,Y=0,ne=0,ke=0,We=0,Xe=0,Ye=0,T=y[0],et=y[1],lt=y[2],ft=y[3],Je=y[4],st=y[5],ot=y[6],Et=y[7],it=y[8],Ct=y[9],gt=y[10],Pt=y[11],Dt=y[12],Jt=y[13],Qt=y[14],Zt=y[15];u=b[0],L+=u*T,I+=u*et,W+=u*lt,se+=u*ft,ve+=u*Je,pe+=u*st,ct+=u*ot,ye+=u*Et,je+=u*it,Ue+=u*Ct,Fe+=u*gt,qe+=u*Pt,$e+=u*Dt,Ke+=u*Jt,ze+=u*Qt,xe+=u*Zt,u=b[1],I+=u*T,W+=u*et,se+=u*lt,ve+=u*ft,pe+=u*Je,ct+=u*st,ye+=u*ot,je+=u*Et,Ue+=u*it,Fe+=u*Ct,qe+=u*gt,$e+=u*Pt,Ke+=u*Dt,ze+=u*Jt,xe+=u*Qt,Oe+=u*Zt,u=b[2],W+=u*T,se+=u*et,ve+=u*lt,pe+=u*ft,ct+=u*Je,ye+=u*st,je+=u*ot,Ue+=u*Et,Fe+=u*it,qe+=u*Ct,$e+=u*gt,Ke+=u*Pt,ze+=u*Dt,xe+=u*Jt,Oe+=u*Qt,me+=u*Zt,u=b[3],se+=u*T,ve+=u*et,pe+=u*lt,ct+=u*ft,ye+=u*Je,je+=u*st,Ue+=u*ot,Fe+=u*Et,qe+=u*it,$e+=u*Ct,Ke+=u*gt,ze+=u*Pt,xe+=u*Dt,Oe+=u*Jt,me+=u*Qt,be+=u*Zt,u=b[4],ve+=u*T,pe+=u*et,ct+=u*lt,ye+=u*ft,je+=u*Je,Ue+=u*st,Fe+=u*ot,qe+=u*Et,$e+=u*it,Ke+=u*Ct,ze+=u*gt,xe+=u*Pt,Oe+=u*Dt,me+=u*Jt,be+=u*Qt,Se+=u*Zt,u=b[5],pe+=u*T,ct+=u*et,ye+=u*lt,je+=u*ft,Ue+=u*Je,Fe+=u*st,qe+=u*ot,$e+=u*Et,Ke+=u*it,ze+=u*Ct,xe+=u*gt,Oe+=u*Pt,me+=u*Dt,be+=u*Jt,Se+=u*Qt,he+=u*Zt,u=b[6],ct+=u*T,ye+=u*et,je+=u*lt,Ue+=u*ft,Fe+=u*Je,qe+=u*st,$e+=u*ot,Ke+=u*Et,ze+=u*it,xe+=u*Ct,Oe+=u*gt,me+=u*Pt,be+=u*Dt,Se+=u*Jt,he+=u*Qt,F+=u*Zt,u=b[7],ye+=u*T,je+=u*et,Ue+=u*lt,Fe+=u*ft,qe+=u*Je,$e+=u*st,Ke+=u*ot,ze+=u*Et,xe+=u*it,Oe+=u*Ct,me+=u*gt,be+=u*Pt,Se+=u*Dt,he+=u*Jt,F+=u*Qt,B+=u*Zt,u=b[8],je+=u*T,Ue+=u*et,Fe+=u*lt,qe+=u*ft,$e+=u*Je,Ke+=u*st,ze+=u*ot,xe+=u*Et,Oe+=u*it,me+=u*Ct,be+=u*gt,Se+=u*Pt,he+=u*Dt,F+=u*Jt,B+=u*Qt,Q+=u*Zt,u=b[9],Ue+=u*T,Fe+=u*et,qe+=u*lt,$e+=u*ft,Ke+=u*Je,ze+=u*st,xe+=u*ot,Oe+=u*Et,me+=u*it,be+=u*Ct,Se+=u*gt,he+=u*Pt,F+=u*Dt,B+=u*Jt,Q+=u*Qt,q+=u*Zt,u=b[10],Fe+=u*T,qe+=u*et,$e+=u*lt,Ke+=u*ft,ze+=u*Je,xe+=u*st,Oe+=u*ot,me+=u*Et,be+=u*it,Se+=u*Ct,he+=u*gt,F+=u*Pt,B+=u*Dt,Q+=u*Jt,q+=u*Qt,Y+=u*Zt,u=b[11],qe+=u*T,$e+=u*et,Ke+=u*lt,ze+=u*ft,xe+=u*Je,Oe+=u*st,me+=u*ot,be+=u*Et,Se+=u*it,he+=u*Ct,F+=u*gt,B+=u*Pt,Q+=u*Dt,q+=u*Jt,Y+=u*Qt,ne+=u*Zt,u=b[12],$e+=u*T,Ke+=u*et,ze+=u*lt,xe+=u*ft,Oe+=u*Je,me+=u*st,be+=u*ot,Se+=u*Et,he+=u*it,F+=u*Ct,B+=u*gt,Q+=u*Pt,q+=u*Dt,Y+=u*Jt,ne+=u*Qt,ke+=u*Zt,u=b[13],Ke+=u*T,ze+=u*et,xe+=u*lt,Oe+=u*ft,me+=u*Je,be+=u*st,Se+=u*ot,he+=u*Et,F+=u*it,B+=u*Ct,Q+=u*gt,q+=u*Pt,Y+=u*Dt,ne+=u*Jt,ke+=u*Qt,We+=u*Zt,u=b[14],ze+=u*T,xe+=u*et,Oe+=u*lt,me+=u*ft,be+=u*Je,Se+=u*st,he+=u*ot,F+=u*Et,B+=u*it,Q+=u*Ct,q+=u*gt,Y+=u*Pt,ne+=u*Dt,ke+=u*Jt,We+=u*Qt,Xe+=u*Zt,u=b[15],xe+=u*T,Oe+=u*et,me+=u*lt,be+=u*ft,Se+=u*Je,he+=u*st,F+=u*ot,B+=u*Et,Q+=u*it,q+=u*Ct,Y+=u*gt,ne+=u*Pt,ke+=u*Dt,We+=u*Jt,Xe+=u*Qt,Ye+=u*Zt,L+=38*Oe,I+=38*me,W+=38*be,se+=38*Se,ve+=38*he,pe+=38*F,ct+=38*B,ye+=38*Q,je+=38*q,Ue+=38*Y,Fe+=38*ne,qe+=38*ke,$e+=38*We,Ke+=38*Xe,ze+=38*Ye,E=1,u=L+E+65535,E=Math.floor(u/65536),L=u-E*65536,u=I+E+65535,E=Math.floor(u/65536),I=u-E*65536,u=W+E+65535,E=Math.floor(u/65536),W=u-E*65536,u=se+E+65535,E=Math.floor(u/65536),se=u-E*65536,u=ve+E+65535,E=Math.floor(u/65536),ve=u-E*65536,u=pe+E+65535,E=Math.floor(u/65536),pe=u-E*65536,u=ct+E+65535,E=Math.floor(u/65536),ct=u-E*65536,u=ye+E+65535,E=Math.floor(u/65536),ye=u-E*65536,u=je+E+65535,E=Math.floor(u/65536),je=u-E*65536,u=Ue+E+65535,E=Math.floor(u/65536),Ue=u-E*65536,u=Fe+E+65535,E=Math.floor(u/65536),Fe=u-E*65536,u=qe+E+65535,E=Math.floor(u/65536),qe=u-E*65536,u=$e+E+65535,E=Math.floor(u/65536),$e=u-E*65536,u=Ke+E+65535,E=Math.floor(u/65536),Ke=u-E*65536,u=ze+E+65535,E=Math.floor(u/65536),ze=u-E*65536,u=xe+E+65535,E=Math.floor(u/65536),xe=u-E*65536,L+=E-1+37*(E-1),E=1,u=L+E+65535,E=Math.floor(u/65536),L=u-E*65536,u=I+E+65535,E=Math.floor(u/65536),I=u-E*65536,u=W+E+65535,E=Math.floor(u/65536),W=u-E*65536,u=se+E+65535,E=Math.floor(u/65536),se=u-E*65536,u=ve+E+65535,E=Math.floor(u/65536),ve=u-E*65536,u=pe+E+65535,E=Math.floor(u/65536),pe=u-E*65536,u=ct+E+65535,E=Math.floor(u/65536),ct=u-E*65536,u=ye+E+65535,E=Math.floor(u/65536),ye=u-E*65536,u=je+E+65535,E=Math.floor(u/65536),je=u-E*65536,u=Ue+E+65535,E=Math.floor(u/65536),Ue=u-E*65536,u=Fe+E+65535,E=Math.floor(u/65536),Fe=u-E*65536,u=qe+E+65535,E=Math.floor(u/65536),qe=u-E*65536,u=$e+E+65535,E=Math.floor(u/65536),$e=u-E*65536,u=Ke+E+65535,E=Math.floor(u/65536),Ke=u-E*65536,u=ze+E+65535,E=Math.floor(u/65536),ze=u-E*65536,u=xe+E+65535,E=Math.floor(u/65536),xe=u-E*65536,L+=E-1+37*(E-1),p[0]=L,p[1]=I,p[2]=W,p[3]=se,p[4]=ve,p[5]=pe,p[6]=ct,p[7]=ye,p[8]=je,p[9]=Ue,p[10]=Fe,p[11]=qe,p[12]=$e,p[13]=Ke,p[14]=ze,p[15]=xe}function _t(p,b){Ge(p,b,b)}function H(p,b){var y=n(),u;for(u=0;u<16;u++)y[u]=b[u];for(u=253;u>=0;u--)_t(y,y),u!==2&&u!==4&&Ge(y,y,b);for(u=0;u<16;u++)p[u]=y[u]}function ge(p,b){var y=n(),u;for(u=0;u<16;u++)y[u]=b[u];for(u=250;u>=0;u--)_t(y,y),u!==1&&Ge(y,y,b);for(u=0;u<16;u++)p[u]=y[u]}function ue(p,b,y){var u=new Uint8Array(32),E=new Float64Array(80),L,I,W=n(),se=n(),ve=n(),pe=n(),ct=n(),ye=n();for(I=0;I<31;I++)u[I]=b[I];for(u[31]=b[31]&127|64,u[0]&=248,Ut(E,y),I=0;I<16;I++)se[I]=E[I],pe[I]=W[I]=ve[I]=0;for(W[0]=pe[0]=1,I=254;I>=0;--I)L=u[I>>>3]>>>(I&7)&1,de(W,se,L),de(ve,pe,L),bt(ct,W,ve),Lt(W,W,ve),bt(ve,se,pe),Lt(se,se,pe),_t(pe,ct),_t(ye,W),Ge(W,ve,W),Ge(ve,se,ct),bt(ct,W,ve),Lt(W,W,ve),_t(se,W),Lt(ve,pe,ye),Ge(W,ve,c),bt(W,W,pe),Ge(ve,ve,W),Ge(W,pe,ye),Ge(pe,se,E),_t(se,ct),de(W,se,L),de(ve,pe,L);for(I=0;I<16;I++)E[I+16]=W[I],E[I+32]=ve[I],E[I+48]=se[I],E[I+64]=pe[I];var je=E.subarray(32),Ue=E.subarray(16);return H(je,je),Ge(Ue,Ue,je),nt(p,Ue),0}function Ee(p,b){return ue(p,b,o)}function rt(p,b){return r(b,32),Ee(p,b)}function pt(p,b,y){var u=new Uint8Array(32);return ue(u,y,b),P(p,s,u,k)}var O=fe,R=Me;function D(p,b,y,u,E,L){var I=new Uint8Array(32);return pt(I,E,L),O(p,b,y,u,I)}function J(p,b,y,u,E,L){var I=new Uint8Array(32);return pt(I,E,L),R(p,b,y,u,I)}var z=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function ee(p,b,y,u){for(var E=new Int32Array(16),L=new Int32Array(16),I,W,se,ve,pe,ct,ye,je,Ue,Fe,qe,$e,Ke,ze,xe,Oe,me,be,Se,he,F,B,Q,q,Y,ne,ke=p[0],We=p[1],Xe=p[2],Ye=p[3],T=p[4],et=p[5],lt=p[6],ft=p[7],Je=b[0],st=b[1],ot=b[2],Et=b[3],it=b[4],Ct=b[5],gt=b[6],Pt=b[7],Dt=0;u>=128;){for(Se=0;Se<16;Se++)he=8*Se+Dt,E[Se]=y[he+0]<<24|y[he+1]<<16|y[he+2]<<8|y[he+3],L[Se]=y[he+4]<<24|y[he+5]<<16|y[he+6]<<8|y[he+7];for(Se=0;Se<80;Se++)if(I=ke,W=We,se=Xe,ve=Ye,pe=T,ct=et,ye=lt,je=ft,Ue=Je,Fe=st,qe=ot,$e=Et,Ke=it,ze=Ct,xe=gt,Oe=Pt,F=ft,B=Pt,Q=B&65535,q=B>>>16,Y=F&65535,ne=F>>>16,F=(T>>>14|it<<18)^(T>>>18|it<<14)^(it>>>9|T<<23),B=(it>>>14|T<<18)^(it>>>18|T<<14)^(T>>>9|it<<23),Q+=B&65535,q+=B>>>16,Y+=F&65535,ne+=F>>>16,F=T&et^~T<,B=it&Ct^~it>,Q+=B&65535,q+=B>>>16,Y+=F&65535,ne+=F>>>16,F=z[Se*2],B=z[Se*2+1],Q+=B&65535,q+=B>>>16,Y+=F&65535,ne+=F>>>16,F=E[Se%16],B=L[Se%16],Q+=B&65535,q+=B>>>16,Y+=F&65535,ne+=F>>>16,q+=Q>>>16,Y+=q>>>16,ne+=Y>>>16,me=Y&65535|ne<<16,be=Q&65535|q<<16,F=me,B=be,Q=B&65535,q=B>>>16,Y=F&65535,ne=F>>>16,F=(ke>>>28|Je<<4)^(Je>>>2|ke<<30)^(Je>>>7|ke<<25),B=(Je>>>28|ke<<4)^(ke>>>2|Je<<30)^(ke>>>7|Je<<25),Q+=B&65535,q+=B>>>16,Y+=F&65535,ne+=F>>>16,F=ke&We^ke&Xe^We&Xe,B=Je&st^Je&ot^st&ot,Q+=B&65535,q+=B>>>16,Y+=F&65535,ne+=F>>>16,q+=Q>>>16,Y+=q>>>16,ne+=Y>>>16,je=Y&65535|ne<<16,Oe=Q&65535|q<<16,F=ve,B=$e,Q=B&65535,q=B>>>16,Y=F&65535,ne=F>>>16,F=me,B=be,Q+=B&65535,q+=B>>>16,Y+=F&65535,ne+=F>>>16,q+=Q>>>16,Y+=q>>>16,ne+=Y>>>16,ve=Y&65535|ne<<16,$e=Q&65535|q<<16,We=I,Xe=W,Ye=se,T=ve,et=pe,lt=ct,ft=ye,ke=je,st=Ue,ot=Fe,Et=qe,it=$e,Ct=Ke,gt=ze,Pt=xe,Je=Oe,Se%16===15)for(he=0;he<16;he++)F=E[he],B=L[he],Q=B&65535,q=B>>>16,Y=F&65535,ne=F>>>16,F=E[(he+9)%16],B=L[(he+9)%16],Q+=B&65535,q+=B>>>16,Y+=F&65535,ne+=F>>>16,me=E[(he+1)%16],be=L[(he+1)%16],F=(me>>>1|be<<31)^(me>>>8|be<<24)^me>>>7,B=(be>>>1|me<<31)^(be>>>8|me<<24)^(be>>>7|me<<25),Q+=B&65535,q+=B>>>16,Y+=F&65535,ne+=F>>>16,me=E[(he+14)%16],be=L[(he+14)%16],F=(me>>>19|be<<13)^(be>>>29|me<<3)^me>>>6,B=(be>>>19|me<<13)^(me>>>29|be<<3)^(be>>>6|me<<26),Q+=B&65535,q+=B>>>16,Y+=F&65535,ne+=F>>>16,q+=Q>>>16,Y+=q>>>16,ne+=Y>>>16,E[he]=Y&65535|ne<<16,L[he]=Q&65535|q<<16;F=ke,B=Je,Q=B&65535,q=B>>>16,Y=F&65535,ne=F>>>16,F=p[0],B=b[0],Q+=B&65535,q+=B>>>16,Y+=F&65535,ne+=F>>>16,q+=Q>>>16,Y+=q>>>16,ne+=Y>>>16,p[0]=ke=Y&65535|ne<<16,b[0]=Je=Q&65535|q<<16,F=We,B=st,Q=B&65535,q=B>>>16,Y=F&65535,ne=F>>>16,F=p[1],B=b[1],Q+=B&65535,q+=B>>>16,Y+=F&65535,ne+=F>>>16,q+=Q>>>16,Y+=q>>>16,ne+=Y>>>16,p[1]=We=Y&65535|ne<<16,b[1]=st=Q&65535|q<<16,F=Xe,B=ot,Q=B&65535,q=B>>>16,Y=F&65535,ne=F>>>16,F=p[2],B=b[2],Q+=B&65535,q+=B>>>16,Y+=F&65535,ne+=F>>>16,q+=Q>>>16,Y+=q>>>16,ne+=Y>>>16,p[2]=Xe=Y&65535|ne<<16,b[2]=ot=Q&65535|q<<16,F=Ye,B=Et,Q=B&65535,q=B>>>16,Y=F&65535,ne=F>>>16,F=p[3],B=b[3],Q+=B&65535,q+=B>>>16,Y+=F&65535,ne+=F>>>16,q+=Q>>>16,Y+=q>>>16,ne+=Y>>>16,p[3]=Ye=Y&65535|ne<<16,b[3]=Et=Q&65535|q<<16,F=T,B=it,Q=B&65535,q=B>>>16,Y=F&65535,ne=F>>>16,F=p[4],B=b[4],Q+=B&65535,q+=B>>>16,Y+=F&65535,ne+=F>>>16,q+=Q>>>16,Y+=q>>>16,ne+=Y>>>16,p[4]=T=Y&65535|ne<<16,b[4]=it=Q&65535|q<<16,F=et,B=Ct,Q=B&65535,q=B>>>16,Y=F&65535,ne=F>>>16,F=p[5],B=b[5],Q+=B&65535,q+=B>>>16,Y+=F&65535,ne+=F>>>16,q+=Q>>>16,Y+=q>>>16,ne+=Y>>>16,p[5]=et=Y&65535|ne<<16,b[5]=Ct=Q&65535|q<<16,F=lt,B=gt,Q=B&65535,q=B>>>16,Y=F&65535,ne=F>>>16,F=p[6],B=b[6],Q+=B&65535,q+=B>>>16,Y+=F&65535,ne+=F>>>16,q+=Q>>>16,Y+=q>>>16,ne+=Y>>>16,p[6]=lt=Y&65535|ne<<16,b[6]=gt=Q&65535|q<<16,F=ft,B=Pt,Q=B&65535,q=B>>>16,Y=F&65535,ne=F>>>16,F=p[7],B=b[7],Q+=B&65535,q+=B>>>16,Y+=F&65535,ne+=F>>>16,q+=Q>>>16,Y+=q>>>16,ne+=Y>>>16,p[7]=ft=Y&65535|ne<<16,b[7]=Pt=Q&65535|q<<16,Dt+=128,u-=128}return u}function ce(p,b,y){var u=new Int32Array(8),E=new Int32Array(8),L=new Uint8Array(256),I,W=y;for(u[0]=1779033703,u[1]=3144134277,u[2]=1013904242,u[3]=2773480762,u[4]=1359893119,u[5]=2600822924,u[6]=528734635,u[7]=1541459225,E[0]=4089235720,E[1]=2227873595,E[2]=4271175723,E[3]=1595750129,E[4]=2917565137,E[5]=725511199,E[6]=4215389547,E[7]=327033209,ee(u,E,b,y),y%=128,I=0;I=0;--E)u=y[E/8|0]>>(E&7)&1,ie(p,b,u),oe(b,p),oe(p,p),ie(p,b,u)}function le(p,b){var y=[n(),n(),n(),n()];ae(y[0],d),ae(y[1],h),ae(y[2],a),Ge(y[3],d,h),Re(p,y,b)}function Ae(p,b,y){var u=new Uint8Array(64),E=[n(),n(),n(),n()],L;for(y||r(b,32),ce(u,b,32),u[0]&=248,u[31]&=127,u[31]|=64,le(E,u),te(p,E),L=0;L<32;L++)b[L+32]=p[L];return 0}var Le=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function Ze(p,b){var y,u,E,L;for(u=63;u>=32;--u){for(y=0,E=u-32,L=u-12;E>4)*Le[E],y=b[E]>>8,b[E]&=255;for(E=0;E<32;E++)b[E]-=y*Le[E];for(u=0;u<32;u++)b[u+1]+=b[u]>>8,p[u]=b[u]&255}function ht(p){var b=new Float64Array(64),y;for(y=0;y<64;y++)b[y]=p[y];for(y=0;y<64;y++)p[y]=0;Ze(p,b)}function at(p,b,y,u){var E=new Uint8Array(64),L=new Uint8Array(64),I=new Uint8Array(64),W,se,ve=new Float64Array(64),pe=[n(),n(),n(),n()];ce(E,u,32),E[0]&=248,E[31]&=127,E[31]|=64;var ct=y+64;for(W=0;W>7&&Lt(p[0],i,p[0]),Ge(p[3],p[0],p[1]),0)}function Mt(p,b,y,u){var E,L=new Uint8Array(32),I=new Uint8Array(64),W=[n(),n(),n(),n()],se=[n(),n(),n(),n()];if(y<64||nn(se,u))return-1;for(E=0;E=0},t.sign.keyPair=function(){var p=new Uint8Array(dr),b=new Uint8Array(Fr);return Ae(p,b),{publicKey:p,secretKey:b}},t.sign.keyPair.fromSecretKey=function(p){if(yn(p),p.length!==Fr)throw new Error("bad secret key size");for(var b=new Uint8Array(dr),y=0;yt in e?Bb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pf=(e,t)=>{for(var n in t||(t={}))zb.call(t,n)&&Rh(e,n,t[n]);if(Ph)for(var n of Ph(t))Vb.call(t,n)&&Rh(e,n,t[n]);return e},Rf=(e,t)=>Ub(e,$b(t)),Yu=class extends Error{constructor(e){super("DEXIE ENCRYPT ADDON: "+e)}},Kb=class extends Yu{constructor(e){super(e)}},M2=class extends Yu{constructor(e){super(e)}},Gu=class extends Yu{constructor(e){super(e)}},xl=()=>({id:"DexieEcryptedTestDoc",value:"This should be readable"}),ac={name:"__dexie-encrypted-addon__",keyString:"id, $value"};function Hb(e){return!e||!Object.keys(e).filter(t=>t!==ac.name).length}async function qb(e){const t=e;if(!t.backendDB().objectStoreNames.contains(ac.name))return console.warn(new Kb("A database version update is required for key change detection to work").message),!1;const s=t[ac.name],o=await s.get(xl().id).catch(i=>{if(i instanceof Gu)return null;throw i});return o===null?!0:o===void 0?(await s.add(xl()),!1):xl().value!==o.value}async function Wb(e,t){const n=Hb(t),r=await qb(e);if(n&&console.warn(new Gu("No encryption keys are set").message),r)throw new M2("Encryption key has changed")}var Xu=class{get secret(){return this._secret}get secretUint8Array(){return this._keyUint8Array}static createRandomEncryptionKey(){return _l(Ur.randomBytes(32))}static hash(e){const t=Tf(JSON.stringify(e)),n=Ur.hash(t);return _l(n)}encrypt(e){if(e===void 0)return e;const t=Ur.randomBytes(Ur.secretbox.nonceLength),n=Tf(JSON.stringify(e)),r=Ur.secretbox(n,t,this.secretUint8Array),s=new Uint8Array(t.length+r.length);return s.set(t),s.set(r,t.length),_l(s)}decrypt(e){const t=Oh(e),n=t.slice(0,Ur.secretbox.nonceLength),r=t.slice(Ur.secretbox.nonceLength,e.length),s=Ur.secretbox.open(r,n,this.secretUint8Array);if(!s)throw new Gu("Could not decrypt message!");const o=P2(s);return JSON.parse(o)}constructor(e){this._secret=e,this._keyUint8Array=Oh(this._secret)}};function Yb(e,t,n,r){let s=null;n.hashKey&&e===void 0&&(s=Xu.hash(t)),n.keys.forEach(o=>{t[o]!==void 0&&(t[o]=r.encrypt(t[o]))}),s&&n.hashKey&&(t[n.hashKey]=s)}function Gb(e,t,n,r){return Object.entries(e).reduce((s,[o,i])=>(n.keys.some(a=>a===o)&&(s[o]=r.encrypt(i)),s),{})}function Xb(e,t,n){return e&&(t.keys.forEach(r=>{e[r]!==void 0&&(e[r]=n.decrypt(e[r]))}),e)}var Jb=class{getEncryptedKeys(){return Object.entries(this.schema).reduce((e,[t,n])=>{if(!n)return e;const r=n.split(",").map(c=>c.trim()),s=r.filter(c=>c.startsWith("$")).map(c=>c.replace("$","")),o=r[0],i=o.includes("#");if(!s.length&&!i)return e;const a=i?o.replace("#","").replace("++",""):null;return Rf(Pf({},e),{[t]:{keys:s,hashKey:a}})},{})}getCleanedSchema(){return Object.entries(this.schema).reduce((e,[t,n])=>{if(!n)return e;const r=n.split(",").map(o=>o.trim());r[0]=r[0].replace("#","");const s=r.filter(o=>!o.startsWith("$")).join(",");return Rf(Pf({},e),{[t]:s})},{})}addTables(e){e.forEach(t=>{t.name in this.schema||(this.schema[t.name]=t.keyString)})}constructor(e){this.schema=e}};function kf(e,t){const n=e;n.pVermeerAddonsRegistered=Rf(Pf({},n.pVermeerAddonsRegistered),{encrypted:!0}),e.close();let r,s=!0;if(t&&(t.secretKey&&(r=t.secretKey),t.immutable!==void 0&&(s=t.immutable)),!r)throw new M2("Secret key is not provided");s&&!n.pVermeerAddonsRegistered.immutable&&Ob(e);let o;const i=new Xu(r);e.Version.prototype._parseStoresSpec=en.override(e.Version.prototype._parseStoresSpec,a=>function(c,f){const l=new Jb(c);l.addTables([ac]);const d=l.getEncryptedKeys(),h=l.getCleanedSchema();return o=d,a.apply(this,[h,f])}),e.on("ready",async()=>{Object.entries(o).forEach(([a,c])=>{const f=e.table(a),l=f.schema.readHook,d=h=>{const m=en.currentTransaction,x=m!=null&&m.raw?h:Xb(h,c,i);return l?l(x):x};f.schema.readHook&&f.hook.reading.unsubscribe(f.schema.readHook),f.schema.readHook=d,f.hook("reading",d),f.hook("creating",(h,m)=>{const x=en.currentTransaction;return x!=null&&x.raw?m:Yb(h,m,c,i)}),f.hook("updating",(h,m)=>{const x=en.currentTransaction;return x!=null&&x.raw?h:Gb(h,m,c,i)})}),await Wb(e,o)})}kf.setOptions=e=>t=>kf(t,e);function kt(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function Es(e){return function t(n){return arguments.length===0||kt(n)?t:e.apply(this,arguments)}}function _s(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return kt(n)?t:Es(function(s){return e(n,s)});default:return kt(n)&&kt(r)?t:kt(n)?Es(function(s){return e(s,r)}):kt(r)?Es(function(s){return e(n,s)}):e(n,r)}}}function N2(e){return function t(n,r,s){switch(arguments.length){case 0:return t;case 1:return kt(n)?t:_s(function(o,i){return e(n,o,i)});case 2:return kt(n)&&kt(r)?t:kt(n)?_s(function(o,i){return e(o,r,i)}):kt(r)?_s(function(o,i){return e(n,o,i)}):Es(function(o){return e(n,r,o)});default:return kt(n)&&kt(r)&&kt(s)?t:kt(n)&&kt(r)?_s(function(o,i){return e(o,i,s)}):kt(n)&&kt(s)?_s(function(o,i){return e(o,r,i)}):kt(r)&&kt(s)?_s(function(o,i){return e(n,o,i)}):kt(n)?Es(function(o){return e(o,r,s)}):kt(r)?Es(function(o){return e(n,o,s)}):kt(s)?Es(function(o){return e(n,r,o)}):e(n,r,s)}}}function ga(e,t){return Object.prototype.hasOwnProperty.call(t,e)}function kh(e){return Object.prototype.toString.call(e)==="[object Object]"}var Qb=N2(function(t,n,r){var s={},o;n=n||{},r=r||{};for(o in n)ga(o,n)&&(s[o]=ga(o,r)?t(o,n[o],r[o]):n[o]);for(o in r)ga(o,r)&&!ga(o,s)&&(s[o]=r[o]);return s}),Zb=N2(function e(t,n,r){return Qb(function(s,o,i){return kh(o)&&kh(i)?e(t,o,i):t(s,o,i)},n,r)}),e5=_s(function(t,n){return Zb(function(r,s,o){return o},t,n)});const t5={accounts:"++id, dateCreated, derivationPath, did, $identity, $mnemonic, publicKeyHex"},n5={contacts:"&did, name"},r5={logs:"date"},s5={secret:"++id, secret"},Mh=0;function ZE(e){return!!(e!=null&&e.filterFeedByNearby||e!=null&&e.filterFeedByVisible)}const o5={settings:"id, &accountDid"},Ju=1,e9=15,i5={temp:"id"};var a5=(e=>(e.APP_NAME="Time Safari",e.PROD_ENDORSER_API_SERVER="https://api.endorser.ch",e.TEST_ENDORSER_API_SERVER="https://test-api.endorser.ch",e.LOCAL_ENDORSER_API_SERVER="http://localhost:3000",e.PROD_IMAGE_API_SERVER="https://image-api.timesafari.app",e.TEST_IMAGE_API_SERVER="https://test-image-api.timesafari.app",e.LOCAL_IMAGE_API_SERVER="http://localhost:3001",e.PROD_PARTNER_API_SERVER="https://partner-api.endorser.ch",e.TEST_PARTNER_API_SERVER="https://test-partner-api.endorser.ch",e.LOCAL_PARTNER_API_SERVER="http://localhost:3000",e.PROD_PUSH_SERVER="https://timesafari.app",e.TEST1_PUSH_SERVER="https://test.timesafari.app",e.TEST2_PUSH_SERVER="https://timesafari-pwa.anomalistlabs.com",e.NO_CONTACT_NAME="(no name)",e))(a5||{});const t9="https://timesafari.app",c5="https://api.endorser.ch",n9="https://image-api.timesafari.app",r9="https://partner-api.endorser.ch",s9=window.location.protocol+"//"+window.location.host,o9="profile",i9=!1,L2=new en("TimeSafariSecret");L2.version(1).stores(s5);const l5=new en("TimeSafariAccounts"),f5=u5(L2,l5),mn=new en("TimeSafari");mn.version(2).stores({...n5,...r5,settings:"id"});mn.version(3).stores(i5);mn.version(4).stores(o5).upgrade(e=>e.table("settings").toCollection().modify(t=>{t.accountDid=""}));const I2={id:Ju,activeDid:void 0,apiServer:c5};mn.on("populate",async()=>{await mn.settings.add(I2)});async function u5(e,t){return e.open().then(()=>e.secret.get(Mh)).then(n=>{let r=n==null?void 0:n.secret;if(r!=null)return r;{const s=localStorage.getItem("secret");return s!=null?r=s:r=Xu.createRandomEncryptionKey(),e.secret.add({id:Mh,secret:r}).then(()=>r)}}).then(n=>{if(n==null)throw new Error("No secret found or created.");return kf(t,{secretKey:n}),t.version(1).stores(t5),t.open(),t}).catch(n=>{throw to("Error processing secret & encrypted accountsDB.",n),n})}async function d5(){return await mn.open(),await mn.settings.get(Ju)||I2}async function h5(){const e=await d5();if(e.activeDid){const t=await mn.settings.where("accountDid").equals(e.activeDid).first()||{};return e5(e,t)}else return e}async function a9(e){delete e.accountDid,delete e.id,await mn.settings.update(Ju,e)}async function c9(e,t){t.accountDid=e,delete t.id,await mn.settings.where("accountDid").equals(t.accountDid).modify(t)===0&&(t.id||(t.id=await mn.settings.count()+1),await mn.settings.add(t))}async function to(e,t=!1){t?console.error(`${new Date().toISOString()} ${e}`):console.log(`${new Date().toISOString()} ${e}`),await mn.open();const n=new Date().toDateString(),r=await mn.logs.get(n);r||await mn.logs.clear();const o=`${r&&r.message||""} -${new Date().toISOString()} ${e}`;await mn.logs.update(n,{message:o})}var p5=Object.getOwnPropertyDescriptor,m5=(e,t,n,r)=>{for(var s=r>1?void 0:r?p5(t,n):t,o=e.length-1,i;o>=0;o--)(i=e[o])&&(s=i(s)||s);return s};let Mf=class extends O4{constructor(){super(...arguments);el(this,"$notify");el(this,"stopAsking",!1)}truncateLongWords(n){return n.split(" ").map(r=>r.length>30?r.slice(0,30)+"...":r).join(" ")}async turnOffNotifications(n){var o;console.log("Starting turnOffNotifications...");let r=null,s=!1;try{console.log("Retrieving settings for the active account...");const i=await h5();console.log("Retrieved settings:",i);const a=!!(i!=null&&i.notifyingNewActivityTime),c=!!(i!=null&&i.notifyingReminderTime);if((!a||!c)&&(s=!0,console.log("Both notifications are being turned off.")),console.log("Checking service worker readiness..."),await((o=navigator.serviceWorker)==null?void 0:o.ready.then(h=>(console.log("Service worker is ready. Fetching subscription..."),h.pushManager.getSubscription())).then(async h=>{h?(r=h.toJSON(),console.log("PushSubscription retrieved:",r),s&&(console.log("Unsubscribing from push notifications..."),await h.unsubscribe(),console.log("Successfully unsubscribed."))):(to("Subscription object is not available."),console.log("No subscription found."))}).catch(h=>{to("Push provider server communication failed: "+JSON.stringify(h),!0),console.error("Error during subscription fetch:",h)})),!r)return console.log("No subscription available. Notifying user..."),this.$notify({group:"alert",type:"info",title:"Finished",text:"Notifications are off."},5e3),console.log("Exiting as there is no subscription to process."),!0;const f={...r};s||(f.notifyType=n.title,console.log(`Server subscription updated with notifyType: ${n.title}`)),console.log("Sending unsubscribe request to the server...");const l=await fetch("/web-push/unsubscribe",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)}).then(async h=>{if(!h.ok){const m=await h.text();to(`Push server failed: ${h.status} ${m}`,!0),console.error("Push server error response:",m)}return console.log(`Server response status: ${h.status}`),h.ok}).catch(h=>(to("Push server communication failed: "+JSON.stringify(h),!0),console.error("Error during server communication:",h),!1)),d=l?"Notification is off.":"Notification is still on. Try to turn it off again.";return console.log("Server response processed. Message:",d),this.$notify({group:"alert",type:"info",title:"Finished",text:d},5e3),n.callback&&(console.log("Executing notification callback..."),n.callback(l)),console.log("Completed turnOffNotifications with success:",l),l}catch(i){return to("Error turning off notifications: "+JSON.stringify(i),!0),console.error("Critical error in turnOffNotifications:",i),this.$notify({group:"alert",type:"error",title:"Error",text:"Failed to turn off notifications. Please try again."},5e3),!1}}};Mf=m5([C4],Mf);const g5=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},y5={class:"fixed top-4 right-4 w-full max-w-sm flex flex-col items-start justify-end"},b5={key:0,class:"w-full max-w-sm mx-auto mb-3 overflow-hidden bg-slate-900/90 text-white rounded-lg shadow-md"},v5={class:"w-full px-4 py-3"},_5={class:"font-semibold"},x5={class:"text-sm"},w5={key:1,class:"flex w-full max-w-sm mx-auto mb-3 overflow-hidden bg-slate-100 rounded-lg shadow-md"},E5={class:"flex items-center justify-center w-12 bg-slate-600 text-slate-100"},A5={class:"relative w-full pl-4 pr-8 py-2 text-slate-900"},S5={class:"font-semibold"},C5={class:"text-sm"},O5=["onClick"],T5={key:2,class:"flex w-full max-w-sm mx-auto mb-3 overflow-hidden bg-emerald-100 rounded-lg shadow-md"},P5={class:"flex items-center justify-center w-12 bg-emerald-600 text-emerald-100"},R5={class:"relative w-full pl-4 pr-8 py-2 text-emerald-900"},k5={class:"font-semibold"},M5={class:"text-sm"},N5=["onClick"],L5={key:3,class:"flex w-full max-w-sm mx-auto mb-3 overflow-hidden bg-amber-100 rounded-lg shadow-md"},I5={class:"flex items-center justify-center w-12 bg-amber-600 text-amber-100"},D5={class:"relative w-full pl-4 pr-8 py-2 text-amber-900"},j5={class:"font-semibold"},F5={class:"text-sm"},B5=["onClick"],U5={key:4,class:"flex w-full max-w-sm mx-auto mb-3 overflow-hidden bg-rose-100 rounded-lg shadow-md"},$5={class:"flex items-center justify-center w-12 bg-rose-600 text-rose-100"},z5={class:"relative w-full pl-4 pr-8 py-2 text-rose-900"},V5={class:"font-semibold"},K5={class:"text-sm"},H5=["onClick"],q5={class:"fixed z-[100] top-0 inset-x-0 w-full"},W5={key:0,class:"absolute inset-0 h-screen flex flex-col items-center justify-center bg-slate-900/50"},Y5={class:"flex w-11/12 max-w-sm mx-auto mb-3 overflow-hidden bg-white rounded-lg shadow-lg"},G5={class:"w-full px-6 py-6 text-slate-900 text-center"},X5={class:"font-semibold text-lg"},J5={class:"text-sm mb-2"},Q5=["onClick"],Z5=["onClick"],ev={class:"relative ml-2"},tv=["onClick"],nv={key:1,class:"absolute inset-0 h-screen flex flex-col items-center justify-center bg-slate-900/50"},rv={class:"flex w-11/12 max-w-sm mx-auto mb-3 overflow-hidden bg-white rounded-lg shadow-lg"},sv={class:"w-full px-6 py-6 text-slate-900 text-center"},ov=["onClick"],iv={key:2,class:"absolute inset-0 h-screen flex flex-col items-center justify-center bg-slate-900/50"},av={class:"flex w-11/12 max-w-sm mx-auto mb-3 overflow-hidden bg-white rounded-lg shadow-lg"},cv={class:"w-full px-6 py-6 text-slate-900 text-center"},lv=["onClick"],fv=["onClick"];function uv(e,t,n,r,s,o){const i=Ko("router-view"),a=Ko("font-awesome"),c=Ko("Notification"),f=Ko("NotificationGroup");return Nt(),on(jt,null,[tt(i),tt(f,{group:"alert"},{default:Qr(()=>[Ie("div",y5,[tt(c,{enter:"transform ease-out duration-300 transition","enter-from":"translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-4","enter-to":"translate-y-0 opacity-100 sm:translate-x-0",leave:"transition ease-in duration-500","leave-from":"opacity-100","leave-to":"opacity-0",move:"transition duration-500","move-delay":"delay-300"},{default:Qr(({notifications:l,close:d})=>[(Nt(!0),on(jt,null,Ul(l,h=>(Nt(),on("div",{key:h.id,class:"w-full",role:"alert"},[h.type==="toast"?(Nt(),on("div",b5,[Ie("div",v5,[Ie("span",_5,an(h.title),1),Ie("p",x5,an(h.text),1)])])):Bn("",!0),h.type==="info"?(Nt(),on("div",w5,[Ie("div",E5,[tt(a,{icon:"circle-info",class:"fa-fw fa-xl"})]),Ie("div",A5,[Ie("span",S5,an(h.title),1),Ie("p",C5,an(e.truncateLongWords(h.text)),1),Ie("button",{class:"absolute top-2 right-2 px-0.5 py-0 rounded-full bg-slate-200 text-slate-600",onClick:m=>d(h.id)},[tt(a,{icon:"xmark",class:"fa-fw"})],8,O5)])])):Bn("",!0),h.type==="success"?(Nt(),on("div",T5,[Ie("div",P5,[tt(a,{icon:"circle-info",class:"fa-fw fa-xl"})]),Ie("div",R5,[Ie("span",k5,an(h.title),1),Ie("p",M5,an(e.truncateLongWords(h.text)),1),Ie("button",{class:"absolute top-2 right-2 px-0.5 py-0 rounded-full bg-emerald-200 text-emerald-600",onClick:m=>d(h.id)},[tt(a,{icon:"xmark",class:"fa-fw"})],8,N5)])])):Bn("",!0),h.type==="warning"?(Nt(),on("div",L5,[Ie("div",I5,[tt(a,{icon:"triangle-exclamation",class:"fa-fw fa-xl"})]),Ie("div",D5,[Ie("span",j5,an(h.title),1),Ie("p",F5,an(e.truncateLongWords(h.text)),1),Ie("button",{class:"absolute top-2 right-2 px-0.5 py-0 rounded-full bg-amber-200 text-amber-600",onClick:m=>d(h.id)},[tt(a,{icon:"xmark",class:"fa-fw"})],8,B5)])])):Bn("",!0),h.type==="danger"?(Nt(),on("div",U5,[Ie("div",$5,[tt(a,{icon:"triangle-exclamation",class:"fa-fw fa-xl"})]),Ie("div",z5,[Ie("span",V5,an(h.title),1),Ie("p",K5,an(e.truncateLongWords(h.text)),1),Ie("button",{class:"absolute top-2 right-2 px-0.5 py-0 rounded-full bg-rose-200 text-rose-600",onClick:m=>d(h.id)},[tt(a,{icon:"xmark",class:"fa-fw"})],8,H5)])])):Bn("",!0)]))),128))]),_:1})])]),_:1}),tt(f,{group:"modal"},{default:Qr(()=>[Ie("div",q5,[tt(c,{enter:"transform ease-out duration-300 transition","enter-from":"translate-y-2 opacity-0 sm:translate-y-4","enter-to":"translate-y-0 opacity-100 sm:translate-y-0",leave:"transition ease-in duration-500","leave-from":"opacity-100","leave-to":"opacity-0",move:"transition duration-500","move-delay":"delay-300"},{default:Qr(({notifications:l,close:d})=>[(Nt(!0),on(jt,null,Ul(l,h=>(Nt(),on("div",{key:h.id,class:"w-full",role:"alert"},[h.type==="confirm"?(Nt(),on("div",W5,[Ie("div",Y5,[Ie("div",G5,[Ie("span",X5,an(h.title),1),Ie("p",J5,an(h.text),1),h.onYes?(Nt(),on("button",{key:0,class:"block w-full text-center text-md font-bold uppercase bg-blue-600 text-white px-2 py-2 rounded-md mb-2",onClick:m=>{h.onYes(),d(h.id)}}," Yes"+an(h.yesText?", "+h.yesText:""),9,Q5)):Bn("",!0),h.onNo?(Nt(),on("button",{key:1,class:"block w-full text-center text-md font-bold uppercase bg-yellow-600 text-white px-2 py-2 rounded-md mb-2",onClick:m=>{h.onNo(e.stopAsking),d(h.id),e.stopAsking=!1}}," No"+an(h.noText?", "+h.noText:""),9,Z5)):Bn("",!0),h.promptToStopAsking&&h.onNo?(Nt(),on("label",{key:2,for:"toggleStopAsking",class:"flex items-center justify-between cursor-pointer my-4",onClick:t[1]||(t[1]=m=>e.stopAsking=!e.stopAsking)},[t[4]||(t[4]=Ie("span",{class:"ml-2"},"... and do not ask again.",-1)),Ie("div",ev,[b1(Ie("input",{"onUpdate:modelValue":t[0]||(t[0]=m=>e.stopAsking=m),type:"checkbox",name:"stopAsking",class:"sr-only"},null,512),[[Lc,e.stopAsking]]),t[2]||(t[2]=Ie("div",{class:"block bg-slate-500 w-14 h-8 rounded-full"},null,-1)),t[3]||(t[3]=Ie("div",{class:"dot absolute left-1 top-1 bg-slate-400 w-6 h-6 rounded-full transition"},null,-1))])])):Bn("",!0),Ie("button",{class:"block w-full text-center text-md font-bold uppercase bg-slate-600 text-white px-2 py-2 rounded-md",onClick:m=>{h.onCancel&&h.onCancel(e.stopAsking),d(h.id),e.stopAsking=!1}},an(h.onYes?"Cancel":"Close"),9,tv)])])])):Bn("",!0),h.type==="notification-mute"?(Nt(),on("div",nv,[Ie("div",rv,[Ie("div",sv,[t[5]||(t[5]=Ie("p",{class:"text-lg mb-4"},"Mute app notifications:",-1)),t[6]||(t[6]=Ie("button",{class:"block w-full text-center text-md font-bold uppercase bg-blue-600 text-white px-2 py-2 rounded-md mb-2"}," For 1 Day ",-1)),t[7]||(t[7]=Ie("button",{class:"block w-full text-center text-md font-bold uppercase bg-blue-600 text-white px-2 py-2 rounded-md mb-2"}," For 2 Days ",-1)),t[8]||(t[8]=Ie("button",{class:"block w-full text-center text-md font-bold uppercase bg-blue-600 text-white px-2 py-2 rounded-md mb-2"}," For 1 Week ",-1)),t[9]||(t[9]=Ie("button",{class:"block w-full text-center text-md font-bold uppercase bg-blue-600 text-white px-2 py-2 rounded-md mb-2"}," Until I turn it back on ",-1)),Ie("button",{class:"block w-full text-center text-md font-bold uppercase bg-slate-600 text-white px-2 py-2 rounded-md",onClick:m=>d(h.id)}," Cancel ",8,ov)])])])):Bn("",!0),h.type==="notification-off"?(Nt(),on("div",iv,[Ie("div",av,[Ie("div",cv,[t[10]||(t[10]=Ie("p",{class:"text-lg mb-4"},[xi(" Would you like to "),Ie("b",null,"turn off"),xi(" this notification? ")],-1)),Ie("button",{class:"block w-full text-center text-md font-bold uppercase bg-rose-600 text-white px-2 py-2 rounded-md mb-2",onClick:m=>{d(h.id),e.turnOffNotifications(h)}}," Turn Off Notification ",8,lv),Ie("button",{class:"block w-full text-center text-md font-bold uppercase bg-slate-600 text-white px-2 py-2 rounded-md",onClick:m=>d(h.id)}," Leave it On ",8,fv)])])])):Bn("",!0)]))),128))]),_:1})])]),_:1})],64)}const dv=g5(Mf,[["render",uv]]);/*! - * vue-router v4.5.0 - * (c) 2024 Eduardo San Martin Morote - * @license MIT - */const no=typeof document<"u";function D2(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function hv(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&D2(e.default)}const yt=Object.assign;function wl(e,t){const n={};for(const r in t){const s=t[r];n[r]=Jn(s)?s.map(e):e(s)}return n}const ci=()=>{},Jn=Array.isArray,j2=/#/g,pv=/&/g,mv=/\//g,gv=/=/g,yv=/\?/g,F2=/\+/g,bv=/%5B/g,vv=/%5D/g,B2=/%5E/g,_v=/%60/g,U2=/%7B/g,xv=/%7C/g,$2=/%7D/g,wv=/%20/g;function Qu(e){return encodeURI(""+e).replace(xv,"|").replace(bv,"[").replace(vv,"]")}function Ev(e){return Qu(e).replace(U2,"{").replace($2,"}").replace(B2,"^")}function Nf(e){return Qu(e).replace(F2,"%2B").replace(wv,"+").replace(j2,"%23").replace(pv,"%26").replace(_v,"`").replace(U2,"{").replace($2,"}").replace(B2,"^")}function Av(e){return Nf(e).replace(gv,"%3D")}function Sv(e){return Qu(e).replace(j2,"%23").replace(yv,"%3F")}function Cv(e){return e==null?"":Sv(e).replace(mv,"%2F")}function Pi(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const Ov=/\/$/,Tv=e=>e.replace(Ov,"");function El(e,t,n="/"){let r,s={},o="",i="";const a=t.indexOf("#");let c=t.indexOf("?");return a=0&&(c=-1),c>-1&&(r=t.slice(0,c),o=t.slice(c+1,a>-1?a:t.length),s=e(o)),a>-1&&(r=r||t.slice(0,a),i=t.slice(a,t.length)),r=Mv(r??t,n),{fullPath:r+(o&&"?")+o+i,path:r,query:s,hash:Pi(i)}}function Pv(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Nh(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Rv(e,t,n){const r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&wo(t.matched[r],n.matched[s])&&z2(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function wo(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function z2(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!kv(e[n],t[n]))return!1;return!0}function kv(e,t){return Jn(e)?Lh(e,t):Jn(t)?Lh(t,e):e===t}function Lh(e,t){return Jn(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function Mv(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),s=r[r.length-1];(s===".."||s===".")&&r.push("");let o=n.length-1,i,a;for(i=0;i1&&o--;else break;return n.slice(0,o).join("/")+"/"+r.slice(i).join("/")}const $r={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Eo;(function(e){e.pop="pop",e.push="push"})(Eo||(Eo={}));var Ns;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Ns||(Ns={}));const Al="";function V2(e){if(!e)if(no){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Tv(e)}const Nv=/^[^#]+#/;function K2(e,t){return e.replace(Nv,"#")+t}function Lv(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const Fc=()=>({left:window.scrollX,top:window.scrollY});function Iv(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;t=Lv(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function Ih(e,t){return(history.state?history.state.position-t:-1)+e}const Lf=new Map;function Dv(e,t){Lf.set(e,t)}function jv(e){const t=Lf.get(e);return Lf.delete(e),t}let Fv=()=>location.protocol+"//"+location.host;function H2(e,t){const{pathname:n,search:r,hash:s}=t,o=e.indexOf("#");if(o>-1){let a=s.includes(e.slice(o))?e.slice(o).length:1,c=s.slice(a);return c[0]!=="/"&&(c="/"+c),Nh(c,"")}return Nh(n,e)+r+s}function Bv(e,t,n,r){let s=[],o=[],i=null;const a=({state:h})=>{const m=H2(e,location),x=n.value,_=t.value;let C=0;if(h){if(n.value=m,t.value=h,i&&i===x){i=null;return}C=_?h.position-_.position:0}else r(m);s.forEach(w=>{w(n.value,x,{delta:C,type:Eo.pop,direction:C?C>0?Ns.forward:Ns.back:Ns.unknown})})};function c(){i=n.value}function f(h){s.push(h);const m=()=>{const x=s.indexOf(h);x>-1&&s.splice(x,1)};return o.push(m),m}function l(){const{history:h}=window;h.state&&h.replaceState(yt({},h.state,{scroll:Fc()}),"")}function d(){for(const h of o)h();o=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",l)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",l,{passive:!0}),{pauseListeners:c,listen:f,destroy:d}}function Dh(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?Fc():null}}function Uv(e){const{history:t,location:n}=window,r={value:H2(e,n)},s={value:t.state};s.value||o(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(c,f,l){const d=e.indexOf("#"),h=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+c:Fv()+e+c;try{t[l?"replaceState":"pushState"](f,"",h),s.value=f}catch(m){console.error(m),n[l?"replace":"assign"](h)}}function i(c,f){const l=yt({},t.state,Dh(s.value.back,c,s.value.forward,!0),f,{position:s.value.position});o(c,l,!0),r.value=c}function a(c,f){const l=yt({},s.value,t.state,{forward:c,scroll:Fc()});o(l.current,l,!0);const d=yt({},Dh(r.value,c,null),{position:l.position+1},f);o(c,d,!1),r.value=c}return{location:r,state:s,push:a,replace:i}}function $v(e){e=V2(e);const t=Uv(e),n=Bv(e,t.state,t.location,t.replace);function r(o,i=!0){i||n.pauseListeners(),history.go(o)}const s=yt({location:"",base:e,go:r,createHref:K2.bind(null,e)},t,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}function zv(e=""){let t=[],n=[Al],r=0;e=V2(e);function s(a){r++,r!==n.length&&n.splice(r),n.push(a)}function o(a,c,{direction:f,delta:l}){const d={direction:f,delta:l,type:Eo.pop};for(const h of t)h(a,c,d)}const i={location:Al,state:{},base:e,createHref:K2.bind(null,e),replace(a){n.splice(r--,1),s(a)},push(a,c){s(a)},listen(a){return t.push(a),()=>{const c=t.indexOf(a);c>-1&&t.splice(c,1)}},destroy(){t=[],n=[Al],r=0},go(a,c=!0){const f=this.location,l=a<0?Ns.back:Ns.forward;r=Math.max(0,Math.min(r+a,n.length-1)),c&&o(this.location,f,{direction:l,delta:a})}};return Object.defineProperty(i,"location",{enumerable:!0,get:()=>n[r]}),i}function Vv(e){return typeof e=="string"||e&&typeof e=="object"}function q2(e){return typeof e=="string"||typeof e=="symbol"}const W2=Symbol("");var jh;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(jh||(jh={}));function Ao(e,t){return yt(new Error,{type:e,[W2]:!0},t)}function br(e,t){return e instanceof Error&&W2 in e&&(t==null||!!(e.type&t))}const Fh="[^/]+?",Kv={sensitive:!1,strict:!1,start:!0,end:!0},Hv=/[.+*?^${}()[\]/\\]/g;function qv(e,t){const n=yt({},Kv,t),r=[];let s=n.start?"^":"";const o=[];for(const f of e){const l=f.length?[]:[90];n.strict&&!f.length&&(s+="/");for(let d=0;dt.length?t.length===1&&t[0]===80?1:-1:0}function Y2(e,t){let n=0;const r=e.score,s=t.score;for(;n0&&t[t.length-1]<0}const Yv={type:0,value:""},Gv=/[a-zA-Z0-9_]/;function Xv(e){if(!e)return[[]];if(e==="/")return[[Yv]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(m){throw new Error(`ERR (${n})/"${f}": ${m}`)}let n=0,r=n;const s=[];let o;function i(){o&&s.push(o),o=[]}let a=0,c,f="",l="";function d(){f&&(n===0?o.push({type:0,value:f}):n===1||n===2||n===3?(o.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${f}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:f,regexp:l,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),f="")}function h(){f+=c}for(;a{i(v)}:ci}function i(d){if(q2(d)){const h=r.get(d);h&&(r.delete(d),n.splice(n.indexOf(h),1),h.children.forEach(i),h.alias.forEach(i))}else{const h=n.indexOf(d);h>-1&&(n.splice(h,1),d.record.name&&r.delete(d.record.name),d.children.forEach(i),d.alias.forEach(i))}}function a(){return n}function c(d){const h=t_(d,n);n.splice(h,0,d),d.record.name&&!zh(d)&&r.set(d.record.name,d)}function f(d,h){let m,x={},_,C;if("name"in d&&d.name){if(m=r.get(d.name),!m)throw Ao(1,{location:d});C=m.record.name,x=yt(Uh(h.params,m.keys.filter(v=>!v.optional).concat(m.parent?m.parent.keys.filter(v=>v.optional):[]).map(v=>v.name)),d.params&&Uh(d.params,m.keys.map(v=>v.name))),_=m.stringify(x)}else if(d.path!=null)_=d.path,m=n.find(v=>v.re.test(_)),m&&(x=m.parse(_),C=m.record.name);else{if(m=h.name?r.get(h.name):n.find(v=>v.re.test(h.path)),!m)throw Ao(1,{location:d,currentLocation:h});C=m.record.name,x=yt({},h.params,d.params),_=m.stringify(x)}const w=[];let g=m;for(;g;)w.unshift(g.record),g=g.parent;return{name:C,path:_,params:x,matched:w,meta:e_(w)}}e.forEach(d=>o(d));function l(){n.length=0,r.clear()}return{addRoute:o,resolve:f,removeRoute:i,clearRoutes:l,getRoutes:a,getRecordMatcher:s}}function Uh(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function $h(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Zv(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Zv(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function zh(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function e_(e){return e.reduce((t,n)=>yt(t,n.meta),{})}function Vh(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function t_(e,t){let n=0,r=t.length;for(;n!==r;){const o=n+r>>1;Y2(e,t[o])<0?r=o:n=o+1}const s=n_(e);return s&&(r=t.lastIndexOf(s,r-1)),r}function n_(e){let t=e;for(;t=t.parent;)if(G2(t)&&Y2(e,t)===0)return t}function G2({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function r_(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;so&&Nf(o)):[r&&Nf(r)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function s_(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=Jn(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}const o_=Symbol(""),Hh=Symbol(""),Zu=Symbol(""),X2=Symbol(""),If=Symbol("");function $o(){let e=[];function t(r){return e.push(r),()=>{const s=e.indexOf(r);s>-1&&e.splice(s,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Xr(e,t,n,r,s,o=i=>i()){const i=r&&(r.enterCallbacks[s]=r.enterCallbacks[s]||[]);return()=>new Promise((a,c)=>{const f=h=>{h===!1?c(Ao(4,{from:n,to:t})):h instanceof Error?c(h):Vv(h)?c(Ao(2,{from:t,to:h})):(i&&r.enterCallbacks[s]===i&&typeof h=="function"&&i.push(h),a())},l=o(()=>e.call(r&&r.instances[s],t,n,f));let d=Promise.resolve(l);e.length<3&&(d=d.then(f)),d.catch(h=>c(h))})}function Sl(e,t,n,r,s=o=>o()){const o=[];for(const i of e)for(const a in i.components){let c=i.components[a];if(!(t!=="beforeRouteEnter"&&!i.instances[a]))if(D2(c)){const l=(c.__vccOpts||c)[t];l&&o.push(Xr(l,n,r,i,a,s))}else{let f=c();o.push(()=>f.then(l=>{if(!l)throw new Error(`Couldn't resolve component "${a}" at "${i.path}"`);const d=hv(l)?l.default:l;i.mods[a]=l,i.components[a]=d;const m=(d.__vccOpts||d)[t];return m&&Xr(m,n,r,i,a,s)()}))}}return o}function qh(e){const t=Yn(Zu),n=Yn(X2),r=Ft(()=>{const c=Or(e.to);return t.resolve(c)}),s=Ft(()=>{const{matched:c}=r.value,{length:f}=c,l=c[f-1],d=n.matched;if(!l||!d.length)return-1;const h=d.findIndex(wo.bind(null,l));if(h>-1)return h;const m=Wh(c[f-2]);return f>1&&Wh(l)===m&&d[d.length-1].path!==m?d.findIndex(wo.bind(null,c[f-2])):h}),o=Ft(()=>s.value>-1&&f_(n.params,r.value.params)),i=Ft(()=>s.value>-1&&s.value===n.matched.length-1&&z2(n.params,r.value.params));function a(c={}){if(l_(c)){const f=t[Or(e.replace)?"replace":"push"](Or(e.to)).catch(ci);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>f),f}return Promise.resolve()}return{route:r,href:Ft(()=>r.value.href),isActive:o,isExactActive:i,navigate:a}}function i_(e){return e.length===1?e[0]:e}const a_=Ir({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:qh,setup(e,{slots:t}){const n=Oo(qh(e)),{options:r}=Yn(Zu),s=Ft(()=>({[Yh(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[Yh(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&i_(t.default(n));return e.custom?o:$i("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},o)}}}),c_=a_;function l_(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function f_(e,t){for(const n in t){const r=t[n],s=e[n];if(typeof r=="string"){if(r!==s)return!1}else if(!Jn(s)||s.length!==r.length||r.some((o,i)=>o!==s[i]))return!1}return!0}function Wh(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Yh=(e,t,n)=>e??t??n,u_=Ir({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=Yn(If),s=Ft(()=>e.route||r.value),o=Yn(Hh,0),i=Ft(()=>{let f=Or(o);const{matched:l}=s.value;let d;for(;(d=l[f])&&!d.components;)f++;return f}),a=Ft(()=>s.value.matched[i.value]);fo(Hh,Ft(()=>i.value+1)),fo(o_,a),fo(If,s);const c=Os();return ts(()=>[c.value,a.value,e.name],([f,l,d],[h,m,x])=>{l&&(l.instances[d]=f,m&&m!==l&&f&&f===h&&(l.leaveGuards.size||(l.leaveGuards=m.leaveGuards),l.updateGuards.size||(l.updateGuards=m.updateGuards))),f&&l&&(!m||!wo(l,m)||!h)&&(l.enterCallbacks[d]||[]).forEach(_=>_(f))},{flush:"post"}),()=>{const f=s.value,l=e.name,d=a.value,h=d&&d.components[l];if(!h)return Gh(n.default,{Component:h,route:f});const m=d.props[l],x=m?m===!0?f.params:typeof m=="function"?m(f):m:null,C=$i(h,yt({},x,t,{onVnodeUnmounted:w=>{w.component.isUnmounted&&(d.instances[l]=null)},ref:c}));return Gh(n.default,{Component:C,route:f})||C}}});function Gh(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const d_=u_;function h_(e){const t=Qv(e.routes,e),n=e.parseQuery||r_,r=e.stringifyQuery||Kh,s=e.history,o=$o(),i=$o(),a=$o(),c=gu($r);let f=$r;no&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const l=wl.bind(null,H=>""+H),d=wl.bind(null,Cv),h=wl.bind(null,Pi);function m(H,ge){let ue,Ee;return q2(H)?(ue=t.getRecordMatcher(H),Ee=ge):Ee=H,t.addRoute(Ee,ue)}function x(H){const ge=t.getRecordMatcher(H);ge&&t.removeRoute(ge)}function _(){return t.getRoutes().map(H=>H.record)}function C(H){return!!t.getRecordMatcher(H)}function w(H,ge){if(ge=yt({},ge||c.value),typeof H=="string"){const R=El(n,H,ge.path),D=t.resolve({path:R.path},ge),J=s.createHref(R.fullPath);return yt(R,D,{params:h(D.params),hash:Pi(R.hash),redirectedFrom:void 0,href:J})}let ue;if(H.path!=null)ue=yt({},H,{path:El(n,H.path,ge.path).path});else{const R=yt({},H.params);for(const D in R)R[D]==null&&delete R[D];ue=yt({},H,{params:d(R)}),ge.params=d(ge.params)}const Ee=t.resolve(ue,ge),rt=H.hash||"";Ee.params=l(h(Ee.params));const pt=Pv(r,yt({},H,{hash:Ev(rt),path:Ee.path})),O=s.createHref(pt);return yt({fullPath:pt,hash:rt,query:r===Kh?s_(H.query):H.query||{}},Ee,{redirectedFrom:void 0,href:O})}function g(H){return typeof H=="string"?El(n,H,c.value.path):yt({},H)}function v(H,ge){if(f!==H)return Ao(8,{from:ge,to:H})}function S(H){return M(H)}function P(H){return S(yt(g(H),{replace:!0}))}function k(H){const ge=H.matched[H.matched.length-1];if(ge&&ge.redirect){const{redirect:ue}=ge;let Ee=typeof ue=="function"?ue(H):ue;return typeof Ee=="string"&&(Ee=Ee.includes("?")||Ee.includes("#")?Ee=g(Ee):{path:Ee},Ee.params={}),yt({query:H.query,hash:H.hash,params:Ee.path!=null?{}:H.params},Ee)}}function M(H,ge){const ue=f=w(H),Ee=c.value,rt=H.state,pt=H.force,O=H.replace===!0,R=k(ue);if(R)return M(yt(g(R),{state:typeof R=="object"?yt({},rt,R.state):rt,force:pt,replace:O}),ge||ue);const D=ue;D.redirectedFrom=ge;let J;return!pt&&Rv(r,Ee,ue)&&(J=Ao(16,{to:D,from:Ee}),Xt(Ee,Ee,!0,!1)),(J?Promise.resolve(J):$(D,Ee)).catch(z=>br(z)?br(z,2)?z:He(z):de(z,D,Ee)).then(z=>{if(z){if(br(z,2))return M(yt({replace:O},g(z.to),{state:typeof z.to=="object"?yt({},rt,z.to.state):rt,force:pt}),ge||D)}else z=K(D,Ee,!0,O,rt);return Z(D,Ee,z),z})}function V(H,ge){const ue=v(H,ge);return ue?Promise.reject(ue):Promise.resolve()}function N(H){const ge=Lt.values().next().value;return ge&&typeof ge.runWithContext=="function"?ge.runWithContext(H):H()}function $(H,ge){let ue;const[Ee,rt,pt]=p_(H,ge);ue=Sl(Ee.reverse(),"beforeRouteLeave",H,ge);for(const R of Ee)R.leaveGuards.forEach(D=>{ue.push(Xr(D,H,ge))});const O=V.bind(null,H,ge);return ue.push(O),_t(ue).then(()=>{ue=[];for(const R of o.list())ue.push(Xr(R,H,ge));return ue.push(O),_t(ue)}).then(()=>{ue=Sl(rt,"beforeRouteUpdate",H,ge);for(const R of rt)R.updateGuards.forEach(D=>{ue.push(Xr(D,H,ge))});return ue.push(O),_t(ue)}).then(()=>{ue=[];for(const R of pt)if(R.beforeEnter)if(Jn(R.beforeEnter))for(const D of R.beforeEnter)ue.push(Xr(D,H,ge));else ue.push(Xr(R.beforeEnter,H,ge));return ue.push(O),_t(ue)}).then(()=>(H.matched.forEach(R=>R.enterCallbacks={}),ue=Sl(pt,"beforeRouteEnter",H,ge,N),ue.push(O),_t(ue))).then(()=>{ue=[];for(const R of i.list())ue.push(Xr(R,H,ge));return ue.push(O),_t(ue)}).catch(R=>br(R,8)?R:Promise.reject(R))}function Z(H,ge,ue){a.list().forEach(Ee=>N(()=>Ee(H,ge,ue)))}function K(H,ge,ue,Ee,rt){const pt=v(H,ge);if(pt)return pt;const O=ge===$r,R=no?history.state:{};ue&&(Ee||O?s.replace(H.fullPath,yt({scroll:O&&R&&R.scroll},rt)):s.push(H.fullPath,rt)),c.value=H,Xt(H,ge,ue,O),He()}let G;function fe(){G||(G=s.listen((H,ge,ue)=>{if(!Ge.listening)return;const Ee=w(H),rt=k(Ee);if(rt){M(yt(rt,{replace:!0,force:!0}),Ee).catch(ci);return}f=Ee;const pt=c.value;no&&Dv(Ih(pt.fullPath,ue.delta),Fc()),$(Ee,pt).catch(O=>br(O,12)?O:br(O,2)?(M(yt(g(O.to),{force:!0}),Ee).then(R=>{br(R,20)&&!ue.delta&&ue.type===Eo.pop&&s.go(-1,!1)}).catch(ci),Promise.reject()):(ue.delta&&s.go(-ue.delta,!1),de(O,Ee,pt))).then(O=>{O=O||K(Ee,pt,!1),O&&(ue.delta&&!br(O,8)?s.go(-ue.delta,!1):ue.type===Eo.pop&&br(O,20)&&s.go(-1,!1)),Z(Ee,pt,O)}).catch(ci)}))}let Me=$o(),ae=$o(),_e;function de(H,ge,ue){He(H);const Ee=ae.list();return Ee.length?Ee.forEach(rt=>rt(H,ge,ue)):console.error(H),Promise.reject(H)}function nt(){return _e&&c.value!==$r?Promise.resolve():new Promise((H,ge)=>{Me.add([H,ge])})}function He(H){return _e||(_e=!H,fe(),Me.list().forEach(([ge,ue])=>H?ue(H):ge()),Me.reset()),H}function Xt(H,ge,ue,Ee){const{scrollBehavior:rt}=e;if(!no||!rt)return Promise.resolve();const pt=!ue&&jv(Ih(H.fullPath,0))||(Ee||!ue)&&history.state&&history.state.scroll||null;return ji().then(()=>rt(H,ge,pt)).then(O=>O&&Iv(O)).catch(O=>de(O,H,ge))}const Ut=H=>s.go(H);let bt;const Lt=new Set,Ge={currentRoute:c,listening:!0,addRoute:m,removeRoute:x,clearRoutes:t.clearRoutes,hasRoute:C,getRoutes:_,resolve:w,options:e,push:S,replace:P,go:Ut,back:()=>Ut(-1),forward:()=>Ut(1),beforeEach:o.add,beforeResolve:i.add,afterEach:a.add,onError:ae.add,isReady:nt,install(H){const ge=this;H.component("RouterLink",c_),H.component("RouterView",d_),H.config.globalProperties.$router=ge,Object.defineProperty(H.config.globalProperties,"$route",{enumerable:!0,get:()=>Or(c)}),no&&!bt&&c.value===$r&&(bt=!0,S(s.location).catch(rt=>{}));const ue={};for(const rt in $r)Object.defineProperty(ue,rt,{get:()=>c.value[rt],enumerable:!0});H.provide(Zu,ge),H.provide(X2,hu(ue)),H.provide(If,c);const Ee=H.unmount;Lt.add(H),H.unmount=function(){Lt.delete(H),Lt.size<1&&(f=$r,G&&G(),G=null,c.value=$r,bt=!1,_e=!1),Ee()}}};function _t(H){return H.reduce((ge,ue)=>ge.then(()=>N(ue)),Promise.resolve())}return Ge}function p_(e,t){const n=[],r=[],s=[],o=Math.max(t.matched.length,e.matched.length);for(let i=0;iwo(f,a))?r.push(a):n.push(a));const c=e.matched[i];c&&(t.matched.find(f=>wo(f,c))||s.push(c))}return[n,r,s]}const m_=async(e,t,n)=>{await(await f5).accounts.count()>0?n():n({name:"start"})},g_=[{path:"/account",name:"account",component:()=>Be(()=>import("./AccountViewView-BvsLGx3g.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]))},{path:"/claim/:id?",name:"claim",component:()=>Be(()=>import("./ClaimView-c0v_AehR.js"),__vite__mapDeps([20,21,22,3,1,2,23,24,25,26,18,15,7,27]))},{path:"/claim-add-raw/:id?",name:"claim-add-raw",component:()=>Be(()=>import("./ClaimAddRawView-MjnUQPZ5.js"),__vite__mapDeps([28,15,1,2,3,7]))},{path:"/claim-cert/:id",name:"claim-cert",component:()=>Be(()=>import("./ClaimCertificateView-WsWhMks_.js"),__vite__mapDeps([29,1,2,3,7]))},{path:"/confirm-contact",name:"confirm-contact",component:()=>Be(()=>import("./ConfirmContactView-CXS4FvMu.js"),__vite__mapDeps([30,7]))},{path:"/confirm-gift/:id?",name:"confirm-gift",component:()=>Be(()=>import("./ConfirmGiftView-BDAczKwI.js"),__vite__mapDeps([31,21,22,3,1,2,23,24,25,15,16,7]))},{path:"/contact-amounts",name:"contact-amounts",component:()=>Be(()=>import("./ContactAmountsView-Bsd4-O6A.js"),__vite__mapDeps([32,15,1,2,3,23,25,7,27]))},{path:"/contact-edit/:did",name:"contact-edit",component:()=>Be(()=>import("./ContactEditView-Dw42tFmc.js"),__vite__mapDeps([33,15,16,24,3,7]))},{path:"/contact-gift",name:"contact-gift",component:()=>Be(()=>import("./ContactGiftingView-CgQUVeDX.js"),__vite__mapDeps([34,26,1,2,3,18,15,8,35,7]))},{path:"/contact-import/:jwt?",name:"contact-import",component:()=>Be(()=>import("./ContactImportView-CH0ouLM8.js"),__vite__mapDeps([36,22,3,1,2,23,24,25,15,8,37,18,7]))},{path:"/contact-qr",name:"contact-qr",component:()=>Be(()=>import("./ContactQRScanShowView-wtOPMc0J.js"),__vite__mapDeps([38,2,15,17,18,1,3,7]))},{path:"/contacts",name:"contacts",component:()=>Be(()=>import("./ContactsView-CiB3UJEn.js"),__vite__mapDeps([39,1,2,3,15,8,26,18,37,40,16,25,7]))},{path:"/did/:did?",name:"did",component:()=>Be(()=>import("./DIDView-DsYtCrHy.js"),__vite__mapDeps([41,21,15,42,16,1,2,3,8,7,18]))},{path:"/discover",name:"discover",component:()=>Be(()=>import("./DiscoverView-DkKWeZ06.js"),__vite__mapDeps([43,5,6,7,15,42,44,45,1,2,3,46,16,47,19]))},{path:"/gifted-details",name:"gifted-details",component:()=>Be(()=>import("./GiftedDetailsView-Biz6UhaP.js"),__vite__mapDeps([48,9,10,1,2,3,11,12,15,16,7]))},{path:"/help",name:"help",component:()=>Be(()=>import("./HelpView-pr-0AKMM.js"),__vite__mapDeps([49,2,15,7]))},{path:"/help-notifications",name:"help-notifications",component:()=>Be(()=>import("./HelpNotificationsView-BOcgCbHz.js"),__vite__mapDeps([50,15,1,2,3,13,14,7]))},{path:"/help-notification-types",name:"help-notification-types",component:()=>Be(()=>import("./HelpNotificationTypesView-76lSXFAL.js"),__vite__mapDeps([51,15,7]))},{path:"/help-onboarding",name:"help-onboarding",component:()=>Be(()=>import("./HelpOnboardingView-CcWgFmX6.js"),__vite__mapDeps([52,15,7]))},{path:"/",name:"home",component:()=>Be(()=>import("./HomeView-BUammUSs.js"),__vite__mapDeps([53,8,26,1,2,3,18,6,7,42,45,46,15,16,17,35,54]))},{path:"/identity-switcher",name:"identity-switcher",component:()=>Be(()=>import("./IdentitySwitcherView-BYk59nuq.js"),__vite__mapDeps([55,15,1,2,3,7]))},{path:"/import-account",name:"import-account",component:()=>Be(()=>import("./ImportAccountView-Ceo5D7dW.js"),__vite__mapDeps([56,1,2,3,7]))},{path:"/import-derive",name:"import-derive",component:()=>Be(()=>import("./ImportDerivedAccountView-CtHBjHll.js"),__vite__mapDeps([57,1,2,3,7]))},{path:"/invite-one",name:"invite-one",component:()=>Be(()=>import("./InviteOneView-BeYvBmK8.js"),__vite__mapDeps([58,2,40,18,15,16,1,3,7]))},{path:"/invite-one-accept/:jwt?",name:"InviteOneAcceptView",component:()=>Be(()=>import("./InviteOneAcceptView-B4mm6cID.js"),__vite__mapDeps([59,15,1,2,3,7]))},{path:"/new-activity",name:"new-activity",component:()=>Be(()=>import("./NewActivityView-DGm2GpQB.js"),__vite__mapDeps([60,26,1,2,3,18,15,8,7]))},{path:"/new-edit-account",name:"new-edit-account",component:()=>Be(()=>import("./NewEditAccountView-B1OhdTIn.js"),__vite__mapDeps([61,7]))},{path:"/new-edit-project",name:"new-edit-project",component:()=>Be(()=>import("./NewEditProjectView-DeSG79Yx.js"),__vite__mapDeps([62,63,6,7,9,10,1,2,3,11,12,15,19]))},{path:"/new-identifier",name:"new-identifier",component:()=>Be(()=>import("./NewIdentifierView-BYGrWVRA.js"),__vite__mapDeps([64,4,1,2,3,15,7]))},{path:"/offer-details/:id?",name:"offer-details",component:()=>Be(()=>import("./OfferDetailsView-DojQCzul.js"),__vite__mapDeps([65,15,16,1,2,3,7]))},{path:"/onboard-meeting-list",name:"onboard-meeting-list",component:()=>Be(()=>import("./OnboardMeetingListView-d6saebIJ.js"),__vite__mapDeps([66,15,16,1,2,3,7]))},{path:"/onboard-meeting-members/:groupId",name:"onboard-meeting-members",component:()=>Be(()=>import("./OnboardMeetingMembersView-BWzSX9QC.js"),__vite__mapDeps([67,15,16,68,1,2,3,17,18,7]))},{path:"/onboard-meeting-setup",name:"onboard-meeting-setup",component:()=>Be(()=>import("./OnboardMeetingSetupView-BbhzMP8b.js"),__vite__mapDeps([69,15,16,68,1,2,3,7]))},{path:"/project/:id?",name:"project",component:()=>Be(()=>import("./ProjectViewView-BqC9uWSO.js"),__vite__mapDeps([70,26,1,2,3,18,37,16,15,8,44,22,23,24,25,35,7]))},{path:"/projects",name:"projects",component:()=>Be(()=>import("./ProjectsView-qIPma1jV.js"),__vite__mapDeps([71,8,42,15,45,1,2,3,46,44,16,17,18,7])),beforeEnter:m_},{path:"/quick-action-bvc",name:"quick-action-bvc",component:()=>Be(()=>import("./QuickActionBvcView-DsgRspIO.js"),__vite__mapDeps([72,15,16,7]))},{path:"/quick-action-bvc-begin",name:"quick-action-bvc-begin",component:()=>Be(()=>import("./QuickActionBvcBeginView-BOihmGgs.js"),__vite__mapDeps([73,63,15,16,1,2,3,7]))},{path:"/quick-action-bvc-end",name:"quick-action-bvc-end",component:()=>Be(()=>import("./QuickActionBvcEndView-D8eLkuZh.js"),__vite__mapDeps([74,63,15,16,1,2,3,7]))},{path:"/recent-offers-to-user",name:"recent-offers-to-user",component:()=>Be(()=>import("./RecentOffersToUserView-DFvU7HF3.js"),__vite__mapDeps([75,26,1,2,3,18,8,42,15,7]))},{path:"/recent-offers-to-user-projects",name:"recent-offers-to-user-projects",component:()=>Be(()=>import("./RecentOffersToUserProjectsView-DXDjfx6v.js"),__vite__mapDeps([76,8,26,1,2,3,18,42,15,7]))},{path:"/scan-contact",name:"scan-contact",component:()=>Be(()=>import("./ContactScanView-C0FSjMaw.js"),__vite__mapDeps([77,7]))},{path:"/search-area",name:"search-area",component:()=>Be(()=>import("./SearchAreaView-lyPWi-VO.js"),__vite__mapDeps([78,6,7,15,19]))},{path:"/seed-backup",name:"seed-backup",component:()=>Be(()=>import("./SeedBackupView-BDz7XsWF.js"),__vite__mapDeps([79,2,15,1,3,7]))},{path:"/share-my-contact-info",name:"share-my-contact-info",component:()=>Be(()=>import("./ShareMyContactInfoView-BFOKyt7V.js"),__vite__mapDeps([80,2,15,16,1,3,7]))},{path:"/shared-photo",name:"shared-photo",component:()=>Be(()=>import("./SharedPhotoView-FMHGExnU.js"),__vite__mapDeps([81,10,1,2,3,11,15,7]))},{path:"/start",name:"start",component:()=>Be(()=>import("./StartView-vHoI6X9y.js"),__vite__mapDeps([82,1,2,3,7]))},{path:"/statistics",name:"statistics",component:()=>Be(()=>import("./StatisticsView-CerH3Xe1.js"),__vite__mapDeps([83,1,2,3,15,7]))},{path:"/test",name:"test",component:()=>Be(()=>import("./TestView-Dd6x8bkM.js"),__vite__mapDeps([84,1,2,3,15,7]))},{path:"/user-profile/:id?",name:"user-profile",component:()=>Be(()=>import("./UserProfileView-B0lMeHcj.js"),__vite__mapDeps([85,6,7,15,16,1,2,3,19]))}],J2=window.location.protocol==="file:",y_=J2?window.location.pathname.split("/dist-electron/www/")[1]||"/":window.location.pathname,b_=J2?zv():$v("/"),ed=h_({history:b_,routes:g_});ed.replace(y_||"/");const v_=(e,t,n)=>{console.error("Caught in top level error handler:",e,t,n),alert("Something is very wrong. Try reloading or restarting the app.")};ed.onError(v_);function Q2(e,t){return function(){return e.apply(t,arguments)}}const{toString:__}=Object.prototype,{getPrototypeOf:td}=Object,Bc=(e=>t=>{const n=__.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Qn=e=>(e=e.toLowerCase(),t=>Bc(t)===e),Uc=e=>t=>typeof t===e,{isArray:Mo}=Array,Ri=Uc("undefined");function x_(e){return e!==null&&!Ri(e)&&e.constructor!==null&&!Ri(e.constructor)&&In(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Z2=Qn("ArrayBuffer");function w_(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Z2(e.buffer),t}const E_=Uc("string"),In=Uc("function"),em=Uc("number"),$c=e=>e!==null&&typeof e=="object",A_=e=>e===!0||e===!1,Ra=e=>{if(Bc(e)!=="object")return!1;const t=td(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},S_=Qn("Date"),C_=Qn("File"),O_=Qn("Blob"),T_=Qn("FileList"),P_=e=>$c(e)&&In(e.pipe),R_=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||In(e.append)&&((t=Bc(e))==="formdata"||t==="object"&&In(e.toString)&&e.toString()==="[object FormData]"))},k_=Qn("URLSearchParams"),[M_,N_,L_,I_]=["ReadableStream","Request","Response","Headers"].map(Qn),D_=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function qi(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),Mo(e))for(r=0,s=e.length;r0;)if(s=n[r],t===s.toLowerCase())return s;return null}const As=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,nm=e=>!Ri(e)&&e!==As;function Df(){const{caseless:e}=nm(this)&&this||{},t={},n=(r,s)=>{const o=e&&tm(t,s)||s;Ra(t[o])&&Ra(r)?t[o]=Df(t[o],r):Ra(r)?t[o]=Df({},r):Mo(r)?t[o]=r.slice():t[o]=r};for(let r=0,s=arguments.length;r(qi(t,(s,o)=>{n&&In(s)?e[o]=Q2(s,n):e[o]=s},{allOwnKeys:r}),e),F_=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),B_=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},U_=(e,t,n,r)=>{let s,o,i;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=n!==!1&&td(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},$_=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},z_=e=>{if(!e)return null;if(Mo(e))return e;let t=e.length;if(!em(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},V_=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&td(Uint8Array)),K_=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},H_=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},q_=Qn("HTMLFormElement"),W_=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Xh=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Y_=Qn("RegExp"),rm=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};qi(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},G_=e=>{rm(e,(t,n)=>{if(In(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(In(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},X_=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return Mo(e)?r(e):r(String(e).split(t)),n},J_=()=>{},Q_=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Z_(e){return!!(e&&In(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const ex=e=>{const t=new Array(10),n=(r,s)=>{if($c(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const o=Mo(r)?[]:{};return qi(r,(i,a)=>{const c=n(i,s+1);!Ri(c)&&(o[a]=c)}),t[s]=void 0,o}}return r};return n(e,0)},tx=Qn("AsyncFunction"),nx=e=>e&&($c(e)||In(e))&&In(e.then)&&In(e.catch),sm=((e,t)=>e?setImmediate:t?((n,r)=>(As.addEventListener("message",({source:s,data:o})=>{s===As&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),As.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",In(As.postMessage)),rx=typeof queueMicrotask<"u"?queueMicrotask.bind(As):typeof process<"u"&&process.nextTick||sm,U={isArray:Mo,isArrayBuffer:Z2,isBuffer:x_,isFormData:R_,isArrayBufferView:w_,isString:E_,isNumber:em,isBoolean:A_,isObject:$c,isPlainObject:Ra,isReadableStream:M_,isRequest:N_,isResponse:L_,isHeaders:I_,isUndefined:Ri,isDate:S_,isFile:C_,isBlob:O_,isRegExp:Y_,isFunction:In,isStream:P_,isURLSearchParams:k_,isTypedArray:V_,isFileList:T_,forEach:qi,merge:Df,extend:j_,trim:D_,stripBOM:F_,inherits:B_,toFlatObject:U_,kindOf:Bc,kindOfTest:Qn,endsWith:$_,toArray:z_,forEachEntry:K_,matchAll:H_,isHTMLForm:q_,hasOwnProperty:Xh,hasOwnProp:Xh,reduceDescriptors:rm,freezeMethods:G_,toObjectSet:X_,toCamelCase:W_,noop:J_,toFiniteNumber:Q_,findKey:tm,global:As,isContextDefined:nm,isSpecCompliantForm:Z_,toJSONObject:ex,isAsyncFn:tx,isThenable:nx,setImmediate:sm,asap:rx};function Qe(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}U.inherits(Qe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:U.toJSONObject(this.config),code:this.code,status:this.status}}});const om=Qe.prototype,im={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{im[e]={value:e}});Object.defineProperties(Qe,im);Object.defineProperty(om,"isAxiosError",{value:!0});Qe.from=(e,t,n,r,s,o)=>{const i=Object.create(om);return U.toFlatObject(e,i,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),Qe.call(i,e.message,t,n,r,s),i.cause=e,i.name=e.name,o&&Object.assign(i,o),i};const sx=null;function jf(e){return U.isPlainObject(e)||U.isArray(e)}function am(e){return U.endsWith(e,"[]")?e.slice(0,-2):e}function Jh(e,t,n){return e?e.concat(t).map(function(s,o){return s=am(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function ox(e){return U.isArray(e)&&!e.some(jf)}const ix=U.toFlatObject(U,{},null,function(t){return/^is[A-Z]/.test(t)});function zc(e,t,n){if(!U.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=U.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(_,C){return!U.isUndefined(C[_])});const r=n.metaTokens,s=n.visitor||l,o=n.dots,i=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&U.isSpecCompliantForm(t);if(!U.isFunction(s))throw new TypeError("visitor must be a function");function f(x){if(x===null)return"";if(U.isDate(x))return x.toISOString();if(!c&&U.isBlob(x))throw new Qe("Blob is not supported. Use a Buffer instead.");return U.isArrayBuffer(x)||U.isTypedArray(x)?c&&typeof Blob=="function"?new Blob([x]):Buffer.from(x):x}function l(x,_,C){let w=x;if(x&&!C&&typeof x=="object"){if(U.endsWith(_,"{}"))_=r?_:_.slice(0,-2),x=JSON.stringify(x);else if(U.isArray(x)&&ox(x)||(U.isFileList(x)||U.endsWith(_,"[]"))&&(w=U.toArray(x)))return _=am(_),w.forEach(function(v,S){!(U.isUndefined(v)||v===null)&&t.append(i===!0?Jh([_],S,o):i===null?_:_+"[]",f(v))}),!1}return jf(x)?!0:(t.append(Jh(C,_,o),f(x)),!1)}const d=[],h=Object.assign(ix,{defaultVisitor:l,convertValue:f,isVisitable:jf});function m(x,_){if(!U.isUndefined(x)){if(d.indexOf(x)!==-1)throw Error("Circular reference detected in "+_.join("."));d.push(x),U.forEach(x,function(w,g){(!(U.isUndefined(w)||w===null)&&s.call(t,w,U.isString(g)?g.trim():g,_,h))===!0&&m(w,_?_.concat(g):[g])}),d.pop()}}if(!U.isObject(e))throw new TypeError("data must be an object");return m(e),t}function Qh(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function nd(e,t){this._pairs=[],e&&zc(e,this,t)}const cm=nd.prototype;cm.append=function(t,n){this._pairs.push([t,n])};cm.toString=function(t){const n=t?function(r){return t.call(this,r,Qh)}:Qh;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function ax(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function lm(e,t,n){if(!t)return e;const r=n&&n.encode||ax;U.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let o;if(s?o=s(t,n):o=U.isURLSearchParams(t)?t.toString():new nd(t,n).toString(r),o){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Zh{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){U.forEach(this.handlers,function(r){r!==null&&t(r)})}}const fm={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},cx=typeof URLSearchParams<"u"?URLSearchParams:nd,lx=typeof FormData<"u"?FormData:null,fx=typeof Blob<"u"?Blob:null,ux={isBrowser:!0,classes:{URLSearchParams:cx,FormData:lx,Blob:fx},protocols:["http","https","file","blob","url","data"]},rd=typeof window<"u"&&typeof document<"u",Ff=typeof navigator=="object"&&navigator||void 0,dx=rd&&(!Ff||["ReactNative","NativeScript","NS"].indexOf(Ff.product)<0),hx=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",px=rd&&window.location.href||"http://localhost",mx=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:rd,hasStandardBrowserEnv:dx,hasStandardBrowserWebWorkerEnv:hx,navigator:Ff,origin:px},Symbol.toStringTag,{value:"Module"})),dn={...mx,...ux};function gx(e,t){return zc(e,new dn.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,o){return dn.isNode&&U.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function yx(e){return U.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function bx(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r=n.length;return i=!i&&U.isArray(s)?s.length:i,c?(U.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!a):((!s[i]||!U.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&U.isArray(s[i])&&(s[i]=bx(s[i])),!a)}if(U.isFormData(e)&&U.isFunction(e.entries)){const n={};return U.forEachEntry(e,(r,s)=>{t(yx(r),s,n,0)}),n}return null}function vx(e,t,n){if(U.isString(e))try{return(t||JSON.parse)(e),U.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Wi={transitional:fm,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=U.isObject(t);if(o&&U.isHTMLForm(t)&&(t=new FormData(t)),U.isFormData(t))return s?JSON.stringify(um(t)):t;if(U.isArrayBuffer(t)||U.isBuffer(t)||U.isStream(t)||U.isFile(t)||U.isBlob(t)||U.isReadableStream(t))return t;if(U.isArrayBufferView(t))return t.buffer;if(U.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return gx(t,this.formSerializer).toString();if((a=U.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return zc(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),vx(t)):t}],transformResponse:[function(t){const n=this.transitional||Wi.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(U.isResponse(t)||U.isReadableStream(t))return t;if(t&&U.isString(t)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(a){if(i)throw a.name==="SyntaxError"?Qe.from(a,Qe.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:dn.classes.FormData,Blob:dn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};U.forEach(["delete","get","head","post","put","patch"],e=>{Wi.headers[e]={}});const _x=U.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),xx=e=>{const t={};let n,r,s;return e&&e.split(` -`).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||t[n]&&_x[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},e0=Symbol("internals");function zo(e){return e&&String(e).trim().toLowerCase()}function ka(e){return e===!1||e==null?e:U.isArray(e)?e.map(ka):String(e)}function wx(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Ex=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Cl(e,t,n,r,s){if(U.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!U.isString(t)){if(U.isString(r))return t.indexOf(r)!==-1;if(U.isRegExp(r))return r.test(t)}}function Ax(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Sx(e,t){const n=U.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}let Mn=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(a,c,f){const l=zo(c);if(!l)throw new Error("header name must be a non-empty string");const d=U.findKey(s,l);(!d||s[d]===void 0||f===!0||f===void 0&&s[d]!==!1)&&(s[d||c]=ka(a))}const i=(a,c)=>U.forEach(a,(f,l)=>o(f,l,c));if(U.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(U.isString(t)&&(t=t.trim())&&!Ex(t))i(xx(t),n);else if(U.isHeaders(t))for(const[a,c]of t.entries())o(c,a,r);else t!=null&&o(n,t,r);return this}get(t,n){if(t=zo(t),t){const r=U.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return wx(s);if(U.isFunction(n))return n.call(this,s,r);if(U.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=zo(t),t){const r=U.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Cl(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=zo(i),i){const a=U.findKey(r,i);a&&(!n||Cl(r,r[a],a,n))&&(delete r[a],s=!0)}}return U.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||Cl(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return U.forEach(this,(s,o)=>{const i=U.findKey(r,o);if(i){n[i]=ka(s),delete n[o];return}const a=t?Ax(o):String(o).trim();a!==o&&delete n[o],n[a]=ka(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return U.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&U.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[e0]=this[e0]={accessors:{}}).accessors,s=this.prototype;function o(i){const a=zo(i);r[a]||(Sx(s,i),r[a]=!0)}return U.isArray(t)?t.forEach(o):o(t),this}};Mn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);U.reduceDescriptors(Mn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});U.freezeMethods(Mn);function Ol(e,t){const n=this||Wi,r=t||n,s=Mn.from(r.headers);let o=r.data;return U.forEach(e,function(a){o=a.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function dm(e){return!!(e&&e.__CANCEL__)}function No(e,t,n){Qe.call(this,e??"canceled",Qe.ERR_CANCELED,t,n),this.name="CanceledError"}U.inherits(No,Qe,{__CANCEL__:!0});function hm(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Qe("Request failed with status code "+n.status,[Qe.ERR_BAD_REQUEST,Qe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Cx(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Ox(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(c){const f=Date.now(),l=r[o];i||(i=f),n[s]=c,r[s]=f;let d=o,h=0;for(;d!==s;)h+=n[d++],d=d%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),f-i{n=l,s=null,o&&(clearTimeout(o),o=null),e.apply(null,f)};return[(...f)=>{const l=Date.now(),d=l-n;d>=r?i(f,l):(s=f,o||(o=setTimeout(()=>{o=null,i(s)},r-d)))},()=>s&&i(s)]}const cc=(e,t,n=3)=>{let r=0;const s=Ox(50,250);return Tx(o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,c=i-r,f=s(c),l=i<=a;r=i;const d={loaded:i,total:a,progress:a?i/a:void 0,bytes:c,rate:f||void 0,estimated:f&&a&&l?(a-i)/f:void 0,event:o,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},t0=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},n0=e=>(...t)=>U.asap(()=>e(...t)),Px=dn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,dn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(dn.origin),dn.navigator&&/(msie|trident)/i.test(dn.navigator.userAgent)):()=>!0,Rx=dn.hasStandardBrowserEnv?{write(e,t,n,r,s,o){const i=[e+"="+encodeURIComponent(t)];U.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),U.isString(r)&&i.push("path="+r),U.isString(s)&&i.push("domain="+s),o===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function kx(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Mx(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function pm(e,t,n){let r=!kx(t);return e&&r||n==!1?Mx(e,t):t}const r0=e=>e instanceof Mn?{...e}:e;function Bs(e,t){t=t||{};const n={};function r(f,l,d,h){return U.isPlainObject(f)&&U.isPlainObject(l)?U.merge.call({caseless:h},f,l):U.isPlainObject(l)?U.merge({},l):U.isArray(l)?l.slice():l}function s(f,l,d,h){if(U.isUndefined(l)){if(!U.isUndefined(f))return r(void 0,f,d,h)}else return r(f,l,d,h)}function o(f,l){if(!U.isUndefined(l))return r(void 0,l)}function i(f,l){if(U.isUndefined(l)){if(!U.isUndefined(f))return r(void 0,f)}else return r(void 0,l)}function a(f,l,d){if(d in t)return r(f,l);if(d in e)return r(void 0,f)}const c={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(f,l,d)=>s(r0(f),r0(l),d,!0)};return U.forEach(Object.keys(Object.assign({},e,t)),function(l){const d=c[l]||s,h=d(e[l],t[l],l);U.isUndefined(h)&&d!==a||(n[l]=h)}),n}const mm=e=>{const t=Bs({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:a}=t;t.headers=i=Mn.from(i),t.url=lm(pm(t.baseURL,t.url),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(U.isFormData(n)){if(dn.hasStandardBrowserEnv||dn.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((c=i.getContentType())!==!1){const[f,...l]=c?c.split(";").map(d=>d.trim()).filter(Boolean):[];i.setContentType([f||"multipart/form-data",...l].join("; "))}}if(dn.hasStandardBrowserEnv&&(r&&U.isFunction(r)&&(r=r(t)),r||r!==!1&&Px(t.url))){const f=s&&o&&Rx.read(o);f&&i.set(s,f)}return t},Nx=typeof XMLHttpRequest<"u",Lx=Nx&&function(e){return new Promise(function(n,r){const s=mm(e);let o=s.data;const i=Mn.from(s.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:f}=s,l,d,h,m,x;function _(){m&&m(),x&&x(),s.cancelToken&&s.cancelToken.unsubscribe(l),s.signal&&s.signal.removeEventListener("abort",l)}let C=new XMLHttpRequest;C.open(s.method.toUpperCase(),s.url,!0),C.timeout=s.timeout;function w(){if(!C)return;const v=Mn.from("getAllResponseHeaders"in C&&C.getAllResponseHeaders()),P={data:!a||a==="text"||a==="json"?C.responseText:C.response,status:C.status,statusText:C.statusText,headers:v,config:e,request:C};hm(function(M){n(M),_()},function(M){r(M),_()},P),C=null}"onloadend"in C?C.onloadend=w:C.onreadystatechange=function(){!C||C.readyState!==4||C.status===0&&!(C.responseURL&&C.responseURL.indexOf("file:")===0)||setTimeout(w)},C.onabort=function(){C&&(r(new Qe("Request aborted",Qe.ECONNABORTED,e,C)),C=null)},C.onerror=function(){r(new Qe("Network Error",Qe.ERR_NETWORK,e,C)),C=null},C.ontimeout=function(){let S=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const P=s.transitional||fm;s.timeoutErrorMessage&&(S=s.timeoutErrorMessage),r(new Qe(S,P.clarifyTimeoutError?Qe.ETIMEDOUT:Qe.ECONNABORTED,e,C)),C=null},o===void 0&&i.setContentType(null),"setRequestHeader"in C&&U.forEach(i.toJSON(),function(S,P){C.setRequestHeader(P,S)}),U.isUndefined(s.withCredentials)||(C.withCredentials=!!s.withCredentials),a&&a!=="json"&&(C.responseType=s.responseType),f&&([h,x]=cc(f,!0),C.addEventListener("progress",h)),c&&C.upload&&([d,m]=cc(c),C.upload.addEventListener("progress",d),C.upload.addEventListener("loadend",m)),(s.cancelToken||s.signal)&&(l=v=>{C&&(r(!v||v.type?new No(null,e,C):v),C.abort(),C=null)},s.cancelToken&&s.cancelToken.subscribe(l),s.signal&&(s.signal.aborted?l():s.signal.addEventListener("abort",l)));const g=Cx(s.url);if(g&&dn.protocols.indexOf(g)===-1){r(new Qe("Unsupported protocol "+g+":",Qe.ERR_BAD_REQUEST,e));return}C.send(o||null)})},Ix=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const o=function(f){if(!s){s=!0,a();const l=f instanceof Error?f:this.reason;r.abort(l instanceof Qe?l:new No(l instanceof Error?l.message:l))}};let i=t&&setTimeout(()=>{i=null,o(new Qe(`timeout ${t} of ms exceeded`,Qe.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(o):f.removeEventListener("abort",o)}),e=null)};e.forEach(f=>f.addEventListener("abort",o));const{signal:c}=r;return c.unsubscribe=()=>U.asap(a),c}},Dx=function*(e,t){let n=e.byteLength;if(n{const s=jx(e,t);let o=0,i,a=c=>{i||(i=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:f,value:l}=await s.next();if(f){a(),c.close();return}let d=l.byteLength;if(n){let h=o+=d;n(h)}c.enqueue(new Uint8Array(l))}catch(f){throw a(f),f}},cancel(c){return a(c),s.return()}},{highWaterMark:2})},Vc=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",gm=Vc&&typeof ReadableStream=="function",Bx=Vc&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),ym=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Ux=gm&&ym(()=>{let e=!1;const t=new Request(dn.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),o0=64*1024,Bf=gm&&ym(()=>U.isReadableStream(new Response("").body)),lc={stream:Bf&&(e=>e.body)};Vc&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!lc[t]&&(lc[t]=U.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Qe(`Response type '${t}' is not supported`,Qe.ERR_NOT_SUPPORT,r)})})})(new Response);const $x=async e=>{if(e==null)return 0;if(U.isBlob(e))return e.size;if(U.isSpecCompliantForm(e))return(await new Request(dn.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(U.isArrayBufferView(e)||U.isArrayBuffer(e))return e.byteLength;if(U.isURLSearchParams(e)&&(e=e+""),U.isString(e))return(await Bx(e)).byteLength},zx=async(e,t)=>{const n=U.toFiniteNumber(e.getContentLength());return n??$x(t)},Vx=Vc&&(async e=>{let{url:t,method:n,data:r,signal:s,cancelToken:o,timeout:i,onDownloadProgress:a,onUploadProgress:c,responseType:f,headers:l,withCredentials:d="same-origin",fetchOptions:h}=mm(e);f=f?(f+"").toLowerCase():"text";let m=Ix([s,o&&o.toAbortSignal()],i),x;const _=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let C;try{if(c&&Ux&&n!=="get"&&n!=="head"&&(C=await zx(l,r))!==0){let P=new Request(t,{method:"POST",body:r,duplex:"half"}),k;if(U.isFormData(r)&&(k=P.headers.get("content-type"))&&l.setContentType(k),P.body){const[M,V]=t0(C,cc(n0(c)));r=s0(P.body,o0,M,V)}}U.isString(d)||(d=d?"include":"omit");const w="credentials"in Request.prototype;x=new Request(t,{...h,signal:m,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:r,duplex:"half",credentials:w?d:void 0});let g=await fetch(x);const v=Bf&&(f==="stream"||f==="response");if(Bf&&(a||v&&_)){const P={};["status","statusText","headers"].forEach(N=>{P[N]=g[N]});const k=U.toFiniteNumber(g.headers.get("content-length")),[M,V]=a&&t0(k,cc(n0(a),!0))||[];g=new Response(s0(g.body,o0,M,()=>{V&&V(),_&&_()}),P)}f=f||"text";let S=await lc[U.findKey(lc,f)||"text"](g,e);return!v&&_&&_(),await new Promise((P,k)=>{hm(P,k,{data:S,headers:Mn.from(g.headers),status:g.status,statusText:g.statusText,config:e,request:x})})}catch(w){throw _&&_(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new Qe("Network Error",Qe.ERR_NETWORK,e,x),{cause:w.cause||w}):Qe.from(w,w&&w.code,e,x)}}),Uf={http:sx,xhr:Lx,fetch:Vx};U.forEach(Uf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const i0=e=>`- ${e}`,Kx=e=>U.isFunction(e)||e===null||e===!1,bm={getAdapter:e=>{e=U.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let o=0;o`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let i=t?o.length>1?`since : -`+o.map(i0).join(` -`):" "+i0(o[0]):"as no adapter specified";throw new Qe("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:Uf};function Tl(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new No(null,e)}function a0(e){return Tl(e),e.headers=Mn.from(e.headers),e.data=Ol.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),bm.getAdapter(e.adapter||Wi.adapter)(e).then(function(r){return Tl(e),r.data=Ol.call(e,e.transformResponse,r),r.headers=Mn.from(r.headers),r},function(r){return dm(r)||(Tl(e),r&&r.response&&(r.response.data=Ol.call(e,e.transformResponse,r.response),r.response.headers=Mn.from(r.response.headers))),Promise.reject(r)})}const vm="1.8.1",Kc={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Kc[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const c0={};Kc.transitional=function(t,n,r){function s(o,i){return"[Axios v"+vm+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,a)=>{if(t===!1)throw new Qe(s(i," has been removed"+(n?" in "+n:"")),Qe.ERR_DEPRECATED);return n&&!c0[i]&&(c0[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,a):!0}};Kc.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Hx(e,t,n){if(typeof e!="object")throw new Qe("options must be an object",Qe.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=t[o];if(i){const a=e[o],c=a===void 0||i(a,o,e);if(c!==!0)throw new Qe("option "+o+" must be "+c,Qe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Qe("Unknown option "+o,Qe.ERR_BAD_OPTION)}}const Ma={assertOptions:Hx,validators:Kc},er=Ma.validators;let Ls=class{constructor(t){this.defaults=t,this.interceptors={request:new Zh,response:new Zh}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` -`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Bs(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&Ma.assertOptions(r,{silentJSONParsing:er.transitional(er.boolean),forcedJSONParsing:er.transitional(er.boolean),clarifyTimeoutError:er.transitional(er.boolean)},!1),s!=null&&(U.isFunction(s)?n.paramsSerializer={serialize:s}:Ma.assertOptions(s,{encode:er.function,serialize:er.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ma.assertOptions(n,{baseUrl:er.spelling("baseURL"),withXsrfToken:er.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&U.merge(o.common,o[n.method]);o&&U.forEach(["delete","get","head","post","put","patch","common"],x=>{delete o[x]}),n.headers=Mn.concat(i,o);const a=[];let c=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(n)===!1||(c=c&&_.synchronous,a.unshift(_.fulfilled,_.rejected))});const f=[];this.interceptors.response.forEach(function(_){f.push(_.fulfilled,_.rejected)});let l,d=0,h;if(!c){const x=[a0.bind(this),void 0];for(x.unshift.apply(x,a),x.push.apply(x,f),h=x.length,l=Promise.resolve(n);d{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(a=>{r.subscribe(a),o=a}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,a){r.reason||(r.reason=new No(o,i,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new _m(function(s){t=s}),cancel:t}}};function Wx(e){return function(n){return e.apply(null,n)}}function Yx(e){return U.isObject(e)&&e.isAxiosError===!0}const $f={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries($f).forEach(([e,t])=>{$f[t]=e});function xm(e){const t=new Ls(e),n=Q2(Ls.prototype.request,t);return U.extend(n,Ls.prototype,t,{allOwnKeys:!0}),U.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return xm(Bs(e,s))},n}const Bt=xm(Wi);Bt.Axios=Ls;Bt.CanceledError=No;Bt.CancelToken=qx;Bt.isCancel=dm;Bt.VERSION=vm;Bt.toFormData=zc;Bt.AxiosError=Qe;Bt.Cancel=Bt.CanceledError;Bt.all=function(t){return Promise.all(t)};Bt.spread=Wx;Bt.isAxiosError=Yx;Bt.mergeConfig=Bs;Bt.AxiosHeaders=Mn;Bt.formToJSON=e=>um(U.isHTMLForm(e)?new FormData(e):e);Bt.getAdapter=bm.getAdapter;Bt.HttpStatusCode=$f;Bt.default=Bt;const{Axios:d9,AxiosError:h9,CanceledError:p9,isCancel:m9,CancelToken:g9,VERSION:y9,all:b9,Cancel:v9,isAxiosError:_9,spread:x9,toFormData:w9,AxiosHeaders:E9,HttpStatusCode:A9,formToJSON:S9,getAdapter:C9,mergeConfig:O9}=Bt;function fc(e){return fc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fc(e)}function Na(e,t){if(!e.vueAxiosInstalled){var n=wm(t)?Jx(t):t;if(Qx(n)){var r=Zx(e);if(r){var s=r<3?Gx:Xx;Object.keys(n).forEach(function(o){s(e,o,n[o])}),e.vueAxiosInstalled=!0}else console.error("[vue-axios] unknown Vue version")}else console.error("[vue-axios] configuration is invalid, expected options are either or { : }")}}function Gx(e,t,n){Object.defineProperty(e.prototype,t,{get:function(){return n}}),e[t]=n}function Xx(e,t,n){e.config.globalProperties[t]=n,e[t]=n}function wm(e){return e&&typeof e.get=="function"&&typeof e.post=="function"}function Jx(e){return{axios:e,$http:e}}function Qx(e){return fc(e)==="object"&&Object.keys(e).every(function(t){return wm(e[t])})}function Zx(e){return e&&e.version&&Number(e.version.split(".")[0])}(typeof exports>"u"?"undefined":fc(exports))=="object"?module.exports=Na:typeof define=="function"&&define.amd?define([],function(){return Na}):window.Vue&&window.axios&&window.Vue.use&&Vue.use(Na,window.axios);function e8(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map(function(s){s(n)}),(r=e.get("*"))&&r.slice().map(function(s){s(t,n)})}}}const uc=e8();let l0=0;const t8=()=>{const e=l0;return l0+=1,e},n8=()=>(e,t)=>{const n={...e,id:t8(),group:e.group||""};return uc.emit("notify",{notification:n,timeout:t}),()=>uc.emit("close",n.id)},Em="context",f0=Ir({__name:"Notification",props:{maxNotifications:{default:10},enter:{default:""},enterFrom:{default:""},enterTo:{default:""},leave:{default:""},leaveFrom:{default:""},leaveTo:{default:""},move:{default:""},moveDelay:{default:""}},emits:["close"],setup(e,{emit:t}){const n=e,r=t,s=Yn(Em),o=Oo({notifications:[],timeouts:{}}),i=Ft(()=>o.notifications.filter(m=>m.group===s.group)),a=Ft(()=>s.position==="bottom"?[...i.value]:[...i.value].reverse()),c=(m,x)=>{o.timeouts[m]=window.setTimeout(()=>{x!==-1&&f(m)},Math.max(x||3e3,0))},f=m=>{o.notifications.splice(o.notifications.findIndex(x=>x.id===m),1),clearTimeout(o.timeouts[m])},l=({notification:m,timeout:x})=>{o.notifications.length!==n.maxNotifications&&(o.notifications.push(m),c(m.id,x))},d=m=>{r("close"),f(m)},h=(m,x,_)=>{x?clearTimeout(o.timeouts[m]):c(m,_)};return Po(()=>{uc.on("notify",l),uc.on("close",f)}),(m,x)=>(Nt(),_i(kp,{"enter-active-class":i.value.length>1?[n.enter,n.moveDelay].join(" "):n.enter,"enter-from-class":n.enterFrom,"enter-to-class":n.enterTo,"leave-active-class":n.leave,"leave-from-class":n.leaveFrom,"leave-to-class":n.leaveTo,"move-class":n.move},{default:Qr(()=>[Su(m.$slots,"default",{notifications:a.value,close:d,hovering:h})]),_:3},8,["enter-active-class","enter-from-class","enter-to-class","leave-active-class","leave-from-class","leave-to-class","move-class"]))}}),u0=Ir({inheritAttrs:!1,__name:"NotificationGroup",props:{group:{default:""},position:{default:"top"}},setup(e){const t=e;return fo(Em,{group:t.group,position:t.position}),(n,r)=>Su(n.$slots,"default",{group:n.group})}});function r8(e){e.config.globalProperties.$notify=n8(),e.component("Notification",f0),e.component("NotificationGroup",u0),e.component("notification",f0),e.component("notificationGroup",u0)}const s8={install:r8};/*! - * Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com - * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) - * Copyright 2024 Fonticons, Inc. - */function o8(e,t,n){return(t=a8(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function re(e){for(var t=1;t{};let sd={},Am={},Sm=null,Cm={mark:h0,measure:h0};try{typeof window<"u"&&(sd=window),typeof document<"u"&&(Am=document),typeof MutationObserver<"u"&&(Sm=MutationObserver),typeof performance<"u"&&(Cm=performance)}catch{}const{userAgent:p0=""}=sd.navigator||{},ls=sd,Tt=Am,m0=Sm,ya=Cm;ls.document;const jr=!!Tt.documentElement&&!!Tt.head&&typeof Tt.addEventListener=="function"&&typeof Tt.createElement=="function",Om=~p0.indexOf("MSIE")||~p0.indexOf("Trident/");var c8=/fa(s|r|l|t|d|dr|dl|dt|b|k|kd|ss|sr|sl|st|sds|sdr|sdl|sdt)?[\-\ ]/,l8=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit)?.*/i,Tm={classic:{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fab:"brands","fa-brands":"brands"},duotone:{fa:"solid",fad:"solid","fa-solid":"solid","fa-duotone":"solid",fadr:"regular","fa-regular":"regular",fadl:"light","fa-light":"light",fadt:"thin","fa-thin":"thin"},sharp:{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"},"sharp-duotone":{fa:"solid",fasds:"solid","fa-solid":"solid",fasdr:"regular","fa-regular":"regular",fasdl:"light","fa-light":"light",fasdt:"thin","fa-thin":"thin"}},f8={GROUP:"duotone-group",PRIMARY:"primary",SECONDARY:"secondary"},Pm=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone"],gn="classic",Hc="duotone",u8="sharp",d8="sharp-duotone",Rm=[gn,Hc,u8,d8],h8={classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},duotone:{900:"fad",400:"fadr",300:"fadl",100:"fadt"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds",400:"fasdr",300:"fasdl",100:"fasdt"}},p8={"Font Awesome 6 Free":{900:"fas",400:"far"},"Font Awesome 6 Pro":{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},"Font Awesome 6 Brands":{400:"fab",normal:"fab"},"Font Awesome 6 Duotone":{900:"fad",400:"fadr",normal:"fadr",300:"fadl",100:"fadt"},"Font Awesome 6 Sharp":{900:"fass",400:"fasr",normal:"fasr",300:"fasl",100:"fast"},"Font Awesome 6 Sharp Duotone":{900:"fasds",400:"fasdr",normal:"fasdr",300:"fasdl",100:"fasdt"}},m8=new Map([["classic",{defaultShortPrefixId:"fas",defaultStyleId:"solid",styleIds:["solid","regular","light","thin","brands"],futureStyleIds:[],defaultFontWeight:900}],["sharp",{defaultShortPrefixId:"fass",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["duotone",{defaultShortPrefixId:"fad",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["sharp-duotone",{defaultShortPrefixId:"fasds",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}]]),g8={classic:{solid:"fas",regular:"far",light:"fal",thin:"fat",brands:"fab"},duotone:{solid:"fad",regular:"fadr",light:"fadl",thin:"fadt"},sharp:{solid:"fass",regular:"fasr",light:"fasl",thin:"fast"},"sharp-duotone":{solid:"fasds",regular:"fasdr",light:"fasdl",thin:"fasdt"}},y8=["fak","fa-kit","fakd","fa-kit-duotone"],g0={kit:{fak:"kit","fa-kit":"kit"},"kit-duotone":{fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"}},b8=["kit"],v8={kit:{"fa-kit":"fak"}},_8=["fak","fakd"],x8={kit:{fak:"fa-kit"}},y0={kit:{kit:"fak"},"kit-duotone":{"kit-duotone":"fakd"}},ba={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},w8=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone"],E8=["fak","fa-kit","fakd","fa-kit-duotone"],A8={"Font Awesome Kit":{400:"fak",normal:"fak"},"Font Awesome Kit Duotone":{400:"fakd",normal:"fakd"}},S8={classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},duotone:{"fa-regular":"fadr","fa-light":"fadl","fa-thin":"fadt"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds","fa-regular":"fasdr","fa-light":"fasdl","fa-thin":"fasdt"}},C8={classic:["fas","far","fal","fat","fad"],duotone:["fadr","fadl","fadt"],sharp:["fass","fasr","fasl","fast"],"sharp-duotone":["fasds","fasdr","fasdl","fasdt"]},zf={classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},duotone:{fadr:"fa-regular",fadl:"fa-light",fadt:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid",fasdr:"fa-regular",fasdl:"fa-light",fasdt:"fa-thin"}},O8=["fa-solid","fa-regular","fa-light","fa-thin","fa-duotone","fa-brands"],Vf=["fa","fas","far","fal","fat","fad","fadr","fadl","fadt","fab","fass","fasr","fasl","fast","fasds","fasdr","fasdl","fasdt",...w8,...O8],T8=["solid","regular","light","thin","duotone","brands"],km=[1,2,3,4,5,6,7,8,9,10],P8=km.concat([11,12,13,14,15,16,17,18,19,20]),R8=[...Object.keys(C8),...T8,"2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","fw","inverse","layers-counter","layers-text","layers","li","pull-left","pull-right","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul",ba.GROUP,ba.SWAP_OPACITY,ba.PRIMARY,ba.SECONDARY].concat(km.map(e=>"".concat(e,"x"))).concat(P8.map(e=>"w-".concat(e))),k8={"Font Awesome 5 Free":{900:"fas",400:"far"},"Font Awesome 5 Pro":{900:"fas",400:"far",normal:"far",300:"fal"},"Font Awesome 5 Brands":{400:"fab",normal:"fab"},"Font Awesome 5 Duotone":{900:"fad"}};const Nr="___FONT_AWESOME___",Kf=16,Mm="fa",Nm="svg-inline--fa",Us="data-fa-i2svg",Hf="data-fa-pseudo-element",M8="data-fa-pseudo-element-pending",od="data-prefix",id="data-icon",b0="fontawesome-i2svg",N8="async",L8=["HTML","HEAD","STYLE","SCRIPT"],Lm=(()=>{try{return!0}catch{return!1}})();function Yi(e){return new Proxy(e,{get(t,n){return n in t?t[n]:t[gn]}})}const Im=re({},Tm);Im[gn]=re(re(re(re({},{"fa-duotone":"duotone"}),Tm[gn]),g0.kit),g0["kit-duotone"]);const I8=Yi(Im),qf=re({},g8);qf[gn]=re(re(re(re({},{duotone:"fad"}),qf[gn]),y0.kit),y0["kit-duotone"]);const v0=Yi(qf),Wf=re({},zf);Wf[gn]=re(re({},Wf[gn]),x8.kit);const ad=Yi(Wf),Yf=re({},S8);Yf[gn]=re(re({},Yf[gn]),v8.kit);Yi(Yf);const D8=c8,Dm="fa-layers-text",j8=l8,F8=re({},h8);Yi(F8);const B8=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],Pl=f8,U8=[...b8,...R8],li=ls.FontAwesomeConfig||{};function $8(e){var t=Tt.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}function z8(e){return e===""?!0:e==="false"?!1:e==="true"?!0:e}Tt&&typeof Tt.querySelector=="function"&&[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]].forEach(t=>{let[n,r]=t;const s=z8($8(n));s!=null&&(li[r]=s)});const jm={styleDefault:"solid",familyDefault:gn,cssPrefix:Mm,replacementClass:Nm,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};li.familyPrefix&&(li.cssPrefix=li.familyPrefix);const So=re(re({},jm),li);So.autoReplaceSvg||(So.observeMutations=!1);const Pe={};Object.keys(jm).forEach(e=>{Object.defineProperty(Pe,e,{enumerable:!0,set:function(t){So[e]=t,fi.forEach(n=>n(Pe))},get:function(){return So[e]}})});Object.defineProperty(Pe,"familyPrefix",{enumerable:!0,set:function(e){So.cssPrefix=e,fi.forEach(t=>t(Pe))},get:function(){return So.cssPrefix}});ls.FontAwesomeConfig=Pe;const fi=[];function V8(e){return fi.push(e),()=>{fi.splice(fi.indexOf(e),1)}}const zr=Kf,ir={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function K8(e){if(!e||!jr)return;const t=Tt.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;const n=Tt.head.childNodes;let r=null;for(let s=n.length-1;s>-1;s--){const o=n[s],i=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(i)>-1&&(r=o)}return Tt.head.insertBefore(t,r),e}const H8="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function ki(){let e=12,t="";for(;e-- >0;)t+=H8[Math.random()*62|0];return t}function Lo(e){const t=[];for(let n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function cd(e){return e.classList?Lo(e.classList):(e.getAttribute("class")||"").split(" ").filter(t=>t)}function Fm(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function q8(e){return Object.keys(e||{}).reduce((t,n)=>t+"".concat(n,'="').concat(Fm(e[n]),'" '),"").trim()}function qc(e){return Object.keys(e||{}).reduce((t,n)=>t+"".concat(n,": ").concat(e[n].trim(),";"),"")}function ld(e){return e.size!==ir.size||e.x!==ir.x||e.y!==ir.y||e.rotate!==ir.rotate||e.flipX||e.flipY}function W8(e){let{transform:t,containerWidth:n,iconWidth:r}=e;const s={transform:"translate(".concat(n/2," 256)")},o="translate(".concat(t.x*32,", ").concat(t.y*32,") "),i="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),a="rotate(".concat(t.rotate," 0 0)"),c={transform:"".concat(o," ").concat(i," ").concat(a)},f={transform:"translate(".concat(r/2*-1," -256)")};return{outer:s,inner:c,path:f}}function Y8(e){let{transform:t,width:n=Kf,height:r=Kf,startCentered:s=!1}=e,o="";return s&&Om?o+="translate(".concat(t.x/zr-n/2,"em, ").concat(t.y/zr-r/2,"em) "):s?o+="translate(calc(-50% + ".concat(t.x/zr,"em), calc(-50% + ").concat(t.y/zr,"em)) "):o+="translate(".concat(t.x/zr,"em, ").concat(t.y/zr,"em) "),o+="scale(".concat(t.size/zr*(t.flipX?-1:1),", ").concat(t.size/zr*(t.flipY?-1:1),") "),o+="rotate(".concat(t.rotate,"deg) "),o}var G8=`:root, :host { - --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Free"; - --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Free"; - --fa-font-light: normal 300 1em/1 "Font Awesome 6 Pro"; - --fa-font-thin: normal 100 1em/1 "Font Awesome 6 Pro"; - --fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone"; - --fa-font-duotone-regular: normal 400 1em/1 "Font Awesome 6 Duotone"; - --fa-font-duotone-light: normal 300 1em/1 "Font Awesome 6 Duotone"; - --fa-font-duotone-thin: normal 100 1em/1 "Font Awesome 6 Duotone"; - --fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands"; - --fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 6 Sharp"; - --fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 6 Sharp"; - --fa-font-sharp-light: normal 300 1em/1 "Font Awesome 6 Sharp"; - --fa-font-sharp-thin: normal 100 1em/1 "Font Awesome 6 Sharp"; - --fa-font-sharp-duotone-solid: normal 900 1em/1 "Font Awesome 6 Sharp Duotone"; - --fa-font-sharp-duotone-regular: normal 400 1em/1 "Font Awesome 6 Sharp Duotone"; - --fa-font-sharp-duotone-light: normal 300 1em/1 "Font Awesome 6 Sharp Duotone"; - --fa-font-sharp-duotone-thin: normal 100 1em/1 "Font Awesome 6 Sharp Duotone"; -} - -svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa { - overflow: visible; - box-sizing: content-box; -} - -.svg-inline--fa { - display: var(--fa-display, inline-block); - height: 1em; - overflow: visible; - vertical-align: -0.125em; -} -.svg-inline--fa.fa-2xs { - vertical-align: 0.1em; -} -.svg-inline--fa.fa-xs { - vertical-align: 0em; -} -.svg-inline--fa.fa-sm { - vertical-align: -0.0714285705em; -} -.svg-inline--fa.fa-lg { - vertical-align: -0.2em; -} -.svg-inline--fa.fa-xl { - vertical-align: -0.25em; -} -.svg-inline--fa.fa-2xl { - vertical-align: -0.3125em; -} -.svg-inline--fa.fa-pull-left { - margin-right: var(--fa-pull-margin, 0.3em); - width: auto; -} -.svg-inline--fa.fa-pull-right { - margin-left: var(--fa-pull-margin, 0.3em); - width: auto; -} -.svg-inline--fa.fa-li { - width: var(--fa-li-width, 2em); - top: 0.25em; -} -.svg-inline--fa.fa-fw { - width: var(--fa-fw-width, 1.25em); -} - -.fa-layers svg.svg-inline--fa { - bottom: 0; - left: 0; - margin: auto; - position: absolute; - right: 0; - top: 0; -} - -.fa-layers-counter, .fa-layers-text { - display: inline-block; - position: absolute; - text-align: center; -} - -.fa-layers { - display: inline-block; - height: 1em; - position: relative; - text-align: center; - vertical-align: -0.125em; - width: 1em; -} -.fa-layers svg.svg-inline--fa { - transform-origin: center center; -} - -.fa-layers-text { - left: 50%; - top: 50%; - transform: translate(-50%, -50%); - transform-origin: center center; -} - -.fa-layers-counter { - background-color: var(--fa-counter-background-color, #ff253a); - border-radius: var(--fa-counter-border-radius, 1em); - box-sizing: border-box; - color: var(--fa-inverse, #fff); - line-height: var(--fa-counter-line-height, 1); - max-width: var(--fa-counter-max-width, 5em); - min-width: var(--fa-counter-min-width, 1.5em); - overflow: hidden; - padding: var(--fa-counter-padding, 0.25em 0.5em); - right: var(--fa-right, 0); - text-overflow: ellipsis; - top: var(--fa-top, 0); - transform: scale(var(--fa-counter-scale, 0.25)); - transform-origin: top right; -} - -.fa-layers-bottom-right { - bottom: var(--fa-bottom, 0); - right: var(--fa-right, 0); - top: auto; - transform: scale(var(--fa-layers-scale, 0.25)); - transform-origin: bottom right; -} - -.fa-layers-bottom-left { - bottom: var(--fa-bottom, 0); - left: var(--fa-left, 0); - right: auto; - top: auto; - transform: scale(var(--fa-layers-scale, 0.25)); - transform-origin: bottom left; -} - -.fa-layers-top-right { - top: var(--fa-top, 0); - right: var(--fa-right, 0); - transform: scale(var(--fa-layers-scale, 0.25)); - transform-origin: top right; -} - -.fa-layers-top-left { - left: var(--fa-left, 0); - right: auto; - top: var(--fa-top, 0); - transform: scale(var(--fa-layers-scale, 0.25)); - transform-origin: top left; -} - -.fa-1x { - font-size: 1em; -} - -.fa-2x { - font-size: 2em; -} - -.fa-3x { - font-size: 3em; -} - -.fa-4x { - font-size: 4em; -} - -.fa-5x { - font-size: 5em; -} - -.fa-6x { - font-size: 6em; -} - -.fa-7x { - font-size: 7em; -} - -.fa-8x { - font-size: 8em; -} - -.fa-9x { - font-size: 9em; -} - -.fa-10x { - font-size: 10em; -} - -.fa-2xs { - font-size: 0.625em; - line-height: 0.1em; - vertical-align: 0.225em; -} - -.fa-xs { - font-size: 0.75em; - line-height: 0.0833333337em; - vertical-align: 0.125em; -} - -.fa-sm { - font-size: 0.875em; - line-height: 0.0714285718em; - vertical-align: 0.0535714295em; -} - -.fa-lg { - font-size: 1.25em; - line-height: 0.05em; - vertical-align: -0.075em; -} - -.fa-xl { - font-size: 1.5em; - line-height: 0.0416666682em; - vertical-align: -0.125em; -} - -.fa-2xl { - font-size: 2em; - line-height: 0.03125em; - vertical-align: -0.1875em; -} - -.fa-fw { - text-align: center; - width: 1.25em; -} - -.fa-ul { - list-style-type: none; - margin-left: var(--fa-li-margin, 2.5em); - padding-left: 0; -} -.fa-ul > li { - position: relative; -} - -.fa-li { - left: calc(-1 * var(--fa-li-width, 2em)); - position: absolute; - text-align: center; - width: var(--fa-li-width, 2em); - line-height: inherit; -} - -.fa-border { - border-color: var(--fa-border-color, #eee); - border-radius: var(--fa-border-radius, 0.1em); - border-style: var(--fa-border-style, solid); - border-width: var(--fa-border-width, 0.08em); - padding: var(--fa-border-padding, 0.2em 0.25em 0.15em); -} - -.fa-pull-left { - float: left; - margin-right: var(--fa-pull-margin, 0.3em); -} - -.fa-pull-right { - float: right; - margin-left: var(--fa-pull-margin, 0.3em); -} - -.fa-beat { - animation-name: fa-beat; - animation-delay: var(--fa-animation-delay, 0s); - animation-direction: var(--fa-animation-direction, normal); - animation-duration: var(--fa-animation-duration, 1s); - animation-iteration-count: var(--fa-animation-iteration-count, infinite); - animation-timing-function: var(--fa-animation-timing, ease-in-out); -} - -.fa-bounce { - animation-name: fa-bounce; - animation-delay: var(--fa-animation-delay, 0s); - animation-direction: var(--fa-animation-direction, normal); - animation-duration: var(--fa-animation-duration, 1s); - animation-iteration-count: var(--fa-animation-iteration-count, infinite); - animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1)); -} - -.fa-fade { - animation-name: fa-fade; - animation-delay: var(--fa-animation-delay, 0s); - animation-direction: var(--fa-animation-direction, normal); - animation-duration: var(--fa-animation-duration, 1s); - animation-iteration-count: var(--fa-animation-iteration-count, infinite); - animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); -} - -.fa-beat-fade { - animation-name: fa-beat-fade; - animation-delay: var(--fa-animation-delay, 0s); - animation-direction: var(--fa-animation-direction, normal); - animation-duration: var(--fa-animation-duration, 1s); - animation-iteration-count: var(--fa-animation-iteration-count, infinite); - animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); -} - -.fa-flip { - animation-name: fa-flip; - animation-delay: var(--fa-animation-delay, 0s); - animation-direction: var(--fa-animation-direction, normal); - animation-duration: var(--fa-animation-duration, 1s); - animation-iteration-count: var(--fa-animation-iteration-count, infinite); - animation-timing-function: var(--fa-animation-timing, ease-in-out); -} - -.fa-shake { - animation-name: fa-shake; - animation-delay: var(--fa-animation-delay, 0s); - animation-direction: var(--fa-animation-direction, normal); - animation-duration: var(--fa-animation-duration, 1s); - animation-iteration-count: var(--fa-animation-iteration-count, infinite); - animation-timing-function: var(--fa-animation-timing, linear); -} - -.fa-spin { - animation-name: fa-spin; - animation-delay: var(--fa-animation-delay, 0s); - animation-direction: var(--fa-animation-direction, normal); - animation-duration: var(--fa-animation-duration, 2s); - animation-iteration-count: var(--fa-animation-iteration-count, infinite); - animation-timing-function: var(--fa-animation-timing, linear); -} - -.fa-spin-reverse { - --fa-animation-direction: reverse; -} - -.fa-pulse, -.fa-spin-pulse { - animation-name: fa-spin; - animation-direction: var(--fa-animation-direction, normal); - animation-duration: var(--fa-animation-duration, 1s); - animation-iteration-count: var(--fa-animation-iteration-count, infinite); - animation-timing-function: var(--fa-animation-timing, steps(8)); -} - -@media (prefers-reduced-motion: reduce) { - .fa-beat, -.fa-bounce, -.fa-fade, -.fa-beat-fade, -.fa-flip, -.fa-pulse, -.fa-shake, -.fa-spin, -.fa-spin-pulse { - animation-delay: -1ms; - animation-duration: 1ms; - animation-iteration-count: 1; - transition-delay: 0s; - transition-duration: 0s; - } -} -@keyframes fa-beat { - 0%, 90% { - transform: scale(1); - } - 45% { - transform: scale(var(--fa-beat-scale, 1.25)); - } -} -@keyframes fa-bounce { - 0% { - transform: scale(1, 1) translateY(0); - } - 10% { - transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); - } - 30% { - transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); - } - 50% { - transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); - } - 57% { - transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); - } - 64% { - transform: scale(1, 1) translateY(0); - } - 100% { - transform: scale(1, 1) translateY(0); - } -} -@keyframes fa-fade { - 50% { - opacity: var(--fa-fade-opacity, 0.4); - } -} -@keyframes fa-beat-fade { - 0%, 100% { - opacity: var(--fa-beat-fade-opacity, 0.4); - transform: scale(1); - } - 50% { - opacity: 1; - transform: scale(var(--fa-beat-fade-scale, 1.125)); - } -} -@keyframes fa-flip { - 50% { - transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); - } -} -@keyframes fa-shake { - 0% { - transform: rotate(-15deg); - } - 4% { - transform: rotate(15deg); - } - 8%, 24% { - transform: rotate(-18deg); - } - 12%, 28% { - transform: rotate(18deg); - } - 16% { - transform: rotate(-22deg); - } - 20% { - transform: rotate(22deg); - } - 32% { - transform: rotate(-12deg); - } - 36% { - transform: rotate(12deg); - } - 40%, 100% { - transform: rotate(0deg); - } -} -@keyframes fa-spin { - 0% { - transform: rotate(0deg); - } - 100% { - transform: rotate(360deg); - } -} -.fa-rotate-90 { - transform: rotate(90deg); -} - -.fa-rotate-180 { - transform: rotate(180deg); -} - -.fa-rotate-270 { - transform: rotate(270deg); -} - -.fa-flip-horizontal { - transform: scale(-1, 1); -} - -.fa-flip-vertical { - transform: scale(1, -1); -} - -.fa-flip-both, -.fa-flip-horizontal.fa-flip-vertical { - transform: scale(-1, -1); -} - -.fa-rotate-by { - transform: rotate(var(--fa-rotate-angle, 0)); -} - -.fa-stack { - display: inline-block; - vertical-align: middle; - height: 2em; - position: relative; - width: 2.5em; -} - -.fa-stack-1x, -.fa-stack-2x { - bottom: 0; - left: 0; - margin: auto; - position: absolute; - right: 0; - top: 0; - z-index: var(--fa-stack-z-index, auto); -} - -.svg-inline--fa.fa-stack-1x { - height: 1em; - width: 1.25em; -} -.svg-inline--fa.fa-stack-2x { - height: 2em; - width: 2.5em; -} - -.fa-inverse { - color: var(--fa-inverse, #fff); -} - -.sr-only, -.fa-sr-only { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - margin: -1px; - overflow: hidden; - clip: rect(0, 0, 0, 0); - white-space: nowrap; - border-width: 0; -} - -.sr-only-focusable:not(:focus), -.fa-sr-only-focusable:not(:focus) { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - margin: -1px; - overflow: hidden; - clip: rect(0, 0, 0, 0); - white-space: nowrap; - border-width: 0; -} - -.svg-inline--fa .fa-primary { - fill: var(--fa-primary-color, currentColor); - opacity: var(--fa-primary-opacity, 1); -} - -.svg-inline--fa .fa-secondary { - fill: var(--fa-secondary-color, currentColor); - opacity: var(--fa-secondary-opacity, 0.4); -} - -.svg-inline--fa.fa-swap-opacity .fa-primary { - opacity: var(--fa-secondary-opacity, 0.4); -} - -.svg-inline--fa.fa-swap-opacity .fa-secondary { - opacity: var(--fa-primary-opacity, 1); -} - -.svg-inline--fa mask .fa-primary, -.svg-inline--fa mask .fa-secondary { - fill: black; -}`;function Bm(){const e=Mm,t=Nm,n=Pe.cssPrefix,r=Pe.replacementClass;let s=G8;if(n!==e||r!==t){const o=new RegExp("\\.".concat(e,"\\-"),"g"),i=new RegExp("\\--".concat(e,"\\-"),"g"),a=new RegExp("\\.".concat(t),"g");s=s.replace(o,".".concat(n,"-")).replace(i,"--".concat(n,"-")).replace(a,".".concat(r))}return s}let _0=!1;function Rl(){Pe.autoAddCss&&!_0&&(K8(Bm()),_0=!0)}var X8={mixout(){return{dom:{css:Bm,insertCss:Rl}}},hooks(){return{beforeDOMElementCreation(){Rl()},beforeI2svg(){Rl()}}}};const Lr=ls||{};Lr[Nr]||(Lr[Nr]={});Lr[Nr].styles||(Lr[Nr].styles={});Lr[Nr].hooks||(Lr[Nr].hooks={});Lr[Nr].shims||(Lr[Nr].shims=[]);var ar=Lr[Nr];const Um=[],$m=function(){Tt.removeEventListener("DOMContentLoaded",$m),dc=1,Um.map(e=>e())};let dc=!1;jr&&(dc=(Tt.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(Tt.readyState),dc||Tt.addEventListener("DOMContentLoaded",$m));function J8(e){jr&&(dc?setTimeout(e,0):Um.push(e))}function Gi(e){const{tag:t,attributes:n={},children:r=[]}=e;return typeof e=="string"?Fm(e):"<".concat(t," ").concat(q8(n),">").concat(r.map(Gi).join(""),"")}function x0(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}var kl=function(t,n,r,s){var o=Object.keys(t),i=o.length,a=n,c,f,l;for(r===void 0?(c=1,l=t[o[0]]):(c=0,l=r);c=55296&&s<=56319&&n=55296&&r<=56319&&n>t+1&&(s=e.charCodeAt(t+1),s>=56320&&s<=57343)?(r-55296)*1024+s-56320+65536:r}function w0(e){return Object.keys(e).reduce((t,n)=>{const r=e[n];return!!r.icon?t[r.iconName]=r.icon:t[n]=r,t},{})}function Xf(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{skipHooks:r=!1}=n,s=w0(t);typeof ar.hooks.addPack=="function"&&!r?ar.hooks.addPack(e,w0(t)):ar.styles[e]=re(re({},ar.styles[e]||{}),s),e==="fas"&&Xf("fa",t)}const{styles:Mi,shims:ew}=ar,zm=Object.keys(ad),tw=zm.reduce((e,t)=>(e[t]=Object.keys(ad[t]),e),{});let fd=null,Vm={},Km={},Hm={},qm={},Wm={};function nw(e){return~U8.indexOf(e)}function rw(e,t){const n=t.split("-"),r=n[0],s=n.slice(1).join("-");return r===e&&s!==""&&!nw(s)?s:null}const Ym=()=>{const e=r=>kl(Mi,(s,o,i)=>(s[i]=kl(o,r,{}),s),{});Vm=e((r,s,o)=>(s[3]&&(r[s[3]]=o),s[2]&&s[2].filter(a=>typeof a=="number").forEach(a=>{r[a.toString(16)]=o}),r)),Km=e((r,s,o)=>(r[o]=o,s[2]&&s[2].filter(a=>typeof a=="string").forEach(a=>{r[a]=o}),r)),Wm=e((r,s,o)=>{const i=s[2];return r[o]=o,i.forEach(a=>{r[a]=o}),r});const t="far"in Mi||Pe.autoFetchSvg,n=kl(ew,(r,s)=>{const o=s[0];let i=s[1];const a=s[2];return i==="far"&&!t&&(i="fas"),typeof o=="string"&&(r.names[o]={prefix:i,iconName:a}),typeof o=="number"&&(r.unicodes[o.toString(16)]={prefix:i,iconName:a}),r},{names:{},unicodes:{}});Hm=n.names,qm=n.unicodes,fd=Wc(Pe.styleDefault,{family:Pe.familyDefault})};V8(e=>{fd=Wc(e.styleDefault,{family:Pe.familyDefault})});Ym();function ud(e,t){return(Vm[e]||{})[t]}function sw(e,t){return(Km[e]||{})[t]}function Ss(e,t){return(Wm[e]||{})[t]}function Gm(e){return Hm[e]||{prefix:null,iconName:null}}function ow(e){const t=qm[e],n=ud("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function fs(){return fd}const Xm=()=>({prefix:null,iconName:null,rest:[]});function iw(e){let t=gn;const n=zm.reduce((r,s)=>(r[s]="".concat(Pe.cssPrefix,"-").concat(s),r),{});return Rm.forEach(r=>{(e.includes(n[r])||e.some(s=>tw[r].includes(s)))&&(t=r)}),t}function Wc(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{family:n=gn}=t,r=I8[n][e];if(n===Hc&&!e)return"fad";const s=v0[n][e]||v0[n][r],o=e in ar.styles?e:null;return s||o||null}function aw(e){let t=[],n=null;return e.forEach(r=>{const s=rw(Pe.cssPrefix,r);s?n=s:r&&t.push(r)}),{iconName:n,rest:t}}function E0(e){return e.sort().filter((t,n,r)=>r.indexOf(t)===n)}function Yc(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{skipLookups:n=!1}=t;let r=null;const s=Vf.concat(E8),o=E0(e.filter(d=>s.includes(d))),i=E0(e.filter(d=>!Vf.includes(d))),a=o.filter(d=>(r=d,!Pm.includes(d))),[c=null]=a,f=iw(o),l=re(re({},aw(i)),{},{prefix:Wc(c,{family:f})});return re(re(re({},l),uw({values:e,family:f,styles:Mi,config:Pe,canonical:l,givenPrefix:r})),cw(n,r,l))}function cw(e,t,n){let{prefix:r,iconName:s}=n;if(e||!r||!s)return{prefix:r,iconName:s};const o=t==="fa"?Gm(s):{},i=Ss(r,s);return s=o.iconName||i||s,r=o.prefix||r,r==="far"&&!Mi.far&&Mi.fas&&!Pe.autoFetchSvg&&(r="fas"),{prefix:r,iconName:s}}const lw=Rm.filter(e=>e!==gn||e!==Hc),fw=Object.keys(zf).filter(e=>e!==gn).map(e=>Object.keys(zf[e])).flat();function uw(e){const{values:t,family:n,canonical:r,givenPrefix:s="",styles:o={},config:i={}}=e,a=n===Hc,c=t.includes("fa-duotone")||t.includes("fad"),f=i.familyDefault==="duotone",l=r.prefix==="fad"||r.prefix==="fa-duotone";if(!a&&(c||f||l)&&(r.prefix="fad"),(t.includes("fa-brands")||t.includes("fab"))&&(r.prefix="fab"),!r.prefix&&lw.includes(n)&&(Object.keys(o).find(h=>fw.includes(h))||i.autoFetchSvg)){const h=m8.get(n).defaultShortPrefixId;r.prefix=h,r.iconName=Ss(r.prefix,r.iconName)||r.iconName}return(r.prefix==="fa"||s==="fa")&&(r.prefix=fs()||"fas"),r}class dw{constructor(){this.definitions={}}add(){for(var t=arguments.length,n=new Array(t),r=0;r{this.definitions[o]=re(re({},this.definitions[o]||{}),s[o]),Xf(o,s[o]);const i=ad[gn][o];i&&Xf(i,s[o]),Ym()})}reset(){this.definitions={}}_pullDefinitions(t,n){const r=n.prefix&&n.iconName&&n.icon?{0:n}:n;return Object.keys(r).map(s=>{const{prefix:o,iconName:i,icon:a}=r[s],c=a[2];t[o]||(t[o]={}),c.length>0&&c.forEach(f=>{typeof f=="string"&&(t[o][f]=a)}),t[o][i]=a}),t}}let A0=[],so={};const go={},hw=Object.keys(go);function pw(e,t){let{mixoutsTo:n}=t;return A0=e,so={},Object.keys(go).forEach(r=>{hw.indexOf(r)===-1&&delete go[r]}),A0.forEach(r=>{const s=r.mixout?r.mixout():{};if(Object.keys(s).forEach(o=>{typeof s[o]=="function"&&(n[o]=s[o]),typeof s[o]=="object"&&Object.keys(s[o]).forEach(i=>{n[o]||(n[o]={}),n[o][i]=s[o][i]})}),r.hooks){const o=r.hooks();Object.keys(o).forEach(i=>{so[i]||(so[i]=[]),so[i].push(o[i])})}r.provides&&r.provides(go)}),n}function Jf(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),s=2;s{t=i.apply(null,[t,...r])}),t}function $s(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{o.apply(null,n)})}function us(){const e=arguments[0],t=Array.prototype.slice.call(arguments,1);return go[e]?go[e].apply(null,t):void 0}function Qf(e){e.prefix==="fa"&&(e.prefix="fas");let{iconName:t}=e;const n=e.prefix||fs();if(t)return t=Ss(n,t)||t,x0(Jm.definitions,n,t)||x0(ar.styles,n,t)}const Jm=new dw,mw=()=>{Pe.autoReplaceSvg=!1,Pe.observeMutations=!1,$s("noAuto")},gw={i2svg:function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return jr?($s("beforeI2svg",e),us("pseudoElements2svg",e),us("i2svg",e)):Promise.reject(new Error("Operation requires a DOM of some kind."))},watch:function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{autoReplaceSvgRoot:t}=e;Pe.autoReplaceSvg===!1&&(Pe.autoReplaceSvg=!0),Pe.observeMutations=!0,J8(()=>{bw({autoReplaceSvgRoot:t}),$s("watch",e)})}},yw={icon:e=>{if(e===null)return null;if(typeof e=="object"&&e.prefix&&e.iconName)return{prefix:e.prefix,iconName:Ss(e.prefix,e.iconName)||e.iconName};if(Array.isArray(e)&&e.length===2){const t=e[1].indexOf("fa-")===0?e[1].slice(3):e[1],n=Wc(e[0]);return{prefix:n,iconName:Ss(n,t)||t}}if(typeof e=="string"&&(e.indexOf("".concat(Pe.cssPrefix,"-"))>-1||e.match(D8))){const t=Yc(e.split(" "),{skipLookups:!0});return{prefix:t.prefix||fs(),iconName:Ss(t.prefix,t.iconName)||t.iconName}}if(typeof e=="string"){const t=fs();return{prefix:t,iconName:Ss(t,e)||e}}}},jn={noAuto:mw,config:Pe,dom:gw,parse:yw,library:Jm,findIconDefinition:Qf,toHtml:Gi},bw=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{autoReplaceSvgRoot:t=Tt}=e;(Object.keys(ar.styles).length>0||Pe.autoFetchSvg)&&jr&&Pe.autoReplaceSvg&&jn.dom.i2svg({node:t})};function Gc(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(n=>Gi(n))}}),Object.defineProperty(e,"node",{get:function(){if(!jr)return;const n=Tt.createElement("div");return n.innerHTML=e.html,n.children}}),e}function vw(e){let{children:t,main:n,mask:r,attributes:s,styles:o,transform:i}=e;if(ld(i)&&n.found&&!r.found){const{width:a,height:c}=n,f={x:a/c/2,y:.5};s.style=qc(re(re({},o),{},{"transform-origin":"".concat(f.x+i.x/16,"em ").concat(f.y+i.y/16,"em")}))}return[{tag:"svg",attributes:s,children:t}]}function _w(e){let{prefix:t,iconName:n,children:r,attributes:s,symbol:o}=e;const i=o===!0?"".concat(t,"-").concat(Pe.cssPrefix,"-").concat(n):o;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:re(re({},s),{},{id:i}),children:r}]}]}function dd(e){const{icons:{main:t,mask:n},prefix:r,iconName:s,transform:o,symbol:i,title:a,maskId:c,titleId:f,extra:l,watchable:d=!1}=e,{width:h,height:m}=n.found?n:t,x=_8.includes(r),_=[Pe.replacementClass,s?"".concat(Pe.cssPrefix,"-").concat(s):""].filter(P=>l.classes.indexOf(P)===-1).filter(P=>P!==""||!!P).concat(l.classes).join(" ");let C={children:[],attributes:re(re({},l.attributes),{},{"data-prefix":r,"data-icon":s,class:_,role:l.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(h," ").concat(m)})};const w=x&&!~l.classes.indexOf("fa-fw")?{width:"".concat(h/m*16*.0625,"em")}:{};d&&(C.attributes[Us]=""),a&&(C.children.push({tag:"title",attributes:{id:C.attributes["aria-labelledby"]||"title-".concat(f||ki())},children:[a]}),delete C.attributes.title);const g=re(re({},C),{},{prefix:r,iconName:s,main:t,mask:n,maskId:c,transform:o,symbol:i,styles:re(re({},w),l.styles)}),{children:v,attributes:S}=n.found&&t.found?us("generateAbstractMask",g)||{children:[],attributes:{}}:us("generateAbstractIcon",g)||{children:[],attributes:{}};return g.children=v,g.attributes=S,i?_w(g):vw(g)}function S0(e){const{content:t,width:n,height:r,transform:s,title:o,extra:i,watchable:a=!1}=e,c=re(re(re({},i.attributes),o?{title:o}:{}),{},{class:i.classes.join(" ")});a&&(c[Us]="");const f=re({},i.styles);ld(s)&&(f.transform=Y8({transform:s,startCentered:!0,width:n,height:r}),f["-webkit-transform"]=f.transform);const l=qc(f);l.length>0&&(c.style=l);const d=[];return d.push({tag:"span",attributes:c,children:[t]}),o&&d.push({tag:"span",attributes:{class:"sr-only"},children:[o]}),d}function xw(e){const{content:t,title:n,extra:r}=e,s=re(re(re({},r.attributes),n?{title:n}:{}),{},{class:r.classes.join(" ")}),o=qc(r.styles);o.length>0&&(s.style=o);const i=[];return i.push({tag:"span",attributes:s,children:[t]}),n&&i.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),i}const{styles:Ml}=ar;function Zf(e){const t=e[0],n=e[1],[r]=e.slice(4);let s=null;return Array.isArray(r)?s={tag:"g",attributes:{class:"".concat(Pe.cssPrefix,"-").concat(Pl.GROUP)},children:[{tag:"path",attributes:{class:"".concat(Pe.cssPrefix,"-").concat(Pl.SECONDARY),fill:"currentColor",d:r[0]}},{tag:"path",attributes:{class:"".concat(Pe.cssPrefix,"-").concat(Pl.PRIMARY),fill:"currentColor",d:r[1]}}]}:s={tag:"path",attributes:{fill:"currentColor",d:r}},{found:!0,width:t,height:n,icon:s}}const ww={found:!1,width:512,height:512};function Ew(e,t){!Lm&&!Pe.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function eu(e,t){let n=t;return t==="fa"&&Pe.styleDefault!==null&&(t=fs()),new Promise((r,s)=>{if(n==="fa"){const o=Gm(e)||{};e=o.iconName||e,t=o.prefix||t}if(e&&t&&Ml[t]&&Ml[t][e]){const o=Ml[t][e];return r(Zf(o))}Ew(e,t),r(re(re({},ww),{},{icon:Pe.showMissingIcons&&e?us("missingIconAbstract")||{}:{}}))})}const C0=()=>{},tu=Pe.measurePerformance&&ya&&ya.mark&&ya.measure?ya:{mark:C0,measure:C0},Yo='FA "6.7.2"',Aw=e=>(tu.mark("".concat(Yo," ").concat(e," begins")),()=>Qm(e)),Qm=e=>{tu.mark("".concat(Yo," ").concat(e," ends")),tu.measure("".concat(Yo," ").concat(e),"".concat(Yo," ").concat(e," begins"),"".concat(Yo," ").concat(e," ends"))};var hd={begin:Aw,end:Qm};const La=()=>{};function O0(e){return typeof(e.getAttribute?e.getAttribute(Us):null)=="string"}function Sw(e){const t=e.getAttribute?e.getAttribute(od):null,n=e.getAttribute?e.getAttribute(id):null;return t&&n}function Cw(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(Pe.replacementClass)}function Ow(){return Pe.autoReplaceSvg===!0?Ia.replace:Ia[Pe.autoReplaceSvg]||Ia.replace}function Tw(e){return Tt.createElementNS("http://www.w3.org/2000/svg",e)}function Pw(e){return Tt.createElement(e)}function Zm(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{ceFn:n=e.tag==="svg"?Tw:Pw}=t;if(typeof e=="string")return Tt.createTextNode(e);const r=n(e.tag);return Object.keys(e.attributes||[]).forEach(function(o){r.setAttribute(o,e.attributes[o])}),(e.children||[]).forEach(function(o){r.appendChild(Zm(o,{ceFn:n}))}),r}function Rw(e){let t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}const Ia={replace:function(e){const t=e[0];if(t.parentNode)if(e[1].forEach(n=>{t.parentNode.insertBefore(Zm(n),t)}),t.getAttribute(Us)===null&&Pe.keepOriginalSource){let n=Tt.createComment(Rw(t));t.parentNode.replaceChild(n,t)}else t.remove()},nest:function(e){const t=e[0],n=e[1];if(~cd(t).indexOf(Pe.replacementClass))return Ia.replace(e);const r=new RegExp("".concat(Pe.cssPrefix,"-.*"));if(delete n[0].attributes.id,n[0].attributes.class){const o=n[0].attributes.class.split(" ").reduce((i,a)=>(a===Pe.replacementClass||a.match(r)?i.toSvg.push(a):i.toNode.push(a),i),{toNode:[],toSvg:[]});n[0].attributes.class=o.toSvg.join(" "),o.toNode.length===0?t.removeAttribute("class"):t.setAttribute("class",o.toNode.join(" "))}const s=n.map(o=>Gi(o)).join(` -`);t.setAttribute(Us,""),t.innerHTML=s}};function T0(e){e()}function eg(e,t){const n=typeof t=="function"?t:La;if(e.length===0)n();else{let r=T0;Pe.mutateApproach===N8&&(r=ls.requestAnimationFrame||T0),r(()=>{const s=Ow(),o=hd.begin("mutate");e.map(s),o(),n()})}}let pd=!1;function tg(){pd=!0}function nu(){pd=!1}let hc=null;function P0(e){if(!m0||!Pe.observeMutations)return;const{treeCallback:t=La,nodeCallback:n=La,pseudoElementsCallback:r=La,observeMutationsRoot:s=Tt}=e;hc=new m0(o=>{if(pd)return;const i=fs();Lo(o).forEach(a=>{if(a.type==="childList"&&a.addedNodes.length>0&&!O0(a.addedNodes[0])&&(Pe.searchPseudoElements&&r(a.target),t(a.target)),a.type==="attributes"&&a.target.parentNode&&Pe.searchPseudoElements&&r(a.target.parentNode),a.type==="attributes"&&O0(a.target)&&~B8.indexOf(a.attributeName))if(a.attributeName==="class"&&Sw(a.target)){const{prefix:c,iconName:f}=Yc(cd(a.target));a.target.setAttribute(od,c||i),f&&a.target.setAttribute(id,f)}else Cw(a.target)&&n(a.target)})}),jr&&hc.observe(s,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}function kw(){hc&&hc.disconnect()}function Mw(e){const t=e.getAttribute("style");let n=[];return t&&(n=t.split(";").reduce((r,s)=>{const o=s.split(":"),i=o[0],a=o.slice(1);return i&&a.length>0&&(r[i]=a.join(":").trim()),r},{})),n}function Nw(e){const t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=e.innerText!==void 0?e.innerText.trim():"";let s=Yc(cd(e));return s.prefix||(s.prefix=fs()),t&&n&&(s.prefix=t,s.iconName=n),s.iconName&&s.prefix||(s.prefix&&r.length>0&&(s.iconName=sw(s.prefix,e.innerText)||ud(s.prefix,Gf(e.innerText))),!s.iconName&&Pe.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(s.iconName=e.firstChild.data)),s}function Lw(e){const t=Lo(e.attributes).reduce((s,o)=>(s.name!=="class"&&s.name!=="style"&&(s[o.name]=o.value),s),{}),n=e.getAttribute("title"),r=e.getAttribute("data-fa-title-id");return Pe.autoA11y&&(n?t["aria-labelledby"]="".concat(Pe.replacementClass,"-title-").concat(r||ki()):(t["aria-hidden"]="true",t.focusable="false")),t}function Iw(){return{iconName:null,title:null,titleId:null,prefix:null,transform:ir,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function R0(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0};const{iconName:n,prefix:r,rest:s}=Nw(e),o=Lw(e),i=Jf("parseNodeAttributes",{},e);let a=t.styleParser?Mw(e):[];return re({iconName:n,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:r,transform:ir,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:s,styles:a,attributes:o}},i)}const{styles:Dw}=ar;function ng(e){const t=Pe.autoReplaceSvg==="nest"?R0(e,{styleParser:!1}):R0(e);return~t.extra.classes.indexOf(Dm)?us("generateLayersText",e,t):us("generateSvgReplacementMutation",e,t)}function jw(){return[...y8,...Vf]}function k0(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!jr)return Promise.resolve();const n=Tt.documentElement.classList,r=l=>n.add("".concat(b0,"-").concat(l)),s=l=>n.remove("".concat(b0,"-").concat(l)),o=Pe.autoFetchSvg?jw():Pm.concat(Object.keys(Dw));o.includes("fa")||o.push("fa");const i=[".".concat(Dm,":not([").concat(Us,"])")].concat(o.map(l=>".".concat(l,":not([").concat(Us,"])"))).join(", ");if(i.length===0)return Promise.resolve();let a=[];try{a=Lo(e.querySelectorAll(i))}catch{}if(a.length>0)r("pending"),s("complete");else return Promise.resolve();const c=hd.begin("onTree"),f=a.reduce((l,d)=>{try{const h=ng(d);h&&l.push(h)}catch(h){Lm||h.name==="MissingIcon"&&console.error(h)}return l},[]);return new Promise((l,d)=>{Promise.all(f).then(h=>{eg(h,()=>{r("active"),r("complete"),s("pending"),typeof t=="function"&&t(),c(),l()})}).catch(h=>{c(),d(h)})})}function Fw(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;ng(e).then(n=>{n&&eg([n],t)})}function Bw(e){return function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=(t||{}).icon?t:Qf(t||{});let{mask:s}=n;return s&&(s=(s||{}).icon?s:Qf(s||{})),e(r,re(re({},n),{},{mask:s}))}}const Uw=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{transform:n=ir,symbol:r=!1,mask:s=null,maskId:o=null,title:i=null,titleId:a=null,classes:c=[],attributes:f={},styles:l={}}=t;if(!e)return;const{prefix:d,iconName:h,icon:m}=e;return Gc(re({type:"icon"},e),()=>($s("beforeDOMElementCreation",{iconDefinition:e,params:t}),Pe.autoA11y&&(i?f["aria-labelledby"]="".concat(Pe.replacementClass,"-title-").concat(a||ki()):(f["aria-hidden"]="true",f.focusable="false")),dd({icons:{main:Zf(m),mask:s?Zf(s.icon):{found:!1,width:null,height:null,icon:{}}},prefix:d,iconName:h,transform:re(re({},ir),n),symbol:r,title:i,maskId:o,titleId:a,extra:{attributes:f,styles:l,classes:c}})))};var $w={mixout(){return{icon:Bw(Uw)}},hooks(){return{mutationObserverCallbacks(e){return e.treeCallback=k0,e.nodeCallback=Fw,e}}},provides(e){e.i2svg=function(t){const{node:n=Tt,callback:r=()=>{}}=t;return k0(n,r)},e.generateSvgReplacementMutation=function(t,n){const{iconName:r,title:s,titleId:o,prefix:i,transform:a,symbol:c,mask:f,maskId:l,extra:d}=n;return new Promise((h,m)=>{Promise.all([eu(r,i),f.iconName?eu(f.iconName,f.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(x=>{let[_,C]=x;h([t,dd({icons:{main:_,mask:C},prefix:i,iconName:r,transform:a,symbol:c,maskId:l,title:s,titleId:o,extra:d,watchable:!0})])}).catch(m)})},e.generateAbstractIcon=function(t){let{children:n,attributes:r,main:s,transform:o,styles:i}=t;const a=qc(i);a.length>0&&(r.style=a);let c;return ld(o)&&(c=us("generateAbstractTransformGrouping",{main:s,transform:o,containerWidth:s.width,iconWidth:s.width})),n.push(c||s.icon),{children:n,attributes:r}}}},zw={mixout(){return{layer(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{classes:n=[]}=t;return Gc({type:"layer"},()=>{$s("beforeDOMElementCreation",{assembler:e,params:t});let r=[];return e(s=>{Array.isArray(s)?s.map(o=>{r=r.concat(o.abstract)}):r=r.concat(s.abstract)}),[{tag:"span",attributes:{class:["".concat(Pe.cssPrefix,"-layers"),...n].join(" ")},children:r}]})}}}},Vw={mixout(){return{counter(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{title:n=null,classes:r=[],attributes:s={},styles:o={}}=t;return Gc({type:"counter",content:e},()=>($s("beforeDOMElementCreation",{content:e,params:t}),xw({content:e.toString(),title:n,extra:{attributes:s,styles:o,classes:["".concat(Pe.cssPrefix,"-layers-counter"),...r]}})))}}}},Kw={mixout(){return{text(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{transform:n=ir,title:r=null,classes:s=[],attributes:o={},styles:i={}}=t;return Gc({type:"text",content:e},()=>($s("beforeDOMElementCreation",{content:e,params:t}),S0({content:e,transform:re(re({},ir),n),title:r,extra:{attributes:o,styles:i,classes:["".concat(Pe.cssPrefix,"-layers-text"),...s]}})))}}},provides(e){e.generateLayersText=function(t,n){const{title:r,transform:s,extra:o}=n;let i=null,a=null;if(Om){const c=parseInt(getComputedStyle(t).fontSize,10),f=t.getBoundingClientRect();i=f.width/c,a=f.height/c}return Pe.autoA11y&&!r&&(o.attributes["aria-hidden"]="true"),Promise.resolve([t,S0({content:t.innerHTML,width:i,height:a,transform:s,title:r,extra:o,watchable:!0})])}}};const Hw=new RegExp('"',"ug"),M0=[1105920,1112319],N0=re(re(re(re({},{FontAwesome:{normal:"fas",400:"fas"}}),p8),k8),A8),ru=Object.keys(N0).reduce((e,t)=>(e[t.toLowerCase()]=N0[t],e),{}),qw=Object.keys(ru).reduce((e,t)=>{const n=ru[t];return e[t]=n[900]||[...Object.entries(n)][0][1],e},{});function Ww(e){const t=e.replace(Hw,""),n=Z8(t,0),r=n>=M0[0]&&n<=M0[1],s=t.length===2?t[0]===t[1]:!1;return{value:Gf(s?t[0]:t),isSecondary:r||s}}function Yw(e,t){const n=e.replace(/^['"]|['"]$/g,"").toLowerCase(),r=parseInt(t),s=isNaN(r)?"normal":r;return(ru[n]||{})[s]||qw[n]}function L0(e,t){const n="".concat(M8).concat(t.replace(":","-"));return new Promise((r,s)=>{if(e.getAttribute(n)!==null)return r();const i=Lo(e.children).filter(h=>h.getAttribute(Hf)===t)[0],a=ls.getComputedStyle(e,t),c=a.getPropertyValue("font-family"),f=c.match(j8),l=a.getPropertyValue("font-weight"),d=a.getPropertyValue("content");if(i&&!f)return e.removeChild(i),r();if(f&&d!=="none"&&d!==""){const h=a.getPropertyValue("content");let m=Yw(c,l);const{value:x,isSecondary:_}=Ww(h),C=f[0].startsWith("FontAwesome");let w=ud(m,x),g=w;if(C){const v=ow(x);v.iconName&&v.prefix&&(w=v.iconName,m=v.prefix)}if(w&&!_&&(!i||i.getAttribute(od)!==m||i.getAttribute(id)!==g)){e.setAttribute(n,g),i&&e.removeChild(i);const v=Iw(),{extra:S}=v;S.attributes[Hf]=t,eu(w,m).then(P=>{const k=dd(re(re({},v),{},{icons:{main:P,mask:Xm()},prefix:m,iconName:g,extra:S,watchable:!0})),M=Tt.createElementNS("http://www.w3.org/2000/svg","svg");t==="::before"?e.insertBefore(M,e.firstChild):e.appendChild(M),M.outerHTML=k.map(V=>Gi(V)).join(` -`),e.removeAttribute(n),r()}).catch(s)}else r()}else r()})}function Gw(e){return Promise.all([L0(e,"::before"),L0(e,"::after")])}function Xw(e){return e.parentNode!==document.head&&!~L8.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(Hf)&&(!e.parentNode||e.parentNode.tagName!=="svg")}function I0(e){if(jr)return new Promise((t,n)=>{const r=Lo(e.querySelectorAll("*")).filter(Xw).map(Gw),s=hd.begin("searchPseudoElements");tg(),Promise.all(r).then(()=>{s(),nu(),t()}).catch(()=>{s(),nu(),n()})})}var Jw={hooks(){return{mutationObserverCallbacks(e){return e.pseudoElementsCallback=I0,e}}},provides(e){e.pseudoElements2svg=function(t){const{node:n=Tt}=t;Pe.searchPseudoElements&&I0(n)}}};let D0=!1;var Qw={mixout(){return{dom:{unwatch(){tg(),D0=!0}}}},hooks(){return{bootstrap(){P0(Jf("mutationObserverCallbacks",{}))},noAuto(){kw()},watch(e){const{observeMutationsRoot:t}=e;D0?nu():P0(Jf("mutationObserverCallbacks",{observeMutationsRoot:t}))}}}};const j0=e=>{let t={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return e.toLowerCase().split(" ").reduce((n,r)=>{const s=r.toLowerCase().split("-"),o=s[0];let i=s.slice(1).join("-");if(o&&i==="h")return n.flipX=!0,n;if(o&&i==="v")return n.flipY=!0,n;if(i=parseFloat(i),isNaN(i))return n;switch(o){case"grow":n.size=n.size+i;break;case"shrink":n.size=n.size-i;break;case"left":n.x=n.x-i;break;case"right":n.x=n.x+i;break;case"up":n.y=n.y-i;break;case"down":n.y=n.y+i;break;case"rotate":n.rotate=n.rotate+i;break}return n},t)};var Zw={mixout(){return{parse:{transform:e=>j0(e)}}},hooks(){return{parseNodeAttributes(e,t){const n=t.getAttribute("data-fa-transform");return n&&(e.transform=j0(n)),e}}},provides(e){e.generateAbstractTransformGrouping=function(t){let{main:n,transform:r,containerWidth:s,iconWidth:o}=t;const i={transform:"translate(".concat(s/2," 256)")},a="translate(".concat(r.x*32,", ").concat(r.y*32,") "),c="scale(".concat(r.size/16*(r.flipX?-1:1),", ").concat(r.size/16*(r.flipY?-1:1),") "),f="rotate(".concat(r.rotate," 0 0)"),l={transform:"".concat(a," ").concat(c," ").concat(f)},d={transform:"translate(".concat(o/2*-1," -256)")},h={outer:i,inner:l,path:d};return{tag:"g",attributes:re({},h.outer),children:[{tag:"g",attributes:re({},h.inner),children:[{tag:n.icon.tag,children:n.icon.children,attributes:re(re({},n.icon.attributes),h.path)}]}]}}}};const Nl={x:0,y:0,width:"100%",height:"100%"};function F0(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}function e7(e){return e.tag==="g"?e.children:[e]}var t7={hooks(){return{parseNodeAttributes(e,t){const n=t.getAttribute("data-fa-mask"),r=n?Yc(n.split(" ").map(s=>s.trim())):Xm();return r.prefix||(r.prefix=fs()),e.mask=r,e.maskId=t.getAttribute("data-fa-mask-id"),e}}},provides(e){e.generateAbstractMask=function(t){let{children:n,attributes:r,main:s,mask:o,maskId:i,transform:a}=t;const{width:c,icon:f}=s,{width:l,icon:d}=o,h=W8({transform:a,containerWidth:l,iconWidth:c}),m={tag:"rect",attributes:re(re({},Nl),{},{fill:"white"})},x=f.children?{children:f.children.map(F0)}:{},_={tag:"g",attributes:re({},h.inner),children:[F0(re({tag:f.tag,attributes:re(re({},f.attributes),h.path)},x))]},C={tag:"g",attributes:re({},h.outer),children:[_]},w="mask-".concat(i||ki()),g="clip-".concat(i||ki()),v={tag:"mask",attributes:re(re({},Nl),{},{id:w,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[m,C]},S={tag:"defs",children:[{tag:"clipPath",attributes:{id:g},children:e7(d)},v]};return n.push(S,{tag:"rect",attributes:re({fill:"currentColor","clip-path":"url(#".concat(g,")"),mask:"url(#".concat(w,")")},Nl)}),{children:n,attributes:r}}}},n7={provides(e){let t=!1;ls.matchMedia&&(t=ls.matchMedia("(prefers-reduced-motion: reduce)").matches),e.missingIconAbstract=function(){const n=[],r={fill:"currentColor"},s={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};n.push({tag:"path",attributes:re(re({},r),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});const o=re(re({},s),{},{attributeName:"opacity"}),i={tag:"circle",attributes:re(re({},r),{},{cx:"256",cy:"364",r:"28"}),children:[]};return t||i.children.push({tag:"animate",attributes:re(re({},s),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:re(re({},o),{},{values:"1;0;1;1;0;1;"})}),n.push(i),n.push({tag:"path",attributes:re(re({},r),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:t?[]:[{tag:"animate",attributes:re(re({},o),{},{values:"1;0;0;0;0;1;"})}]}),t||n.push({tag:"path",attributes:re(re({},r),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:re(re({},o),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:n}}}},r7={hooks(){return{parseNodeAttributes(e,t){const n=t.getAttribute("data-fa-symbol"),r=n===null?!1:n===""?!0:n;return e.symbol=r,e}}}},s7=[X8,$w,zw,Vw,Kw,Jw,Qw,Zw,t7,n7,r7];pw(s7,{mixoutsTo:jn});jn.noAuto;jn.config;const o7=jn.library;jn.dom;const su=jn.parse;jn.findIconDefinition;jn.toHtml;const i7=jn.icon;jn.layer;jn.text;jn.counter;/*! - * Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com - * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) - * Copyright 2024 Fonticons, Inc. - */const a7={prefix:"fas",iconName:"trash-can",icon:[448,512,[61460,"trash-alt"],"f2ed","M135.2 17.7C140.6 6.8 151.7 0 163.8 0L284.2 0c12.1 0 23.2 6.8 28.6 17.7L320 32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l96 0 7.2-14.3zM32 128l384 0 0 320c0 35.3-28.7 64-64 64L96 512c-35.3 0-64-28.7-64-64l0-320zm96 64c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224c0-8.8-7.2-16-16-16z"]},c7={prefix:"fas",iconName:"message",icon:[512,512,["comment-alt"],"f27a","M64 0C28.7 0 0 28.7 0 64L0 352c0 35.3 28.7 64 64 64l96 0 0 80c0 6.1 3.4 11.6 8.8 14.3s11.9 2.1 16.8-1.5L309.3 416 448 416c35.3 0 64-28.7 64-64l0-288c0-35.3-28.7-64-64-64L64 0z"]},l7={prefix:"fas",iconName:"file-lines",icon:[384,512,[128441,128462,61686,"file-alt","file-text"],"f15c","M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM112 256l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z"]},f7={prefix:"fas",iconName:"right-from-bracket",icon:[512,512,["sign-out-alt"],"f2f5","M377.9 105.9L500.7 228.7c7.2 7.2 11.3 17.1 11.3 27.3s-4.1 20.1-11.3 27.3L377.9 406.1c-6.4 6.4-15 9.9-24 9.9c-18.7 0-33.9-15.2-33.9-33.9l0-62.1-128 0c-17.7 0-32-14.3-32-32l0-64c0-17.7 14.3-32 32-32l128 0 0-62.1c0-18.7 15.2-33.9 33.9-33.9c9 0 17.6 3.6 24 9.9zM160 96L96 96c-17.7 0-32 14.3-32 32l0 256c0 17.7 14.3 32 32 32l64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-64 0c-53 0-96-43-96-96L0 128C0 75 43 32 96 32l64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32z"]},u7={prefix:"fas",iconName:"square-caret-down",icon:[448,512,["caret-square-down"],"f150","M384 480c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0zM224 352c-6.7 0-13-2.8-17.6-7.7l-104-112c-6.5-7-8.2-17.2-4.4-25.9s12.5-14.4 22-14.4l208 0c9.5 0 18.2 5.7 22 14.4s2.1 18.9-4.4 25.9l-104 112c-4.5 4.9-10.9 7.7-17.6 7.7z"]},d7={prefix:"fas",iconName:"lightbulb",icon:[384,512,[128161],"f0eb","M272 384c9.6-31.9 29.5-59.1 49.2-86.2c0 0 0 0 0 0c5.2-7.1 10.4-14.2 15.4-21.4c19.8-28.5 31.4-63 31.4-100.3C368 78.8 289.2 0 192 0S16 78.8 16 176c0 37.3 11.6 71.9 31.4 100.3c5 7.2 10.2 14.3 15.4 21.4c0 0 0 0 0 0c19.8 27.1 39.7 54.4 49.2 86.2l160 0zM192 512c44.2 0 80-35.8 80-80l0-16-160 0 0 16c0 44.2 35.8 80 80 80zM112 176c0 8.8-7.2 16-16 16s-16-7.2-16-16c0-61.9 50.1-112 112-112c8.8 0 16 7.2 16 16s-7.2 16-16 16c-44.2 0-80 35.8-80 80z"]},h7={prefix:"fas",iconName:"share-nodes",icon:[448,512,["share-alt"],"f1e0","M352 224c53 0 96-43 96-96s-43-96-96-96s-96 43-96 96c0 4 .2 8 .7 11.9l-94.1 47C145.4 170.2 121.9 160 96 160c-53 0-96 43-96 96s43 96 96 96c25.9 0 49.4-10.2 66.6-26.9l94.1 47c-.5 3.9-.7 7.8-.7 11.9c0 53 43 96 96 96s96-43 96-96s-43-96-96-96c-25.9 0-49.4 10.2-66.6 26.9l-94.1-47c.5-3.9 .7-7.8 .7-11.9s-.2-8-.7-11.9l94.1-47C302.6 213.8 326.1 224 352 224z"]},p7={prefix:"fas",iconName:"users",icon:[640,512,[],"f0c0","M144 0a80 80 0 1 1 0 160A80 80 0 1 1 144 0zM512 0a80 80 0 1 1 0 160A80 80 0 1 1 512 0zM0 298.7C0 239.8 47.8 192 106.7 192l42.7 0c15.9 0 31 3.5 44.6 9.7c-1.3 7.2-1.9 14.7-1.9 22.3c0 38.2 16.8 72.5 43.3 96c-.2 0-.4 0-.7 0L21.3 320C9.6 320 0 310.4 0 298.7zM405.3 320c-.2 0-.4 0-.7 0c26.6-23.5 43.3-57.8 43.3-96c0-7.6-.7-15-1.9-22.3c13.6-6.3 28.7-9.7 44.6-9.7l42.7 0C592.2 192 640 239.8 640 298.7c0 11.8-9.6 21.3-21.3 21.3l-213.3 0zM224 224a96 96 0 1 1 192 0 96 96 0 1 1 -192 0zM128 485.3C128 411.7 187.7 352 261.3 352l117.3 0C452.3 352 512 411.7 512 485.3c0 14.7-11.9 26.7-26.7 26.7l-330.7 0c-14.7 0-26.7-11.9-26.7-26.7z"]},m7={prefix:"fas",iconName:"eye-slash",icon:[640,512,[],"f070","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zM223.1 149.5C248.6 126.2 282.7 112 320 112c79.5 0 144 64.5 144 144c0 24.9-6.3 48.3-17.4 68.7L408 294.5c8.4-19.3 10.6-41.4 4.8-63.3c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3c0 10.2-2.4 19.8-6.6 28.3l-90.3-70.8zM373 389.9c-16.4 6.5-34.3 10.1-53 10.1c-79.5 0-144-64.5-144-144c0-6.9 .5-13.6 1.4-20.2L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5L373 389.9z"]},g7={prefix:"fas",iconName:"hand",icon:[512,512,[129306,9995,"hand-paper"],"f256","M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 208c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-176c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 272c0 1.5 0 3.1 .1 4.6L67.6 283c-16-15.2-41.3-14.6-56.6 1.4s-14.6 41.3 1.4 56.6L124.8 448c43.1 41.1 100.4 64 160 64l19.2 0c97.2 0 176-78.8 176-176l0-208c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 112c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-176c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 176c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-208z"]},y7={prefix:"fas",iconName:"chevron-up",icon:[512,512,[],"f077","M233.4 105.4c12.5-12.5 32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L256 173.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z"]},b7={prefix:"fas",iconName:"user",icon:[448,512,[128100,62144],"f007","M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512l388.6 0c16.4 0 29.7-13.3 29.7-29.7C448 383.8 368.2 304 269.7 304l-91.4 0z"]},v7={prefix:"fas",iconName:"globe",icon:[512,512,[127760],"f0ac","M352 256c0 22.2-1.2 43.6-3.3 64l-185.3 0c-2.2-20.4-3.3-41.8-3.3-64s1.2-43.6 3.3-64l185.3 0c2.2 20.4 3.3 41.8 3.3 64zm28.8-64l123.1 0c5.3 20.5 8.1 41.9 8.1 64s-2.8 43.5-8.1 64l-123.1 0c2.1-20.6 3.2-42 3.2-64s-1.1-43.4-3.2-64zm112.6-32l-116.7 0c-10-63.9-29.8-117.4-55.3-151.6c78.3 20.7 142 77.5 171.9 151.6zm-149.1 0l-176.6 0c6.1-36.4 15.5-68.6 27-94.7c10.5-23.6 22.2-40.7 33.5-51.5C239.4 3.2 248.7 0 256 0s16.6 3.2 27.8 13.8c11.3 10.8 23 27.9 33.5 51.5c11.6 26 20.9 58.2 27 94.7zm-209 0L18.6 160C48.6 85.9 112.2 29.1 190.6 8.4C165.1 42.6 145.3 96.1 135.3 160zM8.1 192l123.1 0c-2.1 20.6-3.2 42-3.2 64s1.1 43.4 3.2 64L8.1 320C2.8 299.5 0 278.1 0 256s2.8-43.5 8.1-64zM194.7 446.6c-11.6-26-20.9-58.2-27-94.6l176.6 0c-6.1 36.4-15.5 68.6-27 94.6c-10.5 23.6-22.2 40.7-33.5 51.5C272.6 508.8 263.3 512 256 512s-16.6-3.2-27.8-13.8c-11.3-10.8-23-27.9-33.5-51.5zM135.3 352c10 63.9 29.8 117.4 55.3 151.6C112.2 482.9 48.6 426.1 18.6 352l116.7 0zm358.1 0c-30 74.1-93.6 130.9-171.9 151.6c25.5-34.2 45.2-87.7 55.3-151.6l116.7 0z"]},_7={prefix:"fas",iconName:"ban",icon:[512,512,[128683,"cancel"],"f05e","M367.2 412.5L99.5 144.8C77.1 176.1 64 214.5 64 256c0 106 86 192 192 192c41.5 0 79.9-13.1 111.2-35.5zm45.3-45.3C434.9 335.9 448 297.5 448 256c0-106-86-192-192-192c-41.5 0-79.9 13.1-111.2 35.5L412.5 367.2zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"]},x7={prefix:"fas",iconName:"folder-open",icon:[576,512,[128194,128449,61717],"f07c","M88.7 223.8L0 375.8 0 96C0 60.7 28.7 32 64 32l117.5 0c17 0 33.3 6.7 45.3 18.7l26.5 26.5c12 12 28.3 18.7 45.3 18.7L416 96c35.3 0 64 28.7 64 64l0 32-336 0c-22.8 0-43.8 12.1-55.3 31.8zm27.6 16.1C122.1 230 132.6 224 144 224l400 0c11.5 0 22 6.1 27.7 16.1s5.7 22.2-.1 32.1l-112 192C453.9 474 443.4 480 432 480L32 480c-11.5 0-22-6.1-27.7-16.1s-5.7-22.2 .1-32.1l112-192z"]},w7={prefix:"fas",iconName:"gift",icon:[512,512,[127873],"f06b","M190.5 68.8L225.3 128l-1.3 0-72 0c-22.1 0-40-17.9-40-40s17.9-40 40-40l2.2 0c14.9 0 28.8 7.9 36.3 20.8zM64 88c0 14.4 3.5 28 9.6 40L32 128c-17.7 0-32 14.3-32 32l0 64c0 17.7 14.3 32 32 32l448 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l-41.6 0c6.1-12 9.6-25.6 9.6-40c0-48.6-39.4-88-88-88l-2.2 0c-31.9 0-61.5 16.9-77.7 44.4L256 85.5l-24.1-41C215.7 16.9 186.1 0 154.2 0L152 0C103.4 0 64 39.4 64 88zm336 0c0 22.1-17.9 40-40 40l-72 0-1.3 0 34.8-59.2C329.1 55.9 342.9 48 357.8 48l2.2 0c22.1 0 40 17.9 40 40zM32 288l0 176c0 26.5 21.5 48 48 48l144 0 0-224L32 288zM288 512l144 0c26.5 0 48-21.5 48-48l0-176-192 0 0 224z"]},E7={prefix:"fas",iconName:"square-caret-up",icon:[448,512,["caret-square-up"],"f151","M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM224 160c6.7 0 13 2.8 17.6 7.7l104 112c6.5 7 8.2 17.2 4.4 25.9s-12.5 14.4-22 14.4l-208 0c-9.5 0-18.2-5.7-22-14.4s-2.1-18.9 4.4-25.9l104-112c4.5-4.9 10.9-7.7 17.6-7.7z"]},A7={prefix:"fas",iconName:"square-plus",icon:[448,512,[61846,"plus-square"],"f0fe","M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM200 344l0-64-64 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l64 0 0-64c0-13.3 10.7-24 24-24s24 10.7 24 24l0 64 64 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-64 0 0 64c0 13.3-10.7 24-24 24s-24-10.7-24-24z"]},S7={prefix:"fas",iconName:"chair",icon:[448,512,[129681],"f6c0","M248 48l0 208 48 0 0-197.3c23.9 13.8 40 39.7 40 69.3l0 128 48 0 0-128C384 57.3 326.7 0 256 0L192 0C121.3 0 64 57.3 64 128l0 128 48 0 0-128c0-29.6 16.1-55.5 40-69.3L152 256l48 0 0-208 48 0zM48 288c-12.1 0-23.2 6.8-28.6 17.7l-16 32c-5 9.9-4.4 21.7 1.4 31.1S20.9 384 32 384l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96 256 0 0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96c11.1 0 21.4-5.7 27.2-15.2s6.4-21.2 1.4-31.1l-16-32C423.2 294.8 412.1 288 400 288L48 288z"]},C7={prefix:"fas",iconName:"circle-check",icon:[512,512,[61533,"check-circle"],"f058","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"]},O7={prefix:"fas",iconName:"burst",icon:[512,512,[],"e4dc","M37.6 4.2C28-2.3 15.2-1.1 7 7s-9.4 21-2.8 30.5l112 163.3L16.6 233.2C6.7 236.4 0 245.6 0 256s6.7 19.6 16.6 22.8l103.1 33.4L66.8 412.8c-4.9 9.3-3.2 20.7 4.3 28.1s18.8 9.2 28.1 4.3l100.6-52.9 33.4 103.1c3.2 9.9 12.4 16.6 22.8 16.6s19.6-6.7 22.8-16.6l33.4-103.1 100.6 52.9c9.3 4.9 20.7 3.2 28.1-4.3s9.2-18.8 4.3-28.1L392.3 312.2l103.1-33.4c9.9-3.2 16.6-12.4 16.6-22.8s-6.7-19.6-16.6-22.8L388.9 198.7l25.7-70.4c3.2-8.8 1-18.6-5.6-25.2s-16.4-8.8-25.2-5.6l-70.4 25.7L278.8 16.6C275.6 6.7 266.4 0 256 0s-19.6 6.7-22.8 16.6l-32.3 99.6L37.6 4.2z"]},T7={prefix:"fas",iconName:"left-right",icon:[512,512,[8596,"arrows-alt-h"],"f337","M504.3 273.6c4.9-4.5 7.7-10.9 7.7-17.6s-2.8-13-7.7-17.6l-112-104c-7-6.5-17.2-8.2-25.9-4.4s-14.4 12.5-14.4 22l0 56-192 0 0-56c0-9.5-5.7-18.2-14.4-22s-18.9-2.1-25.9 4.4l-112 104C2.8 243 0 249.3 0 256s2.8 13 7.7 17.6l112 104c7 6.5 17.2 8.2 25.9 4.4s14.4-12.5 14.4-22l0-56 192 0 0 56c0 9.5 5.7 18.2 14.4 22s18.9 2.1 25.9-4.4l112-104z"]},P7={prefix:"fas",iconName:"square",icon:[448,512,[9632,9723,9724,61590],"f0c8","M0 96C0 60.7 28.7 32 64 32H384c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96z"]},R7={prefix:"fas",iconName:"filter",icon:[512,512,[],"f0b0","M3.9 54.9C10.5 40.9 24.5 32 40 32l432 0c15.5 0 29.5 8.9 36.1 22.9s4.6 30.5-5.2 42.5L320 320.9 320 448c0 12.1-6.8 23.2-17.7 28.6s-23.8 4.3-33.5-3l-64-48c-8.1-6-12.8-15.5-12.8-25.6l0-79.1L9 97.3C-.7 85.4-2.8 68.8 3.9 54.9z"]},k7={prefix:"fas",iconName:"question",icon:[320,512,[10067,10068,61736],"3f","M80 160c0-35.3 28.7-64 64-64l32 0c35.3 0 64 28.7 64 64l0 3.6c0 21.8-11.1 42.1-29.4 53.8l-42.2 27.1c-25.2 16.2-40.4 44.1-40.4 74l0 1.4c0 17.7 14.3 32 32 32s32-14.3 32-32l0-1.4c0-8.2 4.2-15.8 11-20.2l42.2-27.1c36.6-23.6 58.8-64.1 58.8-107.7l0-3.6c0-70.7-57.3-128-128-128l-32 0C73.3 32 16 89.3 16 160c0 17.7 14.3 32 32 32s32-14.3 32-32zm80 320a40 40 0 1 0 0-80 40 40 0 1 0 0 80z"]},M7={prefix:"fas",iconName:"hand-holding-heart",icon:[576,512,[],"f4be","M163.9 136.9c-29.4-29.8-29.4-78.2 0-108s77-29.8 106.4 0l17.7 18 17.7-18c29.4-29.8 77-29.8 106.4 0s29.4 78.2 0 108L310.5 240.1c-6.2 6.3-14.3 9.4-22.5 9.4s-16.3-3.1-22.5-9.4L163.9 136.9zM568.2 336.3c13.1 17.8 9.3 42.8-8.5 55.9L433.1 485.5c-23.4 17.2-51.6 26.5-80.7 26.5L192 512 32 512c-17.7 0-32-14.3-32-32l0-64c0-17.7 14.3-32 32-32l36.8 0 44.9-36c22.7-18.2 50.9-28 80-28l78.3 0 16 0 64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-64 0-16 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l120.6 0 119.7-88.2c17.8-13.1 42.8-9.3 55.9 8.5zM193.6 384c0 0 0 0 0 0l-.9 0c.3 0 .6 0 .9 0z"]},N7={prefix:"fas",iconName:"arrow-up-right-from-square",icon:[512,512,["external-link"],"f08e","M320 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l82.7 0L201.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L448 109.3l0 82.7c0 17.7 14.3 32 32 32s32-14.3 32-32l0-160c0-17.7-14.3-32-32-32L320 0zM80 32C35.8 32 0 67.8 0 112L0 432c0 44.2 35.8 80 80 80l320 0c44.2 0 80-35.8 80-80l0-112c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 112c0 8.8-7.2 16-16 16L80 448c-8.8 0-16-7.2-16-16l0-320c0-8.8 7.2-16 16-16l112 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 32z"]},L7={prefix:"fas",iconName:"file-contract",icon:[384,512,[],"f56c","M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM80 64l64 0c8.8 0 16 7.2 16 16s-7.2 16-16 16L80 96c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64l64 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-64 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zm54.2 253.8c-6.1 20.3-24.8 34.2-46 34.2L80 416c-8.8 0-16-7.2-16-16s7.2-16 16-16l8.2 0c7.1 0 13.3-4.6 15.3-11.4l14.9-49.5c3.4-11.3 13.8-19.1 25.6-19.1s22.2 7.7 25.6 19.1l11.6 38.6c7.4-6.2 16.8-9.7 26.8-9.7c15.9 0 30.4 9 37.5 23.2l4.4 8.8 54.1 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-64 0c-6.1 0-11.6-3.4-14.3-8.8l-8.8-17.7c-1.7-3.4-5.1-5.5-8.8-5.5s-7.2 2.1-8.8 5.5l-8.8 17.7c-2.9 5.9-9.2 9.4-15.7 8.8s-12.1-5.1-13.9-11.3L144 349l-9.8 32.8z"]},I7={prefix:"fas",iconName:"arrow-right",icon:[448,512,[8594],"f061","M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z"]},D7={prefix:"fas",iconName:"person-circle-question",icon:[576,512,[],"e542","M112 48a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm40 304l0 128c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-223.1L59.4 304.5c-9.1 15.1-28.8 20-43.9 10.9s-20-28.8-10.9-43.9l58.3-97c17.4-28.9 48.6-46.6 82.3-46.6l29.7 0c33.7 0 64.9 17.7 82.3 46.6l44.9 74.7c-16.1 17.6-28.6 38.5-36.6 61.5c-1.9-1.8-3.5-3.9-4.9-6.3L232 256.9 232 480c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-128-16 0zM432 224a144 144 0 1 1 0 288 144 144 0 1 1 0-288zm0 240a24 24 0 1 0 0-48 24 24 0 1 0 0 48zM368 321.6l0 6.4c0 8.8 7.2 16 16 16s16-7.2 16-16l0-6.4c0-5.3 4.3-9.6 9.6-9.6l40.5 0c7.7 0 13.9 6.2 13.9 13.9c0 5.2-2.9 9.9-7.4 12.3l-32 16.8c-5.3 2.8-8.6 8.2-8.6 14.2l0 14.8c0 8.8 7.2 16 16 16s16-7.2 16-16l0-5.1 23.5-12.3c15.1-7.9 24.5-23.6 24.5-40.6c0-25.4-20.6-45.9-45.9-45.9l-40.5 0c-23 0-41.6 18.6-41.6 41.6z"]},j7={prefix:"fas",iconName:"bitcoin-sign",icon:[320,512,[],"e0b4","M48 32C48 14.3 62.3 0 80 0s32 14.3 32 32l0 32 32 0 0-32c0-17.7 14.3-32 32-32s32 14.3 32 32l0 32c0 1.5-.1 3.1-.3 4.5C254.1 82.2 288 125.1 288 176c0 24.2-7.7 46.6-20.7 64.9c31.7 19.8 52.7 55 52.7 95.1c0 61.9-50.1 112-112 112l0 32c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-32-32 0 0 32c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-32-6.3 0C18.7 448 0 429.3 0 406.3L0 288l0-22.3L0 224 0 101.6C0 80.8 16.8 64 37.6 64L48 64l0-32zM64 224l112 0c26.5 0 48-21.5 48-48s-21.5-48-48-48L64 128l0 96zm112 64L64 288l0 96 144 0c26.5 0 48-21.5 48-48s-21.5-48-48-48l-32 0z"]},F7={prefix:"fas",iconName:"circle",icon:[512,512,[128308,128309,128992,128993,128994,128995,128996,9679,9898,9899,11044,61708,61915],"f111","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512z"]},B7={prefix:"fas",iconName:"circle-question",icon:[512,512,[62108,"question-circle"],"f059","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM169.8 165.3c7.9-22.3 29.1-37.3 52.8-37.3l58.3 0c34.9 0 63.1 28.3 63.1 63.1c0 22.6-12.1 43.5-31.7 54.8L280 264.4c-.2 13-10.9 23.6-24 23.6c-13.3 0-24-10.7-24-24l0-13.5c0-8.6 4.6-16.5 12.1-20.8l44.3-25.4c4.7-2.7 7.6-7.7 7.6-13.1c0-8.4-6.8-15.1-15.1-15.1l-58.3 0c-3.4 0-6.4 2.1-7.5 5.3l-.4 1.2c-4.4 12.5-18.2 19-30.6 14.6s-19-18.2-14.6-30.6l.4-1.2zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"]},U7={prefix:"fas",iconName:"eye",icon:[576,512,[128065],"f06e","M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64c-7.1 0-13.9-1.2-20.3-3.3c-5.5-1.8-11.9 1.6-11.7 7.4c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3z"]},$7={prefix:"fas",iconName:"pen",icon:[512,512,[128394],"f304","M362.7 19.3L314.3 67.7 444.3 197.7l48.4-48.4c25-25 25-65.5 0-90.5L453.3 19.3c-25-25-65.5-25-90.5 0zm-71 71L58.6 323.5c-10.4 10.4-18 23.3-22.2 37.4L1 481.2C-1.5 489.7 .8 498.8 7 505s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L421.7 220.3 291.7 90.3z"]},z7={prefix:"fas",iconName:"house-chimney",icon:[576,512,[63499,"home-lg"],"e3af","M543.8 287.6c17 0 32-14 32-32.1c1-9-3-17-11-24L512 185l0-121c0-17.7-14.3-32-32-32l-32 0c-17.7 0-32 14.3-32 32l0 36.7L309.5 7c-6-5-14-7-21-7s-15 1-22 8L10 231.5c-7 7-10 15-10 24c0 18 14 32.1 32 32.1l32 0 0 69.7c-.1 .9-.1 1.8-.1 2.8l0 112c0 22.1 17.9 40 40 40l16 0c1.2 0 2.4-.1 3.6-.2c1.5 .1 3 .2 4.5 .2l31.9 0 24 0c22.1 0 40-17.9 40-40l0-24 0-64c0-17.7 14.3-32 32-32l64 0c17.7 0 32 14.3 32 32l0 64 0 24c0 22.1 17.9 40 40 40l24 0 32.5 0c1.4 0 2.8 0 4.2-.1c1.1 .1 2.2 .1 3.3 .1l16 0c22.1 0 40-17.9 40-40l0-16.2c.3-2.6 .5-5.3 .5-8.1l-.7-160.2 32 0z"]},V7={prefix:"fas",iconName:"floppy-disk",icon:[448,512,[128190,128426,"save"],"f0c7","M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-242.7c0-17-6.7-33.3-18.7-45.3L352 50.7C340 38.7 323.7 32 306.7 32L64 32zm0 96c0-17.7 14.3-32 32-32l192 0c17.7 0 32 14.3 32 32l0 64c0 17.7-14.3 32-32 32L96 224c-17.7 0-32-14.3-32-32l0-64zM224 288a64 64 0 1 1 0 128 64 64 0 1 1 0-128z"]},K7={prefix:"fas",iconName:"hand-holding-dollar",icon:[576,512,["hand-holding-usd"],"f4c0","M312 24l0 10.5c6.4 1.2 12.6 2.7 18.2 4.2c12.8 3.4 20.4 16.6 17 29.4s-16.6 20.4-29.4 17c-10.9-2.9-21.1-4.9-30.2-5c-7.3-.1-14.7 1.7-19.4 4.4c-2.1 1.3-3.1 2.4-3.5 3c-.3 .5-.7 1.2-.7 2.8c0 .3 0 .5 0 .6c.2 .2 .9 1.2 3.3 2.6c5.8 3.5 14.4 6.2 27.4 10.1l.9 .3s0 0 0 0c11.1 3.3 25.9 7.8 37.9 15.3c13.7 8.6 26.1 22.9 26.4 44.9c.3 22.5-11.4 38.9-26.7 48.5c-6.7 4.1-13.9 7-21.3 8.8l0 10.6c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-11.4c-9.5-2.3-18.2-5.3-25.6-7.8c-2.1-.7-4.1-1.4-6-2c-12.6-4.2-19.4-17.8-15.2-30.4s17.8-19.4 30.4-15.2c2.6 .9 5 1.7 7.3 2.5c13.6 4.6 23.4 7.9 33.9 8.3c8 .3 15.1-1.6 19.2-4.1c1.9-1.2 2.8-2.2 3.2-2.9c.4-.6 .9-1.8 .8-4.1l0-.2c0-1 0-2.1-4-4.6c-5.7-3.6-14.3-6.4-27.1-10.3l-1.9-.6c-10.8-3.2-25-7.5-36.4-14.4c-13.5-8.1-26.5-22-26.6-44.1c-.1-22.9 12.9-38.6 27.7-47.4c6.4-3.8 13.3-6.4 20.2-8.2L264 24c0-13.3 10.7-24 24-24s24 10.7 24 24zM568.2 336.3c13.1 17.8 9.3 42.8-8.5 55.9L433.1 485.5c-23.4 17.2-51.6 26.5-80.7 26.5L192 512 32 512c-17.7 0-32-14.3-32-32l0-64c0-17.7 14.3-32 32-32l36.8 0 44.9-36c22.7-18.2 50.9-28 80-28l78.3 0 16 0 64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-64 0-16 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l120.6 0 119.7-88.2c17.8-13.1 42.8-9.3 55.9 8.5zM193.6 384c0 0 0 0 0 0l-.9 0c.3 0 .6 0 .9 0z"]},H7={prefix:"fas",iconName:"arrow-left",icon:[448,512,[8592],"f060","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"]},q7={prefix:"fas",iconName:"comment",icon:[512,512,[128489,61669],"f075","M512 240c0 114.9-114.6 208-256 208c-37.1 0-72.3-6.4-104.1-17.9c-11.9 8.7-31.3 20.6-54.3 30.6C73.6 471.1 44.7 480 16 480c-6.5 0-12.3-3.9-14.8-9.9c-2.5-6-1.1-12.8 3.4-17.4c0 0 0 0 0 0s0 0 0 0s0 0 0 0c0 0 0 0 0 0l.3-.3c.3-.3 .7-.7 1.3-1.4c1.1-1.2 2.8-3.1 4.9-5.7c4.1-5 9.6-12.4 15.2-21.6c10-16.6 19.5-38.4 21.4-62.9C17.7 326.8 0 285.1 0 240C0 125.1 114.6 32 256 32s256 93.1 256 208z"]},W7={prefix:"fas",iconName:"circle-info",icon:[512,512,["info-circle"],"f05a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},Y7={prefix:"fas",iconName:"camera",icon:[512,512,[62258,"camera-alt"],"f030","M149.1 64.8L138.7 96 64 96C28.7 96 0 124.7 0 160L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64l-74.7 0L362.9 64.8C356.4 45.2 338.1 32 317.4 32L194.6 32c-20.7 0-39 13.2-45.5 32.8zM256 192a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"]},G7={prefix:"fas",iconName:"arrow-rotate-left",icon:[512,512,[8634,"arrow-left-rotate","arrow-rotate-back","arrow-rotate-backward","undo"],"f0e2","M125.7 160l50.3 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L48 224c-17.7 0-32-14.3-32-32L16 64c0-17.7 14.3-32 32-32s32 14.3 32 32l0 51.2L97.6 97.6c87.5-87.5 229.3-87.5 316.8 0s87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3s-163.8-62.5-226.3 0L125.7 160z"]},X7=G7,J7={prefix:"fas",iconName:"left-long",icon:[512,512,["long-arrow-alt-left"],"f30a","M177.5 414c-8.8 3.8-19 2-26-4.6l-144-136C2.7 268.9 0 262.6 0 256s2.7-12.9 7.5-17.4l144-136c7-6.6 17.2-8.4 26-4.6s14.5 12.5 14.5 22l0 72 288 0c17.7 0 32 14.3 32 32l0 64c0 17.7-14.3 32-32 32l-288 0 0 72c0 9.6-5.7 18.2-14.5 22z"]},Q7=J7,Z7={prefix:"fas",iconName:"minus",icon:[448,512,[8211,8722,10134,"subtract"],"f068","M432 256c0 17.7-14.3 32-32 32L48 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l352 0c17.7 0 32 14.3 32 32z"]},eE={prefix:"fas",iconName:"clock",icon:[512,512,[128339,"clock-four"],"f017","M256 0a256 256 0 1 1 0 512A256 256 0 1 1 256 0zM232 120l0 136c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2 280 120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"]},tE={prefix:"fas",iconName:"caret-down",icon:[320,512,[],"f0d7","M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"]},nE={prefix:"fas",iconName:"coins",icon:[512,512,[],"f51e","M512 80c0 18-14.3 34.6-38.4 48c-29.1 16.1-72.5 27.5-122.3 30.9c-3.7-1.8-7.4-3.5-11.3-5C300.6 137.4 248.2 128 192 128c-8.3 0-16.4 .2-24.5 .6l-1.1-.6C142.3 114.6 128 98 128 80c0-44.2 86-80 192-80S512 35.8 512 80zM160.7 161.1c10.2-.7 20.7-1.1 31.3-1.1c62.2 0 117.4 12.3 152.5 31.4C369.3 204.9 384 221.7 384 240c0 4-.7 7.9-2.1 11.7c-4.6 13.2-17 25.3-35 35.5c0 0 0 0 0 0c-.1 .1-.3 .1-.4 .2c0 0 0 0 0 0s0 0 0 0c-.3 .2-.6 .3-.9 .5c-35 19.4-90.8 32-153.6 32c-59.6 0-112.9-11.3-148.2-29.1c-1.9-.9-3.7-1.9-5.5-2.9C14.3 274.6 0 258 0 240c0-34.8 53.4-64.5 128-75.4c10.5-1.5 21.4-2.7 32.7-3.5zM416 240c0-21.9-10.6-39.9-24.1-53.4c28.3-4.4 54.2-11.4 76.2-20.5c16.3-6.8 31.5-15.2 43.9-25.5l0 35.4c0 19.3-16.5 37.1-43.8 50.9c-14.6 7.4-32.4 13.7-52.4 18.5c.1-1.8 .2-3.5 .2-5.3zm-32 96c0 18-14.3 34.6-38.4 48c-1.8 1-3.6 1.9-5.5 2.9C304.9 404.7 251.6 416 192 416c-62.8 0-118.6-12.6-153.6-32C14.3 370.6 0 354 0 336l0-35.4c12.5 10.3 27.6 18.7 43.9 25.5C83.4 342.6 135.8 352 192 352s108.6-9.4 148.1-25.9c7.8-3.2 15.3-6.9 22.4-10.9c6.1-3.4 11.8-7.2 17.2-11.2c1.5-1.1 2.9-2.3 4.3-3.4l0 3.4 0 5.7 0 26.3zm32 0l0-32 0-25.9c19-4.2 36.5-9.5 52.1-16c16.3-6.8 31.5-15.2 43.9-25.5l0 35.4c0 10.5-5 21-14.9 30.9c-16.3 16.3-45 29.7-81.3 38.4c.1-1.7 .2-3.5 .2-5.3zM192 448c56.2 0 108.6-9.4 148.1-25.9c16.3-6.8 31.5-15.2 43.9-25.5l0 35.4c0 44.2-86 80-192 80S0 476.2 0 432l0-35.4c12.5 10.3 27.6 18.7 43.9 25.5C83.4 438.6 135.8 448 192 448z"]},rE={prefix:"fas",iconName:"ellipsis-vertical",icon:[128,512,["ellipsis-v"],"f142","M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112zm0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112zM120 96A56 56 0 1 0 8 96a56 56 0 1 0 112 0z"]},sE={prefix:"fas",iconName:"right-long",icon:[512,512,["long-arrow-alt-right"],"f30b","M334.5 414c8.8 3.8 19 2 26-4.6l144-136c4.8-4.5 7.5-10.8 7.5-17.4s-2.7-12.9-7.5-17.4l-144-136c-7-6.6-17.2-8.4-26-4.6s-14.5 12.5-14.5 22l0 72L32 192c-17.7 0-32 14.3-32 32l0 64c0 17.7 14.3 32 32 32l288 0 0 72c0 9.6 5.7 18.2 14.5 22z"]},oE=sE,iE={prefix:"fas",iconName:"forward",icon:[512,512,[9193],"f04e","M52.5 440.6c-9.5 7.9-22.8 9.7-34.1 4.4S0 428.4 0 416L0 96C0 83.6 7.2 72.3 18.4 67s24.5-3.6 34.1 4.4L224 214.3l0 41.7 0 41.7L52.5 440.6zM256 352l0-96 0-128 0-32c0-12.4 7.2-23.7 18.4-29s24.5-3.6 34.1 4.4l192 160c7.3 6.1 11.5 15.1 11.5 24.6s-4.2 18.5-11.5 24.6l-192 160c-9.5 7.9-22.8 9.7-34.1 4.4s-18.4-16.6-18.4-29l0-64z"]},aE={prefix:"fas",iconName:"ellipsis",icon:[448,512,["ellipsis-h"],"f141","M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z"]},cE={prefix:"fas",iconName:"location-dot",icon:[384,512,["map-marker-alt"],"f3c5","M215.7 499.2C267 435 384 279.4 384 192C384 86 298 0 192 0S0 86 0 192c0 87.4 117 243 168.3 307.2c12.3 15.3 35.1 15.3 47.4 0zM192 128a64 64 0 1 1 0 128 64 64 0 1 1 0-128z"]},lE={prefix:"fas",iconName:"arrow-down",icon:[384,512,[8595],"f063","M169.4 470.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 370.8 224 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 306.7L54.6 265.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"]},fE={prefix:"fas",iconName:"eraser",icon:[576,512,[],"f12d","M290.7 57.4L57.4 290.7c-25 25-25 65.5 0 90.5l80 80c12 12 28.3 18.7 45.3 18.7L288 480l9.4 0L512 480c17.7 0 32-14.3 32-32s-14.3-32-32-32l-124.1 0L518.6 285.3c25-25 25-65.5 0-90.5L381.3 57.4c-25-25-65.5-25-90.5 0zM297.4 416l-9.4 0-105.4 0-80-80L227.3 211.3 364.7 348.7 297.4 416z"]},uE={prefix:"fas",iconName:"envelope-open-text",icon:[512,512,[],"f658","M215.4 96L144 96l-36.2 0L96 96l0 8.8L96 144l0 40.4 0 89L.2 202.5c1.6-18.1 10.9-34.9 25.7-45.8L48 140.3 48 96c0-26.5 21.5-48 48-48l76.6 0 49.9-36.9C232.2 3.9 243.9 0 256 0s23.8 3.9 33.5 11L339.4 48 416 48c26.5 0 48 21.5 48 48l0 44.3 22.1 16.4c14.8 10.9 24.1 27.7 25.7 45.8L416 273.4l0-89 0-40.4 0-39.2 0-8.8-11.8 0L368 96l-71.4 0-81.3 0zM0 448L0 242.1 217.6 403.3c11.1 8.2 24.6 12.7 38.4 12.7s27.3-4.4 38.4-12.7L512 242.1 512 448s0 0 0 0c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64c0 0 0 0 0 0zM176 160l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z"]},dE={prefix:"fas",iconName:"link",icon:[640,512,[128279,"chain"],"f0c1","M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z"]},hE={prefix:"fas",iconName:"magnifying-glass",icon:[512,512,[128269,"search"],"f002","M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]},pE={prefix:"fas",iconName:"chevron-down",icon:[512,512,[],"f078","M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},mE={prefix:"fas",iconName:"arrow-up",icon:[384,512,[8593],"f062","M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2 160 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-306.7L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z"]},gE={prefix:"fas",iconName:"circle-user",icon:[512,512,[62142,"user-circle"],"f2bd","M399 384.2C376.9 345.8 335.4 320 288 320l-64 0c-47.4 0-88.9 25.8-111 64.2c35.2 39.2 86.2 63.8 143 63.8s107.8-24.7 143-63.8zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm256 16a72 72 0 1 0 0-144 72 72 0 1 0 0 144z"]},yE={prefix:"fas",iconName:"copy",icon:[448,512,[],"f0c5","M208 0L332.1 0c12.7 0 24.9 5.1 33.9 14.1l67.9 67.9c9 9 14.1 21.2 14.1 33.9L448 336c0 26.5-21.5 48-48 48l-192 0c-26.5 0-48-21.5-48-48l0-288c0-26.5 21.5-48 48-48zM48 128l80 0 0 64-64 0 0 256 192 0 0-32 64 0 0 48c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48L0 176c0-26.5 21.5-48 48-48z"]},bE={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0 0 144c0 17.7 14.3 32 32 32s32-14.3 32-32l0-144 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-144z"]},vE={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},_E={prefix:"fas",iconName:"chevron-left",icon:[320,512,[9001],"f053","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"]},xE={prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"]},wE={prefix:"fas",iconName:"hammer",icon:[576,512,[128296],"f6e3","M413.5 237.5c-28.2 4.8-58.2-3.6-80-25.4l-38.1-38.1C280.4 159 272 138.8 272 117.6l0-12.1L192.3 62c-5.3-2.9-8.6-8.6-8.3-14.7s3.9-11.5 9.5-14l47.2-21C259.1 4.2 279 0 299.2 0l18.1 0c36.7 0 72 14 98.7 39.1l44.6 42c24.2 22.8 33.2 55.7 26.6 86L503 183l8-8c9.4-9.4 24.6-9.4 33.9 0l24 24c9.4 9.4 9.4 24.6 0 33.9l-88 88c-9.4 9.4-24.6 9.4-33.9 0l-24-24c-9.4-9.4-9.4-24.6 0-33.9l8-8-17.5-17.5zM27.4 377.1L260.9 182.6c3.5 4.9 7.5 9.6 11.8 14l38.1 38.1c6 6 12.4 11.2 19.2 15.7L134.9 484.6c-14.5 17.4-36 27.4-58.6 27.4C34.1 512 0 477.8 0 435.7c0-22.6 10.1-44.1 27.4-58.6z"]},EE={prefix:"fas",iconName:"rotate",icon:[512,512,[128260,"sync-alt"],"f2f1","M142.9 142.9c-17.5 17.5-30.1 38-37.8 59.8c-5.9 16.7-24.2 25.4-40.8 19.5s-25.4-24.2-19.5-40.8C55.6 150.7 73.2 122 97.6 97.6c87.2-87.2 228.3-87.5 315.8-1L455 55c6.9-6.9 17.2-8.9 26.2-5.2s14.8 12.5 14.8 22.2l0 128c0 13.3-10.7 24-24 24l-8.4 0c0 0 0 0 0 0L344 224c-9.7 0-18.5-5.8-22.2-14.8s-1.7-19.3 5.2-26.2l41.1-41.1c-62.6-61.5-163.1-61.2-225.3 1zM16 312c0-13.3 10.7-24 24-24l7.6 0 .7 0L168 288c9.7 0 18.5 5.8 22.2 14.8s1.7 19.3-5.2 26.2l-41.1 41.1c62.6 61.5 163.1 61.2 225.3-1c17.5-17.5 30.1-38 37.8-59.8c5.9-16.7 24.2-25.4 40.8-19.5s25.4 24.2 19.5 40.8c-10.8 30.6-28.4 59.3-52.9 83.8c-87.2 87.2-228.3 87.5-315.8 1L57 457c-6.9 6.9-17.2 8.9-26.2 5.2S16 449.7 16 440l0-119.6 0-.7 0-7.6z"]},AE={prefix:"fas",iconName:"spinner",icon:[512,512,[],"f110","M304 48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zm0 416a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM48 304a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm464-48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM142.9 437A48 48 0 1 0 75 369.1 48 48 0 1 0 142.9 437zm0-294.2A48 48 0 1 0 75 75a48 48 0 1 0 67.9 67.9zM369.1 437A48 48 0 1 0 437 369.1 48 48 0 1 0 369.1 437z"]},SE={prefix:"fas",iconName:"qrcode",icon:[448,512,[],"f029","M0 80C0 53.5 21.5 32 48 32l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48L0 80zM64 96l0 64 64 0 0-64L64 96zM0 336c0-26.5 21.5-48 48-48l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48l0-96zm64 16l0 64 64 0 0-64-64 0zM304 32l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48l0-96c0-26.5 21.5-48 48-48zm80 64l-64 0 0 64 64 0 0-64zM256 304c0-8.8 7.2-16 16-16l64 0c8.8 0 16 7.2 16 16s7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s7.2-16 16-16s16 7.2 16 16l0 96c0 8.8-7.2 16-16 16l-64 0c-8.8 0-16-7.2-16-16s-7.2-16-16-16s-16 7.2-16 16l0 64c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-160zM368 480a16 16 0 1 1 0-32 16 16 0 1 1 0 32zm64 0a16 16 0 1 1 0-32 16 16 0 1 1 0 32z"]},CE={prefix:"fas",iconName:"calendar",icon:[448,512,[128197,128198],"f133","M96 32l0 32L48 64C21.5 64 0 85.5 0 112l0 48 448 0 0-48c0-26.5-21.5-48-48-48l-48 0 0-32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 32L160 64l0-32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192L0 192 0 464c0 26.5 21.5 48 48 48l352 0c26.5 0 48-21.5 48-48l0-272z"]},OE={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"]},TE={prefix:"fas",iconName:"image-portrait",icon:[384,512,["portrait"],"f3e0","M384 64c0-35.3-28.7-64-64-64L64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-384zM128 192a64 64 0 1 1 128 0 64 64 0 1 1 -128 0zM80 356.6c0-37.9 30.7-68.6 68.6-68.6l86.9 0c37.9 0 68.6 30.7 68.6 68.6c0 15.1-12.3 27.4-27.4 27.4l-169.1 0C92.3 384 80 371.7 80 356.6z"]},PE={prefix:"fas",iconName:"triangle-exclamation",icon:[512,512,[9888,"exclamation-triangle","warning"],"f071","M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480L40 480c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24l0 112c0 13.3 10.7 24 24 24s24-10.7 24-24l0-112c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]},RE={prefix:"fas",iconName:"dollar-sign",icon:[320,512,[128178,61781,"dollar","usd"],"24","M160 0c17.7 0 32 14.3 32 32l0 35.7c1.6 .2 3.1 .4 4.7 .7c.4 .1 .7 .1 1.1 .2l48 8.8c17.4 3.2 28.9 19.9 25.7 37.2s-19.9 28.9-37.2 25.7l-47.5-8.7c-31.3-4.6-58.9-1.5-78.3 6.2s-27.2 18.3-29 28.1c-2 10.7-.5 16.7 1.2 20.4c1.8 3.9 5.5 8.3 12.8 13.2c16.3 10.7 41.3 17.7 73.7 26.3l2.9 .8c28.6 7.6 63.6 16.8 89.6 33.8c14.2 9.3 27.6 21.9 35.9 39.5c8.5 17.9 10.3 37.9 6.4 59.2c-6.9 38-33.1 63.4-65.6 76.7c-13.7 5.6-28.6 9.2-44.4 11l0 33.4c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-34.9c-.4-.1-.9-.1-1.3-.2l-.2 0s0 0 0 0c-24.4-3.8-64.5-14.3-91.5-26.3c-16.1-7.2-23.4-26.1-16.2-42.2s26.1-23.4 42.2-16.2c20.9 9.3 55.3 18.5 75.2 21.6c31.9 4.7 58.2 2 76-5.3c16.9-6.9 24.6-16.9 26.8-28.9c1.9-10.6 .4-16.7-1.3-20.4c-1.9-4-5.6-8.4-13-13.3c-16.4-10.7-41.5-17.7-74-26.3l-2.8-.7s0 0 0 0C119.4 279.3 84.4 270 58.4 253c-14.2-9.3-27.5-22-35.8-39.6c-8.4-17.9-10.1-37.9-6.1-59.2C23.7 116 52.3 91.2 84.8 78.3c13.3-5.3 27.9-8.9 43.2-11L128 32c0-17.7 14.3-32 32-32z"]},kE=RE,ME={prefix:"fas",iconName:"person-circle-check",icon:[576,512,[],"e53e","M112 48a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm40 304l0 128c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-223.1L59.4 304.5c-9.1 15.1-28.8 20-43.9 10.9s-20-28.8-10.9-43.9l58.3-97c17.4-28.9 48.6-46.6 82.3-46.6l29.7 0c33.7 0 64.9 17.7 82.3 46.6l44.9 74.7c-16.1 17.6-28.6 38.5-36.6 61.5c-1.9-1.8-3.5-3.9-4.9-6.3L232 256.9 232 480c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-128-16 0zm136 16a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm211.3-43.3c-6.2-6.2-16.4-6.2-22.6 0L416 385.4l-28.7-28.7c-6.2-6.2-16.4-6.2-22.6 0s-6.2 16.4 0 22.6l40 40c6.2 6.2 16.4 6.2 22.6 0l72-72c6.2-6.2 6.2-16.4 0-22.6z"]};function B0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Sr(e){for(var t=1;t=0)continue;n[r]=e[r]}return n}function DE(e,t){if(e==null)return{};var n=IE(e,t),r,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var jE=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},rg={exports:{}};(function(e){(function(t){var n=function(w,g,v){if(!f(g)||d(g)||h(g)||m(g)||c(g))return g;var S,P=0,k=0;if(l(g))for(S=[],k=g.length;P1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(typeof e=="string")return e;var r=(e.children||[]).map(function(c){return sg(c)}),s=Object.keys(e.attributes||{}).reduce(function(c,f){var l=e.attributes[f];switch(f){case"class":c.class=$E(l);break;case"style":c.style=UE(l);break;default:c.attrs[f]=l}return c},{attrs:{},class:{},style:{}});n.class;var o=n.style,i=o===void 0?{}:o,a=DE(n,BE);return $i(e.tag,Sr(Sr(Sr({},t),{},{class:s.class,style:Sr(Sr({},s.style),i)},s.attrs),a),r)}var og=!1;try{og=!0}catch{}function zE(){if(!og&&console&&typeof console.error=="function"){var e;(e=console).error.apply(e,arguments)}}function Ll(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?Tn({},e,t):{}}function VE(e){var t,n=(t={"fa-spin":e.spin,"fa-pulse":e.pulse,"fa-fw":e.fixedWidth,"fa-border":e.border,"fa-li":e.listItem,"fa-inverse":e.inverse,"fa-flip":e.flip===!0,"fa-flip-horizontal":e.flip==="horizontal"||e.flip==="both","fa-flip-vertical":e.flip==="vertical"||e.flip==="both"},Tn(Tn(Tn(Tn(Tn(Tn(Tn(Tn(Tn(Tn(t,"fa-".concat(e.size),e.size!==null),"fa-rotate-".concat(e.rotation),e.rotation!==null),"fa-pull-".concat(e.pull),e.pull!==null),"fa-swap-opacity",e.swapOpacity),"fa-bounce",e.bounce),"fa-shake",e.shake),"fa-beat",e.beat),"fa-fade",e.fade),"fa-beat-fade",e.beatFade),"fa-flash",e.flash),Tn(Tn(t,"fa-spin-pulse",e.spinPulse),"fa-spin-reverse",e.spinReverse));return Object.keys(n).map(function(r){return n[r]?r:null}).filter(function(r){return r})}function U0(e){if(e&&pc(e)==="object"&&e.prefix&&e.iconName&&e.icon)return e;if(su.icon)return su.icon(e);if(e===null)return null;if(pc(e)==="object"&&e.prefix&&e.iconName)return e;if(Array.isArray(e)&&e.length===2)return{prefix:e[0],iconName:e[1]};if(typeof e=="string")return{prefix:"fas",iconName:e}}var KE=Ir({name:"FontAwesomeIcon",props:{border:{type:Boolean,default:!1},fixedWidth:{type:Boolean,default:!1},flip:{type:[Boolean,String],default:!1,validator:function(t){return[!0,!1,"horizontal","vertical","both"].indexOf(t)>-1}},icon:{type:[Object,Array,String],required:!0},mask:{type:[Object,Array,String],default:null},maskId:{type:String,default:null},listItem:{type:Boolean,default:!1},pull:{type:String,default:null,validator:function(t){return["right","left"].indexOf(t)>-1}},pulse:{type:Boolean,default:!1},rotation:{type:[String,Number],default:null,validator:function(t){return[90,180,270].indexOf(Number.parseInt(t,10))>-1}},swapOpacity:{type:Boolean,default:!1},size:{type:String,default:null,validator:function(t){return["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"].indexOf(t)>-1}},spin:{type:Boolean,default:!1},transform:{type:[String,Object],default:null},symbol:{type:[Boolean,String],default:!1},title:{type:String,default:null},titleId:{type:String,default:null},inverse:{type:Boolean,default:!1},bounce:{type:Boolean,default:!1},shake:{type:Boolean,default:!1},beat:{type:Boolean,default:!1},fade:{type:Boolean,default:!1},beatFade:{type:Boolean,default:!1},flash:{type:Boolean,default:!1},spinPulse:{type:Boolean,default:!1},spinReverse:{type:Boolean,default:!1}},setup:function(t,n){var r=n.attrs,s=Ft(function(){return U0(t.icon)}),o=Ft(function(){return Ll("classes",VE(t))}),i=Ft(function(){return Ll("transform",typeof t.transform=="string"?su.transform(t.transform):t.transform)}),a=Ft(function(){return Ll("mask",U0(t.mask))}),c=Ft(function(){return i7(s.value,Sr(Sr(Sr(Sr({},o.value),i.value),a.value),{},{symbol:t.symbol,title:t.title,titleId:t.titleId,maskId:t.maskId}))});ts(c,function(l){if(!l)return zE("Could not find one or more icon(s)",s.value,a.value)},{immediate:!0});var f=Ft(function(){return c.value?sg(c.value.abstract[0],{},r):null});return function(){return f.value}}});o7.add(lE,H7,I7,X7,N7,mE,_7,j7,O7,CE,Y7,tE,S7,OE,pE,_E,xE,y7,F7,C7,W7,B7,gE,eE,nE,q7,yE,kE,aE,rE,uE,fE,U7,m7,L7,l7,R7,V7,x7,iE,w7,v7,wE,g7,K7,M7,z7,TE,T7,d7,dE,cE,Q7,oE,hE,c7,Z7,$7,ME,D7,bE,SE,k7,EE,f7,h7,AE,P7,u7,E7,A7,a7,PE,b7,p7,vE);var ig={exports:{}};const HE=C2(e4);(function(e,t){(function(n,r){e.exports=r(HE)})(ws,function(n){/*! ***************************************************************************** - Copyright (c) Microsoft Corporation. - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. - ***************************************************************************** */function r(m,x,_,C){function w(g){return g instanceof _?g:new _(function(v){v(g)})}return new(_||(_=Promise))(function(g,v){function S(M){try{k(C.next(M))}catch(V){v(V)}}function P(M){try{k(C.throw(M))}catch(V){v(V)}}function k(M){M.done?g(M.value):w(M.value).then(S,P)}k((C=C.apply(m,[])).next())})}function s(m,x){var _={label:0,sent:function(){if(g[0]&1)throw g[1];return g[1]},trys:[],ops:[]},C,w,g,v;return v={next:S(0),throw:S(1),return:S(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function S(k){return function(M){return P([k,M])}}function P(k){if(C)throw new TypeError("Generator is already executing.");for(;_;)try{if(C=1,w&&(g=k[0]&2?w.return:k[0]?w.throw||((g=w.return)&&g.call(w),0):w.next)&&!(g=g.call(w,k[1])).done)return g;switch(w=0,g&&(k=[k[0]&2,g.value]),k[0]){case 0:case 1:g=k;break;case 4:return _.label++,{value:k[1],done:!1};case 5:_.label++,w=k[1],k=[0];continue;case 7:k=_.ops.pop(),_.trys.pop();continue;default:if(g=_.trys,!(g=g.length>0&&g[g.length-1])&&(k[0]===6||k[0]===2)){_=0;continue}if(k[0]===3&&(!g||k[1]>g[0]&&k[1]0)return G[0]}},M=function(){return r(_,void 0,void 0,function(){var G,fe;return s(this,function(Me){switch(Me.label){case 0:C("loading"),Me.label=1;case 1:return Me.trys.push([1,3,,4]),G=v,[4,navigator.mediaDevices.getUserMedia(S)];case 2:if(G.value=Me.sent(),!w.value)throw new Error("Video ref is null");return w.value.srcObject=v.value,C("started"),[3,4];case 3:return fe=Me.sent(),C("error",fe),[3,4];case 4:return[2]}})})},V=function(G,fe,Me){var ae;if(G===void 0&&(G=m.resolution),fe===void 0&&(fe="image/png"),!w.value)throw new Error("Video ref is null");if(!g.value)throw new Error("Canvas ref is null");var _e=G.width,de=G.height;return g.value.width=_e,g.value.height=de,(ae=g.value.getContext("2d"))===null||ae===void 0||ae.drawImage(w.value,0,0,_e,de),new Promise(function(nt){var He;(He=g.value)===null||He===void 0||He.toBlob(function(Xt){C("snapshot",Xt),nt(Xt)},fe,Me)})},N=function(G){return r(_,void 0,void 0,function(){return s(this,function(fe){switch(fe.label){case 0:return K(),S.video.deviceId.exact=G,[4,M()];case 1:return fe.sent(),C("camera-change",G),[2]}})})},$=function(){var G;(G=w.value)===null||G===void 0||G.play(),C("resumed")},Z=function(){var G;(G=w.value)===null||G===void 0||G.pause(),C("paused")},K=function(){var G;(G=v.value)===null||G===void 0||G.getTracks().forEach(function(fe){return fe.stop()}),C("stopped")};return{start:M,stop:K,video:w,snapshot:V,canvas:g,devices:P,currentDeviceID:k,pause:Z,resume:$,changeCamera:N,stream:v}}});const i={id:"camera-container"},a={autoplay:"",ref:"video",id:"video"},c={id:"slot-container"},f={ref:"canvas",id:"canvas"};function l(m,x,_,C,w,g){return n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createElementVNode("div",i,[n.createElementVNode("video",a,null,512),n.createElementVNode("div",c,[n.renderSlot(m.$slots,"default")])]),n.createElementVNode("canvas",f,null,512)],64)}function d(m,x){x===void 0&&(x={});var _=x.insertAt;if(!(typeof document>"u")){var C=document.head||document.getElementsByTagName("head")[0],w=document.createElement("style");w.type="text/css",_==="top"&&C.firstChild?C.insertBefore(w,C.firstChild):C.appendChild(w),w.styleSheet?w.styleSheet.cssText=m:w.appendChild(document.createTextNode(m))}}var h=` -#camera-container[data-v-74104ed5] { - position: relative; - width: 100%; - height: 100%; -} -#slot-container[data-v-74104ed5] { - position: absolute; - height: 100%; - width: 100%; - left: 0; - top: 0; -} -#video[data-v-74104ed5] { - width: 100%; - height: 100%; -} -#canvas[data-v-74104ed5] { - display: none; -} -`;return d(h),o.render=l,o.__scopeId="data-v-74104ed5",o.__file="src/components/Camera.vue",o})})(ig);var qE=ig.exports;const WE=S2(qE);function YE(e){console.log("[App Init] Setting up global error handler"),e.config.errorHandler=(t,n,r)=>{console.error("[App Error] Global Error Handler:",{error:t,info:r,component:(n==null?void 0:n.$options.name)||"unknown"}),alert((t instanceof Error?t.message:"Something bad happened")+" - Try reloading or restarting the app.")}}function T9(){console.log("[App Init] Starting app initialization"),console.log("[App Init] Platform:","capacitor");const e=Ja(dv);console.log("[App Init] Vue app created"),e.component("FontAwesome",KE).component("camera",WE),console.log("[App Init] Components registered");const t=n4();return e.use(t),console.log("[App Init] Pinia store initialized"),e.use(Na,Bt),console.log("[App Init] Axios initialized"),e.use(ed),console.log("[App Init] Router initialized"),e.use(s8),console.log("[App Init] Notifications initialized"),YE(e),console.log("[App Init] App initialization complete"),e}export{Mh as $,a5 as A,Nt as B,C4 as C,s9 as D,Ul as E,jt as F,ji as G,t9 as H,o9 as I,W6 as J,HE as K,S2 as L,Ju as M,Ir as N,ts as O,Po as P,Rc as Q,Ft as R,Ii as S,gy as T,Su as U,O4 as V,a9 as W,en as X,Xy as Y,L2 as Z,g5 as _,n9 as a,ws as a0,JE as a1,P3 as a2,i9 as a3,ZE as a4,f5 as a5,Bt as a6,_s as a7,kh as a8,Es as a9,gu as aa,pu as ab,o3 as ac,W0 as ad,Lg as ae,Vn as af,Or as ag,dt as ah,$i as ai,Yn as aj,mu as ak,Bp as al,fo as am,Pc as an,Oo as ao,kt as ap,ga as aq,WE as ar,N2 as as,Zb as at,Qb as au,e5 as av,QE as aw,r9 as b,e9 as c,mn as d,h5 as e,Os as f,h9 as g,on as h,T9 as i,tt as j,Ie as k,to as l,Bn as m,xi as n,b1 as o,Yy as p,Lc as q,ed as r,Xa as s,an as t,c9 as u,Sp as v,Qr as w,Di as x,_i as y,Ko as z}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/main.electron-BOHrDxsQ.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/main.electron-BOHrDxsQ.js deleted file mode 100644 index 541b13c..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/main.electron-BOHrDxsQ.js +++ /dev/null @@ -1 +0,0 @@ -import{i as p}from"./main.common-DD7dqhZp.js";import"./index-BGoTPXII.js";const i=p();i.mount("#app"); diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/main.pywebview-BOHrDxsQ.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/main.pywebview-BOHrDxsQ.js deleted file mode 100644 index 541b13c..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/main.pywebview-BOHrDxsQ.js +++ /dev/null @@ -1 +0,0 @@ -import{i as p}from"./main.common-DD7dqhZp.js";import"./index-BGoTPXII.js";const i=p();i.mount("#app"); diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/main.web-Bfhz1b5p.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/main.web-Bfhz1b5p.js deleted file mode 100644 index 39a8aa9..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/main.web-Bfhz1b5p.js +++ /dev/null @@ -1 +0,0 @@ -import{i as o}from"./main.common-DD7dqhZp.js";import"./index-BGoTPXII.js";console.log("Service worker registration skipped - not enabled or not in production");const i=o();i.mount("#app"); diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/marker-icon-2x-D4k_ikNW.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/marker-icon-2x-D4k_ikNW.js deleted file mode 100644 index 56ccbd7..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/marker-icon-2x-D4k_ikNW.js +++ /dev/null @@ -1 +0,0 @@ -const c="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==";export{c as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/marker-icon-C2eJqgqv.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/marker-icon-C2eJqgqv.js deleted file mode 100644 index d9bc233..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/marker-icon-C2eJqgqv.js +++ /dev/null @@ -1 +0,0 @@ -const A="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=";export{A as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/marker-shadow-DU6CIJ0p.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/marker-shadow-DU6CIJ0p.js deleted file mode 100644 index 236ed6b..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/marker-shadow-DU6CIJ0p.js +++ /dev/null @@ -1 +0,0 @@ -const A="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC";export{A as default}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/set-BrilI7kO.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/set-BrilI7kO.js deleted file mode 100644 index fd50adc..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/set-BrilI7kO.js +++ /dev/null @@ -1 +0,0 @@ -import{a7 as i,a9 as c,as as s,aq as v}from"./main.common-DD7dqhZp.js";import{d as l,c as y,m as _}from"./_isString-B7bbuhPA.js";const o=Number.isInteger||function(r){return r<<0===r};var m=i(function(r,n){var t=r<0?n.length+r:r;return l(n)?n.charAt(t):n[t]}),g=i(function(r,n){if(n!=null)return o(r)?m(r,n):n[r]}),d=c(function(r){return function(){return r}});function h(a,r,n){if(o(a)&&y(n)){var t=[].concat(n);return t[a]=r,t}var u={};for(var e in n)u[e]=n[e];return u[a]=r,u}var p=c(function(r){return r==null}),I=s(function a(r,n,t){if(r.length===0)return n;var u=r[0];if(r.length>1){var e=!p(t)&&v(u,t)&&typeof t[u]=="object"?t[u]:o(r[1])?[]:{};n=a(Array.prototype.slice.call(r,1),n,e)}return h(u,n,t)}),P=s(function(r,n,t){return I([r],n,t)}),A=i(function(r,n){return function(t){return function(u){return _(function(e){return n(e,u)},t(r(u)))}}}),q=c(function(r){return A(g(r),P(r))}),f=function(a){return{value:a,map:function(r){return f(r(a))}}},N=s(function(r,n,t){return r(function(u){return f(n(u))})(t).value}),S=s(function(r,n,t){return N(r,d(n),t)});export{o as _,P as a,d as b,A as c,I as d,h as e,p as i,q as l,m as n,N as o,g as p,S as s}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/sort-DzTCGCnH.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/sort-DzTCGCnH.js deleted file mode 100644 index cabe2cd..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/sort-DzTCGCnH.js +++ /dev/null @@ -1 +0,0 @@ -import{a7 as t}from"./main.common-DD7dqhZp.js";var c=t(function(r,o){return Array.prototype.slice.call(o,0).sort(r)});export{c as s}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/vue-leaflet.es-DQekxOGR.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/vue-leaflet.es-DQekxOGR.js deleted file mode 100644 index 89ee445..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/vue-leaflet.es-DQekxOGR.js +++ /dev/null @@ -1,2 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/leaflet-src-Dm7ILaeL.js","assets/main.common-DD7dqhZp.js","assets/index-BGoTPXII.js","assets/main-D6gZ_dcu.css"])))=>i.map(i=>d[i]); -import{_ as S}from"./index-BGoTPXII.js";import{N as w,ai as D,f as b,aj as B,P as E,ak as k,G as P,Q as X,O as ne,al as Te,am as R,an as W,ao as Re,R as F}from"./main.common-DD7dqhZp.js";const re=(e,t)=>{for(const o of Object.keys(t))e.on(o,t[o])},ue=e=>{for(const t of Object.keys(e)){const o=e[t];o&&j(o.cancel)&&o.cancel()}},Pe=e=>!e||typeof e.charAt!="function"?e:e.charAt(0).toUpperCase()+e.slice(1),j=e=>typeof e=="function",I=(e,t,o)=>{for(const l in o){const n="set"+Pe(l);e[n]?ne(()=>o[l],(a,i)=>{e[n](a,i)}):t[n]&&ne(()=>o[l],a=>{t[n](a)})}},O=(e,t,o={})=>{const l={...o};for(const n in e){const a=t[n],i=e[n];a&&(a&&a.custom===!0||i!==void 0&&(l[n]=i))}return l},U=e=>{const t={},o={};for(const l in e)if(l.startsWith("on")&&!l.startsWith("onUpdate")&&l!=="onReady"){const n=l.slice(2).toLocaleLowerCase();t[n]=e[l]}else o[l]=e[l];return{listeners:t,attrs:o}},je=async e=>{const t=await Promise.all([S(()=>import("./marker-icon-2x-D4k_ikNW.js"),[]),S(()=>import("./marker-icon-C2eJqgqv.js"),[]),S(()=>import("./marker-shadow-DU6CIJ0p.js"),[])]);delete e.Default.prototype._getIconUrl,e.Default.mergeOptions({iconRetinaUrl:t[0].default,iconUrl:t[1].default,shadowUrl:t[2].default})},H=e=>{const t=b((...l)=>console.warn(`Method ${e} has been invoked without being replaced`)),o=(...l)=>t.value(...l);return o.wrapped=t,R(e,o),o},J=(e,t)=>e.wrapped.value=t,_=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||globalThis,h=e=>{const t=B(e);if(t===void 0)throw new Error(`Attempt to inject ${e.description} before it was provided.`);return t},N=Symbol("useGlobalLeaflet"),M=Symbol("addLayer"),Y=Symbol("removeLayer"),de=Symbol("registerControl"),we=Symbol("registerLayerControl"),pe=Symbol("canSetParentHtml"),ce=Symbol("setParentHtml"),ye=Symbol("setIcon"),fe=Symbol("bindPopup"),Be=Symbol("bindTooltip"),me=Symbol("unbindPopup"),Ee=Symbol("unbindTooltip"),Z={options:{type:Object,default:()=>({}),custom:!0}},q=e=>({options:e.options,methods:{}}),$={...Z,pane:{type:String},attribution:{type:String},name:{type:String,custom:!0},layerType:{type:String,custom:!0},visible:{type:Boolean,custom:!0,default:!0}},ee=(e,t,o)=>{const l=h(M),n=h(Y),{options:a,methods:i}=q(e),s=O(e,$,a),r=()=>l({leafletObject:t.value}),p=()=>n({leafletObject:t.value}),u={...i,setAttribution(c){p(),t.value.options.attribution=c,e.visible&&r()},setName(){p(),e.visible&&r()},setLayerType(){p(),e.visible&&r()},setVisible(c){t.value&&(c?r():p())},bindPopup(c){if(!t.value||!j(t.value.bindPopup)){console.warn("Attempt to bind popup before bindPopup method available on layer.");return}t.value.bindPopup(c)},bindTooltip(c){if(!t.value||!j(t.value.bindTooltip)){console.warn("Attempt to bind tooltip before bindTooltip method available on layer.");return}t.value.bindTooltip(c)},unbindTooltip(){t.value&&(j(t.value.closeTooltip)&&t.value.closeTooltip(),j(t.value.unbindTooltip)&&t.value.unbindTooltip())},unbindPopup(){t.value&&(j(t.value.closePopup)&&t.value.closePopup(),j(t.value.unbindPopup)&&t.value.unbindPopup())},updateVisibleProp(c){o.emit("update:visible",c)}};return R(fe,u.bindPopup),R(Be,u.bindTooltip),R(me,u.unbindPopup),R(Ee,u.unbindTooltip),X(()=>{u.unbindPopup(),u.unbindTooltip(),p()}),{options:s,methods:u}},ve=(e,t)=>{if(e&&t.default)return D("div",{style:{display:"none"}},t.default())},be={...$,interactive:{type:Boolean,default:void 0},bubblingMouseEvents:{type:Boolean,default:void 0}},Ie=(e,t,o)=>{const{options:l,methods:n}=ee(e,t,o);return{options:O(e,be,l),methods:n}},te={...be,stroke:{type:Boolean,default:void 0},color:{type:String},weight:{type:Number},opacity:{type:Number},lineCap:{type:String},lineJoin:{type:String},dashArray:{type:String},dashOffset:{type:String},fill:{type:Boolean,default:void 0},fillColor:{type:String},fillOpacity:{type:Number},fillRule:{type:String},className:{type:String}},Ne=(e,t,o)=>{const{options:l,methods:n}=Ie(e,t,o),a=O(e,te,l),i=h(Y),s={...n,setStroke(r){t.value.setStyle({stroke:r})},setColor(r){t.value.setStyle({color:r})},setWeight(r){t.value.setStyle({weight:r})},setOpacity(r){t.value.setStyle({opacity:r})},setLineCap(r){t.value.setStyle({lineCap:r})},setLineJoin(r){t.value.setStyle({lineJoin:r})},setDashArray(r){t.value.setStyle({dashArray:r})},setDashOffset(r){t.value.setStyle({dashOffset:r})},setFill(r){t.value.setStyle({fill:r})},setFillColor(r){t.value.setStyle({fillColor:r})},setFillOpacity(r){t.value.setStyle({fillOpacity:r})},setFillRule(r){t.value.setStyle({fillRule:r})},setClassName(r){t.value.setStyle({className:r})}};return W(()=>{i({leafletObject:t.value})}),{options:a,methods:s}},De={...te,radius:{type:Number},latLng:{type:[Object,Array],required:!0,custom:!0}};({...De});const x={...Z,position:{type:String}},ke=(e,t)=>{const{options:o,methods:l}=q(e),n=O(e,x,o),a={...l,setPosition(i){t.value&&t.value.setPosition(i)}};return X(()=>{t.value&&t.value.remove()}),{options:n,methods:a}},Ue=e=>e.default?D("div",{ref:"root"},e.default()):null;w({name:"LControl",props:{...x,disableClickPropagation:{type:Boolean,custom:!0,default:!0},disableScrollPropagation:{type:Boolean,custom:!0,default:!1}},setup(e,t){const o=b(),l=b(),n=B(N),a=h(de),{options:i,methods:s}=ke(e,o);return E(async()=>{const{Control:r,DomEvent:p}=n?_.L:await S(()=>import("./leaflet-src.esm-HdBnhJze.js"),[]),u=r.extend({onAdd(){return l.value}});o.value=k(new u(i)),I(s,o.value,e),a({leafletObject:o.value}),e.disableClickPropagation&&l.value&&p.disableClickPropagation(l.value),e.disableScrollPropagation&&l.value&&p.disableScrollPropagation(l.value),P(()=>t.emit("ready",o.value))}),{root:l,leafletObject:o}},render(){return Ue(this.$slots)}});({...x});({...x});({...x});({...x});const ge={...$};({...ge});({...ge});const oe={...$,opacity:{type:Number},zIndex:{type:Number},tileSize:{type:[Number,Array,Object]},noWrap:{type:Boolean,default:void 0},minZoom:{type:Number},maxZoom:{type:Number},className:{type:String}},he=(e,t,o)=>{const{options:l,methods:n}=ee(e,t,o),a=O(e,oe,l),i={...n,setTileComponent(){var s;(s=t.value)==null||s.redraw()}};return X(()=>{t.value.off()}),{options:a,methods:i}},Ve=(e,t,o,l)=>e.extend({initialize(n){this.tileComponents={},this.on("tileunload",this._unloadTile),o.setOptions(this,n)},createTile(n){const a=this._tileCoordsToKey(n);this.tileComponents[a]=t.create("div");const i=D({setup:l,props:["coords"]},{coords:n});return Te(i,this.tileComponents[a]),this.tileComponents[a]},_unloadTile(n){const a=this._tileCoordsToKey(n.coords);this.tileComponents[a]&&(this.tileComponents[a].innerHTML="",this.tileComponents[a]=void 0)}});w({props:{...oe,childRender:{type:Function,required:!0}},setup(e,t){const o=b(),l=b(null),n=b(!1),a=B(N),i=h(M),{options:s,methods:r}=he(e,o,t);return E(async()=>{const{GridLayer:p,DomUtil:u,Util:c}=a?_.L:await S(()=>import("./leaflet-src.esm-HdBnhJze.js"),[]),g=Ve(p,u,c,e.childRender);o.value=k(new g(s));const{listeners:y}=U(t.attrs);o.value.on(y),I(r,o.value,e),i({...e,...r,leafletObject:o.value}),n.value=!0,P(()=>t.emit("ready",o.value))}),{root:l,ready:n,leafletObject:o}},render(){return this.ready?D("div",{style:{display:"none"},ref:"root"}):null}});const se={iconUrl:{type:String},iconRetinaUrl:{type:String},iconSize:{type:[Object,Array]},iconAnchor:{type:[Object,Array]},popupAnchor:{type:[Object,Array]},tooltipAnchor:{type:[Object,Array]},shadowUrl:{type:String},shadowRetinaUrl:{type:String},shadowSize:{type:[Object,Array]},shadowAnchor:{type:[Object,Array]},bgPos:{type:[Object,Array]},className:{type:String}};w({name:"LIcon",props:{...se,...Z},setup(e,t){const o=b(),l=B(N),n=h(pe),a=h(ce),i=h(ye);let s,r,p,u,c;const g=(A,m,v)=>{const L=A&&A.innerHTML;if(!m){v&&c&&n()&&a(L);return}const{listeners:z}=U(t.attrs);c&&r(c,z);const{options:K}=q(e),T=O(e,se,K);L&&(T.html=L),c=T.html?p(T):u(T),s(c,z),i(c)},y=()=>{P(()=>g(o.value,!0,!1))},C=()=>{P(()=>g(o.value,!1,!0))},V={setIconUrl:y,setIconRetinaUrl:y,setIconSize:y,setIconAnchor:y,setPopupAnchor:y,setTooltipAnchor:y,setShadowUrl:y,setShadowRetinaUrl:y,setShadowAnchor:y,setBgPos:y,setClassName:y,setHtml:y};return E(async()=>{const{DomEvent:A,divIcon:m,icon:v}=l?_.L:await S(()=>import("./leaflet-src.esm-HdBnhJze.js"),[]);s=A.on,r=A.off,p=m,u=v,I(V,{},e),new MutationObserver(C).observe(o.value,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),y()}),{root:o}},render(){const e=this.$slots.default?this.$slots.default():void 0;return D("div",{ref:"root"},e)}});({...$});function Le(e,t,o){var l,n,a;t===void 0&&(t=50),o===void 0&&(o={});var i=(l=o.isImmediate)!=null&&l,s=(n=o.callback)!=null&&n,r=o.maxWait,p=Date.now(),u=[];function c(){if(r!==void 0){var y=Date.now()-p;if(y+t>=r)return r-y}return t}var g=function(){var y=[].slice.call(arguments),C=this;return new Promise(function(V,A){var m=i&&a===void 0;if(a!==void 0&&clearTimeout(a),a=setTimeout(function(){if(a=void 0,p=Date.now(),!i){var L=e.apply(C,y);s&&s(L),u.forEach(function(z){return(0,z.resolve)(L)}),u=[]}},c()),m){var v=e.apply(C,y);return s&&s(v),V(v)}u.push({resolve:V,reject:A})})};return g.cancel=function(y){a!==void 0&&clearTimeout(a),u.forEach(function(C){return(0,C.reject)(y)}),u=[]},g}const ie={...Z,center:{type:[Object,Array]},bounds:{type:[Array,Object]},maxBounds:{type:[Array,Object]},zoom:{type:Number},minZoom:{type:Number},maxZoom:{type:Number},paddingBottomRight:{type:[Object,Array]},paddingTopLeft:{type:Object},padding:{type:Object},worldCopyJump:{type:Boolean,default:void 0},crs:{type:[String,Object]},maxBoundsViscosity:{type:Number},inertia:{type:Boolean,default:void 0},inertiaDeceleration:{type:Number},inertiaMaxSpeed:{type:Number},easeLinearity:{type:Number},zoomAnimation:{type:Boolean,default:void 0},zoomAnimationThreshold:{type:Number},fadeAnimation:{type:Boolean,default:void 0},markerZoomAnimation:{type:Boolean,default:void 0},noBlockingAnimations:{type:Boolean,default:void 0},useGlobalLeaflet:{type:Boolean,default:!0,custom:!0}},et=w({inheritAttrs:!1,emits:["ready","update:zoom","update:center","update:bounds"],props:ie,setup(e,t){const o=b(),l=Re({ready:!1,layersToAdd:[],layersInControl:[]}),{options:n}=q(e),a=O(e,ie,n),{listeners:i,attrs:s}=U(t.attrs),r=H(M),p=H(Y),u=H(de),c=H(we);R(N,e.useGlobalLeaflet);const g=F(()=>{const m={};return e.noBlockingAnimations&&(m.animate=!1),m}),y=F(()=>{const m=g.value;return e.padding&&(m.padding=e.padding),e.paddingTopLeft&&(m.paddingTopLeft=e.paddingTopLeft),e.paddingBottomRight&&(m.paddingBottomRight=e.paddingBottomRight),m}),C={moveend:Le(m=>{l.leafletRef&&(t.emit("update:zoom",l.leafletRef.getZoom()),t.emit("update:center",l.leafletRef.getCenter()),t.emit("update:bounds",l.leafletRef.getBounds()))}),overlayadd(m){const v=l.layersInControl.find(L=>L.name===m.name);v&&v.updateVisibleProp(!0)},overlayremove(m){const v=l.layersInControl.find(L=>L.name===m.name);v&&v.updateVisibleProp(!1)}};E(async()=>{e.useGlobalLeaflet&&(_.L=_.L||await S(()=>import("./leaflet-src-Dm7ILaeL.js").then(d=>d.l),__vite__mapDeps([0,1,2,3])));const{map:m,CRS:v,Icon:L,latLngBounds:z,latLng:K,stamp:T}=e.useGlobalLeaflet?_.L:await S(()=>import("./leaflet-src.esm-HdBnhJze.js"),[]);try{a.beforeMapMount&&await a.beforeMapMount()}catch(d){console.error(`The following error occurred running the provided beforeMapMount hook ${d.message}`)}await je(L);const Ae=typeof a.crs=="string"?v[a.crs]:a.crs;a.crs=Ae||v.EPSG3857;const G={addLayer(d){d.layerType!==void 0&&(l.layerControl===void 0?l.layersToAdd.push(d):l.layersInControl.find(f=>T(f.leafletObject)===T(d.leafletObject))||(l.layerControl.addLayer(d),l.layersInControl.push(d))),d.visible!==!1&&l.leafletRef.addLayer(d.leafletObject)},removeLayer(d){d.layerType!==void 0&&(l.layerControl===void 0?l.layersToAdd=l.layersToAdd.filter(f=>f.name!==d.name):(l.layerControl.removeLayer(d.leafletObject),l.layersInControl=l.layersInControl.filter(f=>T(f.leafletObject)!==T(d.leafletObject)))),l.leafletRef.removeLayer(d.leafletObject)},registerLayerControl(d){l.layerControl=d,l.layersToAdd.forEach(f=>{l.layerControl.addLayer(f)}),l.layersToAdd=[],u(d)},registerControl(d){l.leafletRef.addControl(d.leafletObject)},setZoom(d){const f=l.leafletRef.getZoom();d!==f&&l.leafletRef.setZoom(d,g.value)},setCrs(d){const f=l.leafletRef.getBounds();l.leafletRef.options.crs=d,l.leafletRef.fitBounds(f,{animate:!1,padding:[0,0]})},fitBounds(d){l.leafletRef.fitBounds(d,y.value)},setBounds(d){if(!d)return;const f=z(d);f.isValid()&&!(l.lastSetBounds||l.leafletRef.getBounds()).equals(f,0)&&(l.lastSetBounds=f,l.leafletRef.fitBounds(f))},setCenter(d){if(d==null)return;const f=K(d),ae=l.lastSetCenter||l.leafletRef.getCenter();(ae.lat!==f.lat||ae.lng!==f.lng)&&(l.lastSetCenter=f,l.leafletRef.panTo(f,g.value))}};J(r,G.addLayer),J(p,G.removeLayer),J(u,G.registerControl),J(c,G.registerLayerControl),l.leafletRef=k(m(o.value,a)),I(G,l.leafletRef,e),re(l.leafletRef,C),re(l.leafletRef,i),l.ready=!0,P(()=>t.emit("ready",l.leafletRef))}),W(()=>{ue(C),l.leafletRef&&(l.leafletRef.off(),l.leafletRef.remove())});const V=F(()=>l.leafletRef),A=F(()=>l.ready);return{root:o,ready:A,leafletObject:V,attrs:s}},render({attrs:e}){return e.style||(e.style={}),e.style.width||(e.style.width="100%"),e.style.height||(e.style.height="100%"),D("div",{...e,ref:"root"},this.ready&&this.$slots.default?this.$slots.default():{})}}),ze=["Symbol(Comment)","Symbol(Text)"],Me=["LTooltip","LPopup"],Se={...$,draggable:{type:Boolean,default:void 0},icon:{type:[Object]},zIndexOffset:{type:Number},latLng:{type:[Object,Array],custom:!0,required:!0}},$e=(e,t,o)=>{const{options:l,methods:n}=ee(e,t,o),a=O(e,Se,l),i={...n,setDraggable(s){t.value.dragging&&(s?t.value.dragging.enable():t.value.dragging.disable())},latLngSync(s){o.emit("update:latLng",s.latlng),o.emit("update:lat-lng",s.latlng)},setLatLng(s){if(s!=null&&t.value){const r=t.value.getLatLng();(!r||!r.equals(s))&&t.value.setLatLng(s)}}};return{options:a,methods:i}},xe=(e,t)=>{const o=t.slots.default&&t.slots.default();return o&&o.length&&o.some(Ge)};function Ge(e){return!(ze.includes(e.type.toString())||Me.includes(e.type.name))}const tt=w({name:"LMarker",props:Se,setup(e,t){const o=b(),l=b(!1),n=B(N),a=h(M);R(pe,()=>{var p;return!!((p=o.value)!=null&&p.getElement())}),R(ce,p=>{var u,c;const g=j((u=o.value)==null?void 0:u.getElement)&&((c=o.value)==null?void 0:c.getElement());g&&(g.innerHTML=p)}),R(ye,p=>{var u;return((u=o.value)==null?void 0:u.setIcon)&&o.value.setIcon(p)});const{options:i,methods:s}=$e(e,o,t),r={moveHandler:Le(s.latLngSync)};return E(async()=>{const{marker:p,divIcon:u}=n?_.L:await S(()=>import("./leaflet-src.esm-HdBnhJze.js"),[]);xe(i,t)&&(i.icon=u({className:""})),o.value=k(p(e.latLng,i));const{listeners:c}=U(t.attrs);o.value.on(c),o.value.on("move",r.moveHandler),I(s,o.value,e),a({...e,...s,leafletObject:o.value}),l.value=!0,P(()=>t.emit("ready",o.value))}),W(()=>ue(r)),{ready:l,leafletObject:o}},render(){return ve(this.ready,this.$slots)}}),Oe={...te,smoothFactor:{type:Number},noClip:{type:Boolean,default:void 0},latLngs:{type:Array,required:!0,custom:!0}},Ze=(e,t,o)=>{const{options:l,methods:n}=Ne(e,t,o),a=O(e,Oe,l),i={...n,setSmoothFactor(s){t.value.setStyle({smoothFactor:s})},setNoClip(s){t.value.setStyle({noClip:s})},addLatLng(s){t.value.addLatLng(s)}};return{options:a,methods:i}},Q={...Oe},qe=(e,t,o)=>{const{options:l,methods:n}=Ze(e,t,o),a=O(e,Q,l),i={...n,toGeoJSON(s){return t.value.toGeoJSON(s)}};return{options:a,methods:i}},_e={...Z,content:{type:String,default:null}},Fe=(e,t)=>{const{options:o,methods:l}=q(e),n={...l,setContent(a){t.value&&a!==null&&a!==void 0&&t.value.setContent(a)}};return{options:o,methods:n}},He=e=>e.default?D("div",{ref:"root"},e.default()):null,Je={..._e,latLng:{type:[Object,Array],default:()=>[]}},We=(e,t)=>{const{options:o,methods:l}=Fe(e,t);return{options:o,methods:l}},ot=w({name:"LPopup",props:Je,setup(e,t){const o=b(),l=b(null),n=B(N),a=h(fe),i=h(me),{options:s,methods:r}=We(e,o);return E(async()=>{const{popup:p}=n?_.L:await S(()=>import("./leaflet-src.esm-HdBnhJze.js"),[]);o.value=k(p(s)),e.latLng!==void 0&&o.value.setLatLng(e.latLng),I(r,o.value,e);const{listeners:u}=U(t.attrs);o.value.on(u),o.value.setContent(e.content||l.value||""),a(o.value),P(()=>t.emit("ready",o.value))}),W(()=>{i()}),{root:l,leafletObject:o}},render(){return He(this.$slots)}}),Ce={...Q,latLngs:{...Q.latLngs,required:!1},bounds:{type:Object,custom:!0}},Ke=(e,t,o)=>{const{options:l,methods:n}=qe(e,t,o),a=O(e,Ce,l),i={...n,setBounds(s){t.value.setBounds(s)},setLatLngs(s){t.value.setBounds(s)}};return{options:a,methods:i}},lt=w({name:"LRectangle",props:Ce,setup(e,t){const o=b(),l=b(!1),n=B(N),a=h(M),{options:i,methods:s}=Ke(e,o,t);return E(async()=>{const{rectangle:r,latLngBounds:p}=n?_.L:await S(()=>import("./leaflet-src.esm-HdBnhJze.js"),[]),u=e.bounds?p(e.bounds):p(e.latLngs||[]);o.value=k(r(u,i));const{listeners:c}=U(t.attrs);o.value.on(c),I(s,o.value,e),a({...e,...s,leafletObject:o.value}),l.value=!0,P(()=>t.emit("ready",o.value))}),{ready:l,leafletObject:o}},render(){return ve(this.ready,this.$slots)}}),le={...oe,tms:{type:Boolean,default:void 0},subdomains:{type:[String,Array],validator:e=>typeof e=="string"?!0:Array.isArray(e)?e.every(t=>typeof t=="string"):!1},detectRetina:{type:Boolean,default:void 0},url:{type:String,required:!0,custom:!0}},Qe=(e,t,o)=>{const{options:l,methods:n}=he(e,t,o),a=O(e,le,l),i={...n};return{options:a,methods:i}},at=w({props:le,setup(e,t){const o=b(),l=B(N),n=h(M),{options:a,methods:i}=Qe(e,o,t);return E(async()=>{const{tileLayer:s}=l?_.L:await S(()=>import("./leaflet-src.esm-HdBnhJze.js"),[]);o.value=k(s(e.url,a));const{listeners:r}=U(t.attrs);o.value.on(r),I(i,o.value,e),n({...e,...i,leafletObject:o.value}),P(()=>t.emit("ready",o.value))}),{leafletObject:o}},render(){return null}});({..._e});({...le});export{et as i,lt as m,tt as u,at as v,ot as y}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/web-DmsbVeCO.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/web-DmsbVeCO.js deleted file mode 100644 index cc1ad95..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/web-DmsbVeCO.js +++ /dev/null @@ -1 +0,0 @@ -import{W as t}from"./main.capacitor-CiEwp7dR.js";import"./main.common-DD7dqhZp.js";import"./index-BGoTPXII.js";class r extends t{constructor(){super(),this.handleVisibilityChange=()=>{const e={isActive:document.hidden!==!0};this.notifyListeners("appStateChange",e),document.hidden?this.notifyListeners("pause",null):this.notifyListeners("resume",null)},document.addEventListener("visibilitychange",this.handleVisibilityChange,!1)}exitApp(){throw this.unimplemented("Not implemented on web.")}async getInfo(){throw this.unimplemented("Not implemented on web.")}async getLaunchUrl(){return{url:""}}async getState(){return{isActive:document.hidden!==!0}}async minimizeApp(){throw this.unimplemented("Not implemented on web.")}}export{r as AppWeb}; diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/windows-system-enable-notifications-Dpjdl83C.png b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/windows-system-enable-notifications-Dpjdl83C.png deleted file mode 100644 index c92fcd2..0000000 Binary files a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/assets/windows-system-enable-notifications-Dpjdl83C.png and /dev/null differ diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/cordova.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/cordova.js deleted file mode 100644 index e69de29..0000000 diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/cordova_plugins.js b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/cordova_plugins.js deleted file mode 100644 index e69de29..0000000 diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/favicon.ico b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/favicon.ico deleted file mode 100644 index 7dd1c89..0000000 Binary files a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/favicon.ico and /dev/null differ diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/background/cert-frame-1.jpg b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/background/cert-frame-1.jpg deleted file mode 100644 index 8353228..0000000 Binary files a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/background/cert-frame-1.jpg and /dev/null differ diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/background/cert-frame-2.jpg b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/background/cert-frame-2.jpg deleted file mode 100644 index a901aff..0000000 Binary files a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/background/cert-frame-2.jpg and /dev/null differ diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/android-chrome-192x192.png b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/android-chrome-192x192.png deleted file mode 100644 index d98e8be..0000000 Binary files a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/android-chrome-192x192.png and /dev/null differ diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/android-chrome-512x512.png b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/android-chrome-512x512.png deleted file mode 100644 index ec8cb09..0000000 Binary files a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/android-chrome-512x512.png and /dev/null differ diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/android-chrome-maskable-192x192.png b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/android-chrome-maskable-192x192.png deleted file mode 100644 index 172fd13..0000000 Binary files a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/android-chrome-maskable-192x192.png and /dev/null differ diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/android-chrome-maskable-512x512.png b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/android-chrome-maskable-512x512.png deleted file mode 100644 index 3905770..0000000 Binary files a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/android-chrome-maskable-512x512.png and /dev/null differ diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/apple-touch-icon-120x120.png b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/apple-touch-icon-120x120.png deleted file mode 100644 index ea61f7e..0000000 Binary files a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/apple-touch-icon-120x120.png and /dev/null differ diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/apple-touch-icon-152x152.png b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/apple-touch-icon-152x152.png deleted file mode 100644 index e112d96..0000000 Binary files a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/apple-touch-icon-152x152.png and /dev/null differ diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/apple-touch-icon-180x180.png b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/apple-touch-icon-180x180.png deleted file mode 100644 index 70a5fcf..0000000 Binary files a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/apple-touch-icon-180x180.png and /dev/null differ diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/apple-touch-icon-60x60.png b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/apple-touch-icon-60x60.png deleted file mode 100644 index 7374d46..0000000 Binary files a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/apple-touch-icon-60x60.png and /dev/null differ diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/apple-touch-icon-76x76.png b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/apple-touch-icon-76x76.png deleted file mode 100644 index df5e54c..0000000 Binary files a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/apple-touch-icon-76x76.png and /dev/null differ diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/apple-touch-icon.png b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/apple-touch-icon.png deleted file mode 100644 index 70a5fcf..0000000 Binary files a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/apple-touch-icon.png and /dev/null differ diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/favicon-16x16.png b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/favicon-16x16.png deleted file mode 100644 index dbcf457..0000000 Binary files a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/favicon-16x16.png and /dev/null differ diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/favicon-32x32.png b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/favicon-32x32.png deleted file mode 100644 index 1aa1195..0000000 Binary files a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/favicon-32x32.png and /dev/null differ diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/msapplication-icon-144x144.png b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/msapplication-icon-144x144.png deleted file mode 100644 index 443baa2..0000000 Binary files a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/msapplication-icon-144x144.png and /dev/null differ diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/mstile-150x150.png b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/mstile-150x150.png deleted file mode 100644 index c8ce73a..0000000 Binary files a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/mstile-150x150.png and /dev/null differ diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/safari-pinned-tab-512x512.svg b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/safari-pinned-tab-512x512.svg deleted file mode 100644 index 90688cf..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/safari-pinned-tab-512x512.svg +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/safari-pinned-tab.svg b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/safari-pinned-tab.svg deleted file mode 100644 index 15d9574..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/icons/safari-pinned-tab.svg +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/textures/leafy-autumn-forest-floor.jpg b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/textures/leafy-autumn-forest-floor.jpg deleted file mode 100644 index cadd5a6..0000000 Binary files a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/img/textures/leafy-autumn-forest-floor.jpg and /dev/null differ diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/index.html b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/index.html deleted file mode 100644 index 189f7c9..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/index.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - TimeSafari - - - - -
- - diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/models/lupine_plant/license.txt b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/models/lupine_plant/license.txt deleted file mode 100644 index 9a6980c..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/models/lupine_plant/license.txt +++ /dev/null @@ -1,11 +0,0 @@ -Model Information: -* title: Lupine Plant -* source: https://sketchfab.com/3d-models/lupine-plant-bf30f1110c174d4baedda0ed63778439 -* author: rufusrockwell (https://sketchfab.com/rufusrockwell) - -Model License: -* license type: CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/) -* requirements: Author must be credited. Commercial use is allowed. - -If you use this 3D model in your project be sure to copy paste this credit wherever you share it: -This work is based on "Lupine Plant" (https://sketchfab.com/3d-models/lupine-plant-bf30f1110c174d4baedda0ed63778439) by rufusrockwell (https://sketchfab.com/rufusrockwell) licensed under CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/) \ No newline at end of file diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/models/lupine_plant/scene.bin b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/models/lupine_plant/scene.bin deleted file mode 100644 index e523e7d..0000000 Binary files a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/models/lupine_plant/scene.bin and /dev/null differ diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/models/lupine_plant/scene.gltf b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/models/lupine_plant/scene.gltf deleted file mode 100644 index 0ec1997..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/models/lupine_plant/scene.gltf +++ /dev/null @@ -1,229 +0,0 @@ -{ - "accessors": [ - { - "bufferView": 2, - "componentType": 5126, - "count": 2759, - "max": [ - 41.3074951171875, - 40.37548828125, - 87.85917663574219 - ], - "min": [ - -35.245540618896484, - -36.895416259765625, - -0.9094290137290955 - ], - "type": "VEC3" - }, - { - "bufferView": 2, - "byteOffset": 33108, - "componentType": 5126, - "count": 2759, - "max": [ - 0.9999382495880127, - 0.9986748695373535, - 0.9985831379890442 - ], - "min": [ - -0.9998949766159058, - -0.9975876212120056, - -0.411094069480896 - ], - "type": "VEC3" - }, - { - "bufferView": 3, - "componentType": 5126, - "count": 2759, - "max": [ - 0.9987699389457703, - 0.9998998045921326, - 0.9577858448028564, - 1.0 - ], - "min": [ - -0.9987726807594299, - -0.9990445971488953, - -0.999801516532898, - 1.0 - ], - "type": "VEC4" - }, - { - "bufferView": 1, - "componentType": 5126, - "count": 2759, - "max": [ - 1.0061479806900024, - 0.9993550181388855 - ], - "min": [ - 0.00279300007969141, - 0.0011620000004768372 - ], - "type": "VEC2" - }, - { - "bufferView": 0, - "componentType": 5125, - "count": 6378, - "type": "SCALAR" - } - ], - "asset": { - "extras": { - "author": "rufusrockwell (https://sketchfab.com/rufusrockwell)", - "license": "CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)", - "source": "https://sketchfab.com/3d-models/lupine-plant-bf30f1110c174d4baedda0ed63778439", - "title": "Lupine Plant" - }, - "generator": "Sketchfab-12.68.0", - "version": "2.0" - }, - "bufferViews": [ - { - "buffer": 0, - "byteLength": 25512, - "name": "floatBufferViews", - "target": 34963 - }, - { - "buffer": 0, - "byteLength": 22072, - "byteOffset": 25512, - "byteStride": 8, - "name": "floatBufferViews", - "target": 34962 - }, - { - "buffer": 0, - "byteLength": 66216, - "byteOffset": 47584, - "byteStride": 12, - "name": "floatBufferViews", - "target": 34962 - }, - { - "buffer": 0, - "byteLength": 44144, - "byteOffset": 113800, - "byteStride": 16, - "name": "floatBufferViews", - "target": 34962 - } - ], - "buffers": [ - { - "byteLength": 157944, - "uri": "scene.bin" - } - ], - "images": [ - { - "uri": "textures/lambert2SG_baseColor.png" - }, - { - "uri": "textures/lambert2SG_normal.png" - } - ], - "materials": [ - { - "alphaCutoff": 0.2, - "alphaMode": "MASK", - "doubleSided": true, - "name": "lambert2SG", - "normalTexture": { - "index": 1 - }, - "pbrMetallicRoughness": { - "baseColorTexture": { - "index": 0 - }, - "metallicFactor": 0.0 - } - } - ], - "meshes": [ - { - "name": "Object_0", - "primitives": [ - { - "attributes": { - "NORMAL": 1, - "POSITION": 0, - "TANGENT": 2, - "TEXCOORD_0": 3 - }, - "indices": 4, - "material": 0, - "mode": 4 - } - ] - } - ], - "nodes": [ - { - "children": [ - 1 - ], - "matrix": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 2.220446049250313e-16, - -1.0, - 0.0, - 0.0, - 1.0, - 2.220446049250313e-16, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0 - ], - "name": "Sketchfab_model" - }, - { - "children": [ - 2 - ], - "name": "LupineSF.obj.cleaner.materialmerger.gles" - }, - { - "mesh": 0, - "name": "Object_2" - } - ], - "samplers": [ - { - "magFilter": 9729, - "minFilter": 9987, - "wrapS": 10497, - "wrapT": 10497 - } - ], - "scene": 0, - "scenes": [ - { - "name": "Sketchfab_Scene", - "nodes": [ - 0 - ] - } - ], - "textures": [ - { - "sampler": 0, - "source": 0 - }, - { - "sampler": 0, - "source": 1 - } - ] -} diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/models/lupine_plant/textures/lambert2SG_baseColor.png b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/models/lupine_plant/textures/lambert2SG_baseColor.png deleted file mode 100644 index 211290e..0000000 Binary files a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/models/lupine_plant/textures/lambert2SG_baseColor.png and /dev/null differ diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/models/lupine_plant/textures/lambert2SG_normal.png b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/models/lupine_plant/textures/lambert2SG_normal.png deleted file mode 100644 index a4e6ffe..0000000 Binary files a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/models/lupine_plant/textures/lambert2SG_normal.png and /dev/null differ diff --git a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/robots.txt b/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/robots.txt deleted file mode 100644 index eb05362..0000000 --- a/android/app/build/intermediates/assets/debug/mergeDebugAssets/public/robots.txt +++ /dev/null @@ -1,2 +0,0 @@ -User-agent: * -Disallow: diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/capacitor.config.json b/android/app/build/intermediates/assets/release/mergeReleaseAssets/capacitor.config.json deleted file mode 100644 index 26d38ce..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/capacitor.config.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "appId": "app.timesafari.app", - "appName": "TimeSafari", - "webDir": "dist", - "bundledWebRuntime": false, - "server": { - "cleartext": true - }, - "plugins": { - "App": { - "appUrlOpen": { - "handlers": [ - { - "url": "timesafari://*", - "autoVerify": true - } - ] - } - } - } -} diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/capacitor.plugins.json b/android/app/build/intermediates/assets/release/mergeReleaseAssets/capacitor.plugins.json deleted file mode 100644 index 21a0521..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/capacitor.plugins.json +++ /dev/null @@ -1,6 +0,0 @@ -[ - { - "pkg": "@capacitor/app", - "classpath": "com.capacitorjs.plugins.app.AppPlugin" - } -] diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/native-bridge.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/native-bridge.js deleted file mode 100644 index 17db853..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/native-bridge.js +++ /dev/null @@ -1,1025 +0,0 @@ - -/*! Capacitor: https://capacitorjs.com/ - MIT License */ -/* Generated File. Do not edit. */ - -var nativeBridge = (function (exports) { - 'use strict'; - - var ExceptionCode; - (function (ExceptionCode) { - /** - * API is not implemented. - * - * This usually means the API can't be used because it is not implemented for - * the current platform. - */ - ExceptionCode["Unimplemented"] = "UNIMPLEMENTED"; - /** - * API is not available. - * - * This means the API can't be used right now because: - * - it is currently missing a prerequisite, such as network connectivity - * - it requires a particular platform or browser version - */ - ExceptionCode["Unavailable"] = "UNAVAILABLE"; - })(ExceptionCode || (ExceptionCode = {})); - class CapacitorException extends Error { - constructor(message, code, data) { - super(message); - this.message = message; - this.code = code; - this.data = data; - } - } - - // For removing exports for iOS/Android, keep let for reassignment - // eslint-disable-next-line - let dummy = {}; - const readFileAsBase64 = (file) => new Promise((resolve, reject) => { - const reader = new FileReader(); - reader.onloadend = () => { - const data = reader.result; - resolve(btoa(data)); - }; - reader.onerror = reject; - reader.readAsBinaryString(file); - }); - const convertFormData = async (formData) => { - const newFormData = []; - for (const pair of formData.entries()) { - const [key, value] = pair; - if (value instanceof File) { - const base64File = await readFileAsBase64(value); - newFormData.push({ - key, - value: base64File, - type: 'base64File', - contentType: value.type, - fileName: value.name, - }); - } - else { - newFormData.push({ key, value, type: 'string' }); - } - } - return newFormData; - }; - const convertBody = async (body, contentType) => { - if (body instanceof ReadableStream || body instanceof Uint8Array) { - let encodedData; - if (body instanceof ReadableStream) { - const reader = body.getReader(); - const chunks = []; - while (true) { - const { done, value } = await reader.read(); - if (done) - break; - chunks.push(value); - } - const concatenated = new Uint8Array(chunks.reduce((acc, chunk) => acc + chunk.length, 0)); - let position = 0; - for (const chunk of chunks) { - concatenated.set(chunk, position); - position += chunk.length; - } - encodedData = concatenated; - } - else { - encodedData = body; - } - let data = new TextDecoder().decode(encodedData); - let type; - if (contentType === 'application/json') { - try { - data = JSON.parse(data); - } - catch (ignored) { - // ignore - } - type = 'json'; - } - else if (contentType === 'multipart/form-data') { - type = 'formData'; - } - else if (contentType === null || contentType === void 0 ? void 0 : contentType.startsWith('image')) { - type = 'image'; - } - else if (contentType === 'application/octet-stream') { - type = 'binary'; - } - else { - type = 'text'; - } - return { - data, - type, - headers: { 'Content-Type': contentType || 'application/octet-stream' }, - }; - } - else if (body instanceof URLSearchParams) { - return { - data: body.toString(), - type: 'text', - }; - } - else if (body instanceof FormData) { - const formData = await convertFormData(body); - return { - data: formData, - type: 'formData', - }; - } - else if (body instanceof File) { - const fileData = await readFileAsBase64(body); - return { - data: fileData, - type: 'file', - headers: { 'Content-Type': body.type }, - }; - } - return { data: body, type: 'json' }; - }; - const CAPACITOR_HTTP_INTERCEPTOR = '/_capacitor_http_interceptor_'; - const CAPACITOR_HTTP_INTERCEPTOR_URL_PARAM = 'u'; - // TODO: export as Cap function - const isRelativeOrProxyUrl = (url) => !url || - !(url.startsWith('http:') || url.startsWith('https:')) || - url.indexOf(CAPACITOR_HTTP_INTERCEPTOR) > -1; - // TODO: export as Cap function - const createProxyUrl = (url, win) => { - var _a, _b; - if (isRelativeOrProxyUrl(url)) - return url; - const bridgeUrl = new URL((_b = (_a = win.Capacitor) === null || _a === void 0 ? void 0 : _a.getServerUrl()) !== null && _b !== void 0 ? _b : ''); - bridgeUrl.pathname = CAPACITOR_HTTP_INTERCEPTOR; - bridgeUrl.searchParams.append(CAPACITOR_HTTP_INTERCEPTOR_URL_PARAM, url); - return bridgeUrl.toString(); - }; - const initBridge = (w) => { - const getPlatformId = (win) => { - var _a, _b; - if (win === null || win === void 0 ? void 0 : win.androidBridge) { - return 'android'; - } - else if ((_b = (_a = win === null || win === void 0 ? void 0 : win.webkit) === null || _a === void 0 ? void 0 : _a.messageHandlers) === null || _b === void 0 ? void 0 : _b.bridge) { - return 'ios'; - } - else { - return 'web'; - } - }; - const convertFileSrcServerUrl = (webviewServerUrl, filePath) => { - if (typeof filePath === 'string') { - if (filePath.startsWith('/')) { - return webviewServerUrl + '/_capacitor_file_' + filePath; - } - else if (filePath.startsWith('file://')) { - return (webviewServerUrl + filePath.replace('file://', '/_capacitor_file_')); - } - else if (filePath.startsWith('content://')) { - return (webviewServerUrl + - filePath.replace('content:/', '/_capacitor_content_')); - } - } - return filePath; - }; - const initEvents = (win, cap) => { - cap.addListener = (pluginName, eventName, callback) => { - const callbackId = cap.nativeCallback(pluginName, 'addListener', { - eventName: eventName, - }, callback); - return { - remove: async () => { - var _a; - (_a = win === null || win === void 0 ? void 0 : win.console) === null || _a === void 0 ? void 0 : _a.debug('Removing listener', pluginName, eventName); - cap.removeListener(pluginName, callbackId, eventName, callback); - }, - }; - }; - cap.removeListener = (pluginName, callbackId, eventName, callback) => { - cap.nativeCallback(pluginName, 'removeListener', { - callbackId: callbackId, - eventName: eventName, - }, callback); - }; - cap.createEvent = (eventName, eventData) => { - const doc = win.document; - if (doc) { - const ev = doc.createEvent('Events'); - ev.initEvent(eventName, false, false); - if (eventData && typeof eventData === 'object') { - for (const i in eventData) { - // eslint-disable-next-line no-prototype-builtins - if (eventData.hasOwnProperty(i)) { - ev[i] = eventData[i]; - } - } - } - return ev; - } - return null; - }; - cap.triggerEvent = (eventName, target, eventData) => { - const doc = win.document; - const cordova = win.cordova; - eventData = eventData || {}; - const ev = cap.createEvent(eventName, eventData); - if (ev) { - if (target === 'document') { - if (cordova === null || cordova === void 0 ? void 0 : cordova.fireDocumentEvent) { - cordova.fireDocumentEvent(eventName, eventData); - return true; - } - else if (doc === null || doc === void 0 ? void 0 : doc.dispatchEvent) { - return doc.dispatchEvent(ev); - } - } - else if (target === 'window' && win.dispatchEvent) { - return win.dispatchEvent(ev); - } - else if (doc === null || doc === void 0 ? void 0 : doc.querySelector) { - const targetEl = doc.querySelector(target); - if (targetEl) { - return targetEl.dispatchEvent(ev); - } - } - } - return false; - }; - win.Capacitor = cap; - }; - const initLegacyHandlers = (win, cap) => { - // define cordova if it's not there already - win.cordova = win.cordova || {}; - const doc = win.document; - const nav = win.navigator; - if (nav) { - nav.app = nav.app || {}; - nav.app.exitApp = () => { - var _a; - if (!((_a = cap.Plugins) === null || _a === void 0 ? void 0 : _a.App)) { - win.console.warn('App plugin not installed'); - } - else { - cap.nativeCallback('App', 'exitApp', {}); - } - }; - } - if (doc) { - const docAddEventListener = doc.addEventListener; - doc.addEventListener = (...args) => { - var _a; - const eventName = args[0]; - const handler = args[1]; - if (eventName === 'deviceready' && handler) { - Promise.resolve().then(handler); - } - else if (eventName === 'backbutton' && cap.Plugins.App) { - // Add a dummy listener so Capacitor doesn't do the default - // back button action - if (!((_a = cap.Plugins) === null || _a === void 0 ? void 0 : _a.App)) { - win.console.warn('App plugin not installed'); - } - else { - cap.Plugins.App.addListener('backButton', () => { - // ignore - }); - } - } - return docAddEventListener.apply(doc, args); - }; - } - // deprecated in v3, remove from v4 - cap.platform = cap.getPlatform(); - cap.isNative = cap.isNativePlatform(); - win.Capacitor = cap; - }; - const initVendor = (win, cap) => { - const Ionic = (win.Ionic = win.Ionic || {}); - const IonicWebView = (Ionic.WebView = Ionic.WebView || {}); - const Plugins = cap.Plugins; - IonicWebView.getServerBasePath = (callback) => { - var _a; - (_a = Plugins === null || Plugins === void 0 ? void 0 : Plugins.WebView) === null || _a === void 0 ? void 0 : _a.getServerBasePath().then((result) => { - callback(result.path); - }); - }; - IonicWebView.setServerAssetPath = (path) => { - var _a; - (_a = Plugins === null || Plugins === void 0 ? void 0 : Plugins.WebView) === null || _a === void 0 ? void 0 : _a.setServerAssetPath({ path }); - }; - IonicWebView.setServerBasePath = (path) => { - var _a; - (_a = Plugins === null || Plugins === void 0 ? void 0 : Plugins.WebView) === null || _a === void 0 ? void 0 : _a.setServerBasePath({ path }); - }; - IonicWebView.persistServerBasePath = () => { - var _a; - (_a = Plugins === null || Plugins === void 0 ? void 0 : Plugins.WebView) === null || _a === void 0 ? void 0 : _a.persistServerBasePath(); - }; - IonicWebView.convertFileSrc = (url) => cap.convertFileSrc(url); - win.Capacitor = cap; - win.Ionic.WebView = IonicWebView; - }; - const initLogger = (win, cap) => { - const BRIDGED_CONSOLE_METHODS = [ - 'debug', - 'error', - 'info', - 'log', - 'trace', - 'warn', - ]; - const createLogFromNative = (c) => (result) => { - if (isFullConsole(c)) { - const success = result.success === true; - const tagStyles = success - ? 'font-style: italic; font-weight: lighter; color: gray' - : 'font-style: italic; font-weight: lighter; color: red'; - c.groupCollapsed('%cresult %c' + - result.pluginId + - '.' + - result.methodName + - ' (#' + - result.callbackId + - ')', tagStyles, 'font-style: italic; font-weight: bold; color: #444'); - if (result.success === false) { - c.error(result.error); - } - else { - c.dir(result.data); - } - c.groupEnd(); - } - else { - if (result.success === false) { - c.error('LOG FROM NATIVE', result.error); - } - else { - c.log('LOG FROM NATIVE', result.data); - } - } - }; - const createLogToNative = (c) => (call) => { - if (isFullConsole(c)) { - c.groupCollapsed('%cnative %c' + - call.pluginId + - '.' + - call.methodName + - ' (#' + - call.callbackId + - ')', 'font-weight: lighter; color: gray', 'font-weight: bold; color: #000'); - c.dir(call); - c.groupEnd(); - } - else { - c.log('LOG TO NATIVE: ', call); - } - }; - const isFullConsole = (c) => { - if (!c) { - return false; - } - return (typeof c.groupCollapsed === 'function' || - typeof c.groupEnd === 'function' || - typeof c.dir === 'function'); - }; - const serializeConsoleMessage = (msg) => { - try { - if (typeof msg === 'object') { - msg = JSON.stringify(msg); - } - return String(msg); - } - catch (e) { - return ''; - } - }; - const platform = getPlatformId(win); - if (platform == 'android' || platform == 'ios') { - // patch document.cookie on Android/iOS - win.CapacitorCookiesDescriptor = - Object.getOwnPropertyDescriptor(Document.prototype, 'cookie') || - Object.getOwnPropertyDescriptor(HTMLDocument.prototype, 'cookie'); - let doPatchCookies = false; - // check if capacitor cookies is disabled before patching - if (platform === 'ios') { - // Use prompt to synchronously get capacitor cookies config. - // https://stackoverflow.com/questions/29249132/wkwebview-complex-communication-between-javascript-native-code/49474323#49474323 - const payload = { - type: 'CapacitorCookies.isEnabled', - }; - const isCookiesEnabled = prompt(JSON.stringify(payload)); - if (isCookiesEnabled === 'true') { - doPatchCookies = true; - } - } - else if (typeof win.CapacitorCookiesAndroidInterface !== 'undefined') { - const isCookiesEnabled = win.CapacitorCookiesAndroidInterface.isEnabled(); - if (isCookiesEnabled === true) { - doPatchCookies = true; - } - } - if (doPatchCookies) { - Object.defineProperty(document, 'cookie', { - get: function () { - var _a, _b, _c; - if (platform === 'ios') { - // Use prompt to synchronously get cookies. - // https://stackoverflow.com/questions/29249132/wkwebview-complex-communication-between-javascript-native-code/49474323#49474323 - const payload = { - type: 'CapacitorCookies.get', - }; - const res = prompt(JSON.stringify(payload)); - return res; - } - else if (typeof win.CapacitorCookiesAndroidInterface !== 'undefined') { - // return original document.cookie since Android does not support filtering of `httpOnly` cookies - return (_c = (_b = (_a = win.CapacitorCookiesDescriptor) === null || _a === void 0 ? void 0 : _a.get) === null || _b === void 0 ? void 0 : _b.call(document)) !== null && _c !== void 0 ? _c : ''; - } - }, - set: function (val) { - const cookiePairs = val.split(';'); - const domainSection = val.toLowerCase().split('domain=')[1]; - const domain = cookiePairs.length > 1 && - domainSection != null && - domainSection.length > 0 - ? domainSection.split(';')[0].trim() - : ''; - if (platform === 'ios') { - // Use prompt to synchronously set cookies. - // https://stackoverflow.com/questions/29249132/wkwebview-complex-communication-between-javascript-native-code/49474323#49474323 - const payload = { - type: 'CapacitorCookies.set', - action: val, - domain, - }; - prompt(JSON.stringify(payload)); - } - else if (typeof win.CapacitorCookiesAndroidInterface !== 'undefined') { - win.CapacitorCookiesAndroidInterface.setCookie(domain, val); - } - }, - }); - } - // patch fetch / XHR on Android/iOS - // store original fetch & XHR functions - win.CapacitorWebFetch = window.fetch; - win.CapacitorWebXMLHttpRequest = { - abort: window.XMLHttpRequest.prototype.abort, - constructor: window.XMLHttpRequest.prototype.constructor, - fullObject: window.XMLHttpRequest, - getAllResponseHeaders: window.XMLHttpRequest.prototype.getAllResponseHeaders, - getResponseHeader: window.XMLHttpRequest.prototype.getResponseHeader, - open: window.XMLHttpRequest.prototype.open, - prototype: window.XMLHttpRequest.prototype, - send: window.XMLHttpRequest.prototype.send, - setRequestHeader: window.XMLHttpRequest.prototype.setRequestHeader, - }; - let doPatchHttp = false; - // check if capacitor http is disabled before patching - if (platform === 'ios') { - // Use prompt to synchronously get capacitor http config. - // https://stackoverflow.com/questions/29249132/wkwebview-complex-communication-between-javascript-native-code/49474323#49474323 - const payload = { - type: 'CapacitorHttp', - }; - const isHttpEnabled = prompt(JSON.stringify(payload)); - if (isHttpEnabled === 'true') { - doPatchHttp = true; - } - } - else if (typeof win.CapacitorHttpAndroidInterface !== 'undefined') { - const isHttpEnabled = win.CapacitorHttpAndroidInterface.isEnabled(); - if (isHttpEnabled === true) { - doPatchHttp = true; - } - } - if (doPatchHttp) { - // fetch patch - window.fetch = async (resource, options) => { - const request = new Request(resource, options); - if (request.url.startsWith(`${cap.getServerUrl()}/`)) { - return win.CapacitorWebFetch(resource, options); - } - const { method } = request; - if (method.toLocaleUpperCase() === 'GET' || - method.toLocaleUpperCase() === 'HEAD' || - method.toLocaleUpperCase() === 'OPTIONS' || - method.toLocaleUpperCase() === 'TRACE') { - if (typeof resource === 'string') { - return await win.CapacitorWebFetch(createProxyUrl(resource, win), options); - } - else if (resource instanceof Request) { - const modifiedRequest = new Request(createProxyUrl(resource.url, win), resource); - return await win.CapacitorWebFetch(modifiedRequest, options); - } - } - const tag = `CapacitorHttp fetch ${Date.now()} ${resource}`; - console.time(tag); - try { - const { body } = request; - const optionHeaders = Object.fromEntries(request.headers.entries()); - const { data: requestData, type, headers, } = await convertBody((options === null || options === void 0 ? void 0 : options.body) || body || undefined, optionHeaders['Content-Type'] || optionHeaders['content-type']); - const nativeResponse = await cap.nativePromise('CapacitorHttp', 'request', { - url: request.url, - method: method, - data: requestData, - dataType: type, - headers: Object.assign(Object.assign({}, headers), optionHeaders), - }); - const contentType = nativeResponse.headers['Content-Type'] || - nativeResponse.headers['content-type']; - let data = (contentType === null || contentType === void 0 ? void 0 : contentType.startsWith('application/json')) - ? JSON.stringify(nativeResponse.data) - : nativeResponse.data; - // use null data for 204 No Content HTTP response - if (nativeResponse.status === 204) { - data = null; - } - // intercept & parse response before returning - const response = new Response(data, { - headers: nativeResponse.headers, - status: nativeResponse.status, - }); - /* - * copy url to response, `cordova-plugin-ionic` uses this url from the response - * we need `Object.defineProperty` because url is an inherited getter on the Response - * see: https://stackoverflow.com/a/57382543 - * */ - Object.defineProperty(response, 'url', { - value: nativeResponse.url, - }); - console.timeEnd(tag); - return response; - } - catch (error) { - console.timeEnd(tag); - return Promise.reject(error); - } - }; - window.XMLHttpRequest = function () { - const xhr = new win.CapacitorWebXMLHttpRequest.constructor(); - Object.defineProperties(xhr, { - _headers: { - value: {}, - writable: true, - }, - _method: { - value: xhr.method, - writable: true, - }, - }); - const prototype = win.CapacitorWebXMLHttpRequest.prototype; - const isProgressEventAvailable = () => typeof ProgressEvent !== 'undefined' && - ProgressEvent.prototype instanceof Event; - // XHR patch abort - prototype.abort = function () { - if (isRelativeOrProxyUrl(this._url)) { - return win.CapacitorWebXMLHttpRequest.abort.call(this); - } - this.readyState = 0; - setTimeout(() => { - this.dispatchEvent(new Event('abort')); - this.dispatchEvent(new Event('loadend')); - }); - }; - // XHR patch open - prototype.open = function (method, url) { - this._method = method.toLocaleUpperCase(); - this._url = url; - if (!this._method || - this._method === 'GET' || - this._method === 'HEAD' || - this._method === 'OPTIONS' || - this._method === 'TRACE') { - if (isRelativeOrProxyUrl(url)) { - return win.CapacitorWebXMLHttpRequest.open.call(this, method, url); - } - this._url = createProxyUrl(this._url, win); - return win.CapacitorWebXMLHttpRequest.open.call(this, method, this._url); - } - Object.defineProperties(this, { - readyState: { - get: function () { - var _a; - return (_a = this._readyState) !== null && _a !== void 0 ? _a : 0; - }, - set: function (val) { - this._readyState = val; - setTimeout(() => { - this.dispatchEvent(new Event('readystatechange')); - }); - }, - }, - }); - setTimeout(() => { - this.dispatchEvent(new Event('loadstart')); - }); - this.readyState = 1; - }; - // XHR patch set request header - prototype.setRequestHeader = function (header, value) { - if (isRelativeOrProxyUrl(this._url)) { - return win.CapacitorWebXMLHttpRequest.setRequestHeader.call(this, header, value); - } - this._headers[header] = value; - }; - // XHR patch send - prototype.send = function (body) { - if (isRelativeOrProxyUrl(this._url)) { - return win.CapacitorWebXMLHttpRequest.send.call(this, body); - } - const tag = `CapacitorHttp XMLHttpRequest ${Date.now()} ${this._url}`; - console.time(tag); - try { - this.readyState = 2; - Object.defineProperties(this, { - response: { - value: '', - writable: true, - }, - responseText: { - value: '', - writable: true, - }, - responseURL: { - value: '', - writable: true, - }, - status: { - value: 0, - writable: true, - }, - }); - convertBody(body).then(({ data, type, headers }) => { - const otherHeaders = this._headers != null && Object.keys(this._headers).length > 0 - ? this._headers - : undefined; - // intercept request & pass to the bridge - cap - .nativePromise('CapacitorHttp', 'request', { - url: this._url, - method: this._method, - data: data !== null ? data : undefined, - headers: Object.assign(Object.assign({}, headers), otherHeaders), - dataType: type, - }) - .then((nativeResponse) => { - var _a; - // intercept & parse response before returning - if (this.readyState == 2) { - //TODO: Add progress event emission on native side - if (isProgressEventAvailable()) { - this.dispatchEvent(new ProgressEvent('progress', { - lengthComputable: true, - loaded: nativeResponse.data.length, - total: nativeResponse.data.length, - })); - } - this._headers = nativeResponse.headers; - this.status = nativeResponse.status; - if (this.responseType === '' || - this.responseType === 'text') { - this.response = - typeof nativeResponse.data !== 'string' - ? JSON.stringify(nativeResponse.data) - : nativeResponse.data; - } - else { - this.response = nativeResponse.data; - } - this.responseText = ((_a = (nativeResponse.headers['Content-Type'] || - nativeResponse.headers['content-type'])) === null || _a === void 0 ? void 0 : _a.startsWith('application/json')) - ? JSON.stringify(nativeResponse.data) - : nativeResponse.data; - this.responseURL = nativeResponse.url; - this.readyState = 4; - setTimeout(() => { - this.dispatchEvent(new Event('load')); - this.dispatchEvent(new Event('loadend')); - }); - } - console.timeEnd(tag); - }) - .catch((error) => { - this.status = error.status; - this._headers = error.headers; - this.response = error.data; - this.responseText = JSON.stringify(error.data); - this.responseURL = error.url; - this.readyState = 4; - if (isProgressEventAvailable()) { - this.dispatchEvent(new ProgressEvent('progress', { - lengthComputable: false, - loaded: 0, - total: 0, - })); - } - setTimeout(() => { - this.dispatchEvent(new Event('error')); - this.dispatchEvent(new Event('loadend')); - }); - console.timeEnd(tag); - }); - }); - } - catch (error) { - this.status = 500; - this._headers = {}; - this.response = error; - this.responseText = error.toString(); - this.responseURL = this._url; - this.readyState = 4; - if (isProgressEventAvailable()) { - this.dispatchEvent(new ProgressEvent('progress', { - lengthComputable: false, - loaded: 0, - total: 0, - })); - } - setTimeout(() => { - this.dispatchEvent(new Event('error')); - this.dispatchEvent(new Event('loadend')); - }); - console.timeEnd(tag); - } - }; - // XHR patch getAllResponseHeaders - prototype.getAllResponseHeaders = function () { - if (isRelativeOrProxyUrl(this._url)) { - return win.CapacitorWebXMLHttpRequest.getAllResponseHeaders.call(this); - } - let returnString = ''; - for (const key in this._headers) { - if (key != 'Set-Cookie') { - returnString += key + ': ' + this._headers[key] + '\r\n'; - } - } - return returnString; - }; - // XHR patch getResponseHeader - prototype.getResponseHeader = function (name) { - if (isRelativeOrProxyUrl(this._url)) { - return win.CapacitorWebXMLHttpRequest.getResponseHeader.call(this, name); - } - return this._headers[name]; - }; - Object.setPrototypeOf(xhr, prototype); - return xhr; - }; - Object.assign(window.XMLHttpRequest, win.CapacitorWebXMLHttpRequest.fullObject); - } - } - // patch window.console on iOS and store original console fns - const isIos = getPlatformId(win) === 'ios'; - if (win.console && isIos) { - Object.defineProperties(win.console, BRIDGED_CONSOLE_METHODS.reduce((props, method) => { - const consoleMethod = win.console[method].bind(win.console); - props[method] = { - value: (...args) => { - const msgs = [...args]; - cap.toNative('Console', 'log', { - level: method, - message: msgs.map(serializeConsoleMessage).join(' '), - }); - return consoleMethod(...args); - }, - }; - return props; - }, {})); - } - cap.logJs = (msg, level) => { - switch (level) { - case 'error': - win.console.error(msg); - break; - case 'warn': - win.console.warn(msg); - break; - case 'info': - win.console.info(msg); - break; - default: - win.console.log(msg); - } - }; - cap.logToNative = createLogToNative(win.console); - cap.logFromNative = createLogFromNative(win.console); - cap.handleError = err => win.console.error(err); - win.Capacitor = cap; - }; - function initNativeBridge(win) { - const cap = win.Capacitor || {}; - // keep a collection of callbacks for native response data - const callbacks = new Map(); - const webviewServerUrl = typeof win.WEBVIEW_SERVER_URL === 'string' ? win.WEBVIEW_SERVER_URL : ''; - cap.getServerUrl = () => webviewServerUrl; - cap.convertFileSrc = filePath => convertFileSrcServerUrl(webviewServerUrl, filePath); - // Counter of callback ids, randomized to avoid - // any issues during reloads if a call comes back with - // an existing callback id from an old session - let callbackIdCount = Math.floor(Math.random() * 134217728); - let postToNative = null; - const isNativePlatform = () => true; - const getPlatform = () => getPlatformId(win); - cap.getPlatform = getPlatform; - cap.isPluginAvailable = name => Object.prototype.hasOwnProperty.call(cap.Plugins, name); - cap.isNativePlatform = isNativePlatform; - // create the postToNative() fn if needed - if (getPlatformId(win) === 'android') { - // android platform - postToNative = data => { - var _a; - try { - win.androidBridge.postMessage(JSON.stringify(data)); - } - catch (e) { - (_a = win === null || win === void 0 ? void 0 : win.console) === null || _a === void 0 ? void 0 : _a.error(e); - } - }; - } - else if (getPlatformId(win) === 'ios') { - // ios platform - postToNative = data => { - var _a; - try { - data.type = data.type ? data.type : 'message'; - win.webkit.messageHandlers.bridge.postMessage(data); - } - catch (e) { - (_a = win === null || win === void 0 ? void 0 : win.console) === null || _a === void 0 ? void 0 : _a.error(e); - } - }; - } - cap.handleWindowError = (msg, url, lineNo, columnNo, err) => { - const str = msg.toLowerCase(); - if (str.indexOf('script error') > -1) ; - else { - const errObj = { - type: 'js.error', - error: { - message: msg, - url: url, - line: lineNo, - col: columnNo, - errorObject: JSON.stringify(err), - }, - }; - if (err !== null) { - cap.handleError(err); - } - postToNative(errObj); - } - return false; - }; - if (cap.DEBUG) { - window.onerror = cap.handleWindowError; - } - initLogger(win, cap); - /** - * Send a plugin method call to the native layer - */ - cap.toNative = (pluginName, methodName, options, storedCallback) => { - var _a, _b; - try { - if (typeof postToNative === 'function') { - let callbackId = '-1'; - if (storedCallback && - (typeof storedCallback.callback === 'function' || - typeof storedCallback.resolve === 'function')) { - // store the call for later lookup - callbackId = String(++callbackIdCount); - callbacks.set(callbackId, storedCallback); - } - const callData = { - callbackId: callbackId, - pluginId: pluginName, - methodName: methodName, - options: options || {}, - }; - if (cap.isLoggingEnabled && pluginName !== 'Console') { - cap.logToNative(callData); - } - // post the call data to native - postToNative(callData); - return callbackId; - } - else { - (_a = win === null || win === void 0 ? void 0 : win.console) === null || _a === void 0 ? void 0 : _a.warn(`implementation unavailable for: ${pluginName}`); - } - } - catch (e) { - (_b = win === null || win === void 0 ? void 0 : win.console) === null || _b === void 0 ? void 0 : _b.error(e); - } - return null; - }; - if (win === null || win === void 0 ? void 0 : win.androidBridge) { - win.androidBridge.onmessage = function (event) { - returnResult(JSON.parse(event.data)); - }; - } - /** - * Process a response from the native layer. - */ - cap.fromNative = result => { - returnResult(result); - }; - const returnResult = (result) => { - var _a, _b; - if (cap.isLoggingEnabled && result.pluginId !== 'Console') { - cap.logFromNative(result); - } - // get the stored call, if it exists - try { - const storedCall = callbacks.get(result.callbackId); - if (storedCall) { - // looks like we've got a stored call - if (result.error) { - // ensure stacktraces by copying error properties to an Error - result.error = Object.keys(result.error).reduce((err, key) => { - // use any type to avoid importing util and compiling most of .ts files - err[key] = result.error[key]; - return err; - }, new cap.Exception('')); - } - if (typeof storedCall.callback === 'function') { - // callback - if (result.success) { - storedCall.callback(result.data); - } - else { - storedCall.callback(null, result.error); - } - } - else if (typeof storedCall.resolve === 'function') { - // promise - if (result.success) { - storedCall.resolve(result.data); - } - else { - storedCall.reject(result.error); - } - // no need to keep this stored callback - // around for a one time resolve promise - callbacks.delete(result.callbackId); - } - } - else if (!result.success && result.error) { - // no stored callback, but if there was an error let's log it - (_a = win === null || win === void 0 ? void 0 : win.console) === null || _a === void 0 ? void 0 : _a.warn(result.error); - } - if (result.save === false) { - callbacks.delete(result.callbackId); - } - } - catch (e) { - (_b = win === null || win === void 0 ? void 0 : win.console) === null || _b === void 0 ? void 0 : _b.error(e); - } - // always delete to prevent memory leaks - // overkill but we're not sure what apps will do with this data - delete result.data; - delete result.error; - }; - cap.nativeCallback = (pluginName, methodName, options, callback) => { - if (typeof options === 'function') { - console.warn(`Using a callback as the 'options' parameter of 'nativeCallback()' is deprecated.`); - callback = options; - options = null; - } - return cap.toNative(pluginName, methodName, options, { callback }); - }; - cap.nativePromise = (pluginName, methodName, options) => { - return new Promise((resolve, reject) => { - cap.toNative(pluginName, methodName, options, { - resolve: resolve, - reject: reject, - }); - }); - }; - // eslint-disable-next-line @typescript-eslint/no-unused-vars - cap.withPlugin = (_pluginId, _fn) => dummy; - cap.Exception = CapacitorException; - initEvents(win, cap); - initLegacyHandlers(win, cap); - initVendor(win, cap); - win.Capacitor = cap; - } - initNativeBridge(w); - }; - initBridge(typeof globalThis !== 'undefined' - ? globalThis - : typeof self !== 'undefined' - ? self - : typeof window !== 'undefined' - ? window - : typeof global !== 'undefined' - ? global - : {}); - - dummy = initBridge; - - Object.defineProperty(exports, '__esModule', { value: true }); - - return exports; - -})({}); diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/AccountViewView-BvsLGx3g.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/AccountViewView-BvsLGx3g.js deleted file mode 100644 index d1e1d7b..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/AccountViewView-BvsLGx3g.js +++ /dev/null @@ -1,11 +0,0 @@ -var re=Object.defineProperty;var ae=(t,e,i)=>e in t?re(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var n=(t,e,i)=>ae(t,typeof e!="symbol"?e+"":e,i);/* empty css */import{V as le,A as de,D as T,a as N,b as U,c as $,l as M,d,e as ue,M as c,f as pe,X as fe,u as Q,g as me,I as ge,C as ye,_ as he,h as f,j as a,k as o,m as h,n as l,w as S,t as m,o as b,v as E,p as X,q as I,s as x,x as L,y as Z,T as we,F as be,z as k,B as p}from"./main.common-DD7dqhZp.js";import{g as D,e as B,t as V,r as ve,b as _,D as ee,a as te,o as ce,f as Pe,c as Se,d as ke}from"./index-ryzpKtgI.js";import"./dexie-export-import-aIN45iyB.js";import{a as Ie}from"./leaflet-src-Dm7ILaeL.js";import{u as Ce}from"./index-CZnn7ED5.js";import{v as Re,u as Ae,i as xe}from"./vue-leaflet.es-DQekxOGR.js";import{E as Le}from"./EntityIcon-DciUb57i.js";import{I as Ee}from"./ImageMethodDialog-zrU-VGNm.js";import{P as De}from"./PushNotificationPermission-BPu7cCY7.js";import{Q as Te}from"./QuickNav-C8jPGtUY.js";import{T as Ne}from"./TopMessage-ZWDDjman.js";import{U as Ue}from"./UserNameDialog-BV49F4GW.js";import"./index-BGoTPXII.js";import"./_isString-B7bbuhPA.js";import"./PhotoDialog-DZbf20A6.js";var $e=Object.getOwnPropertyDescriptor,Me=(t,e,i,r)=>{for(var u=r>1?void 0:r?$e(e,i):e,v=t.length-1,P;v>=0;v--)(P=t[v])&&(u=P(u)||u);return u};const C=pe();let O=class extends le{constructor(){super(...arguments);n(this,"$notify");n(this,"$route");n(this,"$router");n(this,"AppConstants",de);n(this,"DEFAULT_PUSH_SERVER",T);n(this,"DEFAULT_IMAGE_API_SERVER",N);n(this,"DEFAULT_PARTNER_API_SERVER",U);n(this,"activeDid","");n(this,"apiServer","");n(this,"apiServerInput","");n(this,"derivationPath","");n(this,"downloadUrl","");n(this,"endorserLimits",null);n(this,"givenName","");n(this,"hideRegisterPromptOnNewContact",!1);n(this,"imageLimits",null);n(this,"includeUserProfileLocation",!1);n(this,"isRegistered",!1);n(this,"isSearchAreasSet",!1);n(this,"limitsMessage","");n(this,"loadingLimits",!1);n(this,"loadingProfile",!0);n(this,"notifyingNewActivity",!1);n(this,"notifyingNewActivityTime","");n(this,"notifyingReminder",!1);n(this,"notifyingReminderMessage","");n(this,"notifyingReminderTime","");n(this,"partnerApiServer",U);n(this,"partnerApiServerInput",U);n(this,"passkeyExpirationDescription","");n(this,"passkeyExpirationMinutes",$);n(this,"previousPasskeyExpirationMinutes",$);n(this,"profileImageUrl");n(this,"publicHex","");n(this,"publicBase64","");n(this,"savingProfile",!1);n(this,"showAdvanced",!1);n(this,"showB64Copy",!1);n(this,"showContactGives",!1);n(this,"showDidCopy",!1);n(this,"showDerCopy",!1);n(this,"showGeneralAdvanced",!1);n(this,"showLargeIdenticonId");n(this,"showLargeIdenticonUrl");n(this,"showPubCopy",!1);n(this,"showShortcutBvc",!1);n(this,"subscription",null);n(this,"warnIfProdServer",!1);n(this,"warnIfTestServer",!1);n(this,"webPushServer",T);n(this,"webPushServerInput",T);n(this,"userProfileDesc","");n(this,"userProfileLatitude",0);n(this,"userProfileLongitude",0);n(this,"zoom",2)}async mounted(){var i;try{if(await this.initializeState(),await this.processIdentity(),this.isRegistered)try{const r=await D(this.activeDid),u=await this.axios.get(this.apiServer+"/api/partner/userProfileForIssuer/"+this.activeDid,{headers:r});if(u.status===200)this.userProfileDesc=u.data.data.description||"",this.userProfileLatitude=u.data.data.locLat||0,this.userProfileLongitude=u.data.data.locLon||0,this.userProfileLatitude&&this.userProfileLongitude&&(this.includeUserProfileLocation=!0);else throw Error("Unable to load profile.")}catch(r){r.status===404||(M("Error loading profile: "+B(r)),this.$notify({group:"alert",type:"danger",title:"Error Loading Profile",text:"Your server profile is not available."},5e3))}finally{this.loadingProfile=!1}}catch(r){console.error("Telling user to clear cache at page create because:",r),console.error("To repeat with concatenated error: telling user to clear cache at page create because: "+r),this.$notify({group:"alert",type:"danger",title:"Error Loading Profile",text:"See the Help page about errors with your personal data."},5e3)}try{const r=await((i=navigator.serviceWorker)==null?void 0:i.ready);this.subscription=await r.pushManager.getSubscription(),this.subscription||(this.notifyingNewActivity||this.notifyingReminder)&&this.turnOffNotifyingFlags()}catch{this.$notify({group:"alert",type:"warning",title:"Cannot Set Notifications",text:"This browser does not support notifications. Use Chrome, or install this to the home screen, or try other suggestions on the 'Troubleshoot your notifications' page."},3e3)}this.passkeyExpirationDescription=V()}beforeUnmount(){this.downloadUrl&&URL.revokeObjectURL(this.downloadUrl)}async initializeState(){await d.open();const i=await ue();this.activeDid=i.activeDid||"",this.apiServer=i.apiServer||"",this.apiServerInput=i.apiServer||"",this.givenName=((i==null?void 0:i.firstName)||"")+(i!=null&&i.lastName?` ${i.lastName}`:""),this.hideRegisterPromptOnNewContact=!!i.hideRegisterPromptOnNewContact,this.isRegistered=!!(i!=null&&i.isRegistered),this.isSearchAreasSet=!!i.searchBoxes,this.notifyingNewActivity=!!i.notifyingNewActivityTime,this.notifyingNewActivityTime=i.notifyingNewActivityTime||"",this.notifyingReminder=!!i.notifyingReminderTime,this.notifyingReminderMessage=i.notifyingReminderMessage||"",this.notifyingReminderTime=i.notifyingReminderTime||"",this.partnerApiServer=i.partnerApiServer||this.partnerApiServer,this.partnerApiServerInput=i.partnerApiServer||this.partnerApiServerInput,this.profileImageUrl=i.profileImageUrl,this.showContactGives=!!i.showContactGivesInline,this.passkeyExpirationMinutes=i.passkeyExpirationMinutes??$,this.previousPasskeyExpirationMinutes=this.passkeyExpirationMinutes,this.showGeneralAdvanced=!!i.showGeneralAdvanced,this.showShortcutBvc=!!i.showShortcutBvc,this.warnIfProdServer=!!i.warnIfProdServer,this.warnIfTestServer=!!i.warnIfTestServer,this.webPushServer=i.webPushServer||this.webPushServer,this.webPushServerInput=i.webPushServer||this.webPushServerInput}doCopyTwoSecRedo(i,r){r(),Ce().copy(i).then(()=>setTimeout(r,2e3))}async toggleShowContactAmounts(){this.showContactGives=!this.showContactGives,await d.open(),await d.settings.update(c,{showContactGivesInline:this.showContactGives})}async toggleShowGeneralAdvanced(){this.showGeneralAdvanced=!this.showGeneralAdvanced,await d.open(),await d.settings.update(c,{showGeneralAdvanced:this.showGeneralAdvanced})}async toggleProdWarning(){this.warnIfProdServer=!this.warnIfProdServer,await d.open(),await d.settings.update(c,{warnIfProdServer:this.warnIfProdServer})}async toggleTestWarning(){this.warnIfTestServer=!this.warnIfTestServer,await d.open(),await d.settings.update(c,{warnIfTestServer:this.warnIfTestServer})}async toggleShowShortcutBvc(){this.showShortcutBvc=!this.showShortcutBvc,await d.open(),await d.settings.update(c,{showShortcutBvc:this.showShortcutBvc})}readableDate(i){return i?i.substring(0,i.indexOf("T")):"?"}async processIdentity(){var r;const i=await ve(this.activeDid);if(i!=null&&i.identity){const u=JSON.parse(i.identity);this.publicHex=u.keys[0].publicKeyHex,this.publicBase64=_.Buffer.from(this.publicHex,"hex").toString("base64"),this.derivationPath=(r=u.keys[0].meta)==null?void 0:r.derivationPath,await this.checkLimits()}else i!=null&&i.publicKeyHex&&(this.publicHex=i.publicKeyHex,this.publicBase64=_.Buffer.from(this.publicHex,"hex").toString("base64"),await this.checkLimits())}async showNewActivityNotificationInfo(){this.$notify({group:"modal",type:"confirm",title:"New Activity Notification",text:` - This will only notify you when there is new relevant activity for you personally. - Note that it runs on your device and many factors may affect delivery, - so if you want a reliable but simple daily notification then choose a 'Reminder'. - Do you want more details? - `,onYes:async()=>{await this.$router.push({name:"help-notification-types"})},yesText:"tell me more."},-1)}async showNewActivityNotificationChoice(){this.notifyingNewActivity?this.$notify({group:"modal",type:"notification-off",title:ee,text:"",callback:async i=>{i&&(await d.settings.update(c,{notifyingNewActivityTime:""}),this.notifyingNewActivity=!1,this.notifyingNewActivityTime="")}},-1):this.$refs.pushNotificationPermission.open(ee,async(i,r)=>{i&&(await d.settings.update(c,{notifyingNewActivityTime:r}),this.notifyingNewActivity=!0,this.notifyingNewActivityTime=r)})}async showReminderNotificationInfo(){this.$notify({group:"modal",type:"confirm",title:"Reminder Notification",text:` - This will notify you at a specific time each day. - Note that it does not give you personalized notifications, - so if you want less reliable but personalized notification then choose a 'New Activity' Notification. - Do you want more details? - `,onYes:async()=>{await this.$router.push({name:"help-notification-types"})},yesText:"tell me more."},-1)}async showReminderNotificationChoice(){this.notifyingReminder?this.$notify({group:"modal",type:"notification-off",title:te,text:"",callback:async i=>{i&&(await d.settings.update(c,{notifyingReminderMessage:"",notifyingReminderTime:""}),this.notifyingReminder=!1,this.notifyingReminderMessage="",this.notifyingReminderTime="")}},-1):this.$refs.pushNotificationPermission.open(te,async(i,r,u)=>{i&&(await d.settings.update(c,{notifyingReminderMessage:u,notifyingReminderTime:r}),this.notifyingReminder=!0,this.notifyingReminderMessage=u||"",this.notifyingReminderTime=r)})}async toggleHideRegisterPromptOnNewContact(){const i=!this.hideRegisterPromptOnNewContact;await d.open(),await d.settings.update(c,{hideRegisterPromptOnNewContact:i}),this.hideRegisterPromptOnNewContact=i}async updatePasskeyExpiration(){await d.open(),await d.settings.update(c,{passkeyExpirationMinutes:this.passkeyExpirationMinutes}),ke(),this.passkeyExpirationDescription=V()}async turnOffNotifyingFlags(){await d.open(),await d.settings.update(c,{notifyingNewActivityTime:"",notifyingReminderMessage:"",notifyingReminderTime:""}),this.notifyingNewActivity=!1,this.notifyingNewActivityTime="",this.notifyingReminder=!1,this.notifyingReminderMessage="",this.notifyingReminderTime=""}async exportDatabase(){try{const i=await this.generateDatabaseBlob();this.downloadUrl=this.createBlobURL(i),this.downloadDatabaseBackup(this.downloadUrl),this.notifyDownloadStarted(),setTimeout(()=>URL.revokeObjectURL(this.downloadUrl),1e3)}catch(i){this.handleExportError(i)}}async generateDatabaseBlob(){return await d.export({prettyJson:!0})}createBlobURL(i){return URL.createObjectURL(i)}downloadDatabaseBackup(i){const r=this.$refs.downloadLink;r.href=i,r.download=`${d.name}-backup.json`,r.click()}computedStartDownloadLinkClassNames(){return{hidden:this.downloadUrl}}computedDownloadLinkClassNames(){return{hidden:!this.downloadUrl}}notifyDownloadStarted(){this.$notify({group:"alert",type:"success",title:"Download Started",text:"See your downloads directory for the backup. It is in the Dexie format."},-1)}handleExportError(i){console.error("Export Error:",i),this.$notify({group:"alert",type:"danger",title:"Export Error",text:"There was an error exporting the data."},3e3)}async uploadImportFile(i){C.value=i.target.files[0]}showContactImport(){return!!C.value}confirmSubmitImportFile(){C.value!=null&&this.$notify({group:"modal",type:"confirm",title:"Replace All",text:"This will replace all settings and contacts, so we recommend you first do the backup step above. Are you sure you want to import and replace all contacts and settings?",onYes:this.submitImportFile},-1)}async submitImportFile(){C.value!=null&&(await d.delete(),await fe.import(C.value,{progressCallback:this.progressCallback}))}async checkContactImports(){const i=new FileReader;i.onload=r=>{var v,P,w,g;const u=((v=r.target)==null?void 0:v.result)||"{}";try{const R=((g=(w=(P=JSON.parse(u).data)==null?void 0:P.data)==null?void 0:w.find(A=>A.tableName==="contacts"))==null?void 0:g.rows).map(A=>ce(["$types"],A));this.$router.push({name:"contact-import",query:{contacts:JSON.stringify(R)}})}catch(y){console.error("Error checking contact imports:",y),this.$notify({group:"alert",type:"danger",title:"Error Importing",text:"There was an error reading that Dexie file."},3e3)}},i.readAsText(C.value)}progressCallback(i){return console.log(`Import progress: ${i.completedRows} of ${i.totalRows} rows completed.`),i.done&&this.$notify({group:"alert",type:"success",title:"Import Complete",text:""},5e3),!0}async checkLimits(){this.activeDid?this.checkLimitsFor(this.activeDid):this.limitsMessage="You have no identifier, or your data has been corrupted."}async checkLimitsFor(i){this.loadingLimits=!0,this.limitsMessage="";try{const r=await Pe(this.apiServer,this.axios,i);if(r.status===200){if(this.endorserLimits=r.data,!this.isRegistered)try{await Q(i,{isRegistered:!0}),this.isRegistered=!0}catch(u){console.error("Got an error updating settings:",u),this.$notify({group:"alert",type:"danger",title:"Update Error",text:"Unable to update your settings. Check claim limits again."},5e3)}try{const u=await Se(this.axios,i);u.status===200?this.imageLimits=u.data:this.limitsMessage="You don't have access to upload images."}catch{this.limitsMessage="You cannot upload images."}}}catch(r){this.handleRateLimitsError(r)}this.loadingLimits=!1}handleRateLimitsError(i){var r,u;if(i instanceof me)if(i.status==400||i.status==404)console.log("Got 400 or 404 response retrieving limits which probably means they're not registered:",i),this.limitsMessage="No limits were found, so no actions are allowed.";else{const v=(r=i.response)==null?void 0:r.data;this.limitsMessage=((u=v==null?void 0:v.error)==null?void 0:u.message)||"Bad server response.",console.error("Got bad response retrieving limits:",i)}else this.limitsMessage="Got an error retrieving limits.",console.error("Got some error retrieving limits:",i)}async onClickSaveApiServer(){await d.open(),await d.settings.update(c,{apiServer:this.apiServerInput}),this.apiServer=this.apiServerInput}async onClickSavePartnerServer(){await d.open(),await d.settings.update(c,{partnerApiServer:this.partnerApiServerInput}),this.partnerApiServer=this.partnerApiServerInput}async onClickSavePushServer(){await d.open(),await d.settings.update(c,{webPushServer:this.webPushServerInput}),this.webPushServer=this.webPushServerInput,this.$notify({group:"alert",type:"warning",title:"Reload",text:"Now reload the app to get a new VAPID to use with this push server."},5e3)}openImageDialog(){this.$refs.imageMethodDialog.open(async i=>{await d.open(),await d.settings.update(c,{profileImageUrl:i}),this.profileImageUrl=i},ge,!0)}confirmDeleteImage(){this.$notify({group:"modal",type:"confirm",title:"Note that anyone with you already as a contact will no longer see a picture, and you will have to reshare your data with them if you save a new picture. Are you sure you want to delete your profile picture?",text:"",onYes:this.deleteImage},-1)}async deleteImage(){if(this.profileImageUrl)try{const i=await D(this.activeDid);this.passkeyExpirationDescription=V(),window.location.hostname==="localhost"&&!N.includes("localhost")&&console.log("Using shared image API server, so only users on that server can play with images.");const r=await this.axios.delete(N+"/image/"+encodeURIComponent(this.profileImageUrl),{headers:i});r.status===204||(console.error("Non-success deleting image:",r),this.$notify({group:"alert",type:"danger",title:"Error",text:"There was a problem deleting the image. Contact support if you want it removed from the servers."},5e3)),await d.open(),await d.settings.update(c,{profileImageUrl:void 0}),this.profileImageUrl=void 0}catch(i){console.error("Error deleting image:",i),i.response.status===404?(console.error("The image was already deleted:",i),await Q(this.activeDid,{profileImageUrl:void 0}),this.profileImageUrl=void 0):this.$notify({group:"alert",type:"danger",title:"Error",text:"There was an error deleting the image."},3e3)}}onMapReady(i){const r=this.userProfileLatitude&&this.userProfileLongitude?12:2;i.setView([this.userProfileLatitude,this.userProfileLongitude],r)}showProfileInfo(){this.$notify({group:"alert",type:"info",title:"Public Profile Information",text:"This data will be published for all to see, so be careful what your write. Your ID will only be shared with people who you allow to see your activity."},7e3)}async saveProfile(){var i,r,u,v,P;this.savingProfile=!0;try{const w=await D(this.activeDid),g={description:this.userProfileDesc};if(this.userProfileLatitude&&this.userProfileLongitude?(g.locLat=this.userProfileLatitude,g.locLon=this.userProfileLongitude):this.includeUserProfileLocation&&this.$notify({group:"alert",type:"toast",title:"",text:"No profile location is saved."},3e3),(await this.axios.post(this.apiServer+"/api/partner/userProfile",g,{headers:w})).status===201)this.$notify({group:"alert",type:"success",title:"Profile Saved",text:"Your profile has been updated successfully."},3e3);else throw Error("Profile not saved")}catch(w){M("Error saving profile: "+B(w));const g=((u=(r=(i=w.response)==null?void 0:i.data)==null?void 0:r.error)==null?void 0:u.message)||((P=(v=w.response)==null?void 0:v.data)==null?void 0:P.error)||w.message||"There was an error saving your profile.";this.$notify({group:"alert",type:"danger",title:"Error Saving Profile",text:g},3e3)}finally{this.savingProfile=!1}}toggleUserProfileLocation(){this.includeUserProfileLocation=!this.includeUserProfileLocation,this.includeUserProfileLocation||(this.userProfileLatitude=0,this.userProfileLongitude=0,this.zoom=2)}confirmEraseLatLong(){this.$notify({group:"modal",type:"confirm",title:"Erase Marker",text:"Are you sure you don't want to mark a location? This will erase the current location.",onYes:async()=>{this.eraseLatLong()}},-1)}eraseLatLong(){this.userProfileLatitude=0,this.userProfileLongitude=0,this.zoom=2,this.includeUserProfileLocation=!1}async confirmDeleteProfile(){this.$notify({group:"modal",type:"confirm",title:"Delete Profile",text:"Are you sure you want to delete your public profile? This will remove your description and location from the server, and it cannot be undone.",onYes:this.deleteProfile},-1)}async deleteProfile(){var i,r,u,v,P;this.savingProfile=!0;try{const w=await D(this.activeDid);if((await this.axios.delete(this.apiServer+"/api/partner/userProfile",{headers:w})).status===204)this.userProfileDesc="",this.userProfileLatitude=0,this.userProfileLongitude=0,this.includeUserProfileLocation=!1,this.$notify({group:"alert",type:"success",title:"Profile Deleted",text:"Your profile has been deleted successfully."},3e3);else throw Error("Profile not deleted")}catch(w){M("Error deleting profile: "+B(w));const g=((u=(r=(i=w.response)==null?void 0:i.data)==null?void 0:r.error)==null?void 0:u.message)||((P=(v=w.response)==null?void 0:v.data)==null?void 0:P.error)||w.message||"There was an error deleting your profile.";this.$notify({group:"alert",type:"danger",title:"Error Deleting Profile",text:g},3e3)}finally{this.savingProfile=!1}}};O=Me([ye({components:{EntityIcon:Le,ImageMethodDialog:Ee,LeafletMouseEvent:Ie.LeafletMouseEvent,LMap:xe,LMarker:Ae,LTileLayer:Re,PushNotificationPermission:De,QuickNav:Te,TopMessage:Ne,UserNameDialog:Ue}})],O);const Be={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},Ve={key:0,id:"noticeBeforeShare",class:"bg-amber-200 text-amber-900 border-amber-500 border-dashed border text-center rounded-md overflow-hidden px-4 py-3 mt-4"},Oe={id:"sectionIdentityDetails",class:"bg-slate-100 rounded-md overflow-hidden px-4 py-3 mt-4"},Ge={key:0},je={class:"text-xl font-semibold mb-2"},Fe={class:"whitespace-nowrap"},Ye={key:1,class:"block w-full text-center text-md bg-amber-200 border border-dashed border-slate-400 px-1.5 py-2 rounded-md mb-2"},He={class:"flex justify-center mt-4"},We={key:0,class:"flex justify-between"},ze={key:1,class:"text-center"},Ke={class:"mt-6"},qe={class:"flex justify-center text-center"},Je={class:"flex justify-center"},Qe={key:2,class:"fixed z-[100] top-0 inset-x-0 w-full"},Xe={class:"absolute inset-0 h-screen flex flex-col items-center justify-center bg-slate-900/50"},Ze={class:"text-sm text-slate-500 flex justify-start items-center mb-1","data-testId":"didWrapper"},_e={class:"truncate"},et={class:"text-blue-500 text-sm font-bold"},tt={key:1,id:"noticeBeforeAnnounce",class:"bg-amber-200 text-amber-900 border-amber-500 border-dashed border text-center rounded-md overflow-hidden px-4 py-3 mt-4"},ot={key:2,id:"sectionNotifications",class:"bg-slate-100 rounded-md overflow-hidden px-4 py-4 mt-8 mb-8"},it={class:"flex items-center justify-between"},st={key:0,class:"w-full flex justify-between"},nt={class:"ml-8 mr-8"},rt={class:"mt-2 flex items-center justify-between"},at={key:1,class:"w-full text-right"},lt={id:"sectionSearchLocation",class:"flex justify-between bg-slate-100 rounded-md overflow-hidden px-4 py-4 mt-8 mb-8"},dt={key:3,class:"bg-slate-100 rounded-md overflow-hidden px-4 py-4 mt-8 mb-8"},ut={key:0,class:"text-center mb-2"},pt={key:1,class:"flex items-center mb-2"},ft=["readonly"],mt={key:2,class:"mb-4 aspect-video"},gt={key:3},yt={class:"flex justify-between items-center"},ht=["disabled"],wt=["disabled"],bt={key:4},vt={key:5},ct={key:4,id:"sectionUsageLimits",class:"bg-slate-100 rounded-md overflow-hidden px-4 py-4 mt-8 mb-8"},Pt={key:0,class:"text-center"},St={class:"mb-4 text-center"},kt={class:"text-sm"},It={class:"whitespace-nowrap"},Ct={class:"mt-3 text-sm"},Rt={class:"whitespace-nowrap"},At={class:"mt-3 text-sm"},xt={class:"whitespace-nowrap"},Lt={id:"sectionDataExport",class:"bg-slate-100 rounded-md overflow-hidden px-4 py-4 mt-8 mb-8"},Et={class:"mt-4"},Dt={class:"list-disc list-outside ml-4"},Tt={key:5,id:"sectionAdvanced"},Nt={id:"sectionDeepIdentifier",class:"bg-slate-100 rounded-md overflow-hidden px-4 py-3 mb-4"},Ut={class:"text-sm text-slate-500 flex justify-start items-center mb-1"},$t={class:"truncate"},Mt={class:"text-sm text-slate-500 flex justify-start items-center mb-1"},Bt={class:"truncate"},Vt={key:0,class:"text-sm text-slate-500 flex justify-start items-center mb-1"},Ot={class:"truncate"},Gt={key:1,class:"text-sm text-slate-500 flex justify-start items-center mb-1"},jt={id:"sectionImportContactsSettings",class:"mt-4"},Ft={class:"ml-4 mt-2"},Yt={key:0,class:"mt-4"},Ht={class:"flex justify-center"},Wt={class:"flex justify-center"},zt={class:"relative ml-2"},Kt={id:"sectionClaimServer"},qt={class:"px-4 py-4"},Jt={class:"relative ml-2"},Qt={class:"relative ml-2"},Xt={class:"px-3 py-4"},Zt={key:0,class:"px-4 text-sm"},_t={class:"px-3 py-4"},eo={key:1,class:"px-4 text-sm"},to={class:"mt-2"},oo={class:"text-sm"},io={class:"relative ml-2"},so={class:"relative ml-2"},no={class:"flex mt-4"},ro={id:"sectionPasskeyExpiration",class:"flex justify-between"},ao={class:"text-sm ml-2"},lo={class:"relative ml-2"},uo={class:"relative ml-2"};function po(t,e,i,r,u,v){var j,F,Y,H,W,z,K,q,J;const P=k("QuickNav"),w=k("TopMessage"),g=k("router-link"),y=k("font-awesome"),G=k("UserNameDialog"),R=k("EntityIcon"),A=k("ImageMethodDialog"),oe=k("PushNotificationPermission"),ie=k("l-tile-layer"),se=k("l-marker"),ne=k("l-map");return p(),f(be,null,[a(P,{selected:"Profile"}),a(w),o("section",Be,[e[132]||(e[132]=o("h1",{id:"ViewHeading",class:"text-4xl text-center font-light"}," Your Identity ",-1)),t.activeDid?h("",!0):(p(),f("div",Ve,[e[56]||(e[56]=o("p",{class:"mb-4"},[o("b",null,"Note:"),l(" Before you can share with others or take any action, you need an identifier. ")],-1)),a(g,{to:{name:"start"},class:"inline-block text-md bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-4 py-2 rounded-md"},{default:S(()=>e[55]||(e[55]=[l(" Create An Identifier ")])),_:1})])),o("div",Oe,[t.givenName?(p(),f("div",Ge,[o("h2",je,[o("span",Fe,[a(g,{to:{name:"contact-qr"},class:"bg-slate-500 text-white px-1.5 py-1 rounded-md"},{default:S(()=>[a(y,{icon:"qrcode",class:"fa-fw text-xl"})]),_:1})]),l(" "+m(t.givenName)+" ",1),a(g,{to:{name:"new-edit-account"}},{default:S(()=>[a(y,{icon:"pen",class:"text-xs text-blue-500 ml-2 mb-1"})]),_:1})])])):(p(),f("span",Ye,[o("button",{class:"inline-block text-md uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-4 py-2 rounded-md",onClick:e[0]||(e[0]=()=>t.$refs.userNameDialog.open(s=>t.givenName=s))}," Set Your Name "),a(G,{ref:"userNameDialog"},null,512)])),o("div",He,[t.profileImageUrl?(p(),f("span",We,[a(R,{"icon-size":96,"profile-image-url":t.profileImageUrl,class:"inline-block align-text-bottom border border-slate-300 rounded",onClick:e[1]||(e[1]=s=>t.showLargeIdenticonUrl=t.profileImageUrl)},null,8,["profile-image-url"]),a(y,{icon:"trash-can",class:"text-red-500 fa-fw ml-8 mt-8 w-12 h-12",onClick:t.confirmDeleteImage},null,8,["onClick"])])):(p(),f("div",ze,[o("div",{class:"",onClick:e[2]||(e[2]=s=>t.openImageDialog())},[a(y,{icon:"image-portrait",class:"bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-2 rounded-l"}),a(y,{icon:"camera",class:"bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-2 rounded-r"})])])),a(A,{ref:"imageMethodDialog"},null,512)]),o("div",Ke,[o("div",qe,[l(" People "+m(t.profileImageUrl?"without your image":"")+" see this ",1),e[57]||(e[57]=o("br",null,null,-1)),e[58]||(e[58]=l(" (if you've let them see your activity): "))]),o("div",Je,[a(R,{"entity-id":t.activeDid,"icon-size":64,class:"inline-block align-middle border border-slate-300 rounded-md mr-1",onClick:e[3]||(e[3]=s=>t.showLargeIdenticonId=t.activeDid)},null,8,["entity-id"])])]),t.showLargeIdenticonId||t.showLargeIdenticonUrl?(p(),f("div",Qe,[o("div",Xe,[a(R,{"entity-id":t.showLargeIdenticonId,"icon-size":512,"profile-image-url":t.showLargeIdenticonUrl,class:"flex w-11/12 max-w-sm mx-auto mb-3 overflow-hidden bg-white rounded-lg shadow-lg",onClick:e[4]||(e[4]=s=>{t.showLargeIdenticonId=void 0,t.showLargeIdenticonUrl=void 0})},null,8,["entity-id","profile-image-url"])])])):h("",!0),e[60]||(e[60]=o("div",{class:"text-slate-500 text-sm font-bold"},"ID",-1)),o("div",Ze,[o("code",_e,m(t.activeDid),1),o("button",{class:"ml-2",onClick:e[5]||(e[5]=s=>t.doCopyTwoSecRedo(t.activeDid,()=>t.showDidCopy=!t.showDidCopy))},[a(y,{icon:"copy",class:"text-slate-400 fa-fw"})]),b(o("span",null,"Copied",512),[[E,t.showDidCopy]])]),o("div",et,[a(g,{to:{path:"/did/"+encodeURIComponent(t.activeDid)}},{default:S(()=>e[59]||(e[59]=[l(" Your Activity ")])),_:1},8,["to"])])]),t.isRegistered?h("",!0):(p(),f("div",tt,[e[62]||(e[62]=o("p",{class:"mb-4"},[o("b",null,"Note:"),l(" Before you can publicly announce a new project or time commitment, a friend needs to register you. ")],-1)),a(g,{to:{name:"contact-qr"},class:"inline-block text-md uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-4 py-2 rounded-md"},{default:S(()=>e[61]||(e[61]=[l(" Share Your Info ")])),_:1})])),t.isRegistered?(p(),f("div",ot,[e[70]||(e[70]=o("div",{class:"mb-2 font-bold"},"Notifications",-1)),o("div",it,[o("div",null,[e[63]||(e[63]=l(" Reminder Notification ")),a(y,{icon:"question-circle",class:"text-slate-400 fa-fw ml-2 cursor-pointer",onClick:X(t.showReminderNotificationInfo,["stop"])},null,8,["onClick"])]),o("div",{class:"relative ml-2 cursor-pointer",onClick:e[7]||(e[7]=s=>t.showReminderNotificationChoice())},[b(o("input",{"onUpdate:modelValue":e[6]||(e[6]=s=>t.notifyingReminder=s),type:"checkbox",class:"sr-only"},null,512),[[I,t.notifyingReminder]]),e[64]||(e[64]=o("div",{class:"block bg-slate-500 w-14 h-8 rounded-full"},null,-1)),e[65]||(e[65]=o("div",{class:"dot absolute left-1 top-1 bg-slate-400 w-6 h-6 rounded-full transition"},null,-1))])]),t.notifyingReminder?(p(),f("div",st,[o("span",nt,'Message: "'+m(t.notifyingReminderMessage)+'"',1),o("span",null,m(t.notifyingReminderTime.replace(" "," ")),1)])):h("",!0),o("div",rt,[o("div",null,[e[66]||(e[66]=l(" New Activity Notification ")),a(y,{icon:"question-circle",class:"text-slate-400 fa-fw ml-2 cursor-pointer",onClick:X(t.showNewActivityNotificationInfo,["stop"])},null,8,["onClick"])]),o("div",{class:"relative ml-2 cursor-pointer",onClick:e[9]||(e[9]=s=>t.showNewActivityNotificationChoice())},[b(o("input",{"onUpdate:modelValue":e[8]||(e[8]=s=>t.notifyingNewActivity=s),type:"checkbox",class:"sr-only"},null,512),[[I,t.notifyingNewActivity]]),e[67]||(e[67]=o("div",{class:"block bg-slate-500 w-14 h-8 rounded-full"},null,-1)),e[68]||(e[68]=o("div",{class:"dot absolute left-1 top-1 bg-slate-400 w-6 h-6 rounded-full transition"},null,-1))])]),t.notifyingNewActivityTime?(p(),f("div",at,m(t.notifyingNewActivityTime.replace(" "," ")),1)):h("",!0),a(g,{class:"pl-4 text-sm text-blue-500",to:"/help-notifications"},{default:S(()=>e[69]||(e[69]=[l(" Troubleshoot your notifications. ")])),_:1})])):h("",!0),a(oe,{ref:"pushNotificationPermission"},null,512),o("div",lt,[e[71]||(e[71]=o("span",{class:"mb-2 font-bold"},"Location for Searches",-1)),a(g,{to:{name:"search-area"},class:"text-m bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md mb-2"},{default:S(()=>[l(m(t.isSearchAreasSet?"Change":"Set")+" Search Area… ",1)]),_:1})]),t.isRegistered?(p(),f("div",dt,[t.loadingProfile?(p(),f("div",ut,[a(y,{icon:"spinner",class:"fa-spin text-slate-400"}),e[72]||(e[72]=l(" Loading profile... "))])):(p(),f("div",pt,[e[73]||(e[73]=o("span",{class:"font-bold"},"Public Profile",-1)),a(y,{icon:"circle-info",class:"text-slate-400 fa-fw ml-2 cursor-pointer",onClick:t.showProfileInfo},null,8,["onClick"])])),b(o("textarea",{"onUpdate:modelValue":e[10]||(e[10]=s=>t.userProfileDesc=s),class:L(["w-full h-32 p-2 border border-slate-300 rounded-md",{"bg-slate-100":t.loadingProfile||t.savingProfile}]),placeholder:"Write something about yourself for the public...",readonly:t.loadingProfile||t.savingProfile},null,10,ft),[[x,t.userProfileDesc]]),o("div",{class:"flex items-center mb-4",onClick:e[12]||(e[12]=(...s)=>t.toggleUserProfileLocation&&t.toggleUserProfileLocation(...s))},[b(o("input",{"onUpdate:modelValue":e[11]||(e[11]=s=>t.includeUserProfileLocation=s),type:"checkbox",class:"mr-2"},null,512),[[I,t.includeUserProfileLocation]]),e[74]||(e[74]=o("label",{for:"includeUserProfileLocation"},"Include Location",-1))]),t.includeUserProfileLocation?(p(),f("div",mt,[e[75]||(e[75]=o("p",{class:"text-sm mb-2 text-slate-500"}," For your security, choose a location nearby but not exactly at your place. ",-1)),a(ne,{ref:"profileMap",class:"!z-40 rounded-md",onClick:e[14]||(e[14]=s=>{t.userProfileLatitude=s.latlng.lat,t.userProfileLongitude=s.latlng.lng}),onReady:t.onMapReady},{default:S(()=>[a(ie,{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png","layer-type":"base",name:"OpenStreetMap"}),t.userProfileLatitude&&t.userProfileLongitude?(p(),Z(se,{key:0,"lat-lng":[t.userProfileLatitude,t.userProfileLongitude],onClick:e[13]||(e[13]=s=>t.confirmEraseLatLong())},null,8,["lat-lng"])):h("",!0)]),_:1},8,["onReady"])])):h("",!0),!t.loadingProfile&&!t.savingProfile?(p(),f("div",gt,[o("div",yt,[o("button",{class:L(["mt-2 px-4 py-2 bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white rounded-md",{"opacity-50 cursor-not-allowed":t.loadingProfile||t.savingProfile}]),disabled:t.loadingProfile||t.savingProfile,onClick:e[15]||(e[15]=(...s)=>t.saveProfile&&t.saveProfile(...s))}," Save Profile ",10,ht),o("button",{class:L(["mt-2 px-4 py-2 bg-gradient-to-b from-red-400 to-red-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white rounded-md",{"opacity-50 cursor-not-allowed":t.loadingProfile||t.savingProfile||!t.userProfileDesc&&!t.includeUserProfileLocation}]),disabled:t.loadingProfile||t.savingProfile,onClick:e[16]||(e[16]=(...s)=>t.confirmDeleteProfile&&t.confirmDeleteProfile(...s))}," Delete Profile ",10,wt)])])):t.loadingProfile?(p(),f("div",bt,"Loading...")):(p(),f("div",vt,"Saving..."))])):h("",!0),t.activeDid?(p(),f("div",ct,[e[88]||(e[88]=o("div",{class:"mb-2 font-bold"},"Usage Limits",-1)),t.loadingLimits?(p(),f("div",Pt,[e[76]||(e[76]=l(" Checking… ")),a(y,{icon:"spinner",class:"fa-spin"})])):h("",!0),o("div",St,m(t.limitsMessage),1),o("div",null,[o("p",kt,[e[77]||(e[77]=l(" You have done ")),o("b",null,m(((j=t.endorserLimits)==null?void 0:j.doneClaimsThisWeek)||"?")+" claims",1),e[78]||(e[78]=l(" out of ")),o("b",null,m(((F=t.endorserLimits)==null?void 0:F.maxClaimsPerWeek)||"?"),1),e[79]||(e[79]=l(" for this week. Your claims counter resets at ")),o("b",It,m(t.readableDate((Y=t.endorserLimits)==null?void 0:Y.nextWeekBeginDateTime)),1)]),o("p",Ct,[e[80]||(e[80]=l(" You have done ")),o("b",null,m(((H=t.endorserLimits)==null?void 0:H.doneRegistrationsThisMonth)||"?")+" registrations",1),e[81]||(e[81]=l(" out of ")),o("b",null,m(((W=t.endorserLimits)==null?void 0:W.maxRegistrationsPerMonth)||"?"),1),e[82]||(e[82]=l(" for this this month. ")),e[83]||(e[83]=o("i",null,"(You cannot register anyone on your first day.)",-1)),e[84]||(e[84]=l(" Your registration counter resets at ")),o("b",Rt,m(t.readableDate((z=t.endorserLimits)==null?void 0:z.nextMonthBeginDateTime)),1)]),o("p",At,[e[85]||(e[85]=l(" You have uploaded ")),o("b",null,m(((K=t.imageLimits)==null?void 0:K.doneImagesThisWeek)||"?")+" images",1),e[86]||(e[86]=l(" out of ")),o("b",null,m(((q=t.imageLimits)==null?void 0:q.maxImagesPerWeek)||"?"),1),e[87]||(e[87]=l(" for this week. Your image counter resets at ")),o("b",xt,m(t.readableDate((J=t.imageLimits)==null?void 0:J.nextWeekBeginDateTime)),1)])]),o("button",{class:"block float-right w-fit text-center text-md bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-4 py-2 rounded-md mt-2",onClick:e[17]||(e[17]=s=>t.checkLimits())}," Recheck Limits ")])):h("",!0),o("div",Lt,[e[95]||(e[95]=o("div",{class:"mb-2 font-bold"},"Data Export",-1)),t.activeDid?(p(),Z(g,{key:0,to:{name:"seed-backup"},class:"block w-full text-center text-md bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md mb-2 mt-2"},{default:S(()=>e[89]||(e[89]=[l(" Backup Identifier Seed ")])),_:1})):h("",!0),o("button",{class:L([t.computedStartDownloadLinkClassNames(),"block w-full text-center text-md bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md"]),onClick:e[18]||(e[18]=s=>t.exportDatabase())},e[90]||(e[90]=[l(" Download Settings & Contacts "),o("br",null,null,-1),l(" (excluding Identifier Data) ")]),2),o("a",{ref:"downloadLink",class:L([t.computedDownloadLinkClassNames(),"block w-full text-center text-md bg-gradient-to-b from-green-500 to-green-800 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md mb-6"])}," If no download happened yet, click again here to download now. ",2),o("div",Et,[e[94]||(e[94]=o("p",null," After the download, you can save the file in your preferred storage location. ",-1)),o("ul",null,[e[93]||(e[93]=o("li",{class:"list-disc list-outside ml-4"},' On iOS: Choose "More..." and select a place in iCloud, or go "Back" and save to another location. ',-1)),o("li",Dt,[e[91]||(e[91]=l(' On Android: Choose "Open" and then share ')),a(y,{icon:"share-nodes",class:"fa-fw"}),e[92]||(e[92]=l(" to your prefered place. "))])])])]),o("h3",{id:"advanced",class:"text-sm uppercase font-semibold mb-3",onClick:e[19]||(e[19]=s=>t.showAdvanced=!t.showAdvanced)}," Advanced "),t.showAdvanced||t.showGeneralAdvanced?(p(),f("div",Tt,[e[128]||(e[128]=o("p",{class:"text-rose-600 mb-8"}," Beware: the features here can be confusing and even change data in ways you do not expect. But we support your freedom! ",-1)),e[129]||(e[129]=o("span",{class:"text-slate-500 text-sm font-bold mb-2"}," Deep Identifier Details ",-1)),o("div",Nt,[e[96]||(e[96]=o("div",{class:"text-slate-500 text-sm font-bold"},"Public Key (base 64)",-1)),o("div",Ut,[o("code",$t,m(t.publicBase64),1),o("button",{class:"ml-2",onClick:e[20]||(e[20]=s=>t.doCopyTwoSecRedo(t.publicBase64,()=>t.showB64Copy=!t.showB64Copy))},[a(y,{icon:"copy",class:"text-slate-400 fa-fw"})]),b(o("span",null,"Copied",512),[[E,t.showB64Copy]])]),e[97]||(e[97]=o("div",{class:"text-slate-500 text-sm font-bold"},"Public Key (hex)",-1)),o("div",Mt,[o("code",Bt,m(t.publicHex),1),o("button",{class:"ml-2",onClick:e[21]||(e[21]=s=>t.doCopyTwoSecRedo(t.publicHex,()=>t.showPubCopy=!t.showPubCopy))},[a(y,{icon:"copy",class:"text-slate-400 fa-fw"})]),b(o("span",null,"Copied",512),[[E,t.showPubCopy]])]),e[98]||(e[98]=o("div",{class:"text-slate-500 text-sm font-bold"},"Derivation Path",-1)),t.derivationPath?(p(),f("div",Vt,[o("code",Ot,m(t.derivationPath),1),o("button",{class:"ml-2",onClick:e[22]||(e[22]=s=>t.doCopyTwoSecRedo(t.derivationPath,()=>t.showDerCopy=!t.showDerCopy))},[a(y,{icon:"copy",class:"text-slate-400 fa-fw"})]),b(o("span",null,"Copied",512),[[E,t.showDerCopy]])])):(p(),f("div",Gt," (none) "))]),a(g,{id:"switch-identity-link",to:{name:"identity-switcher"},class:"block w-fit text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-4 py-2 rounded-md mb-2"},{default:S(()=>e[99]||(e[99]=[l(" Switch Identifier ")])),_:1}),o("div",jt,[e[102]||(e[102]=o("h2",{class:"text-slate-500 text-sm font-bold"}," Import Contacts & Settings Database ",-1)),o("div",Ft,[o("input",{type:"file",class:"ml-2",onChange:e[23]||(e[23]=(...s)=>t.uploadImportFile&&t.uploadImportFile(...s))},null,32),a(we,{"enter-active-class":"transform ease-out duration-300 transition","enter-from-class":"translate-y-2 opacity-0 sm:translate-y-4","enter-to-class":"translate-y-0 opacity-100 sm:translate-y-0","leave-active-class":"transition ease-in duration-500","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:S(()=>[t.showContactImport()?(p(),f("div",Yt,[o("div",Ht,[o("button",{class:"block text-center text-md bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md mb-6",onClick:e[24]||(e[24]=s=>t.confirmSubmitImportFile())},e[100]||(e[100]=[l(" Overwrite Settings & Contacts "),o("br",null,null,-1),l(" (which doesn't include Identifier Data) ")]))]),o("div",Wt,[o("button",{class:"block text-center text-md bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md mb-6",onClick:e[25]||(e[25]=s=>t.checkContactImports())},e[101]||(e[101]=[l(" Import Only Contacts "),o("br",null,null,-1),l(" after comparing ")]))])])):h("",!0)]),_:1})])]),o("label",{for:"toggleShowAmounts",class:"flex items-center justify-between cursor-pointer my-4",onClick:e[27]||(e[27]=(...s)=>t.toggleShowContactAmounts&&t.toggleShowContactAmounts(...s))},[e[105]||(e[105]=o("span",{class:"text-slate-500 text-sm font-bold"},"Contacts Display",-1)),e[106]||(e[106]=o("span",{class:"ml-2"},"Show hours given & received",-1)),o("div",zt,[b(o("input",{"onUpdate:modelValue":e[26]||(e[26]=s=>t.showContactGives=s),type:"checkbox",name:"showContactGives",class:"sr-only"},null,512),[[I,t.showContactGives]]),e[103]||(e[103]=o("div",{class:"block bg-slate-500 w-14 h-8 rounded-full"},null,-1)),e[104]||(e[104]=o("div",{class:"dot absolute left-1 top-1 bg-slate-400 w-6 h-6 rounded-full transition"},null,-1))])]),o("div",Kt,[e[113]||(e[113]=o("h2",{class:"text-slate-500 text-sm font-bold mt-4"},"Claim Server",-1)),o("div",qt,[b(o("input",{"onUpdate:modelValue":e[28]||(e[28]=s=>t.apiServerInput=s),type:"text",class:"block w-full rounded border border-slate-400 px-4 py-2"},null,512),[[x,t.apiServerInput]]),t.apiServerInput!=t.apiServer?(p(),f("button",{key:0,class:"w-full px-4 rounded bg-yellow-500 border border-slate-400",onClick:e[29]||(e[29]=s=>t.onClickSaveApiServer())},[a(y,{icon:"floppy-disk",class:"fa-fw",color:"white"})])):h("",!0),o("button",{class:"px-3 rounded bg-slate-200 border border-slate-400",onClick:e[30]||(e[30]=s=>t.apiServerInput=t.AppConstants.PROD_ENDORSER_API_SERVER)}," Use Prod "),o("button",{class:"px-3 rounded bg-slate-200 border border-slate-400",onClick:e[31]||(e[31]=s=>t.apiServerInput=t.AppConstants.TEST_ENDORSER_API_SERVER)}," Use Test "),o("button",{class:"px-3 rounded bg-slate-200 border border-slate-400",onClick:e[32]||(e[32]=s=>t.apiServerInput=t.AppConstants.LOCAL_ENDORSER_API_SERVER)}," Use Local ")]),o("label",{for:"toggleProdWarningMessage",class:"flex items-center justify-between cursor-pointer px-4 py-4",onClick:e[34]||(e[34]=(...s)=>t.toggleProdWarning&&t.toggleProdWarning(...s))},[e[109]||(e[109]=o("h2",null,"Show warning if on prod server",-1)),o("div",Jt,[b(o("input",{"onUpdate:modelValue":e[33]||(e[33]=s=>t.warnIfProdServer=s),type:"checkbox",class:"sr-only"},null,512),[[I,t.warnIfProdServer]]),e[107]||(e[107]=o("div",{class:"block bg-slate-500 w-14 h-8 rounded-full"},null,-1)),e[108]||(e[108]=o("div",{class:"dot absolute left-1 top-1 bg-slate-400 w-6 h-6 rounded-full transition"},null,-1))])]),o("label",{for:"toggleTestWarningMessage",class:"flex items-center justify-between cursor-pointer px-4 py-4",onClick:e[36]||(e[36]=(...s)=>t.toggleTestWarning&&t.toggleTestWarning(...s))},[e[112]||(e[112]=o("h2",null,"Show warning if on non-prod server",-1)),o("div",Qt,[b(o("input",{"onUpdate:modelValue":e[35]||(e[35]=s=>t.warnIfTestServer=s),type:"checkbox",class:"sr-only"},null,512),[[I,t.warnIfTestServer]]),e[110]||(e[110]=o("div",{class:"block bg-slate-500 w-14 h-8 rounded-full"},null,-1)),e[111]||(e[111]=o("div",{class:"dot absolute left-1 top-1 bg-slate-400 w-6 h-6 rounded-full transition"},null,-1))])])]),e[130]||(e[130]=o("h2",{class:"text-slate-500 text-sm font-bold mb-2"}," Notification Push Server ",-1)),o("div",Xt,[b(o("input",{"onUpdate:modelValue":e[37]||(e[37]=s=>t.webPushServerInput=s),type:"text",class:"block w-full rounded border border-slate-400 px-3 py-2"},null,512),[[x,t.webPushServerInput]]),t.webPushServerInput!=t.webPushServer?(p(),f("button",{key:0,class:"w-full px-4 rounded bg-yellow-500 border border-slate-400",onClick:e[38]||(e[38]=s=>t.onClickSavePushServer())},[a(y,{icon:"floppy-disk",class:"fa-fw",color:"white"})])):h("",!0),o("button",{class:"px-3 rounded bg-slate-200 border border-slate-400",onClick:e[39]||(e[39]=s=>t.webPushServerInput=t.AppConstants.PROD_PUSH_SERVER)}," Use Prod "),o("button",{class:"px-3 rounded bg-slate-200 border border-slate-400",onClick:e[40]||(e[40]=s=>t.webPushServerInput=t.AppConstants.TEST1_PUSH_SERVER)}," Use Test 1 "),o("button",{class:"px-3 rounded bg-slate-200 border border-slate-400",onClick:e[41]||(e[41]=s=>t.webPushServerInput=t.AppConstants.TEST2_PUSH_SERVER)}," Use Test 2 ")]),t.webPushServerInput?h("",!0):(p(),f("span",Zt," When that setting is blank, this app will use the default web push server URL: "+m(t.DEFAULT_PUSH_SERVER),1)),e[131]||(e[131]=o("h2",{class:"text-slate-500 text-sm font-bold mb-2"},"Partner Server URL",-1)),o("div",_t,[b(o("input",{"onUpdate:modelValue":e[42]||(e[42]=s=>t.partnerApiServerInput=s),type:"text",class:"block w-full rounded border border-slate-400 px-3 py-2"},null,512),[[x,t.partnerApiServerInput]]),t.partnerApiServerInput!=t.partnerApiServer?(p(),f("button",{key:0,class:"w-full px-4 rounded bg-yellow-500 border border-slate-400",onClick:e[43]||(e[43]=s=>t.onClickSavePartnerServer())},[a(y,{icon:"floppy-disk",class:"fa-fw",color:"white"})])):h("",!0),o("button",{class:"px-3 rounded bg-slate-200 border border-slate-400",onClick:e[44]||(e[44]=s=>t.partnerApiServerInput=t.AppConstants.PROD_PARTNER_API_SERVER)}," Use Prod "),o("button",{class:"px-3 rounded bg-slate-200 border border-slate-400",onClick:e[45]||(e[45]=s=>t.partnerApiServerInput=t.AppConstants.TEST_PARTNER_API_SERVER)}," Use Test "),o("button",{class:"px-3 rounded bg-slate-200 border border-slate-400",onClick:e[46]||(e[46]=s=>t.partnerApiServerInput=t.AppConstants.LOCAL_PARTNER_API_SERVER)}," Use Local ")]),t.partnerApiServerInput?h("",!0):(p(),f("span",eo," When that setting is blank, this app will use the default partner server URL: "+m(t.DEFAULT_PARTNER_API_SERVER),1)),o("div",to,[e[114]||(e[114]=o("span",{class:"text-slate-500 text-sm font-bold"},"Image Server URL",-1)),e[115]||(e[115]=l("   ")),o("span",oo,m(t.DEFAULT_IMAGE_API_SERVER),1)]),o("label",{for:"toggleHideRegisterPromptOnNewContact",class:"flex items-center justify-between cursor-pointer mt-4",onClick:e[48]||(e[48]=s=>t.toggleHideRegisterPromptOnNewContact())},[e[118]||(e[118]=o("span",{class:"text-slate-500 text-sm font-bold"}," Hide Register Prompt on New Contact ",-1)),o("div",io,[b(o("input",{"onUpdate:modelValue":e[47]||(e[47]=s=>t.hideRegisterPromptOnNewContact=s),type:"checkbox",class:"sr-only"},null,512),[[I,t.hideRegisterPromptOnNewContact]]),e[116]||(e[116]=o("div",{class:"block bg-slate-500 w-14 h-8 rounded-full"},null,-1)),e[117]||(e[117]=o("div",{class:"dot absolute left-1 top-1 bg-slate-400 w-6 h-6 rounded-full transition"},null,-1))])]),o("label",{for:"toggleShowShortcutBvc",class:"flex items-center justify-between cursor-pointer mt-4",onClick:e[50]||(e[50]=(...s)=>t.toggleShowShortcutBvc&&t.toggleShowShortcutBvc(...s))},[e[121]||(e[121]=o("span",{class:"text-slate-500 text-sm font-bold"}," Show BVC Shortcut on Home Page ",-1)),o("div",so,[b(o("input",{"onUpdate:modelValue":e[49]||(e[49]=s=>t.showShortcutBvc=s),type:"checkbox",class:"sr-only"},null,512),[[I,t.showShortcutBvc]]),e[119]||(e[119]=o("div",{class:"block bg-slate-500 w-14 h-8 rounded-full"},null,-1)),e[120]||(e[120]=o("div",{class:"dot absolute left-1 top-1 bg-slate-400 w-6 h-6 rounded-full transition"},null,-1))])]),o("div",no,[o("button",null,[a(g,{to:{name:"statistics"},class:"block w-fit text-center text-md bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-4 py-2 rounded-md mb-2"},{default:S(()=>e[122]||(e[122]=[l(" See Global Animated History of Giving ")])),_:1})])]),o("div",ro,[o("span",null,[e[123]||(e[123]=o("span",{class:"text-slate-500 text-sm font-bold mb-2"}," Passkey Expiration Minutes ",-1)),e[124]||(e[124]=o("br",null,null,-1)),o("span",ao,m(t.passkeyExpirationDescription),1)]),o("div",lo,[b(o("input",{"onUpdate:modelValue":e[51]||(e[51]=s=>t.passkeyExpirationMinutes=s),type:"number",class:"border border-slate-400 rounded px-2 py-2 text-center w-20",onChange:e[52]||(e[52]=(...s)=>t.updatePasskeyExpiration&&t.updatePasskeyExpiration(...s))},null,544),[[x,t.passkeyExpirationMinutes]])])]),o("label",{for:"toggleShowGeneralAdvanced",class:"flex items-center justify-between cursor-pointer mt-4",onClick:e[54]||(e[54]=(...s)=>t.toggleShowGeneralAdvanced&&t.toggleShowGeneralAdvanced(...s))},[e[127]||(e[127]=o("span",{class:"text-slate-500 text-sm font-bold"}," Show All General Advanced Functions ",-1)),o("div",uo,[b(o("input",{"onUpdate:modelValue":e[53]||(e[53]=s=>t.showGeneralAdvanced=s),type:"checkbox",class:"sr-only"},null,512),[[I,t.showGeneralAdvanced]]),e[125]||(e[125]=o("div",{class:"block bg-slate-500 w-14 h-8 rounded-full"},null,-1)),e[126]||(e[126]=o("div",{class:"dot absolute left-1 top-1 bg-slate-400 w-6 h-6 rounded-full transition"},null,-1))])])])):h("",!0)])],64)}const Eo=he(O,[["render",po]]);export{Eo as default}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ClaimAddRawView-MjnUQPZ5.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ClaimAddRawView-MjnUQPZ5.js deleted file mode 100644 index b6bc36a..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ClaimAddRawView-MjnUQPZ5.js +++ /dev/null @@ -1 +0,0 @@ -var h=Object.defineProperty;var f=(a,e,t)=>e in a?h(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var o=(a,e,t)=>f(a,typeof e!="symbol"?e+"":e,t);import{V as w,e as g,l as v,C,_ as x,h as y,j as u,k as l,n as S,o as b,s as _,F as $,z as d,B as D}from"./main.common-DD7dqhZp.js";import{Q as N}from"./QuickNav-C8jPGtUY.js";import{j as V,g as k,x as J,e as F,v as I}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var A=Object.getOwnPropertyDescriptor,E=(a,e,t,r)=>{for(var i=r>1?void 0:r?A(e,t):e,s=a.length-1,n;s>=0;s--)(n=a[s])&&(i=n(i)||i);return i};let m=class extends w{constructor(){super(...arguments);o(this,"$notify");o(this,"$route");o(this,"$router");o(this,"axios");o(this,"accountIdentityStr","null");o(this,"activeDid","");o(this,"apiServer","");o(this,"claimStr","")}async mounted(){await this.initializeSettings(),await this.loadClaimData()}async initializeSettings(){const t=await g();this.activeDid=t.activeDid||"",this.apiServer=t.apiServer||""}async loadClaimData(){await this.loadClaimFromQueryParam()||await this.loadClaimFromJwtId()}async loadClaimFromQueryParam(){if(this.claimStr=this.$route.query.claim||"",!this.claimStr)return!1;try{const t=JSON.parse(this.claimStr);return this.claimStr=JSON.stringify(t,null,2),!0}catch{return!1}}async loadClaimFromJwtId(){const t=this.$route.query.claimJwtId||"";if(!t)return;const r=V(t)?"/api/claim/byHandle/":"/api/claim/",i=this.apiServer+r+encodeURIComponent(t);try{const s=await this.fetchClaimData(i,t);this.formatClaimResponse(s,t)}catch(s){this.handleClaimError(s)}}async fetchClaimData(t,r){const i=await k(this.activeDid);return await this.axios.get(t,{headers:i})}formatClaimResponse(t,r){var i;if(t.status===200){const s=(i=t.data)==null?void 0:i.claim;s.lastClaimId=J(r),this.claimStr=JSON.stringify(s,null,2)}else throw{message:"Got an error loading that claim.",response:{status:t.status,statusText:t.statusText}}}handleClaimError(t){v("Error retrieving claim: "+F(t),!0),this.$notify({group:"alert",type:"danger",title:"Error",text:"Got an error retrieving claim data."},3e3)}async submitClaim(){const t=JSON.parse(this.claimStr),r=await I(t,this.activeDid,this.apiServer,this.axios);r.type==="success"?this.$notify({group:"alert",type:"success",title:"Success",text:"Claim submitted."},5e3):(console.error("Got error submitting the claim:",r),this.$notify({group:"alert",type:"danger",title:"Error",text:"There was a problem submitting the claim."},5e3))}};m=E([C({components:{QuickNav:N}})],m);const O={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},R={id:"ViewBreadcrumb",class:"mb-8"},P={class:"text-lg text-center font-light relative px-7"},Q={class:"flex"};function B(a,e,t,r,i,s){const n=d("QuickNav"),p=d("font-awesome");return D(),y($,null,[u(n),l("section",O,[l("div",R,[l("h1",P,[l("button",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:e[0]||(e[0]=c=>a.$router.back())},[u(p,{icon:"chevron-left",class:"fa-fw"})]),e[3]||(e[3]=S(" Raw Claim "))])]),l("div",Q,[b(l("textarea",{"onUpdate:modelValue":e[1]||(e[1]=c=>a.claimStr=c),rows:"20",class:"border-2 w-full"},null,512),[[_,a.claimStr]])]),l("button",{class:"block w-full text-center text-lg font-bold uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md",onClick:e[2]||(e[2]=c=>a.submitClaim())}," Sign & Send ")])],64)}const M=x(m,[["render",B]]);export{M as default}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ClaimCertificateView-WsWhMks_.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ClaimCertificateView-WsWhMks_.js deleted file mode 100644 index afd87e2..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ClaimCertificateView-WsWhMks_.js +++ /dev/null @@ -1,8 +0,0 @@ -var Ut=Object.defineProperty;var kt=(e,t,o)=>t in e?Ut(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var M=(e,t,o)=>kt(e,typeof t!="symbol"?t+"":t,o);import{V as Ft,e as zt,G as Gt,d as gt,H as $t,C as xt,_ as Kt,h as ht,k as mt,m as Wt,j as Jt,w as Ot,z as Yt,B as wt}from"./main.common-DD7dqhZp.js";import{s as jt,g as Ct,y as q,z as Qt,A as qt}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var z={},Zt=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},Et={},N={};let ct;const Xt=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];N.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};N.getSymbolTotalCodewords=function(t){return Xt[t]};N.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};N.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');ct=t};N.isKanjiModeEnabled=function(){return typeof ct<"u"};N.toSJIS=function(t){return ct(t)};var J={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+o)}}e.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},e.from=function(r,n){if(e.isValid(r))return r;try{return t(r)}catch{return n}}})(J);function Tt(){this.buffer=[],this.length=0}Tt.prototype={get:function(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let o=0;o>>t-o-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var te=Tt;function G(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}G.prototype.set=function(e,t,o,r){const n=e*this.size+t;this.data[n]=o,r&&(this.reservedBit[n]=!0)};G.prototype.get=function(e,t){return this.data[e*this.size+t]};G.prototype.xor=function(e,t,o){this.data[e*this.size+t]^=o};G.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var ee=G,It={};(function(e){const t=N.getSymbolSize;e.getRowColCoords=function(r){if(r===1)return[];const n=Math.floor(r/7)+2,i=t(r),a=i===145?26:Math.ceil((i-13)/(2*n-2))*2,c=[i-7];for(let s=1;s=0&&n<=7},e.from=function(n){return e.isValid(n)?parseInt(n,10):void 0},e.getPenaltyN1=function(n){const i=n.size;let a=0,c=0,s=0,l=null,f=null;for(let y=0;y=5&&(a+=t.N1+(c-5)),l=d,c=1),d=n.get(m,y),d===f?s++:(s>=5&&(a+=t.N1+(s-5)),f=d,s=1)}c>=5&&(a+=t.N1+(c-5)),s>=5&&(a+=t.N1+(s-5))}return a},e.getPenaltyN2=function(n){const i=n.size;let a=0;for(let c=0;c=10&&(c===1488||c===93)&&a++,s=s<<1&2047|n.get(f,l),f>=10&&(s===1488||s===93)&&a++}return a*t.N3},e.getPenaltyN4=function(n){let i=0;const a=n.data.length;for(let s=0;s=0;){const a=i[0];for(let s=0;s0){const i=new Uint8Array(this.degree);return i.set(r,n),i}return r};var oe=lt,bt={},H={},ut={};ut.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var _={};const Pt="[0-9]+",re="[A-Z $%*+\\-./:]+";let F="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";F=F.replace(/u/g,"\\u");const ie="(?:(?![A-Z0-9 $%*+\\-./:]|"+F+`)(?:.|[\r -]))+`;_.KANJI=new RegExp(F,"g");_.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");_.BYTE=new RegExp(ie,"g");_.NUMERIC=new RegExp(Pt,"g");_.ALPHANUMERIC=new RegExp(re,"g");const se=new RegExp("^"+F+"$"),ae=new RegExp("^"+Pt+"$"),ce=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");_.testKanji=function(t){return se.test(t)};_.testNumeric=function(t){return ae.test(t)};_.testAlphanumeric=function(t){return ce.test(t)};(function(e){const t=ut,o=_;e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(i,a){if(!i.ccBits)throw new Error("Invalid mode: "+i);if(!t.isValid(a))throw new Error("Invalid version: "+a);return a>=1&&a<10?i.ccBits[0]:a<27?i.ccBits[1]:i.ccBits[2]},e.getBestModeForData=function(i){return o.testNumeric(i)?e.NUMERIC:o.testAlphanumeric(i)?e.ALPHANUMERIC:o.testKanji(i)?e.KANJI:e.BYTE},e.toString=function(i){if(i&&i.id)return i.id;throw new Error("Invalid mode")},e.isValid=function(i){return i&&i.bit&&i.ccBits};function r(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+n)}}e.from=function(i,a){if(e.isValid(i))return i;try{return r(i)}catch{return a}}})(H);(function(e){const t=N,o=O,r=J,n=H,i=ut,a=7973,c=t.getBCHDigit(a);function s(m,d,C){for(let p=1;p<=40;p++)if(d<=e.getCapacity(p,C,m))return p}function l(m,d){return n.getCharCountIndicator(m,d)+4}function f(m,d){let C=0;return m.forEach(function(p){const T=l(p.mode,d);C+=T+p.getBitsLength()}),C}function y(m,d){for(let C=1;C<=40;C++)if(f(m,C)<=e.getCapacity(C,d,n.MIXED))return C}e.from=function(d,C){return i.isValid(d)?parseInt(d,10):C},e.getCapacity=function(d,C,p){if(!i.isValid(d))throw new Error("Invalid QR Code version");typeof p>"u"&&(p=n.BYTE);const T=t.getSymbolTotalCodewords(d),u=o.getTotalCodewordsCount(d,C),w=(T-u)*8;if(p===n.MIXED)return w;const h=w-l(p,d);switch(p){case n.NUMERIC:return Math.floor(h/10*3);case n.ALPHANUMERIC:return Math.floor(h/11*2);case n.KANJI:return Math.floor(h/13);case n.BYTE:default:return Math.floor(h/8)}},e.getBestVersionForData=function(d,C){let p;const T=r.from(C,r.M);if(Array.isArray(d)){if(d.length>1)return y(d,T);if(d.length===0)return 1;p=d[0]}else p=d;return s(p.mode,p.getLength(),T)},e.getEncodedBits=function(d){if(!i.isValid(d)||d<7)throw new Error("Invalid QR Code version");let C=d<<12;for(;t.getBCHDigit(C)-c>=0;)C^=a<=0;)n^=Rt<0&&(r=this.data.substr(o),n=parseInt(r,10),t.put(n,i*3+1))};var fe=L;const de=H,Z=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function V(e){this.mode=de.ALPHANUMERIC,this.data=e}V.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};V.prototype.getLength=function(){return this.data.length};V.prototype.getBitsLength=function(){return V.getBitsLength(this.data.length)};V.prototype.write=function(t){let o;for(o=0;o+2<=this.data.length;o+=2){let r=Z.indexOf(this.data[o])*45;r+=Z.indexOf(this.data[o+1]),t.put(r,11)}this.data.length%2&&t.put(Z.indexOf(this.data[o]),6)};var ge=V;const he=H;function D(e){this.mode=he.BYTE,typeof e=="string"?this.data=new TextEncoder().encode(e):this.data=new Uint8Array(e)}D.getBitsLength=function(t){return t*8};D.prototype.getLength=function(){return this.data.length};D.prototype.getBitsLength=function(){return D.getBitsLength(this.data.length)};D.prototype.write=function(e){for(let t=0,o=this.data.length;t=33088&&o<=40956)o-=33088;else if(o>=57408&&o<=60351)o-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+` -Make sure your charset is UTF-8`);o=(o>>>8&255)*192+(o&255),e.put(o,13)}};var pe=v,Lt={exports:{}};(function(e){var t={single_source_shortest_paths:function(o,r,n){var i={},a={};a[r]=0;var c=t.PriorityQueue.make();c.push(r,0);for(var s,l,f,y,m,d,C,p,T;!c.empty();){s=c.pop(),l=s.value,y=s.cost,m=o[l]||{};for(f in m)m.hasOwnProperty(f)&&(d=m[f],C=y+d,p=a[f],T=typeof a[f]>"u",(T||p>C)&&(a[f]=C,c.push(f,C),i[f]=l))}if(typeof n<"u"&&typeof a[n]>"u"){var u=["Could not find a path from ",r," to ",n,"."].join("");throw new Error(u)}return i},extract_shortest_path_from_predecessor_list:function(o,r){for(var n=[],i=r;i;)n.push(i),o[i],i=o[i];return n.reverse(),n},find_path:function(o,r,n){var i=t.single_source_shortest_paths(o,r,n);return t.extract_shortest_path_from_predecessor_list(i,n)},PriorityQueue:{make:function(o){var r=t.PriorityQueue,n={},i;o=o||{};for(i in r)r.hasOwnProperty(i)&&(n[i]=r[i]);return n.queue=[],n.sorter=o.sorter||r.default_sorter,n},default_sorter:function(o,r){return o.cost-r.cost},push:function(o,r){var n={value:o,cost:r};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(Lt);var Ae=Lt.exports;(function(e){const t=H,o=fe,r=ge,n=me,i=pe,a=_,c=N,s=Ae;function l(u){return unescape(encodeURIComponent(u)).length}function f(u,w,h){const g=[];let A;for(;(A=u.exec(h))!==null;)g.push({data:A[0],index:A.index,mode:w,length:A[0].length});return g}function y(u){const w=f(a.NUMERIC,t.NUMERIC,u),h=f(a.ALPHANUMERIC,t.ALPHANUMERIC,u);let g,A;return c.isKanjiModeEnabled()?(g=f(a.BYTE,t.BYTE,u),A=f(a.KANJI,t.KANJI,u)):(g=f(a.BYTE_KANJI,t.BYTE,u),A=[]),w.concat(h,g,A).sort(function(I,B){return I.index-B.index}).map(function(I){return{data:I.data,mode:I.mode,length:I.length}})}function m(u,w){switch(w){case t.NUMERIC:return o.getBitsLength(u);case t.ALPHANUMERIC:return r.getBitsLength(u);case t.KANJI:return i.getBitsLength(u);case t.BYTE:return n.getBitsLength(u)}}function d(u){return u.reduce(function(w,h){const g=w.length-1>=0?w[w.length-1]:null;return g&&g.mode===h.mode?(w[w.length-1].data+=h.data,w):(w.push(h),w)},[])}function C(u){const w=[];for(let h=0;h=0&&c<=6&&(s===0||s===6)||s>=0&&s<=6&&(c===0||c===6)||c>=2&&c<=4&&s>=2&&s<=4?e.set(i+c,a+s,!0,!0):e.set(i+c,a+s,!1,!0))}}function be(e){const t=e.size;for(let o=8;o>c&1)===1,e.set(n,i,a,!0),e.set(i,n,a,!0)}function et(e,t,o){const r=e.size,n=Be.getEncodedBits(t,o);let i,a;for(i=0;i<15;i++)a=(n>>i&1)===1,i<6?e.set(i,8,a,!0):i<8?e.set(i+1,8,a,!0):e.set(r-15+i,8,a,!0),i<8?e.set(8,r-i-1,a,!0):i<9?e.set(8,15-i-1+1,a,!0):e.set(8,15-i-1,a,!0);e.set(r-8,8,1,!0)}function Re(e,t){const o=e.size;let r=-1,n=o-1,i=7,a=0;for(let c=o-1;c>0;c-=2)for(c===6&&c--;;){for(let s=0;s<2;s++)if(!e.isReserved(n,c-s)){let l=!1;a>>i&1)===1),e.set(n,c-s,l),i--,i===-1&&(a++,i=7)}if(n+=r,n<0||o<=n){n-=r,r=-r;break}}}function He(e,t,o){const r=new ye;o.forEach(function(s){r.put(s.mode.bit,4),r.put(s.getLength(),Se.getCharCountIndicator(s.mode,e)),s.write(r)});const n=j.getSymbolTotalCodewords(e),i=it.getTotalCodewordsCount(e,t),a=(n-i)*8;for(r.getLengthInBits()+4<=a&&r.put(0,4);r.getLengthInBits()%8!==0;)r.putBit(0);const c=(a-r.getLengthInBits())/8;for(let s=0;s=7&&Me(s,t),Re(s,a),isNaN(r)&&(r=rt.getBestMask(s,et.bind(null,s,o))),rt.applyMask(r,s),et(s,o,r),{modules:s,version:t,errorCorrectionLevel:o,maskPattern:r,segments:n}}Et.create=function(t,o){if(typeof t>"u"||t==="")throw new Error("No input text");let r=X.M,n,i;return typeof o<"u"&&(r=X.from(o.errorCorrectionLevel,X.M),n=W.from(o.version),i=rt.from(o.maskPattern),o.toSJISFunc&&j.setToSJISFunction(o.toSJISFunc)),Ve(t,n,r,i)};var Vt={},ft={};(function(e){function t(o){if(typeof o=="number"&&(o=o.toString()),typeof o!="string")throw new Error("Color should be defined as hex string");let r=o.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+o);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(i){return[i,i]}))),r.length===6&&r.push("F","F");const n=parseInt(r.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:"#"+r.slice(0,6).join("")}}e.getOptions=function(r){r||(r={}),r.color||(r.color={});const n=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,i=r.width&&r.width>=21?r.width:void 0,a=r.scale||4;return{width:i,scale:i?4:a,margin:n,color:{dark:t(r.color.dark||"#000000ff"),light:t(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},e.getScale=function(r,n){return n.width&&n.width>=r+n.margin*2?n.width/(r+n.margin*2):n.scale},e.getImageWidth=function(r,n){const i=e.getScale(r,n);return Math.floor((r+n.margin*2)*i)},e.qrToImageData=function(r,n,i){const a=n.modules.size,c=n.modules.data,s=e.getScale(a,i),l=Math.floor((a+i.margin*2)*s),f=i.margin*s,y=[i.color.light,i.color.dark];for(let m=0;m=f&&d>=f&&m"u"&&(!a||!a.getContext)&&(s=a,a=void 0),a||(l=r()),s=t.getOptions(s);const f=t.getImageWidth(i.modules.size,s),y=l.getContext("2d"),m=y.createImageData(f,f);return t.qrToImageData(m.data,i,s),o(y,l,f),y.putImageData(m,0,0),l},e.renderToDataURL=function(i,a,c){let s=c;typeof s>"u"&&(!a||!a.getContext)&&(s=a,a=void 0),s||(s={});const l=e.render(i,a,s),f=s.type||"image/png",y=s.rendererOpts||{};return l.toDataURL(f,y.quality)}})(Vt);var Dt={};const De=ft;function yt(e,t){const o=e.a/255,r=t+'="'+e.hex+'"';return o<1?r+" "+t+'-opacity="'+o.toFixed(2).slice(1)+'"':r}function nt(e,t,o){let r=e+t;return typeof o<"u"&&(r+=" "+o),r}function ve(e,t,o){let r="",n=0,i=!1,a=0;for(let c=0;c0&&s>0&&e[c-1]||(r+=i?nt("M",s+o,.5+l+o):nt("m",n,0),n=0,i=!1),s+1':"",l="',f='viewBox="0 0 '+c+" "+c+'"',m=''+s+l+` -`;return typeof r=="function"&&r(null,m),m};const Ue=Zt,st=Et,vt=Vt,ke=Dt;function dt(e,t,o,r,n){const i=[].slice.call(arguments,1),a=i.length,c=typeof i[a-1]=="function";if(!c&&!Ue())throw new Error("Callback required as last argument");if(c){if(a<2)throw new Error("Too few arguments provided");a===2?(n=o,o=t,t=r=void 0):a===3&&(t.getContext&&typeof n>"u"?(n=r,r=void 0):(n=r,r=o,o=t,t=void 0))}else{if(a<1)throw new Error("Too few arguments provided");return a===1?(o=t,t=r=void 0):a===2&&!t.getContext&&(r=o,o=t,t=void 0),new Promise(function(s,l){try{const f=st.create(o,r);s(e(f,t,r))}catch(f){l(f)}})}try{const s=st.create(o,r);n(null,e(s,t,r))}catch(s){n(s)}}z.create=st.create;z.toCanvas=dt.bind(null,vt.render);z.toDataURL=dt.bind(null,vt.renderToDataURL);z.toString=dt.bind(null,function(e,t,o){return ke.render(e,o)});var Fe=Object.getOwnPropertyDescriptor,ze=(e,t,o,r)=>{for(var n=r>1?void 0:r?Fe(t,o):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(n=a(n)||n);return n};let at=class extends Ft{constructor(){super(...arguments);M(this,"$notify");M(this,"activeDid","");M(this,"allMyDids",[]);M(this,"apiServer","");M(this,"claimId","");M(this,"claimData",null);M(this,"serverUtil",jt)}async created(){const o=await zt();this.activeDid=o.activeDid||"",this.apiServer=o.apiServer||"";const r=window.location.pathname.substring(12);this.claimId=r,await this.fetchClaim()}async fetchClaim(){try{const o=await Ct(this.activeDid),r=await this.axios.get(`${this.apiServer}/api/claim/${this.claimId}`,{headers:o});if(r.status===200){this.claimData=await r.data;const n=[this.claimId],i=await Ct(this.activeDid),a=await this.axios.post(`${this.apiServer}/api/v2/report/confirmers/?claimEntryIds=${this.claimId}`,{claimEntryIds:n},{headers:i});let c=[];a.status===200&&(c=await a.data.data),await Gt(),this.claimData&&this.drawCanvas(this.claimData,c)}else throw new Error(`Error fetching claim: ${r.statusText}`)}catch(o){console.error("Failed to load claim:",o),this.$notify({group:"alert",type:"danger",title:"Error",text:"There was a problem loading the claim."})}}async drawCanvas(o,r){await gt.open();const n=await gt.contacts.toArray(),i=this.$refs.claimCanvas;if(i){i.width=1100,i.height=850;const s=i.getContext("2d");if(s){const l=new Image;l.src="/img/background/cert-frame-2.jpg",l.onload=async()=>{var p,T;s.drawImage(l,0,0,1100,850),s.fillStyle="black",s.font="bold 20px Arial";const f=o.claimType==="GiveAction"?"Gift":o.claimType==="PlanAction"?"Project":this.serverUtil.capitalizeAndInsertSpacesBeforeCaps(o.claimType||""),y=s.measureText(f).width;if(s.fillText(f,(1100-y)/2,850*.33),o.claimType==="GiveAction"&&o.claim.agent){const u="Thanks To";s.font="14px Arial";const w=s.measureText(u).width;s.fillText(u,(1100-w)/2,850*.37);const h=o.claim.agent.identifier||o.claim.agent,g=q(h,n);s.font="bold 20px Arial";const A=s.measureText(g).width;s.fillText(g,(1100-A)/2,850*.41)}if(o.claimType==="Offer"){const u="To";s.font="14px Arial";const w=s.measureText(u).width;s.fillText(u,(1100-w)/2,850*.37);const h=o.claim.agent.identifier||o.claim.agent,g=q(h,n);s.font="bold 20px Arial";const A=s.measureText(g).width;s.fillText(g,(1100-A)/2,850*.41)}const m=o.claim.name||o.claim.description||((p=o.claim.itemOffered)==null?void 0:p.description);if(m){const u=m.length>50?m.substring(0,75)+"...":m;s.font="14px Arial";const w=s.measureText(u).width;s.fillText(u,(1100-w)/2,850*.495)}const d=o.claim.object||o.claim.includesObject;if(d!=null&&d.amountOfThisGood&&(d!=null&&d.unitCode)){const u=d.amountOfThisGood,w=d.unitCode,h=Qt(w,u),g=s.measureText(h).width,A=m?850*.525:850*.495;s.font="14px Arial",s.fillText(h,(1100-g)/2,A)}if(o.issuer==null||qt(o.issuer)||o.issuer!==((T=o.claim.agent)==null?void 0:T.identifier)){s.font="14px Arial";let u=q(o.issuer,n);u.length>30&&(u=u.substring(0,30)+"...");const w="Issued by "+u;s.fillText(w,1100*.3,850*.6)}if(r.length>0){const u="Confirmed by "+r.length+(r.length===1?" person":" people");s.font="14px Arial",s.fillText(u,1100*.3,850*.63)}s.font="14px Arial",s.fillText(this.claimId,1100*.3,850*.7),s.fillText("via EndorserSearch.com",1100*.3,850*.73);const C=document.createElement("canvas");await z.toCanvas(C,$t+"/claim/"+this.claimId,{width:150,color:{light:"#0000"}}),s.drawImage(C,1100*.6,850*.55)}}}}};at=ze([xt],at);const Ge={id:"Content"},$e={class:"flex items-center justify-center h-screen"},xe={key:0},Ke={ref:"claimCanvas",class:"w-full block mx-auto"};function We(e,t,o,r,n,i){const a=Yt("router-link");return wt(),ht("section",Ge,[mt("div",$e,[e.claimData?(wt(),ht("div",xe,[Jt(a,{to:"/claim/"+e.claimId},{default:Ot(()=>[mt("canvas",Ke,null,512)]),_:1},8,["to"])])):Wt("",!0)])])}const Xe=Kt(at,[["render",We]]);export{Xe as default}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ClaimView-BUQRK2PH.css b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ClaimView-BUQRK2PH.css deleted file mode 100644 index 4ba121a..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ClaimView-BUQRK2PH.css +++ /dev/null @@ -1 +0,0 @@ -.tooltip{position:relative;display:inline-block;border-bottom:1px dotted black}.tooltip .tooltiptext{visibility:hidden;width:200px;background-color:#000;color:#fff;text-align:center;padding:5px 0;border-radius:6px;position:absolute;z-index:1}.tooltip:hover .tooltiptext,.tooltip:hover .tooltiptext-left{visibility:visible} diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ClaimView-c0v_AehR.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ClaimView-c0v_AehR.js deleted file mode 100644 index b9223fd..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ClaimView-c0v_AehR.js +++ /dev/null @@ -1 +0,0 @@ -var Y=Object.defineProperty;var z=(e,i,l)=>i in e?Y(e,i,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[i]=l;var r=(e,i,l)=>z(e,typeof i!="symbol"?i+"":i,l);import{y as Q,d as B}from"./js-yaml-CxlQHuPU.js";import{R as J}from"./index-BtEdi1q-.js";import{V as W,e as Z,d as K,l as X,C as x,_ as ee,h as o,j as f,k as t,m as d,n as a,t as p,w as V,F as D,E as T,y as S,z as A,B as s}from"./main.common-DD7dqhZp.js";import{u as ie}from"./index-CZnn7ED5.js";import{G as te}from"./GiftedDialog-DmRkVexW.js";import{Q as se}from"./QuickNav-C8jPGtUY.js";import{B as _,l as oe,s as le,h as re,i as ae,j as ne,g as $,k as de,m as me,n as fe,p as he,q as ue,u as ce,v as pe,w as ve}from"./index-ryzpKtgI.js";import"./_isString-B7bbuhPA.js";import"./concat-Ro2w9qwP.js";import"./set-BrilI7kO.js";import"./sort-DzTCGCnH.js";import"./index-BGoTPXII.js";var Ce=Object.getOwnPropertyDescriptor,ye=(e,i,l,h)=>{for(var v=h>1?void 0:h?Ce(i,l):i,g=e.length-1,C;g>=0;g--)(C=e[g])&&(v=C(v)||v);return v};let L=class extends W{constructor(){super(...arguments);r(this,"$notify");r(this,"$route");r(this,"$router");r(this,"activeDid","");r(this,"allMyDids",[]);r(this,"allContacts",[]);r(this,"apiServer","");r(this,"canShare",!1);r(this,"confirmerIdList",[]);r(this,"confsVisibleErrorMessage","");r(this,"confsVisibleToIdList",[]);r(this,"detailsForGive",null);r(this,"detailsForOffer",null);r(this,"fullClaim",null);r(this,"fullClaimDump","");r(this,"fullClaimMessage","");r(this,"isEditedGlobalId",!1);r(this,"isRegistered",!1);r(this,"issuerName","");r(this,"numConfsNotVisible",0);r(this,"providersForGive",[]);r(this,"showIdCopy",!1);r(this,"showVeriClaimDump",!1);r(this,"veriClaim",_);r(this,"veriClaimDump","");r(this,"veriClaimDidsVisible",{});r(this,"windowLocation",window.location.href);r(this,"R",J);r(this,"yaml",Q);r(this,"libsUtil",oe);r(this,"serverUtil",le);r(this,"window",window)}resetThisValues(){this.confirmerIdList=[],this.confsVisibleErrorMessage="",this.confsVisibleToIdList=[],this.detailsForGive=null,this.detailsForOffer=null,this.fullClaim=null,this.fullClaimDump="",this.fullClaimMessage="",this.isEditedGlobalId=!1,this.numConfsNotVisible=0,this.providersForGive=[],this.veriClaim=_,this.veriClaimDump="",this.veriClaimDidsVisible={}}async created(){console.log("ClaimView created");const l=await Z();this.activeDid=l.activeDid||"",this.apiServer=l.apiServer||"",this.allContacts=await K.contacts.toArray(),this.isRegistered=l.isRegistered||!1;try{this.allMyDids=await re()}catch(v){X("Error retrieving all account DIDs on home page:"+v,!0),this.$notify({group:"alert",type:"danger",title:"Error Loading Profile",text:"See the Help page for problems with your personal data."},5e3)}const h=this.$route.params.id;h?await this.loadClaim(h,this.activeDid):this.$notify({group:"alert",type:"danger",title:"Error",text:"No claim ID was provided."},5e3),this.canShare=!!navigator.share}capitalizeAndInsertSpacesBeforeCaps(l){return l?l[0].toUpperCase()+l.substr(1).replace(/([A-Z])/g," $1"):""}totalConfirmers(){return this.numConfsNotVisible+this.confirmerIdList.length+this.confsVisibleToIdList.length}didInfo(l){return ae(l,this.activeDid,this.allMyDids,this.allContacts)}async loadClaim(l,h){var m;console.log("[ClaimView] loadClaim called with claimId:",l);const v=ne(l)?"/api/claim/byHandle/":"/api/claim/",g=this.apiServer+v+encodeURIComponent(l),C=await $(h);try{console.log("[ClaimView] Making API request to:",g);const u=await this.axios.get(g,{headers:C});if(u.status===200)this.veriClaim=u.data,this.issuerName=this.didInfo(this.veriClaim.issuer),this.veriClaimDump=B(this.veriClaim),this.veriClaimDidsVisible=de(this.veriClaim,!0);else{console.error("Error getting claim:",u),this.$notify({group:"alert",type:"danger",title:"Error",text:"There was a problem retrieving that claim."},5e3);return}if(this.isEditedGlobalId=!this.veriClaim.handleId.endsWith(l),this.veriClaim.claimType==="GiveAction"){const w=this.apiServer+"/api/v2/report/gives?handleId="+encodeURIComponent(this.veriClaim.handleId),k=await $(h),y=await this.axios.get(w,{headers:k});y.status===200&&((m=y.data.data)==null?void 0:m.length)>0?this.detailsForGive=y.data.data[0]:console.error("Error getting detailed give info:",y);const G=this.apiServer+"/api/v2/report/providersToGive?handleId="+encodeURIComponent(this.veriClaim.handleId),U=await $(h),I=await this.axios.get(G,{headers:U});I.status===200&&Array.isArray(I.data.data)?this.providersForGive=I.data.data:(console.error("Error getting give providers:",y),this.$notify({group:"alert",type:"warning",title:"Error",text:"Got error retrieving linked provider data."},5e3))}else if(this.veriClaim.claimType==="Offer"){const w=this.apiServer+"/api/v2/report/offers?handleId="+encodeURIComponent(this.veriClaim.handleId),k=await $(h),y=await this.axios.get(w,{headers:k});y.status===200?this.detailsForOffer=y.data.data[0]:(console.error("Error getting detailed offer info:",y),this.$notify({group:"alert",type:"warning",title:"Error",text:"Got error retrieving linked offer data."},5e3))}const c=await me(this.apiServer,l,this.veriClaim.issuer,h);c?(this.confirmerIdList=c.confirmerIdList,this.confsVisibleToIdList=c.confsVisibleToIdList,this.numConfsNotVisible=c.numConfsNotVisible):this.confsVisibleErrorMessage="Had problems retrieving confirmations."}catch(u){console.error("Error retrieving claim:",u),this.$notify({group:"alert",type:"danger",title:"Error",text:"Something went wrong retrieving claim data."},3e3)}}async showFullClaim(l){var g;const h=this.apiServer+"/api/claim/full/"+encodeURIComponent(l),v=await $(this.activeDid);try{const C=await this.axios.get(h,{headers:v});C.status===200?(this.fullClaim=C.data,this.fullClaimDump=B(this.fullClaim)):(console.error("Error getting full claim:",C),this.$notify({group:"alert",type:"danger",title:"Error",text:"There was a problem getting that claim."},5e3))}catch(C){if(console.error("Error retrieving full claim:",C),((g=C.response)==null?void 0:g.status)===403){let u="";const c=fe(this.veriClaim.issuer,this.allContacts);c!=null&&c.name&&(u+="Ask "+c.name+" to show you the full claim details."),(this.confirmerIdList.length>0||this.confsVisibleToIdList.length>0)&&(c!=null&&c.name?u+="You could also ask someone in the Confirmations section to make an introduction.":u+="Ask someone in the Confirmations section to make an introduction."),this.fullClaimMessage="You are not authorized to view the full contents of this claim."+u+" You might ask someone in your network -- like the person who registered you -- if they can find out more and make an introduction: send them this page and see if they can make a connection for you."}else this.$notify({group:"alert",type:"danger",title:"Error",text:"Something went wrong retrieving that claim."},5e3)}}confirmConfirmClaim(){this.$notify({group:"modal",type:"confirm",title:"Confirm",text:"Do you personally confirm that this is true?",onYes:async()=>{await this.confirmClaim()}},-1)}async confirmClaim(){const h={"@context":"https://schema.org","@type":"AgreeAction",object:he(ue(ce(this.veriClaim.claim,this.veriClaim.id,this.veriClaim.handleId)))},v=await pe(h,this.activeDid,this.apiServer,this.axios);v.type==="success"?this.$notify({group:"alert",type:"success",title:"Success",text:"Confirmation submitted."},5e3):(console.error("Got error submitting the confirmation:",v),this.$notify({group:"alert",type:"danger",title:"Error",text:"There was a problem submitting the confirmation."},5e3))}showDifferentClaimPage(l){const h={path:"/claim/"+encodeURIComponent(l)};this.$router.push(h).then(async()=>{this.resetThisValues(),await this.loadClaim(l,this.activeDid)})}openFulfillGiftDialog(){const l={did:ve(this.veriClaim)};this.$refs.customGiveDialog.open(l,void 0,this.veriClaim.handleId,"Offer fulfilled by "+((l==null?void 0:l.name)||"someone not named"))}copyToClipboard(l,h){ie().copy(h).then(()=>{this.$notify({group:"alert",type:"toast",title:"Copied",text:(l||"That")+" was copied to the clipboard."},2e3)})}onClickShareClaim(){this.copyToClipboard("A link to this page",this.windowLocation),window.navigator.share({title:"Help Connect Me",text:"I'm trying to find the people who recorded this. Can you help me?",url:this.windowLocation})}onClickEditClaim(){if(this.veriClaim.claimType==="GiveAction"){const l={name:"gifted-details",query:{prevCredToEdit:JSON.stringify(this.veriClaim),destinationPathAfter:"/claim/"+encodeURIComponent(this.veriClaim.handleId)}};this.$router.push(l)}else if(this.veriClaim.claimType==="Offer"){const l={name:"offer-details",query:{prevCredToEdit:JSON.stringify(this.veriClaim),destinationPathAfter:"/claim/"+encodeURIComponent(this.veriClaim.handleId)}};this.$router.push(l)}else if(this.veriClaim.claimType==="PlanAction"){const l={name:"new-edit-project",query:{projectId:this.veriClaim.handleId}};this.$router.push(l)}else console.error("Unrecognized claim type for edit:",this.veriClaim.claimType),this.$notify({group:"alert",type:"danger",title:"Error",text:"This is an unrecognized claim type."},3e3)}};L=ye([x({components:{GiftedDialog:te,QuickNav:se}})],L);const ge={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},be={id:"ViewBreadcrumb",class:"mb-8"},we={class:"text-lg text-center font-light relative px-7"},ke={class:"bg-slate-100 rounded-md overflow-hidden px-4 py-3 mb-4 w-full"},Ie={class:"block flex gap-4 overflow-hidden w-full"},De={class:"w-full"},Ee={class:"flex columns-3"},Ve={class:"text-md font-bold w-full"},Te={class:"flex justify-center w-full"},$e={class:"flex justify-end w-full"},Ge={class:"text-sm"},Ue={"data-testId":"description"},Ae={key:0,class:"flex justify-center"},Se=["href"],Le=["src"],Fe={key:1,class:"mt-4"},Re={key:2,class:"mt-4"},Oe={key:3},Ne={key:4},He={key:5,class:"mt-4"},Pe={class:"ml-4"},je={class:"flex gap-4"},Me={class:"grow overflow-hidden"},Be=["onClick"],_e={class:"mt-2"},qe={class:"mt-8"},Ye={key:0},ze={class:"flex columns-3"},Qe={key:1,class:"font-bold uppercase text-xl mt-2"},Je={class:"mt-0.5 px-4 py-2"},We={class:"mt-2"},Ze={key:0},Ke={key:1},Xe={key:2},xe={key:0},ei={key:0},ii={key:1},ti={key:2},si={class:"ml-4"},oi={class:"flex gap-4"},li={class:"grow overflow-hidden"},ri={class:"text-sm"},ai={key:0},ni=["href"],di={key:3},mi={class:"ml-4"},fi={class:"flex gap-4"},hi={class:"grow overflow-hidden"},ui={class:"text-sm"},ci={key:0},pi=["href"],vi={key:1},Ci={key:2},yi={key:3},gi={key:1},bi={key:0,class:"mb-2"},wi={key:0},ki={key:1},Ii={key:1},Di={key:0},Ei={key:1},Vi={class:"text-sm"},Ti={class:"ml-12 p-1"},$i={class:"text-sm mt-2"},Gi={key:0},Ui=["href"],Ai={key:1},Si=["href"],Li={key:2,class:"mt-2"},Fi={key:3,class:"text-sm overflow-x-scroll bg-slate-100 px-4 py-3 rounded-md"},Ri={key:4},Oi={key:0,class:"mb-4"},Ni={key:5},Hi={class:"text-sm overflow-x-scroll bg-slate-100 px-4 py-3 rounded-md"},Pi=["href"];function ji(e,i,l,h,v,g){var w,k,y,G,U,I,F,R,O,N,H,P;const C=A("QuickNav"),m=A("font-awesome"),u=A("router-link"),c=A("GiftedDialog");return s(),o(D,null,[f(C),t("section",ge,[t("div",be,[t("h1",we,[t("button",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:i[0]||(i[0]=n=>e.$router.go(-1))},[f(m,{icon:"chevron-left",class:"fa-fw"})]),i[12]||(i[12]=a(" Verifiable Claim Details "))])]),t("div",ke,[t("div",Ie,[t("div",De,[t("div",Ee,[t("h2",Ve,[a(p(e.capitalizeAndInsertSpacesBeforeCaps(e.veriClaim.claimType||""))+" ",1),["GiveAction","Offer","PlanAction"].includes(e.veriClaim.claimType)&&e.veriClaim.issuer===e.activeDid?(s(),o("button",{key:0,title:"Edit","data-testId":"editClaimButton",onClick:i[1]||(i[1]=(...n)=>e.onClickEditClaim&&e.onClickEditClaim(...n))},[f(m,{icon:"pen",class:"text-sm text-blue-500 ml-2 mb-1"})])):d("",!0)]),t("div",Te,[f(u,{to:"/claim-cert/"+encodeURIComponent(e.veriClaim.id),class:"text-blue-500 mt-2",title:"Printable Certificate"},{default:V(()=>[f(m,{icon:"square",class:"text-white bg-yellow-500 p-1"})]),_:1},8,["to"])]),t("div",$e,[t("button",{title:"Copy Link",onClick:i[2]||(i[2]=n=>e.copyToClipboard("A link to this page",e.window.location.href))},[f(m,{icon:"link",class:"text-slate-500"})])])]),t("div",Ge,[t("div",Ue,[f(m,{icon:"message",class:"fa-fw text-slate-400"}),a(" "+p(((k=(w=e.veriClaim.claim)==null?void 0:w.itemOffered)==null?void 0:k.description)||((y=e.veriClaim.claim)==null?void 0:y.description)||""),1)]),t("div",null,[f(m,{icon:"user",class:"fa-fw text-slate-400"}),a(" "+p(e.didInfo(e.veriClaim.issuer)),1)]),t("div",null,[f(m,{icon:"calendar",class:"fa-fw text-slate-400"}),a(" Recorded "+p((G=e.veriClaim.issuedAt)==null?void 0:G.replace(/T/," ").replace(/Z/," UTC")),1)]),e.veriClaim.claim.image?(s(),o("div",Ae,[t("a",{href:e.veriClaim.claim.image,target:"_blank"},[t("img",{src:e.veriClaim.claim.image,class:"h-24 rounded-xl"},null,8,Le)],8,Se)])):d("",!0),e.veriClaim.claimType==="PlanAction"?(s(),o("div",Fe,[f(u,{to:"/project/"+encodeURIComponent(e.veriClaim.handleId),class:"text-blue-500 mt-2"},{default:V(()=>i[13]||(i[13]=[a(" Go to Project page ")])),_:1},8,["to"])])):d("",!0),(U=e.detailsForGive)!=null&&U.fulfillsPlanHandleId?(s(),o("div",Re,[f(u,{to:"/project/"+encodeURIComponent((I=e.detailsForGive)==null?void 0:I.fulfillsPlanHandleId),class:"text-blue-500 mt-2"},{default:V(()=>i[14]||(i[14]=[a(" Fulfills a bigger plan... ")])),_:1},8,["to"])])):d("",!0),(F=e.detailsForGive)!=null&&F.fulfillsType&&((R=e.detailsForGive)==null?void 0:R.fulfillsType)!=="PlanAction"&&((O=e.detailsForGive)!=null&&O.fulfillsHandleId)?(s(),o("div",Oe,[t("a",{class:"text-blue-500 mt-4 cursor-pointer",onClick:i[3]||(i[3]=n=>{var E;return e.showDifferentClaimPage((E=e.detailsForGive)==null?void 0:E.fulfillsHandleId)})}," Fulfills "+p(e.capitalizeAndInsertSpacesBeforeCaps(e.detailsForGive.fulfillsType))+"... ",1)])):d("",!0),(N=e.detailsForOffer)!=null&&N.fulfillsPlanHandleId?(s(),o("div",Ne,[f(u,{to:"/project/"+encodeURIComponent((H=e.detailsForOffer)==null?void 0:H.fulfillsPlanHandleId),class:"text-blue-500 mt-4"},{default:V(()=>i[15]||(i[15]=[a(" Offered to a bigger plan... ")])),_:1},8,["to"])])):d("",!0),((P=e.providersForGive)==null?void 0:P.length)>0?(s(),o("div",He,[i[16]||(i[16]=t("span",null,"Other assistance provided by:",-1)),t("ul",Pe,[(s(!0),o(D,null,T(e.providersForGive,n=>(s(),o("li",{key:n.identifier,class:"list-disc ml-4"},[t("div",je,[t("div",Me,[t("a",{class:"text-blue-500 mt-4 cursor-pointer",onClick:E=>n.identifier.startsWith("did:")?e.$router.push("/did/"+encodeURIComponent(n.identifier)):e.showDifferentClaimPage(n.identifier)}," an activity... ",8,Be)])])]))),128))])])):d("",!0)])])])]),t("div",_e,[f(m,{icon:"comment",class:"text-slate-400"}),a(" "+p(e.issuerName)+" posted that. ",1)]),t("div",qe,[e.libsUtil.canFulfillOffer(e.veriClaim)?(s(),o("button",{key:0,class:"col-span-1 block w-fit text-center text-md bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md",onClick:i[4]||(i[4]=n=>e.openFulfillGiftDialog())},[i[17]||(i[17]=a(" Affirm Delivery ")),f(m,{icon:"hand-holding-heart",class:"ml-2 text-white cursor-pointer"})])):d("",!0)]),f(c,{ref:"customGiveDialog"},null,512),e.libsUtil.isGiveAction(e.veriClaim)?(s(),o("div",Ye,[t("div",ze,[e.libsUtil.isGiveRecordTheUserCanConfirm(e.isRegistered,e.veriClaim,e.activeDid,e.confirmerIdList)?(s(),o("button",{key:0,class:"col-span-1 bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white mt-2 px-4 py-2 rounded-md",onClick:i[5]||(i[5]=n=>e.confirmConfirmClaim())},[i[18]||(i[18]=a(" Confirm ")),f(m,{icon:"circle-check",class:"ml-2 text-white cursor-pointer"})])):(s(),o("h2",Qe,"Confirmations")),t("span",Je,[e.libsUtil.isGiveAction(e.veriClaim)?(s(),S(u,{key:0,to:"/confirm-gift/"+encodeURIComponent(e.veriClaim.id),class:"col-span-1 text-blue-500","data-testId":"confirmGiftLink"},{default:V(()=>i[19]||(i[19]=[a(" Details... ")])),_:1},8,["to"])):d("",!0)])]),t("div",We,[e.totalConfirmers()===0?(s(),o("span",Ze,"Nobody has confirmed this.")):e.totalConfirmers()===1?(s(),o("span",Ke," One person has confirmed this. ")):(s(),o("span",Xe,p(e.totalConfirmers())+" people have confirmed this. ",1))]),e.totalConfirmers()>0?(s(),o("div",xe,[e.confirmerIdList.length===0&&e.confsVisibleToIdList.length===0?(s(),o("div",ei," Nobody that you know confirmed this claim, nor do they have any confirmers in their network. ")):d("",!0),e.confirmerIdList.length===0&&e.confsVisibleToIdList.length>0?(s(),o("div",ii," Nobody that you know has issued or confirmed this claim. ")):d("",!0),e.confirmerIdList.length>0?(s(),o("div",ti,[i[20]||(i[20]=a(" The following people have confirmed this claim. ")),t("ul",si,[(s(!0),o(D,null,T(e.confirmerIdList,n=>(s(),o("li",{key:n,class:"list-disc ml-4"},[t("div",oi,[t("div",li,[t("div",ri,[a(p(e.didInfo(n))+" ",1),e.serverUtil.isEmptyOrHiddenDid(n)?d("",!0):(s(),o("span",ai,[t("a",{href:`/did/${n}`,target:"_blank",class:"text-blue-500"},[f(m,{icon:"arrow-up-right-from-square",class:"fa-fw"})],8,ni)]))])])])]))),128))])])):d("",!0),e.confsVisibleToIdList.length>0?(s(),o("div",di,[i[21]||(i[21]=a(" The following people can connect you with people who have issued or confirmed this claim. ")),t("ul",mi,[(s(!0),o(D,null,T(e.confsVisibleToIdList,n=>(s(),o("li",{key:n,class:"list-disc ml-4"},[t("div",fi,[t("div",hi,[t("div",ui,[a(p(e.didInfo(n))+" ",1),e.serverUtil.isEmptyOrHiddenDid(n)?d("",!0):(s(),o("span",ci,[t("a",{href:`/did/${n}`,target:"_blank",class:"text-blue-500"},[f(m,{icon:"arrow-up-right-from-square",class:"fa-fw"})],8,pi)]))])])])]))),128))])])):d("",!0)])):d("",!0),e.confirmerIdList.includes(e.activeDid)?(s(),o("div",vi," You have confirmed this claim. ")):e.veriClaim.issuer==e.activeDid?(s(),o("div",Ci," You cannot confirm this because you issued this claim, so you already count as confirming it. ")):e.serverUtil.containsHiddenDid(e.veriClaim.claim)?(s(),o("div",yi," You cannot confirm this because it contains hidden identifiers. ")):d("",!0)])):d("",!0),t("h2",{class:"font-bold uppercase text-xl text-blue-500 mt-8 cursor-pointer",onClick:i[6]||(i[6]=n=>e.showVeriClaimDump=!e.showVeriClaimDump)},[i[22]||(i[22]=a(" Details ")),e.showVeriClaimDump?(s(),S(m,{key:0,icon:"chevron-up"})):(s(),S(m,{key:1,icon:"chevron-right"}))]),e.showVeriClaimDump?(s(),o("div",gi,[e.serverUtil.containsHiddenDid(e.veriClaim)&&e.R.isEmpty(e.veriClaimDidsVisible)?(s(),o("div",bi,[i[27]||(i[27]=a(' Some of the details are not visible to you; they show as "HIDDEN". They are not visible to any of your direct contacts, either. ')),e.canShare?(s(),o("span",wi,[i[23]||(i[23]=a(" You can ask one of your contacts to take a look and see if their contacts can see more details: ")),t("a",{class:"text-blue-500",onClick:i[7]||(i[7]=n=>e.onClickShareClaim())},"click to send them this page info"),i[24]||(i[24]=a(" and see if they can make an introduction. Someone is connected to people closer to them; if you don't know who to ask, try the person who registered you. "))])):(s(),o("span",ki,[i[25]||(i[25]=a(" You can ask one of your contacts to take a look and see if their contacts can see more details: ")),t("a",{class:"text-blue-500",onClick:i[8]||(i[8]=n=>e.copyToClipboard("A link to this page",e.windowLocation))},"click to copy this page info"),i[26]||(i[26]=a(" and see if they can make an introduction. Someone is connected to people closer to them; if you don't know who to ask, try the person who registered you. "))]))])):d("",!0),e.R.isEmpty(e.veriClaimDidsVisible)?d("",!0):(s(),o("div",Ii,[i[31]||(i[31]=a(" Some of the details are not visible to you but they are visible to some of your contacts. ")),e.canShare?(s(),o("span",Di,[i[28]||(i[28]=a(" If you'd like an introduction, ")),t("a",{class:"text-blue-500",onClick:i[9]||(i[9]=n=>e.onClickShareClaim())},"click to share the information with them and ask if they'll tell you more about the participants.")])):(s(),o("span",Ei,[i[29]||(i[29]=a(" If you'd like an introduction, ")),t("a",{class:"text-blue-500",onClick:i[10]||(i[10]=n=>e.copyToClipboard("A link to this page",e.windowLocation))},"share this page with them and ask if they'll tell you more about about the participants.")])),(s(!0),o(D,null,T(Object.keys(e.veriClaimDidsVisible),(n,E)=>(s(),o("div",{key:E,class:"list-disc p-4"},[t("div",Vi,[f(m,{icon:"minus",class:"fa-fw"}),a(" The "+p(n)+" is visible to: ",1)]),t("div",Ti,[t("ul",null,[(s(!0),o(D,null,T(e.veriClaimDidsVisible[n],(b,q)=>{var j,M;return s(),o("li",{key:q,class:"list-disc"},[t("div",$i,[t("span",null,[a(p(e.didInfo(b))+" ",1),e.serverUtil.isEmptyOrHiddenDid(b)?d("",!0):(s(),o("span",Gi,[t("a",{href:`/did/${b}`,target:"_blank",class:"text-blue-500"},[f(m,{icon:"arrow-up-right-from-square",class:"fa-fw"})],8,Ui)])),(j=e.veriClaim.publicUrls)!=null&&j[b]?(s(),o("span",Ai,[i[30]||(i[30]=a(", found at ")),t("a",{href:(M=e.veriClaim.publicUrls)==null?void 0:M[b],target:"_blank",class:"text-blue-500"},[f(m,{icon:"globe",class:"fa-fw"}),a(" "+p(e.veriClaim.publicUrls[b].substring(e.veriClaim.publicUrls[b].indexOf("//")+2)),1)],8,Si)])):d("",!0)])])])}),128))])])]))),128))])),e.isEditedGlobalId?(s(),o("span",Li," This record is an edited version. The latest version is shown. ")):d("",!0),i[34]||(i[34]=t("br",null,null,-1)),e.showVeriClaimDump?(s(),o("pre",Fi,p(e.veriClaimDump),1)):d("",!0),i[35]||(i[35]=t("h2",{class:"text-xl mt-8 mb-2"},"Full Claim",-1)),i[36]||(i[36]=t("p",{class:"mb-4"}," The full claim includes the claim as it was originally issued, including the signature (ie. the proof of issuance by that person). ",-1)),e.fullClaim?(s(),o("div",Ni,[t("pre",Hi,p(e.fullClaimDump),1)])):(s(),o("div",Ri,[e.fullClaimMessage?(s(),o("p",Oi,p(e.fullClaimMessage),1)):(s(),o("button",{key:1,class:"text-blue-500 cursor-pointer",onClick:i[11]||(i[11]=n=>e.showFullClaim(e.veriClaim.id))},[f(m,{icon:"file-lines",class:"fa-fw"}),i[32]||(i[32]=a(" Load Full Claim Details "))]))])),t("a",{href:e.apiServer+"/api/claim/"+e.veriClaim.id,target:"_blank",class:"text-blue-500 cursor-pointer"},[f(m,{icon:"file-lines",class:"fa-fw"}),f(m,{icon:"arrow-up-right-from-square",class:"ml-1 fa-fw"}),i[33]||(i[33]=a(" View on the Public Server "))],8,Pi)])):d("",!0)])],64)}const it=ee(L,[["render",ji]]);export{it as default}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ConfirmContactView-CXS4FvMu.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ConfirmContactView-CXS4FvMu.js deleted file mode 100644 index 737c319..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ConfirmContactView-CXS4FvMu.js +++ /dev/null @@ -1 +0,0 @@ -import{V as m,C as x,_ as u,h as _,k as c,J as f,j as d,n as b,w as v,z as i,B as w}from"./main.common-DD7dqhZp.js";import"./index-BGoTPXII.js";var g=Object.getOwnPropertyDescriptor,C=(o,t,r,a)=>{for(var e=a>1?void 0:a?g(t,r):t,s=o.length-1,n;s>=0;s--)(n=o[s])&&(e=n(e)||e);return e};let l=class extends m{};l=C([x({components:{}})],l);const h={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},k={id:"ViewBreadcrumb",class:"mb-8"},V={class:"text-lg text-center font-light relative px-7"};function y(o,t,r,a,e,s){const n=i("font-awesome"),p=i("router-link");return w(),_("section",h,[c("div",k,[c("h1",V,[d(p,{to:{name:"account"},class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1"},{default:v(()=>[d(n,{icon:"chevron-left",class:"fa-fw"})]),_:1}),t[0]||(t[0]=b(" Confirm Contact "))])]),t[1]||(t[1]=f('

Would you like to add Firstname to your network?

Firstname Lastname

ID
did:peer:kl45kj41lk451kl3
',3))])}const j=u(l,[["render",y]]);export{j as default}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ConfirmGiftView-BDAczKwI.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ConfirmGiftView-BDAczKwI.js deleted file mode 100644 index dde0f6d..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ConfirmGiftView-BDAczKwI.js +++ /dev/null @@ -1 +0,0 @@ -var B=Object.defineProperty;var O=(e,i,n)=>i in e?B(e,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[i]=n;var r=(e,i,n)=>O(e,typeof i!="symbol"?i+"":i,n);import{y as P,d as M}from"./js-yaml-CxlQHuPU.js";import{R as Y}from"./index-BtEdi1q-.js";import{V as j,e as _,d as z,C as W,_ as Q,h as s,j as h,k as o,m as f,n as a,t as u,w as A,F as b,E as I,y as E,z as N,B as t}from"./main.common-DD7dqhZp.js";import{u as q}from"./index-CZnn7ED5.js";import{Q as K}from"./QuickNav-C8jPGtUY.js";import{B as G,l as Z,s as J,z as X,h as x,i as ee,j as ie,g as H,k as te,m as se,p as oe,q as ne,u as re,v as ae,C as le,E as de,F as me}from"./index-ryzpKtgI.js";import{T as he}from"./TopMessage-ZWDDjman.js";import"./_isString-B7bbuhPA.js";import"./concat-Ro2w9qwP.js";import"./set-BrilI7kO.js";import"./sort-DzTCGCnH.js";import"./index-BGoTPXII.js";var fe=Object.getOwnPropertyDescriptor,ce=(e,i,n,m)=>{for(var c=m>1?void 0:m?fe(i,n):i,g=e.length-1,p;g>=0;g--)(p=e[g])&&(c=p(c)||c);return c};let R=class extends j{constructor(){super(...arguments);r(this,"$notify");r(this,"$route");r(this,"$router");r(this,"activeDid","");r(this,"allMyDids",[]);r(this,"allContacts",[]);r(this,"apiServer","");r(this,"canShare",!1);r(this,"confirmerIdList",[]);r(this,"confsVisibleErrorMessage","");r(this,"confsVisibleToIdList",[]);r(this,"giveDetails");r(this,"giverName","");r(this,"issuerName","");r(this,"isLoading",!1);r(this,"isRegistered",!1);r(this,"numConfsNotVisible",0);r(this,"recipientName","");r(this,"showVeriClaimDump",!1);r(this,"urlForNewGive","");r(this,"veriClaim",G);r(this,"veriClaimDump","");r(this,"veriClaimDidsVisible",{});r(this,"windowLocation",window.location.href);r(this,"R",Y);r(this,"yaml",P);r(this,"libsUtil",Z);r(this,"serverUtil",J);r(this,"displayAmount",X)}resetThisValues(){this.confirmerIdList=[],this.confsVisibleErrorMessage="",this.confsVisibleToIdList=[],this.giveDetails=void 0,this.isRegistered=!1,this.numConfsNotVisible=0,this.urlForNewGive="",this.veriClaim=G,this.veriClaimDump=""}async mounted(){this.isLoading=!0;const n=await _();this.activeDid=n.activeDid||"",this.apiServer=n.apiServer||"",this.allContacts=await z.contacts.toArray(),this.isRegistered=n.isRegistered||!1,this.allMyDids=await x();const m=window.location.pathname.substring(14);let c;m?(c=decodeURIComponent(m),await this.loadClaim(c,this.activeDid)):this.$notify({group:"alert",type:"danger",title:"Error",text:"No claim ID was provided."},3e3),this.canShare=!!navigator.share,this.isLoading=!1}capitalizeAndInsertSpacesBeforeCaps(n){return n?n[0].toUpperCase()+n.substr(1).replace(/([A-Z])/g," $1"):""}capitalizeAndInsertSpacesBeforeCapsWithAPrefix(n){const m=this.capitalizeAndInsertSpacesBeforeCaps(n);if(m){const c=m[0].toLowerCase();return(["a","e","i","o","u"].includes(c)?"an":"a")+" "+m}else return""}totalConfirmers(){return this.numConfsNotVisible+this.confirmerIdList.length+this.confsVisibleToIdList.length}didInfo(n){return ee(n,this.activeDid,this.allMyDids,this.allContacts)}async loadClaim(n,m){var p;const c=ie(n)?"/api/claim/byHandle/":"/api/claim/",g=this.apiServer+c+encodeURIComponent(n);try{const w=await H(m),l=await this.axios.get(g,{headers:w});if(l.status===200)this.veriClaim=l.data,this.veriClaimDump=M(this.veriClaim),this.veriClaimDidsVisible=te(this.veriClaim,!0);else{console.error("Error getting claim:",l),this.$notify({group:"alert",type:"danger",title:"Error",text:"There was a problem retrieving that claim."},3e3);return}if(this.veriClaim.claimType!=="GiveAction")return;this.issuerName=this.didInfo(this.veriClaim.issuer);const k=this.apiServer+"/api/v2/report/gives?handleId="+encodeURIComponent(this.veriClaim.handleId),D=await H(m),C=await this.axios.get(k,{headers:D});if(C.status===200)this.giveDetails=C.data.data[0];else{console.error("Error getting detailed give info:",C),this.$notify({group:"alert",type:"danger",title:"Error",text:"Something went wrong retrieving gift data."},3e3);return}if(!this.giveDetails)return;this.urlForNewGive="/gifted-details?",this.giveDetails.amount&&(this.urlForNewGive+="&amountInput="+encodeURIComponent(String(this.giveDetails.amount))),this.giveDetails.unit&&(this.urlForNewGive+="&unitCode="+encodeURIComponent(this.giveDetails.unit)),this.giveDetails.description&&(this.urlForNewGive+="&description="+encodeURIComponent(this.giveDetails.description)),this.giverName=this.didInfo(this.giveDetails.agentDid),this.giveDetails.agentDid&&(this.urlForNewGive+="&giverDid="+encodeURIComponent(this.giveDetails.agentDid)+"&giverName="+encodeURIComponent(this.giverName)),this.recipientName=this.didInfo(this.giveDetails.recipientDid),this.giveDetails.recipientDid&&(this.urlForNewGive+="&recipientDid="+encodeURIComponent(this.giveDetails.recipientDid)+"&recipientName="+encodeURIComponent(this.recipientName)),this.giveDetails.fullClaim.image&&(this.urlForNewGive+="&image="+encodeURIComponent(this.giveDetails.fullClaim.image)),this.giveDetails.type=="Offer"&&this.giveDetails.fulfillsHandleId&&(this.urlForNewGive+="&offerId="+encodeURIComponent((p=this.giveDetails)==null?void 0:p.fulfillsHandleId)),this.giveDetails.fulfillsPlanHandleId&&(this.urlForNewGive+="&fulfillsProjectId="+encodeURIComponent(this.giveDetails.fulfillsPlanHandleId));const y=await se(this.apiServer,n,this.veriClaim.issuer,m);y?(this.confirmerIdList=y.confirmerIdList,this.confsVisibleToIdList=y.confsVisibleToIdList,this.numConfsNotVisible=y.numConfsNotVisible):this.confsVisibleErrorMessage="Had problems retrieving confirmations."}catch(w){console.error("Error retrieving claim:",w),this.$notify({group:"alert",type:"danger",title:"Error",text:"Something went wrong retrieving claim data."},3e3)}}confirmConfirmClaim(){this.$notify({group:"modal",type:"confirm",title:"Confirm",text:"Do you personally confirm that this is true?",onYes:async()=>{await this.confirmClaim()}},-1)}async confirmClaim(){const m={"@context":"https://schema.org","@type":"AgreeAction",object:oe(ne(re(this.veriClaim.claim,this.veriClaim.id,this.veriClaim.handleId)))},c=await ae(m,this.activeDid,this.apiServer,this.axios);c.type==="success"?this.$notify({group:"alert",type:"success",title:"Success",text:"Confirmation submitted."},3e3):(console.error("Got error submitting the confirmation:",c),this.$notify({group:"alert",type:"danger",title:"Error",text:"There was a problem submitting the confirmation."},5e3))}showClaimPage(n){const m={path:"/claim/"+encodeURIComponent(n)};this.$router.push(m).then(async()=>{this.resetThisValues(),await this.loadClaim(n,this.activeDid)})}copyToClipboard(n,m){q().copy(m).then(()=>{this.$notify({group:"alert",type:"toast",title:"Copied",text:(n||"That")+" was copied to the clipboard."},2e3)})}notifyWhyCannotConfirm(){le(this.$notify,this.isRegistered,this.veriClaim.claimType,this.giveDetails,this.activeDid,this.confirmerIdList)}notifyWhyCannotConfirmBak(){var n,m;this.isRegistered?de(this.veriClaim)?this.confirmerIdList.includes(this.activeDid)?this.$notify({group:"alert",type:"info",title:"Already Confirmed",text:"You already confirmed this claim."},3e3):((n=this.giveDetails)==null?void 0:n.issuerDid)==this.activeDid?this.$notify({group:"alert",type:"info",title:"Cannot Confirm",text:"You cannot confirm this because you issued this claim."},3e3):me((m=this.giveDetails)==null?void 0:m.fullClaim)?this.$notify({group:"alert",type:"info",title:"Cannot Confirm",text:"You cannot confirm this because some people are hidden."},3e3):this.$notify({group:"alert",type:"info",title:"Cannot Confirm",text:"You cannot confirm this claim. There are no other details, but we can help more if you contact us and send us screenshots."},3e3):this.$notify({group:"alert",type:"info",title:"Not A Give",text:"This is not a giving action to confirm."},3e3):this.$notify({group:"alert",type:"info",title:"Not Registered",text:"Someone needs to register you before you can contribute."},3e3)}onClickShareClaim(){this.copyToClipboard("A link to this page",this.windowLocation),window.navigator.share({title:"Help Connect Me",text:"I'm trying to find the full details of this claim. Can you help me?",url:this.windowLocation})}};R=ce([W({components:{TopMessage:he,QuickNav:K}})],R);const ue={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},pe={id:"ViewBreadcrumb",class:"mb-8"},ve={class:"text-lg text-center font-light relative px-7"},ge={key:0},ye={key:1},Ce={key:0},we={class:"flex justify-center"},be={class:"bg-slate-100 rounded-md overflow-hidden px-4 py-3 mt-4"},ke={class:"flex gap-4 overflow-hidden"},De={class:"overflow-hidden"},Ie={class:"text-sm"},Ne={key:0},Te={key:1},Re={key:2,class:"mt-2"},Le={key:3},Ve={class:"mt-2"},$e={key:0,class:"mt-4"},Ue={key:0},Se={key:1},Ae={key:2},Ee={key:3},Ge={key:0},He={key:1},Fe={key:2},Be={class:"ml-4"},Oe={class:"flex gap-4"},Pe={class:"grow overflow-hidden"},Me={class:"text-sm"},Ye={key:0},je=["onClick"],_e={key:3},ze={class:"ml-4"},We={class:"flex gap-4"},Qe={class:"grow overflow-hidden"},qe={class:"text-sm"},Ke={key:0},Ze=["onClick"],Je={key:4},Xe={key:5},xe={key:6},ei={key:1},ii={key:0,class:"mb-2"},ti={key:0},si={key:1},oi={key:1},ni={key:0},ri={key:1},ai={class:"text-sm"},li={class:"ml-12 p-1"},di={class:"text-sm mt-2"},mi={key:0},hi=["onClick"],fi={key:1},ci=["href"],ui={class:"text-sm overflow-x-scroll px-4 py-3 bg-slate-100 rounded-md"},pi={class:"mt-2 ml-2"},vi={class:"mt-2 ml-2"},gi=["href"],yi={key:1},Ci={key:2,class:"fixed left-6 bottom-24 text-center text-4xl leading-none bg-slate-400 text-white w-14 py-2.5 rounded-full"};function wi(e,i,n,m,c,g){var D,C,y,L,V,$;const p=N("QuickNav"),w=N("TopMessage"),l=N("font-awesome"),k=N("router-link");return t(),s(b,null,[h(p),h(w),o("section",ue,[o("div",pe,[o("h1",ve,[o("button",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:i[0]||(i[0]=d=>e.$router.go(-1))},[h(l,{icon:"chevron-left",class:"fa-fw"})]),e.libsUtil.isGiveRecordTheUserCanConfirm(e.isRegistered,e.veriClaim,e.activeDid,e.confirmerIdList)?(t(),s("span",ge," Do you agree? ")):(t(),s("span",ye," Confirmation Details "))])]),e.giveDetails&&!e.isLoading?(t(),s("div",Ce,[o("div",we,[e.libsUtil.isGiveRecordTheUserCanConfirm(e.isRegistered,e.veriClaim,e.activeDid,e.confirmerIdList)?(t(),s("button",{key:0,class:"col-span-1 bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-4 py-2 rounded-md",onClick:i[1]||(i[1]=d=>e.confirmConfirmClaim())},[i[9]||(i[9]=a(" Confirm ")),h(l,{icon:"circle-check",class:"ml-2 text-white cursor-pointer"})])):(t(),s("button",{key:1,class:"col-span-1 bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-4 py-2 rounded-md",onClick:i[2]||(i[2]=d=>e.notifyWhyCannotConfirm())},[i[10]||(i[10]=a(" Confirm ")),h(l,{icon:"circle-check",class:"ml-2 text-white cursor-pointer"})]))]),o("div",be,[o("div",ke,[o("div",De,[o("div",Ie,[o("div",null,[h(l,{icon:"arrow-left",class:"fa-fw text-slate-400"}),a(" "+u(e.giverName),1)]),i[12]||(i[12]=o("div",{class:"ml-6"},"gave",-1)),e.giveDetails.amount?(t(),s("div",Ne,[h(l,{icon:"hand-holding-dollar",class:"fa-fw text-slate-400"}),a(" "+u(e.displayAmount(e.giveDetails.unit,e.giveDetails.amount)),1)])):f("",!0),e.giveDetails.description?(t(),s("div",Te,[h(l,{icon:"message",class:"fa-fw text-slate-400"}),a(" "+u(e.giveDetails.amount?"and:":"")+" "+u(e.giveDetails.description),1)])):f("",!0),i[13]||(i[13]=o("div",{class:"ml-6"},"to",-1)),o("div",null,[h(l,{icon:"arrow-right",class:"fa-fw text-slate-400"}),a(" "+u(e.recipientName),1)]),o("div",null,[h(l,{icon:"calendar",class:"fa-fw text-slate-400"}),a(" on "+u(e.giveDetails.issuedAt.substring(0,10)),1)]),(D=e.giveDetails)!=null&&D.fulfillsPlanHandleId?(t(),s("div",Re,[h(k,{to:"/project/"+encodeURIComponent(((C=e.giveDetails)==null?void 0:C.fulfillsPlanHandleId)||""),class:"text-blue-500 mt-2 cursor-pointer",target:"_blank"},{default:A(()=>[i[11]||(i[11]=a(" This fulfills a bigger plan ")),h(l,{icon:"arrow-up-right-from-square",class:"fa-fw"})]),_:1},8,["to"])])):f("",!0),(y=e.giveDetails)!=null&&y.fulfillsType&&((L=e.giveDetails)==null?void 0:L.fulfillsType)!=="PlanAction"&&((V=e.giveDetails)!=null&&V.fulfillsHandleId)?(t(),s("div",Le,[h(k,{to:"/claim/"+encodeURIComponent((($=e.giveDetails)==null?void 0:$.fulfillsHandleId)||""),class:"text-blue-500 mt-2 cursor-pointer",target:"_blank"},{default:A(()=>{var d;return[a(" This fulfills "+u(e.capitalizeAndInsertSpacesBeforeCapsWithAPrefix(((d=e.giveDetails)==null?void 0:d.fulfillsType)||""))+" ",1),h(l,{icon:"arrow-up-right-from-square",class:"fa-fw"})]}),_:1},8,["to"])])):f("",!0)])])])]),o("div",Ve,[h(l,{icon:"comment",class:"text-slate-400"}),a(" "+u(e.issuerName)+" posted that. ",1)]),e.libsUtil.isGiveAction(e.veriClaim)?(t(),s("div",$e,[i[16]||(i[16]=o("h2",{class:"font-bold uppercase text-xl mt-8 mb-2"},"Confirmations",-1)),e.totalConfirmers()===0?(t(),s("span",Ue,"Nobody has confirmed this.")):e.totalConfirmers()===1?(t(),s("span",Se," One person confirmed this. ")):(t(),s("span",Ae,u(e.totalConfirmers())+" people confirmed this. ",1)),e.totalConfirmers()>0?(t(),s("div",Ee,[e.confirmerIdList.length===0&&e.confsVisibleToIdList.length===0?(t(),s("div",Ge," Nobody that you know confirmed this claim, nor do they have any confirmers in their network. ")):f("",!0),e.confirmerIdList.length===0&&e.confsVisibleToIdList.length>0?(t(),s("div",He," Nobody that you know issued or confirmed this claim. ")):f("",!0),e.confirmerIdList.length>0?(t(),s("div",Fe,[i[14]||(i[14]=a(" The following people confirmed this claim. ")),o("ul",Be,[(t(!0),s(b,null,I(e.confirmerIdList,d=>(t(),s("li",{key:d,class:"list-disc ml-4"},[o("div",Oe,[o("div",Pe,[o("div",Me,[a(u(e.didInfo(d))+" ",1),e.serverUtil.isEmptyOrHiddenDid(d)?f("",!0):(t(),s("span",Ye,[o("button",{onClick:T=>e.copyToClipboard("The DID of "+d,d)},[h(l,{icon:"copy",class:"text-slate-400 fa-fw"})],8,je)]))])])])]))),128))])])):f("",!0),e.confsVisibleToIdList.length>0?(t(),s("div",_e,[i[15]||(i[15]=a(" The following people can connect you with people who issued or confirmed this claim. ")),o("ul",ze,[(t(!0),s(b,null,I(e.confsVisibleToIdList,d=>(t(),s("li",{key:d,class:"list-disc ml-4"},[o("div",We,[o("div",Qe,[o("div",qe,[a(u(e.didInfo(d))+" ",1),e.serverUtil.isEmptyOrHiddenDid(d)?f("",!0):(t(),s("span",Ke,[o("button",{onClick:T=>e.copyToClipboard("The DID of "+d,d)},[h(l,{icon:"copy",class:"text-slate-400 fa-fw"})],8,Ze)]))])])])]))),128))])])):f("",!0)])):f("",!0),e.isRegistered?e.giveDetails.issuerDid==e.activeDid?(t(),s("div",Xe," You cannot confirm this because you issued this claim, so you already count as confirming it. ")):e.serverUtil.containsHiddenDid(e.veriClaim.claim)?(t(),s("div",xe," You cannot confirm this because some people are hidden. ")):f("",!0):(t(),s("div",Je," You cannot confirm this because you are not registered. Find someone to register you, maybe on the Help page. "))])):f("",!0),o("h2",{class:"font-bold uppercase text-xl text-blue-500 mt-8 cursor-pointer",onClick:i[3]||(i[3]=d=>e.showVeriClaimDump=!e.showVeriClaimDump)},[i[17]||(i[17]=a(" Details ")),e.showVeriClaimDump?(t(),E(l,{key:0,icon:"chevron-up"})):(t(),E(l,{key:1,icon:"chevron-right"}))]),e.showVeriClaimDump?(t(),s("div",ei,[e.serverUtil.containsHiddenDid(e.veriClaim)&&e.R.isEmpty(e.veriClaimDidsVisible)?(t(),s("div",ii,[i[22]||(i[22]=a(' Some of the details are not visible to you; they show as "HIDDEN". They are not visible to any of your direct contacts, either. ')),e.canShare?(t(),s("span",ti,[i[18]||(i[18]=a(" You can ask one of your contacts to take a look and see if their contacts can see more details: ")),o("a",{class:"text-blue-500",onClick:i[4]||(i[4]=d=>e.onClickShareClaim())},"click to send them this page info"),i[19]||(i[19]=a(" and see if they can make an introduction. Someone is connected to people closer to them; if you don't know who to ask, try the person who registered you. "))])):(t(),s("span",si,[i[20]||(i[20]=a(" You can ask one of your contacts to take a look and see if their contacts can see more details: ")),o("a",{class:"text-blue-500",onClick:i[5]||(i[5]=d=>e.copyToClipboard("A link to this page",e.windowLocation))},"click to copy this page info"),i[21]||(i[21]=a(" and see if they can make an introduction. Someone is connected to people closer to them; if you don't know who to ask, try the person who registered you. "))]))])):f("",!0),e.R.isEmpty(e.veriClaimDidsVisible)?f("",!0):(t(),s("div",oi,[i[26]||(i[26]=a(" Some of the details are not visible to you but they are visible to some of your contacts. ")),e.canShare?(t(),s("span",ni,[i[23]||(i[23]=a(" If you'd like an introduction, ")),o("a",{class:"text-blue-500",onClick:i[6]||(i[6]=d=>e.onClickShareClaim())},"click to share the information with them and ask if they'll tell you more about the participants.")])):(t(),s("span",ri,[i[24]||(i[24]=a(" If you'd like an introduction, ")),o("a",{class:"text-blue-500",onClick:i[7]||(i[7]=d=>e.copyToClipboard("A link to this page",e.windowLocation))},"share this page with them and ask if they'll tell you more about about the participants.")])),(t(!0),s(b,null,I(Object.keys(e.veriClaimDidsVisible),(d,T)=>(t(),s("div",{key:T,class:"list-disc p-4"},[o("div",ai,[h(l,{icon:"minus",class:"fa-fw"}),a(" The "+u(d)+" is visible to: ",1)]),o("div",li,[o("ul",null,[(t(!0),s(b,null,I(e.veriClaimDidsVisible[d],(v,F)=>{var U,S;return t(),s("li",{key:F,class:"list-disc"},[o("div",di,[o("span",null,[a(u(e.didInfo(v))+" ",1),e.serverUtil.isEmptyOrHiddenDid(v)?f("",!0):(t(),s("span",mi,[o("button",{onClick:bi=>e.copyToClipboard("The DID of "+v,v)},[h(l,{icon:"copy",class:"text-slate-400 fa-fw"})],8,hi)])),(U=e.veriClaim.publicUrls)!=null&&U[v]?(t(),s("span",fi,[i[25]||(i[25]=a(", found at ")),h(l,{icon:"globe",class:"fa-fw text-slate-400"}),o("a",{href:(S=e.veriClaim.publicUrls)==null?void 0:S[v],class:"text-blue-500"},u(e.veriClaim.publicUrls[v].substring(e.veriClaim.publicUrls[v].indexOf("//")+2)),9,ci)])):f("",!0)])])])}),128))])])]))),128))])),o("pre",ui,u(e.veriClaimDump),1),o("div",pi,[o("a",{class:"text-blue-500 cursor-pointer",onClick:i[8]||(i[8]=d=>e.showClaimPage(e.veriClaim.id))},[h(l,{icon:"file-lines"}),i[27]||(i[27]=a(" See All Generic Info "))])]),o("div",vi,[e.isRegistered?(t(),s("a",{key:0,class:"text-blue-500 cursor-pointer",href:e.urlForNewGive},[h(l,{icon:"file-lines"}),i[28]||(i[28]=a(" Record a Give Similar to the Original "))],8,gi)):f("",!0)])])):f("",!0)])):e.isLoading?f("",!0):(t(),s("div",yi,"This does not have details to confirm.")),e.isLoading?(t(),s("div",Ci,[h(l,{icon:"spinner",class:"fa-spin-pulse"})])):f("",!0)])],64)}const Hi=Q(R,[["render",wi]]);export{Hi as default}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ContactAmountsView-Bsd4-O6A.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ContactAmountsView-Bsd4-O6A.js deleted file mode 100644 index e0f1032..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ContactAmountsView-Bsd4-O6A.js +++ /dev/null @@ -1 +0,0 @@ -var $=Object.defineProperty;var E=(a,t,s)=>t in a?$(a,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):a[t]=s;var p=(a,t,s)=>E(a,typeof t!="symbol"?t+"":t,s);import{V as T,d as N,e as O,C as V,_ as j,h as c,j as h,k as e,w as G,t as y,F as b,E as R,z as x,B as l,m as D,n as k}from"./main.common-DD7dqhZp.js";import{Q as I}from"./QuickNav-C8jPGtUY.js";import{z as U,G as B,g as _,H as F,S as A,I as J}from"./index-ryzpKtgI.js";import{c as M}from"./concat-Ro2w9qwP.js";import{s as H}from"./sort-DzTCGCnH.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var Q=Object.getOwnPropertyDescriptor,W=(a,t,s,i)=>{for(var u=i>1?void 0:i?Q(t,s):t,v=a.length-1,n;v>=0;v--)(n=a[v])&&(u=n(u)||u);return u};let w=class extends T{constructor(){super(...arguments);p(this,"$notify");p(this,"$route");p(this,"$router");p(this,"activeDid","");p(this,"apiServer","");p(this,"contact",null);p(this,"giveRecords",[]);p(this,"numAccounts",0);p(this,"displayAmount",U)}async beforeCreate(){this.numAccounts=await B()}async created(){try{const t=this.$route.query.contactDid;this.contact=await N.contacts.get(t)||null;const s=await O();this.activeDid=(s==null?void 0:s.activeDid)||"",this.apiServer=(s==null?void 0:s.apiServer)||"",this.activeDid&&this.contact&&this.loadGives(this.activeDid,this.contact)}catch(t){console.error("Error retrieving settings or gives.",t),this.$notify({group:"alert",type:"danger",title:"Error",text:t.userMessage||"There was an error retrieving your settings or contacts or gives."},5e3)}}async loadGives(t,s){try{let i=[];const u=this.apiServer+"/api/v2/report/gives?agentDid="+encodeURIComponent(this.activeDid)+"&recipientDid="+encodeURIComponent(s.did),v=await _(t),n=await this.axios.get(u,{headers:v});n.status===200?i=n.data.data:(console.error("Got bad response status & data of",n.status,n.data),this.$notify({group:"alert",type:"danger",title:"Error With Server",text:"Got an error retrieving your given time from the server."},5e3));const r=this.apiServer+"/api/v2/report/gives?agentDid="+encodeURIComponent(s.did)+"&recipientDid="+encodeURIComponent(this.activeDid),g=await _(t),d=await this.axios.get(r,{headers:g});d.status===200?i=M(i,d.data.data):(console.error("Got bad response status & data of",d.status,d.data),this.$notify({group:"alert",type:"danger",title:"Error With Server",text:"Got an error retrieving your given time from the server."},5e3));const o=H((m,f)=>new Date(f.issuedAt).getTime()-new Date(m.issuedAt).getTime(),i);this.giveRecords=o}catch(i){this.$notify({group:"alert",type:"danger",title:"Error With Server",text:i},5e3)}}async confirm(t){var g,d;const s=F(t.fullClaim);t.fullClaim["@context"]==A&&delete s["@context"],s.identifier=t.handleId;const i={"@context":A,"@type":"AgreeAction",object:s},u=await J(this.activeDid,i),v=JSON.stringify({jwtEncoded:u}),n=this.apiServer+"/api/v2/claim",r=await _(this.activeDid);try{(g=(await this.axios.post(n,v,{headers:r})).data)!=null&&g.success&&(t.amountConfirmed=((d=s.object)==null?void 0:d.amountOfThisGood)||1)}catch(o){let m="There was an error.";const f=o;f?f.message?m=f.message:m=JSON.stringify(f.toJSON()):m=o,this.$notify({group:"alert",type:"danger",title:"Error With Server",text:m},5e3)}}cannotConfirmMessage(){this.$notify({group:"alert",type:"danger",title:"Not Allowed",text:"Only the recipient can confirm final receipt."},5e3)}};w=W([V({components:{QuickNav:I}})],w);const z={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},L={class:"mb-8"},P={id:"ViewBreadcrumb",class:"text-lg text-center font-light relative px-7"},q={id:"ViewHeading",class:"text-4xl text-center font-light pt-4"},X={class:"table-auto w-full border-t border-slate-300 text-sm sm:text-base text-center"},K={class:"p-1 text-xs sm:text-sm text-left text-slate-500"},Y={class:"p-1"},Z={key:0},tt={class:"font-bold"},et={key:0,title:"Confirmed"},st=["onClick"],ot={class:"italic text-xs sm:text-sm text-slate-500"},at={class:"p-1"},it={key:0},nt={key:1},rt={class:"p-1"},ct={key:0},lt={class:"font-bold"},dt={key:0,title:"Confirmed"},pt={class:"italic text-xs sm:text-sm text-slate-500"};function ut(a,t,s,i,u,v){var d;const n=x("QuickNav"),r=x("font-awesome"),g=x("router-link");return l(),c(b,null,[h(n,{selected:"Contacts"}),e("section",z,[e("div",L,[e("h1",P,[h(g,{to:{name:"contacts"},class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1"},{default:G(()=>[h(r,{icon:"chevron-left",class:"fa-fw"})]),_:1})]),e("h1",q," Transferred with "+y((d=a.contact)==null?void 0:d.name),1)]),t[2]||(t[2]=e("div",{class:"flex justify-around"},[e("span"),e("span",{class:"justify-around"},"(Only 50 most recent)"),e("span")],-1)),t[3]||(t[3]=e("div",{class:"flex justify-around"},[e("span"),e("span",{class:"justify-around"}," (This does not include claims by them if they're not visible to you.) "),e("span")],-1)),e("table",X,[t[1]||(t[1]=e("thead",{class:"bg-slate-100"},[e("tr",{class:"border-b border-slate-300"},[e("th"),e("th",{class:"px-1 py-2"},"From Them"),e("th"),e("th",{class:"px-1 py-2"},"To Them")])],-1)),e("tbody",null,[(l(!0),c(b,null,R(a.giveRecords,o=>{var m,f,C;return l(),c("tr",{key:o.id,class:"border-b border-slate-300"},[e("td",K,y(new Date(o.issuedAt).toLocaleString()),1),e("td",Y,[o.agentDid==((m=a.contact)==null?void 0:m.did)?(l(),c("span",Z,[e("div",tt,[k(y(a.displayAmount(o.unit,o.amount))+" ",1),o.amountConfirmed?(l(),c("span",et,[h(r,{icon:"circle-check",class:"text-green-600 fa-fw"})])):(l(),c("button",{key:1,title:"Unconfirmed",onClick:S=>a.confirm(o)},[h(r,{icon:"circle",class:"text-blue-600 fa-fw"})],8,st))]),e("div",ot,y(o.description),1)])):D("",!0)]),e("td",at,[o.agentDid==((f=a.contact)==null?void 0:f.did)?(l(),c("span",it,[h(r,{icon:"arrow-left",class:"text-slate-400 fa-fw"})])):(l(),c("span",nt,[h(r,{icon:"arrow-right",class:"text-slate-400 fa-fw"})]))]),e("td",rt,[o.agentDid!=((C=a.contact)==null?void 0:C.did)?(l(),c("span",ct,[e("div",lt,[k(y(a.displayAmount(o.unit,o.amount))+" ",1),o.amountConfirmed?(l(),c("span",dt,[h(r,{icon:"circle-check",class:"text-green-600 fa-fw"})])):(l(),c("button",{key:1,title:"Unconfirmed",onClick:t[0]||(t[0]=S=>a.cannotConfirmMessage())},[h(r,{icon:"circle",class:"text-slate-600 fa-fw"})]))]),e("div",pt,y(o.description),1)])):D("",!0)])])}),128))])])])],64)}const Ct=j(w,[["render",ut]]);export{Ct as default}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ContactEditView-Dw42tFmc.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ContactEditView-Dw42tFmc.js deleted file mode 100644 index 8125335..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ContactEditView-Dw42tFmc.js +++ /dev/null @@ -1 +0,0 @@ -var M=Object.defineProperty;var k=(e,t,s)=>t in e?M(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var r=(e,t,s)=>k(e,typeof t!="symbol"?t+"":t,s);import{V as x,A as $,d as w,C as V,_ as T,h as b,j as i,k as o,n as _,t as E,o as p,s as u,F as C,E as A,z as y,B as f,m as I}from"./main.common-DD7dqhZp.js";import{Q as S}from"./QuickNav-C8jPGtUY.js";import{T as U}from"./TopMessage-ZWDDjman.js";import{s as D,l as L}from"./set-BrilI7kO.js";import{e as O}from"./_isString-B7bbuhPA.js";import"./index-BGoTPXII.js";var P=Object.getOwnPropertyDescriptor,B=(e,t,s,a)=>{for(var c=a>1?void 0:a?P(t,s):t,m=e.length-1,h;m>=0;m--)(h=e[m])&&(c=h(c)||c);return c};let v=class extends x{constructor(){super(...arguments);r(this,"$notify");r(this,"$route");r(this,"$router");r(this,"contact",{did:"",name:"",notes:""});r(this,"contactName","");r(this,"contactNotes","");r(this,"contactMethods",[]);r(this,"dropdownIndex",null);r(this,"AppString",$)}async created(){const s=this.$route.params.did,a=await w.contacts.get(s||"");if(a)this.contact=a,this.contactName=a.name||"",this.contactNotes=a.notes||"",this.contactMethods=a.contactMethods||[];else{this.$notify({group:"alert",type:"danger",title:"Contact Not Found",text:"There is no contact with DID "+s}),this.$router.push({path:"/contacts"});return}}addContactMethod(){this.contactMethods.push({label:"",type:"",value:""})}removeContactMethod(s){this.contactMethods.splice(s,1)}toggleDropdown(s){this.dropdownIndex=this.dropdownIndex===s?null:s}setMethodType(s,a){this.contactMethods[s].type=a,this.dropdownIndex=null}async saveEdit(){const s=JSON.parse(JSON.stringify(this.contactMethods)),a=s.map(c=>D(L("type"),c.type.toUpperCase(),c));if(!O(s,a)){this.contactMethods=a,this.$notify({group:"alert",type:"warning",title:"Contact Methods Updated",text:"Note that some methods have been updated, such as uppercasing 'email' to 'EMAIL'. Save again if the changes are acceptable."},15e3);return}await w.contacts.update(this.contact.did,{name:this.contactName,notes:this.contactNotes,contactMethods:a}),this.$notify({group:"alert",type:"success",title:"Contact Saved",text:"The contact info has been updated successfully."}),this.$router.push({path:"/did/"+encodeURIComponent(this.contact.did)})}};v=B([V({components:{QuickNav:S,TopMessage:U}})],v);const j={id:"ContactEdit",class:"p-6 max-w-3xl mx-auto"},Q={id:"ViewBreadcrumb",class:"mb-8"},F={class:"text-4xl text-center font-light relative px-7"},H={class:"mt-4 flex","data-testId":"contactName"},J={class:"mt-4"},W={class:"mt-4"},q=["onUpdate:modelValue"],z=["onUpdate:modelValue"],R={class:"relative"},G=["onClick"],K={key:0,class:"absolute bg-white border border-gray-300 rounded-md mt-1"},X=["onClick"],Y=["onClick"],Z=["onClick"],tt=["onUpdate:modelValue"],et=["onClick"],ot={class:"mt-8 flex justify-between"};function st(e,t,s,a,c,m){const h=y("QuickNav"),N=y("TopMessage"),g=y("font-awesome");return f(),b(C,null,[i(h,{selected:"Contacts"}),i(N),o("section",j,[o("div",Q,[o("h1",F,[o("button",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:t[0]||(t[0]=n=>e.$router.go(-1))},[i(g,{icon:"chevron-left",class:"fa-fw"})]),_(" "+E(e.contact.name||e.AppString.NO_CONTACT_NAME),1)])]),o("div",H,[t[6]||(t[6]=o("label",{for:"contactName",class:"block text-sm font-medium text-gray-700 mt-2"}," Name ",-1)),p(o("input",{"onUpdate:modelValue":t[1]||(t[1]=n=>e.contactName=n),type:"text",class:"block w-full ml-2 mt-1 border border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500"},null,512),[[u,e.contactName]])]),o("div",J,[t[7]||(t[7]=o("label",{for:"contactNotes",class:"block text-sm font-medium text-gray-700"}," Notes ",-1)),p(o("textarea",{id:"contactNotes","onUpdate:modelValue":t[2]||(t[2]=n=>e.contactNotes=n),rows:"4",class:"block w-full mt-1 border border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500"},null,512),[[u,e.contactNotes]])]),o("div",W,[t[8]||(t[8]=o("h2",{class:"text-lg font-medium text-gray-700"},"Contact Methods",-1)),(f(!0),b(C,null,A(e.contactMethods,(n,l)=>(f(),b("div",{key:l,class:"flex mt-2"},[p(o("input",{"onUpdate:modelValue":d=>n.label=d,type:"text",class:"block w-1/4 border border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500",placeholder:"Label"},null,8,q),[[u,n.label]]),p(o("input",{"onUpdate:modelValue":d=>n.type=d,type:"text",class:"block ml-2 w-1/4 border border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500",placeholder:"Type"},null,8,z),[[u,n.type]]),o("div",R,[o("button",{class:"px-2 py-1 bg-gray-200 rounded-md",onClick:d=>e.toggleDropdown(l)},[i(g,{icon:"caret-down",class:"fa-fw"})],8,G),e.dropdownIndex===l?(f(),b("div",K,[o("div",{class:"px-4 py-2 hover:bg-gray-100 cursor-pointer",onClick:d=>e.setMethodType(l,"CELL")}," CELL ",8,X),o("div",{class:"px-4 py-2 hover:bg-gray-100 cursor-pointer",onClick:d=>e.setMethodType(l,"EMAIL")}," EMAIL ",8,Y),o("div",{class:"px-4 py-2 hover:bg-gray-100 cursor-pointer",onClick:d=>e.setMethodType(l,"WHATSAPP")}," WHATSAPP ",8,Z)])):I("",!0)]),p(o("input",{"onUpdate:modelValue":d=>n.value=d,type:"text",class:"block ml-2 w-1/2 border border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500",placeholder:"Number, email, etc."},null,8,tt),[[u,n.value]]),o("button",{class:"ml-2 text-red-500",onClick:d=>e.removeContactMethod(l)},[i(g,{icon:"trash-can",class:"fa-fw"})],8,et)]))),128)),o("button",{class:"mt-2",onClick:t[3]||(t[3]=(...n)=>e.addContactMethod&&e.addContactMethod(...n))},[i(g,{icon:"plus",class:"fa-fw px-2 py-2.5 bg-green-500 text-green-100 rounded-full"})])]),o("div",ot,[o("button",{class:"px-4 py-2 bg-blue-500 text-white rounded-md",onClick:t[4]||(t[4]=(...n)=>e.saveEdit&&e.saveEdit(...n))}," Save "),o("button",{class:"ml-4 px-4 py-2 bg-slate-500 text-white rounded-md",onClick:t[5]||(t[5]=n=>e.$router.go(-1))}," Cancel ")])])],64)}const ut=T(v,[["render",st]]);export{ut as default}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ContactGiftingView-CgQUVeDX.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ContactGiftingView-CgQUVeDX.js deleted file mode 100644 index c056309..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ContactGiftingView-CgQUVeDX.js +++ /dev/null @@ -1 +0,0 @@ -var y=Object.defineProperty;var v=(o,t,e)=>t in o?y(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e;var n=(o,t,e)=>v(o,typeof t!="symbol"?t+"":t,e);import{V as C,e as k,d as D,C as $,_ as j,h as u,j as a,k as s,n as _,w as G,F as g,E as V,z as d,B as b,t as E}from"./main.common-DD7dqhZp.js";import{G as I}from"./GiftedDialog-DmRkVexW.js";import{Q as N}from"./QuickNav-C8jPGtUY.js";import{E as B}from"./EntityIcon-DciUb57i.js";import{_ as S}from"./blank-square-D9dGgMJw.js";import"./index-BGoTPXII.js";import"./index-ryzpKtgI.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var Q=Object.getOwnPropertyDescriptor,A=(o,t,e,r)=>{for(var i=r>1?void 0:r?Q(t,e):t,c=o.length-1,p;c>=0;c--)(p=o[c])&&(i=p(i)||i);return i};let f=class extends C{constructor(){super(...arguments);n(this,"$notify");n(this,"$route");n(this,"$router");n(this,"activeDid","");n(this,"allContacts",[]);n(this,"apiServer","");n(this,"description","");n(this,"projectId","");n(this,"prompt","")}async created(){try{const e=await k();this.apiServer=e.apiServer||"",this.activeDid=e.activeDid||"";const r=await D.contacts.toArray();this.allContacts=r.sort((i,c)=>(i.name||"").localeCompare(c.name||"")),this.projectId=this.$route.query.projectId||"",this.prompt=this.$route.query.prompt??this.prompt}catch(e){console.error("Error retrieving settings & contacts:",e),this.$notify({group:"alert",type:"danger",title:"Error",text:e.message||"There was an error retrieving your settings or contacts."},5e3)}}openDialog(e){const r=this.projectId?void 0:{did:this.activeDid,name:"you"};this.$refs.customDialog.open(e,r,void 0,"Given by "+((e==null?void 0:e.name)||"someone not named"),this.prompt)}};f=A([$({components:{GiftedDialog:I,QuickNav:N,EntityIcon:B}})],f);const F={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},O={id:"ViewBreadcrumb",class:"mb-8"},q={class:"text-lg text-center font-light relative px-7"},z={class:"border-t border-slate-300"},P={class:"border-b border-slate-300 py-3"},T={class:"text-base flex gap-4 items-center"},U={class:"text-right"},H={class:"text-base flex gap-4 items-center"},L={class:"grow font-semibold"},J={class:"text-right"},K=["onClick"];function M(o,t,e,r,i,c){const p=d("QuickNav"),m=d("font-awesome"),h=d("router-link"),x=d("EntityIcon"),w=d("GiftedDialog");return b(),u(g,null,[a(p,{selected:"Home"}),s("section",F,[s("div",O,[s("h1",q,[a(h,{to:{name:"home"},class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1"},{default:G(()=>[a(m,{icon:"chevron-left",class:"fa-fw"})]),_:1}),t[1]||(t[1]=_(" Given by... "))])]),s("ul",z,[s("li",P,[s("h2",T,[t[2]||(t[2]=s("span",{class:"grow"},[s("img",{src:S,width:"32",class:"inline-block align-middle border border-slate-300 rounded-md mr-1"}),_(" Unnamed/Unknown ")],-1)),s("span",U,[s("button",{type:"button",class:"block w-full text-center text-sm uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-3 py-1.5 rounded-md",onClick:t[0]||(t[0]=l=>o.openDialog())},[a(m,{icon:"gift",class:"fa-fw"})])])])]),(b(!0),u(g,null,V(o.allContacts,l=>(b(),u("li",{key:l.did,class:"border-b border-slate-300 py-3"},[s("h2",H,[s("span",L,[a(x,{contact:l,"icon-size":32,class:"inline-block align-middle border border-slate-300 rounded-md mr-1"},null,8,["contact"]),_(" "+E(l.name||"(no name)"),1)]),s("span",J,[s("button",{type:"button",class:"block w-full text-center text-sm uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-3 py-1.5 rounded-md",onClick:R=>o.openDialog(l)},[a(m,{icon:"gift",class:"fa-fw"})],8,K)])])]))),128))]),a(w,{ref:"customDialog","to-project-id":o.projectId},null,8,["to-project-id"])])],64)}const at=j(f,[["render",M]]);export{at as default}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ContactImportView-CH0ouLM8.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ContactImportView-CH0ouLM8.js deleted file mode 100644 index 1898c96..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ContactImportView-CH0ouLM8.js +++ /dev/null @@ -1 +0,0 @@ -var J=Object.defineProperty;var _=(t,e,s)=>e in t?J(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var c=(t,e,s)=>_(t,typeof e!="symbol"?e+"":e,s);import{R as D,i as S}from"./index-BtEdi1q-.js";import{V as N,A as T,e as O,d as u,H as E,l as P,C as R,_ as U,h as l,j as y,k as a,m as f,o as w,n as C,q as A,t as h,F as v,E as V,s as B,z as $,B as d}from"./main.common-DD7dqhZp.js";import{Q as F}from"./QuickNav-C8jPGtUY.js";import{E as z}from"./EntityIcon-DciUb57i.js";import{O as Q}from"./OfferDialog-DDi7ax_Z.js";import{J as W,l as M,K as x,L as q,e as L,H as j,M as H}from"./index-ryzpKtgI.js";import{e as K}from"./_isString-B7bbuhPA.js";import"./concat-Ro2w9qwP.js";import"./set-BrilI7kO.js";import"./sort-DzTCGCnH.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";var Y=Object.getOwnPropertyDescriptor,G=(t,e,s,p)=>{for(var o=p>1?void 0:p?Y(e,s):e,i=t.length-1,r;i>=0;i--)(r=t[i])&&(o=r(o)||o);return o};let b=class extends N{constructor(){super(...arguments);c(this,"$notify");c(this,"$route");c(this,"$router");c(this,"AppString",T);c(this,"capitalizeAndInsertSpacesBeforeCaps",W);c(this,"libsUtil",M);c(this,"R",D);c(this,"activeDid","");c(this,"apiServer","");c(this,"contactsExisting",{});c(this,"contactsImporting",[]);c(this,"contactsSelected",[]);c(this,"contactDifferences",{});c(this,"checkingImports",!1);c(this,"inputJwt","");c(this,"makeVisible",!0);c(this,"sameCount",0)}async created(){await this.initializeSettings(),await this.processQueryParams(),await this.processJwtFromPath(),await this.handleAutoImport()}async initializeSettings(){const s=await O();this.activeDid=s.activeDid||"",this.apiServer=s.apiServer||""}async processQueryParams(){const s=this.$route.query.contacts;s&&await this.setContactsSelected(JSON.parse(s))}async processJwtFromPath(){var o;const s=/\/contact-import\/(ey.+)$/,p=(o=window.location.pathname.match(s))==null?void 0:o[1];if(p){const i=x(p),r=i.payload.contacts||(Array.isArray(i.payload)?i.payload:void 0);if(!r&&i.payload.own){this.$router.push({name:"contacts",query:{contactJwt:p}});return}r&&await this.setContactsSelected(r)}}async handleAutoImport(){this.contactsImporting.length===1&&S(this.contactsExisting)&&(this.contactsSelected[0]=!0,await this.importContacts())}async setContactsSelected(s){this.contactsImporting=s,this.contactsSelected=new Array(this.contactsImporting.length).fill(!0),await u.open();const p=await u.contacts.toArray();for(let o=0;om.did===i.did);if(r){this.contactsExisting[i.did]=r;const m={};Object.keys(i).forEach(n=>{K(i[n],r[n])||(m[n]={old:r[n],new:i[n]})}),this.contactDifferences[i.did]=m,S(m)&&this.sameCount++,this.contactsSelected[o]=!1}}}async checkContactJwt(s){(s.endsWith(E)||s.endsWith(E+"/")||s.endsWith("contact-import")||s.endsWith("contact-import/"))&&this.$notify({group:"alert",type:"danger",title:"Error",text:"That is only part of the contact-import data; it's missing data at the end. Try another way to get the full data."},5e3)}async processContactJwt(s){this.checkingImports=!0;try{const p=q(s),o=x(p).payload;if(Array.isArray(o.contacts))await this.setContactsSelected(o.contacts);else throw new Error("Invalid contact-import JWT or URL: "+s)}catch(p){const o="Error importing contacts: "+L(p);P(o,!0),this.$notify({group:"alert",type:"danger",title:"Error",text:"There was an error processing the contact-import data."},3e3)}this.checkingImports=!1}async importContacts(){this.checkingImports=!0;let s=0,p=0;for(let o=0;o0&&this.$notify({group:"alert",type:"danger",title:"Visibility Error",text:`Failed to set visibility for ${o.length} contact${o.length==1?"":"s"}. You must set them individually: ${o.map(i=>i.name).join(", ")}`},-1)}this.checkingImports=!1,this.$notify({group:"alert",type:"success",title:"Imported",text:`${s} contact${s==1?"":"s"} imported.`+(p?` ${p} updated.`:"")},3e3),this.$router.push({name:"contacts"})}};b=G([R({components:{EntityIcon:z,OfferDialog:Q,QuickNav:F}})],b);const X={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},Z={class:"text-lg text-center font-light relative px-7"},tt={key:0,class:"text-center"},et={key:1},st={key:0,class:"flex justify-center"},ot={key:1},it={key:0},nt={key:1},at={key:2,class:"border-t border-slate-300"},rt={key:0,class:"grow overflow-hidden border-b border-slate-300 pt-2.5 pb-4"},ct={class:"text-base font-semibold"},lt=["onUpdate:modelValue"],dt={key:0,class:"text-orange-500"},pt={key:1,class:"text-green-500"},mt={class:"text-sm truncate"},ht={key:0},ut={class:"border font-bold p-1"},gt={class:"border p-1"},ft={class:"border p-1"},yt={key:3},wt={key:4},Ct={class:"mt-4 text-center"};function vt(t,e,s,p,o,i){const r=$("QuickNav"),m=$("font-awesome");return d(),l(v,null,[y(r,{selected:"Contacts"}),a("section",X,[a("div",Z,[a("h1",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:e[0]||(e[0]=n=>t.$router.back())},[y(m,{icon:"chevron-left",class:"fa-fw"})])]),e[10]||(e[10]=a("h1",{id:"ViewHeading",class:"text-4xl text-center font-light pt-4 mb-8"}," Contact Import ",-1)),t.checkingImports?(d(),l("div",tt,[y(m,{icon:"spinner",class:"animate-spin"})])):(d(),l("div",et,[t.contactsImporting.length>t.sameCount?(d(),l("span",st,[w(a("input",{"onUpdate:modelValue":e[1]||(e[1]=n=>t.makeVisible=n),type:"checkbox",class:"mr-2"},null,512),[[A,t.makeVisible]]),e[6]||(e[6]=C(" Make my activity visible to these contacts. "))])):f("",!0),t.sameCount>0?(d(),l("div",ot,[t.sameCount==1?(d(),l("span",it,"One contact is the same as an existing contact")):(d(),l("span",nt,h(t.sameCount)+" contacts are the same as existing contacts",1))])):f("",!0),t.contactsImporting.length>t.sameCount?(d(),l("ul",at,[(d(!0),l(v,null,V(t.contactsImporting,(n,k)=>(d(),l("li",{key:n.did},[!t.contactsExisting[n.did]||!t.R.isEmpty(t.contactDifferences[n.did])?(d(),l("div",rt,[a("h2",ct,[w(a("input",{"onUpdate:modelValue":g=>t.contactsSelected[k]=g,type:"checkbox"},null,8,lt),[[A,t.contactsSelected[k]]]),C(" "+h(n.name||t.AppString.NO_CONTACT_NAME)+" - ",1),t.contactsExisting[n.did]?(d(),l("span",dt,"Existing")):(d(),l("span",pt,"New"))]),a("div",mt,h(n.did),1),t.contactDifferences[n.did]?(d(),l("div",ht,[a("div",null,[e[7]||(e[7]=a("div",{class:"grid grid-cols-3 gap-2"},[a("div"),a("div",{class:"font-bold"},"Old Value"),a("div",{class:"font-bold"},"New Value")],-1)),(d(!0),l(v,null,V(t.contactDifferences[n.did],(g,I)=>(d(),l("div",{key:I,class:"grid grid-cols-3 border"},[a("div",ut,h(t.capitalizeAndInsertSpacesBeforeCaps(I)),1),a("div",gt,h(g.old),1),a("div",ft,h(g.new),1)]))),128))])])):f("",!0)])):f("",!0)]))),128)),a("button",{class:"bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-sm text-white mt-2 px-2 py-1.5 rounded",onClick:e[2]||(e[2]=(...n)=>t.importContacts&&t.importContacts(...n))}," Import Selected Contacts ")])):t.contactsImporting.length>0?(d(),l("p",yt," All those contacts are already in your list with the same information. ")):(d(),l("div",wt,[e[9]||(e[9]=C(" There are no contacts in that import. If some were sent, try again to get the full text and paste it. (Note that iOS cuts off data in text messages.) Ask the person to send the data a different way, eg. email. ")),a("div",Ct,[w(a("textarea",{"onUpdate:modelValue":e[3]||(e[3]=n=>t.inputJwt=n),placeholder:"Contact-import data",class:"mt-4 border-2 border-gray-300 p-2 rounded",cols:"30",onInput:e[4]||(e[4]=()=>t.checkContactJwt(t.inputJwt))},null,544),[[B,t.inputJwt]]),e[8]||(e[8]=a("br",null,null,-1)),a("button",{class:"ml-2 p-2 bg-blue-500 text-white rounded",onClick:e[5]||(e[5]=()=>t.processContactJwt(t.inputJwt))}," Check Import ")])]))]))])],64)}const Ot=U(b,[["render",vt]]);export{Ot as default}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ContactNameDialog-B32CzJRA.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ContactNameDialog-B32CzJRA.js deleted file mode 100644 index e13b449..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ContactNameDialog-B32CzJRA.js +++ /dev/null @@ -1 +0,0 @@ -var b=Object.defineProperty;var p=(t,e,s)=>e in t?b(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var o=(t,e,s)=>p(t,typeof e!="symbol"?e+"":e,s);import{C as h,V as C,_ as m,h as v,m as g,B as u,k as i,n as k,o as x,t as d,s as f}from"./main.common-DD7dqhZp.js";var _=Object.getOwnPropertyDescriptor,w=(t,e,s,c)=>{for(var l=c>1?void 0:c?_(e,s):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(l=a(l)||l);return l};let r=class extends C{constructor(){super(...arguments);o(this,"cancelCallback",()=>{});o(this,"saveCallback",()=>{});o(this,"message","");o(this,"newText","");o(this,"title","Contact Name");o(this,"visible",!1)}async open(s,c,l,n,a){this.cancelCallback=n||this.cancelCallback,this.saveCallback=l||this.saveCallback,this.message=c??this.message,this.newText=a??"",this.title=s??this.title,this.visible=!0}async onClickSaveChanges(){this.visible=!1,this.saveCallback&&this.saveCallback(this.newText)}onClickCancel(){this.visible=!1,this.cancelCallback&&this.cancelCallback()}};r=w([h],r);const y={key:0,class:"dialog-overlay"},N={class:"dialog"},D={class:"text-xl font-bold text-center mb-4"},T={class:"mt-8"},$={class:"grid grid-cols-1 sm:grid-cols-2 gap-2"};function V(t,e,s,c,l,n){return t.visible?(u(),v("div",y,[i("div",N,[i("h1",D,d(t.title),1),k(" "+d(t.message)+" Note that their name is only stored on this device. ",1),x(i("input",{"onUpdate:modelValue":e[0]||(e[0]=a=>t.newText=a),type:"text",placeholder:"Name",class:"block w-full rounded border border-slate-400 mb-4 px-3 py-2"},null,512),[[f,t.newText]]),i("div",T,[i("div",$,[i("button",{type:"button",class:"block w-full text-center text-lg font-bold uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md mb-2",onClick:e[1]||(e[1]=a=>t.onClickSaveChanges())}," Save "),i("button",{type:"button",class:"block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md mb-2",onClick:e[2]||(e[2]=a=>t.onClickCancel())}," Cancel ")])])])])):g("",!0)}const P=m(r,[["render",V]]);export{P as C}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ContactQRScanShowView-wtOPMc0J.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ContactQRScanShowView-wtOPMc0J.js deleted file mode 100644 index 684b31d..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ContactQRScanShowView-wtOPMc0J.js +++ /dev/null @@ -1,5 +0,0 @@ -var Ca=Object.defineProperty;var xa=(r,a,i)=>a in r?Ca(r,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[a]=i;var et=(r,a,i)=>xa(r,typeof a!="symbol"?a+"":a,i);import{K as _a,L as Sa,N as Pa,f as dt,O as Dt,P as Oa,Q as Ta,R as or,h as gt,B as yt,k as Ie,o as Ma,S as Da,v as $a,U as ka,V as Ea,e as Ra,d as ht,M as Br,C as Aa,_ as Ia,j as pt,m as ja,n as Nt,w as Ba,F as Fa,z as vt}from"./main.common-DD7dqhZp.js";import{u as Fr}from"./index-CZnn7ED5.js";import{Q as Na}from"./QuickNav-C8jPGtUY.js";import{U as qa}from"./UserNameDialog-BV49F4GW.js";import{N as La,r as za,O as Ua,L as Wa,K as Ha,P as Va,M as Qa,Q as Ga}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./_isString-B7bbuhPA.js";var Yr={exports:{}};(function(r,a){(function(i,h){r.exports=h(_a)})(self,function(i){return(()=>{var h={192:(F,P)=>{var B,V,W=function(){var ae=function(R,k){var E=R,T=$e[k],w=null,d=0,n=null,c=[],u={},l=function(p,D){w=function(b){for(var y=new Array(b),O=0;O=7&&I(p),n==null&&(n=ee(E,T,c)),$(n,D)},g=function(p,D){for(var b=-1;b<=7;b+=1)if(!(p+b<=-1||d<=p+b))for(var y=-1;y<=7;y+=1)D+y<=-1||d<=D+y||(w[p+b][D+y]=0<=b&&b<=6&&(y==0||y==6)||0<=y&&y<=6&&(b==0||b==6)||2<=b&&b<=4&&2<=y&&y<=4)},x=function(){for(var p=8;p>b&1)==1;w[Math.floor(b/3)][b%3+d-8-3]=y}for(b=0;b<18;b+=1)y=!p&&(D>>b&1)==1,w[b%3+d-8-3][Math.floor(b/3)]=y},N=function(p,D){for(var b=T<<3|D,y=he.getBCHTypeInfo(b),O=0;O<15;O+=1){var H=!p&&(y>>O&1)==1;O<6?w[O][8]=H:O<8?w[O+1][8]=H:w[d-15+O][8]=H}for(O=0;O<15;O+=1)H=!p&&(y>>O&1)==1,O<8?w[8][d-O-1]=H:O<9?w[8][15-O-1+1]=H:w[8][15-O-1]=H;w[d-8][8]=!p},$=function(p,D){for(var b=-1,y=d-1,O=7,H=0,Q=he.getMaskFunction(D),U=d-1;U>0;U-=2)for(U==6&&(U-=1);;){for(var ne=0;ne<2;ne+=1)if(w[y][U-ne]==null){var te=!1;H>>O&1)==1),Q(y,U-ne)&&(te=!te),w[y][U-ne]=te,(O-=1)==-1&&(H+=1,O=7)}if((y+=b)<0||d<=y){y-=b,b=-b;break}}},ee=function(p,D,b){for(var y=We.getRSBlocks(p,D),O=qe(),H=0;H8*U)throw"code length overflow. ("+O.getLengthInBits()+">"+8*U+")";for(O.getLengthInBits()+4<=8*U&&O.put(0,4);O.getLengthInBits()%8!=0;)O.putBit(!1);for(;!(O.getLengthInBits()>=8*U||(O.put(236,8),O.getLengthInBits()>=8*U));)O.put(17,8);return function(ne,te){for(var Y=0,ye=0,we=0,J=new Array(te.length),ve=new Array(te.length),ce=0;ce=0?Re.getAt(Be):0}}var at=0;for(ue=0;uete)&&(Q=te,U=ne)}return U}())},u.createTableTag=function(p,D){p=p||2;var b="";b+='";for(var O=0;O';b+=""}return(b+="")+"
"},u.createSvgTag=function(p,D,b,y){var O={};typeof arguments[0]=="object"&&(p=(O=arguments[0]).cellSize,D=O.margin,b=O.alt,y=O.title),p=p||2,D=D===void 0?4*p:D,(b=typeof b=="string"?{text:b}:b||{}).text=b.text||null,b.id=b.text?b.id||"qrcode-description":null,(y=typeof y=="string"?{text:y}:y||{}).text=y.text||null,y.id=y.text?y.id||"qrcode-title":null;var H,Q,U,ne,te=u.getModuleCount()*p+2*D,Y="";for(ne="l"+p+",0 0,"+p+" -"+p+",0 0,-"+p+"z ",Y+=''+j(y.text)+"":"",Y+=b.text?''+j(b.text)+"":"",Y+='',Y+='"},u.createDataURL=function(p,D){p=p||2,D=D===void 0?4*p:D;var b=u.getModuleCount()*p+2*D,y=D,O=b-D;return lt(b,b,function(H,Q){if(y<=H&&H"};var j=function(p){for(var D="",b=0;b":D+=">";break;case"&":D+="&";break;case'"':D+=""";break;default:D+=y}}return D};return u.createASCII=function(p,D){if((p=p||1)<2)return function(J){J=J===void 0?2:J;var ve,ce,je,Le,ue,Ee=1*u.getModuleCount()+2*J,Re=J,Be=Ee-J,at={"██":"█","█ ":"▀"," █":"▄"," ":" "},Xe={"██":"▀","█ ":"▀"," █":" "," ":" "},be="";for(ve=0;ve=Be?Xe[ue]:at[ue];be+=` -`}return Ee%2&&J>0?be.substring(0,be.length-Ee-1)+Array(Ee+1).join("▀"):be.substring(0,be.length-1)}(D);p-=1,D=D===void 0?2*p:D;var b,y,O,H,Q=u.getModuleCount()*p+2*D,U=D,ne=Q-D,te=Array(p+1).join("██"),Y=Array(p+1).join(" "),ye="",we="";for(b=0;b>>8),d.push(255&u)):d.push(T)}}return d}};var fe,K,de,re,ge,$e={L:1,M:0,Q:3,H:2},he=(fe=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],K=1335,de=7973,ge=function(R){for(var k=0;R!=0;)k+=1,R>>>=1;return k},(re={}).getBCHTypeInfo=function(R){for(var k=R<<10;ge(k)-ge(K)>=0;)k^=K<=0;)k^=de<5&&(E+=3+d-5)}for(T=0;T=256;)T-=255;return R[T]}}}();function oe(R,k){if(R.length===void 0)throw R.length+"/"+k;var E=function(){for(var w=0;w>>7-T%8&1)==1},put:function(T,w){for(var d=0;d>>w-d-1&1)==1)},getLengthInBits:function(){return k},putBit:function(T){var w=Math.floor(k/8);R.length<=w&&R.push(0),T&&(R[w]|=128>>>k%8),k+=1}};return E},He=function(R){var k=R,E={getMode:function(){return 1},getLength:function(d){return k.length},write:function(d){for(var n=k,c=0;c+2>>8&255)+(255&n),T.put(n,13),d+=2}if(d>>8)},writeBytes:function(E,T,w){T=T||0,w=w||E.length;for(var d=0;d0&&(E+=","),E+=R[T];return E+"]"}};return k},ut=function(R){var k=R,E=0,T=0,w=0,d={read:function(){for(;w<8;){if(E>=k.length){if(w==0)return-1;throw"unexpected end of file./"+w}var c=k.charAt(E);if(E+=1,c=="=")return w=0,-1;c.match(/^\s$/)||(T=T<<6|n(c.charCodeAt(0)),w+=6)}var u=T>>>w-8&255;return w-=8,u}},n=function(c){if(65<=c&&c<=90)return c-65;if(97<=c&&c<=122)return c-97+26;if(48<=c&&c<=57)return c-48+52;if(c==43)return 62;if(c==47)return 63;throw"c:"+c};return d},lt=function(R,k,E){for(var T=function(g,x){var q=g,I=x,N=new Array(g*x),$={setPixel:function(p,D,b){N[D*q+p]=b},write:function(p){p.writeString("GIF87a"),p.writeShort(q),p.writeShort(I),p.writeByte(128),p.writeByte(0),p.writeByte(0),p.writeByte(0),p.writeByte(0),p.writeByte(0),p.writeByte(255),p.writeByte(255),p.writeByte(255),p.writeString(","),p.writeShort(0),p.writeShort(0),p.writeShort(q),p.writeShort(I),p.writeByte(0);var D=ee(2);p.writeByte(2);for(var b=0;D.length-b>255;)p.writeByte(255),p.writeBytes(D,b,255),b+=255;p.writeByte(D.length-b),p.writeBytes(D,b,D.length-b),p.writeByte(0),p.writeString(";")}},ee=function(p){for(var D=1<>>ce)throw"length over";for(;U+ce>=8;)Q.writeByte(255&(ve<>>=8-U,ne=0,U=0;ne|=ve<0&&Q.writeByte(ne)}});Y.write(D,y);var ye=0,we=String.fromCharCode(N[ye]);for(ye+=1;ye=6;)$(g>>>x-6),x-=6},N.flush=function(){if(x>0&&($(g<<6-x),g=0,x=0),q%3!=0)for(var j=3-q%3,p=0;p>6,128|63&re):re<55296||re>=57344?K.push(224|re>>12,128|re>>6&63,128|63&re):(de++,re=65536+((1023&re)<<10|1023&fe.charCodeAt(de)),K.push(240|re>>18,128|re>>12&63,128|re>>6&63,128|63&re))}return K}(ae)},(V=typeof(B=function(){return W})=="function"?B.apply(P,[]):B)===void 0||(F.exports=V)},103:F=>{F.exports=i}},m={};function _(F){var P=m[F];if(P!==void 0)return P.exports;var B=m[F]={exports:{}};return h[F](B,B.exports,_),B.exports}_.n=F=>{var P=F&&F.__esModule?()=>F.default:()=>F;return _.d(P,{a:P}),P},_.d=(F,P)=>{for(var B in P)_.o(P,B)&&!_.o(F,B)&&Object.defineProperty(F,B,{enumerable:!0,get:P[B]})},_.o=(F,P)=>Object.prototype.hasOwnProperty.call(F,P);var M={};return(()=>{_.d(M,{default:()=>w});var F=_(103);const P={key:1};var B=function(){return(B=Object.assign||function(d){for(var n,c=1,u=arguments.length;c2||q&&I||N&&$)this._basicSquare({x:c,y:u,size:l,context:g,rotation:0});else{if(ee===2){var j=0;return q&&N?j=Math.PI/2:N&&I?j=Math.PI:I&&$&&(j=-Math.PI/2),void this._basicCornerRounded({x:c,y:u,size:l,context:g,rotation:j})}ee===1&&(j=0,N?j=Math.PI/2:I?j=Math.PI:$&&(j=-Math.PI/2),this._basicSideRounded({x:c,y:u,size:l,context:g,rotation:j}))}else this._basicDot({x:c,y:u,size:l,context:g,rotation:0})},d.prototype._drawExtraRounded=function(n){var c=n.x,u=n.y,l=n.size,g=n.context,x=n.getNeighbor,q=+x(-1,0),I=+x(1,0),N=+x(0,-1),$=+x(0,1),ee=q+I+N+$;if(ee!==0)if(ee>2||q&&I||N&&$)this._basicSquare({x:c,y:u,size:l,context:g,rotation:0});else{if(ee===2){var j=0;return q&&N?j=Math.PI/2:N&&I?j=Math.PI:I&&$&&(j=-Math.PI/2),void this._basicCornerExtraRounded({x:c,y:u,size:l,context:g,rotation:j})}ee===1&&(j=0,N?j=Math.PI/2:I?j=Math.PI:$&&(j=-Math.PI/2),this._basicSideRounded({x:c,y:u,size:l,context:g,rotation:j}))}else this._basicDot({x:c,y:u,size:l,context:g,rotation:0})},d.prototype._drawClassy=function(n){var c=n.x,u=n.y,l=n.size,g=n.context,x=n.getNeighbor,q=+x(-1,0),I=+x(1,0),N=+x(0,-1),$=+x(0,1);q+I+N+$!==0?q||N?I||$?this._basicSquare({x:c,y:u,size:l,context:g,rotation:0}):this._basicCornerRounded({x:c,y:u,size:l,context:g,rotation:Math.PI/2}):this._basicCornerRounded({x:c,y:u,size:l,context:g,rotation:-Math.PI/2}):this._basicCornersRounded({x:c,y:u,size:l,context:g,rotation:Math.PI/2})},d.prototype._drawClassyRounded=function(n){var c=n.x,u=n.y,l=n.size,g=n.context,x=n.getNeighbor,q=+x(-1,0),I=+x(1,0),N=+x(0,-1),$=+x(0,1);q+I+N+$!==0?q||N?I||$?this._basicSquare({x:c,y:u,size:l,context:g,rotation:0}):this._basicCornerExtraRounded({x:c,y:u,size:l,context:g,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:c,y:u,size:l,context:g,rotation:-Math.PI/2}):this._basicCornersRounded({x:c,y:u,size:l,context:g,rotation:Math.PI/2})},d}();var re=function(){return(re=Object.assign||function(d){for(var n,c=1,u=arguments.length;c0&&U[U.length-1])||J[0]!==6&&J[0]!==2)){te=0;continue}if(J[0]===3&&(!U||J[1]>U[0]&&J[1]U||ne&&ne=(x-N.hideXDots)/2&&O<(x+N.hideXDots)/2&&H>=(x-N.hideYDots)/2&&H<(x+N.hideYDots)/2||!((Q=Z[O])===null||Q===void 0)&&Q[H]||!((U=Z[O-x+7])===null||U===void 0)&&U[H]||!((ne=Z[O])===null||ne===void 0)&&ne[H-x+7]||!((te=oe[O])===null||te===void 0)&&te[H]||!((Y=oe[O-x+7])===null||Y===void 0)&&Y[H]||!((ye=oe[O])===null||ye===void 0)&&ye[H-x+7])}),this.drawCorners(),this._options.image&&this.drawImage({width:N.width,height:N.height,count:x,dotSize:I}),[2]}})},new((l=void 0)||(l=Promise))(function(x,q){function I(ee){try{$(g.next(ee))}catch(j){q(j)}}function N(ee){try{$(g.throw(ee))}catch(j){q(j)}}function $(ee){var j;ee.done?x(ee.value):(j=ee.value,j instanceof l?j:new l(function(p){p(j)})).then(I,N)}$((g=g.apply(c,u||[])).next())});var c,u,l,g},d.prototype.drawBackground=function(){var n=this.context,c=this._options;if(n){if(c.backgroundOptions.gradient){var u=c.backgroundOptions.gradient,l=this._createGradient({context:n,options:u,additionalRotation:0,x:0,y:0,size:this._canvas.width>this._canvas.height?this._canvas.width:this._canvas.height});u.colorStops.forEach(function(g){var x=g.offset,q=g.color;l.addColorStop(x,q)}),n.fillStyle=l}else c.backgroundOptions.color&&(n.fillStyle=c.backgroundOptions.color);n.fillRect(0,0,this._canvas.width,this._canvas.height)}},d.prototype.drawDots=function(n){var c=this;if(!this._qr)throw"QR code is not defined";var u=this.context;if(!u)throw"QR code is not defined";var l=this._options,g=this._qr.getModuleCount();if(g>l.width||g>l.height)throw"The canvas is too small.";var x=Math.min(l.width,l.height)-2*l.margin,q=Math.floor(x/g),I=Math.floor((l.width-g*q)/2),N=Math.floor((l.height-g*q)/2),$=new de({context:u,type:l.dotsOptions.type});u.beginPath();for(var ee=function(y){for(var O=function(Q){return n&&!n(y,Q)?"continue":j._qr.isDark(y,Q)?void $.draw(I+y*q,N+Q*q,q,function(U,ne){return!(y+U<0||Q+ne<0||y+U>=g||Q+ne>=g)&&!(n&&!n(y+U,Q+ne))&&!!c._qr&&c._qr.isDark(y+U,Q+ne)}):"continue"},H=0;H=0&&$<=.25*Math.PI||$>1.75*Math.PI&&$<=2*Math.PI?(ee-=I/2,j-=I/2*Math.tan(N),p+=I/2,D+=I/2*Math.tan(N)):$>.25*Math.PI&&$<=.75*Math.PI?(j-=I/2,ee-=I/2/Math.tan(N),D+=I/2,p+=I/2/Math.tan(N)):$>.75*Math.PI&&$<=1.25*Math.PI?(ee+=I/2,j+=I/2*Math.tan(N),p-=I/2,D-=I/2*Math.tan(N)):$>1.25*Math.PI&&$<=1.75*Math.PI&&(j+=I/2,ee+=I/2/Math.tan(N),D-=I/2,p-=I/2/Math.tan(N)),c=u.createLinearGradient(Math.round(ee),Math.round(j),Math.round(p),Math.round(D))}return c},d}();for(var qe={},He=0;He<=40;He++)qe[He]=He;const Ge={width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:qe[0],mode:void 0,errorCorrectionLevel:"Q"},imageOptions:{hideBackgroundDots:!0,imageSize:.4,crossOrigin:void 0,margin:0},dotsOptions:{type:"square",color:"#000"},backgroundOptions:{color:"#fff"}};var ke=function(){return(ke=Object.assign||function(d){for(var n,c=1,u=arguments.length;cMath.min(n.width,n.height)&&(n.margin=Math.min(n.width,n.height)),n.dotsOptions=ke({},n.dotsOptions),n.dotsOptions.gradient&&(n.dotsOptions.gradient=Ve(n.dotsOptions.gradient)),n.cornersSquareOptions&&(n.cornersSquareOptions=ke({},n.cornersSquareOptions),n.cornersSquareOptions.gradient&&(n.cornersSquareOptions.gradient=Ve(n.cornersSquareOptions.gradient))),n.cornersDotOptions&&(n.cornersDotOptions=ke({},n.cornersDotOptions),n.cornersDotOptions.gradient&&(n.cornersDotOptions.gradient=Ve(n.cornersDotOptions.gradient))),n.backgroundOptions&&(n.backgroundOptions=ke({},n.backgroundOptions),n.backgroundOptions.gradient&&(n.backgroundOptions.gradient=Ve(n.backgroundOptions.gradient))),n}var ut=_(192),lt=_.n(ut);const R=function(){function d(n){this._options=n?Je(ae(Ge,n)):Ge,this.update()}return d._clearContainer=function(n){n&&(n.innerHTML="")},d.prototype.update=function(n){d._clearContainer(this._container),this._options=n?Je(ae(this._options,n)):this._options,this._options.data&&(this._qr=lt()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||function(c){switch(!0){case/^[0-9]*$/.test(c):return"Numeric";case/^[0-9A-Z $%*+\-./:]*$/.test(c):return"Alphanumeric";default:return"Byte"}}(this._options.data)),this._qr.make(),this._canvas=new We(this._options),this._drawingPromise=this._canvas.drawQR(this._qr),this.append(this._container))},d.prototype.append=function(n){if(n){if(typeof n.appendChild!="function")throw"Container should be a single DOM node";this._canvas&&n.appendChild(this._canvas.getCanvas()),this._container=n}},d.prototype.getImageUrl=function(n){return c=this,u=void 0,g=function(){return function(x,q){var I,N,$,ee,j={label:0,sent:function(){if(1&$[0])throw $[1];return $[1]},trys:[],ops:[]};return ee={next:p(0),throw:p(1),return:p(2)},typeof Symbol=="function"&&(ee[Symbol.iterator]=function(){return this}),ee;function p(D){return function(b){return function(y){if(I)throw new TypeError("Generator is already executing.");for(;j;)try{if(I=1,N&&($=2&y[0]?N.return:y[0]?N.throw||(($=N.return)&&$.call(N),0):N.next)&&!($=$.call(N,y[1])).done)return $;switch(N=0,$&&(y=[2&y[0],$.value]),y[0]){case 0:case 1:$=y;break;case 4:return j.label++,{value:y[1],done:!1};case 5:j.label++,N=y[1],y=[0];continue;case 7:y=j.ops.pop(),j.trys.pop();continue;default:if(!(($=($=j.trys).length>0&&$[$.length-1])||y[0]!==6&&y[0]!==2)){j=0;continue}if(y[0]===3&&(!$||y[1]>$[0]&&y[1]<$[3])){j.label=y[1];break}if(y[0]===6&&j.label<$[1]){j.label=$[1],$=y;break}if($&&j.label<$[2]){j.label=$[2],j.ops.push(y);break}$[2]&&j.ops.pop(),j.trys.pop();continue}y=q.call(x,j)}catch(O){y=[6,O],N=0}finally{I=$=0}if(5&y[0])throw y[1];return{value:y[0]?y[1]:void 0,done:!0}}([D,b])}}}(this,function(x){switch(x.label){case 0:return this._drawingPromise?[4,this._drawingPromise]:[2,""];case 1:return x.sent()===void 0&&this._canvas?[2,this._canvas.getCanvas().toDataURL("image/"+n)]:[2,""]}})},new((l=void 0)||(l=Promise))(function(x,q){function I(ee){try{$(g.next(ee))}catch(j){q(j)}}function N(ee){try{$(g.throw(ee))}catch(j){q(j)}}function $(ee){var j;ee.done?x(ee.value):(j=ee.value,j instanceof l?j:new l(function(p){p(j)})).then(I,N)}$((g=g.apply(c,u||[])).next())});var c,u,l,g},d.prototype.download=function(n){var c=this;this._drawingPromise&&this._drawingPromise.then(function(){if(c._canvas){var u=n,l=u.extension||"png",g=u.name||"qr";(function(x,q){var I=document.createElement("a");I.download=q,I.href=x,document.body.appendChild(I),I.click(),document.body.removeChild(I)})(c._canvas.getCanvas().toDataURL("image/"+l),g+"."+l)}})},d}();var k=function(d,n,c,u){return new(c||(c=Promise))(function(l,g){function x(N){try{I(u.next(N))}catch($){g($)}}function q(N){try{I(u.throw(N))}catch($){g($)}}function I(N){var $;N.done?l(N.value):($=N.value,$ instanceof c?$:new c(function(ee){ee($)})).then(x,q)}I((u=u.apply(d,[])).next())})},E=function(d,n){var c,u,l,g,x={label:0,sent:function(){if(1&l[0])throw l[1];return l[1]},trys:[],ops:[]};return g={next:q(0),throw:q(1),return:q(2)},typeof Symbol=="function"&&(g[Symbol.iterator]=function(){return this}),g;function q(I){return function(N){return function($){if(c)throw new TypeError("Generator is already executing.");for(;x;)try{if(c=1,u&&(l=2&$[0]?u.return:$[0]?u.throw||((l=u.return)&&l.call(u),0):u.next)&&!(l=l.call(u,$[1])).done)return l;switch(u=0,l&&($=[2&$[0],l.value]),$[0]){case 0:case 1:l=$;break;case 4:return x.label++,{value:$[1],done:!1};case 5:x.label++,u=$[1],$=[0];continue;case 7:$=x.ops.pop(),x.trys.pop();continue;default:if(!((l=(l=x.trys).length>0&&l[l.length-1])||$[0]!==6&&$[0]!==2)){x=0;continue}if($[0]===3&&(!l||$[1]>l[0]&&$[1]d.onDownloadClick&&d.onDownloadClick(...x))},(0,F.toDisplayString)(d.buttonName),3)])):(0,F.createCommentVNode)("v-if",!0)])};const w=T})(),M.default})()})})(Yr);var Ya=Yr.exports;const Ja=Sa(Ya);var Jr=(r,a,i)=>{if(!a.has(r))throw TypeError("Cannot "+i)},Nr=(r,a,i)=>(Jr(r,a,"read from private field"),i?i.call(r):a.get(r)),Xa=(r,a,i)=>{if(a.has(r))throw TypeError("Cannot add the same private member more than once");a instanceof WeakSet?a.add(r):a.set(r,i)},Ka=(r,a,i,h)=>(Jr(r,a,"write to private field"),a.set(r,i),i);const Xr=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["data_matrix","DataMatrix"],["dx_film_edge","DXFilmEdge"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["maxi_code","MaxiCode"],["micro_qr_code","MicroQRCode"],["pdf417","PDF417"],["qr_code","QRCode"],["rm_qr_code","rMQRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"],["linear_codes","Linear-Codes"],["matrix_codes","Matrix-Codes"]],Za=[...Xr,["unknown"]].map(r=>r[0]),Lt=new Map(Xr);function ei(r){for(const[a,i]of Lt)if(r===i)return a;return"unknown"}function ti(r){if(Kr(r))return{width:r.naturalWidth,height:r.naturalHeight};if(Zr(r))return{width:r.width.baseVal.value,height:r.height.baseVal.value};if(en(r))return{width:r.videoWidth,height:r.videoHeight};if(rn(r))return{width:r.width,height:r.height};if(on(r))return{width:r.displayWidth,height:r.displayHeight};if(tn(r))return{width:r.width,height:r.height};if(nn(r))return{width:r.width,height:r.height};throw new TypeError("The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.")}function Kr(r){try{return r instanceof HTMLImageElement}catch{return!1}}function Zr(r){try{return r instanceof SVGImageElement}catch{return!1}}function en(r){try{return r instanceof HTMLVideoElement}catch{return!1}}function tn(r){try{return r instanceof HTMLCanvasElement}catch{return!1}}function rn(r){try{return r instanceof ImageBitmap}catch{return!1}}function nn(r){try{return r instanceof OffscreenCanvas}catch{return!1}}function on(r){try{return r instanceof VideoFrame}catch{return!1}}function an(r){try{return r instanceof Blob}catch{return!1}}function ri(r){try{return r instanceof ImageData}catch{return!1}}function ni(r,a){try{const i=new OffscreenCanvas(r,a);if(i.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return i;throw void 0}catch{const h=document.createElement("canvas");return h.width=r,h.height=a,h}}async function sn(r){if(Kr(r)&&!await si(r))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(Zr(r)&&!await ci(r))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(on(r)&&ui(r))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(en(r)&&(r.readyState===0||r.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(rn(r)&&di(r))throw new DOMException("The image source is detached.","InvalidStateError");const{width:a,height:i}=ti(r);if(a===0||i===0)return null;const h=ni(a,i).getContext("2d");h.drawImage(r,0,0);try{return h.getImageData(0,0,a,i)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function oi(r){let a;try{if(globalThis.createImageBitmap)a=await createImageBitmap(r);else if(globalThis.Image){a=new Image;let i="";try{i=URL.createObjectURL(r),a.src=i,await a.decode()}finally{URL.revokeObjectURL(i)}}else return r}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await sn(a)}function ai(r){const{width:a,height:i}=r;if(a===0||i===0)return null;const h=r.getContext("2d");try{return h.getImageData(0,0,a,i)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function ii(r){if(an(r))return await oi(r);if(ri(r)){if(li(r))throw new DOMException("The image data has been detached.","InvalidStateError");return r}return tn(r)||nn(r)?ai(r):await sn(r)}async function si(r){try{return await r.decode(),!0}catch{return!1}}async function ci(r){var a;try{return await((a=r.decode)==null?void 0:a.call(r)),!0}catch{return!1}}function ui(r){return r.format===null}function li(r){return r.data.buffer.byteLength===0}function di(r){return r.width===0&&r.height===0}function qr(r,a){return r instanceof DOMException?new DOMException(`${a}: ${r.message}`,r.name):r instanceof Error?new r.constructor(`${a}: ${r.message}`):new Error(`${a}: ${r}`)}const Lr=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","DXFilmEdge","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","rMQRCode","UPC-A","UPC-E"];function fi(r){return r.join("|")}function hi(r){const a=zr(r);let i=0,h=Lr.length-1;for(;i<=h;){const m=Math.floor((i+h)/2),_=Lr[m],M=zr(_);if(M===a)return _;M{const i=r.match(/_(.+?)\.wasm$/);return i?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.1.3/dist/${i[1]}/${r}`:a+r}};let Ur=new WeakMap;function sr(r,a){var i;const h=Ur.get(r);if(h!=null&&h.modulePromise&&a===void 0)return h.modulePromise;const m=(i=h==null?void 0:h.moduleOverrides)!=null?i:bi,_=r({...m});return Ur.set(r,{moduleOverrides:m,modulePromise:_}),_}async function Ci(r,a,i=bt){const h={...bt,...i},m=await sr(r),{size:_}=a,M=new Uint8Array(await a.arrayBuffer()),F=m._malloc(_);m.HEAPU8.set(M,F);const P=m.readBarcodesFromImage(F,_,cn(m,h));m._free(F);const B=[];for(let V=0;V{var r=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(a={}){var i=a,h,m;i.ready=new Promise((e,t)=>{h=e,m=t});var _=Object.assign({},i),M="./this.program",F=typeof window=="object",P=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var B="";function V(e){return i.locateFile?i.locateFile(e,B):B+e}var W;(F||P)&&(P?B=self.location.href:typeof document<"u"&&document.currentScript&&(B=document.currentScript.src),r&&(B=r),B.indexOf("blob:")!==0?B=B.substr(0,B.replace(/[?#].*/,"").lastIndexOf("/")+1):B="",P&&(W=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)})),i.print||console.log.bind(console);var ae=i.printErr||console.error.bind(console);Object.assign(i,_),_=null,i.arguments&&i.arguments,i.thisProgram&&(M=i.thisProgram),i.quit&&i.quit;var fe;i.wasmBinary&&(fe=i.wasmBinary),typeof WebAssembly!="object"&&c("no native wasm support detected");var K,de=!1,re,ge,$e,he,Z,oe,We,qe;function He(){var e=K.buffer;i.HEAP8=re=new Int8Array(e),i.HEAP16=$e=new Int16Array(e),i.HEAPU8=ge=new Uint8Array(e),i.HEAPU16=he=new Uint16Array(e),i.HEAP32=Z=new Int32Array(e),i.HEAPU32=oe=new Uint32Array(e),i.HEAPF32=We=new Float32Array(e),i.HEAPF64=qe=new Float64Array(e)}var Ge=[],ke=[],Ve=[];function Je(){if(i.preRun)for(typeof i.preRun=="function"&&(i.preRun=[i.preRun]);i.preRun.length;)R(i.preRun.shift());ee(Ge)}function ut(){ee(ke)}function lt(){if(i.postRun)for(typeof i.postRun=="function"&&(i.postRun=[i.postRun]);i.postRun.length;)E(i.postRun.shift());ee(Ve)}function R(e){Ge.unshift(e)}function k(e){ke.unshift(e)}function E(e){Ve.unshift(e)}var T=0,w=null;function d(e){var t;T++,(t=i.monitorRunDependencies)===null||t===void 0||t.call(i,T)}function n(e){var t;if(T--,(t=i.monitorRunDependencies)===null||t===void 0||t.call(i,T),T==0&&w){var o=w;w=null,o()}}function c(e){var t;(t=i.onAbort)===null||t===void 0||t.call(i,e),e="Aborted("+e+")",ae(e),de=!0,e+=". Build with -sASSERTIONS for more info.";var o=new WebAssembly.RuntimeError(e);throw m(o),o}var u="data:application/octet-stream;base64,",l=e=>e.startsWith(u),g;g="zxing_reader.wasm",l(g)||(g=V(g));function x(e){if(e==g&&fe)return new Uint8Array(fe);if(W)return W(e);throw"both async and sync fetching of the wasm failed"}function q(e){return!fe&&(F||P)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()}).catch(()=>x(e)):Promise.resolve().then(()=>x(e))}function I(e,t,o){return q(e).then(s=>WebAssembly.instantiate(s,t)).then(s=>s).then(o,s=>{ae(`failed to asynchronously prepare wasm: ${s}`),c(s)})}function N(e,t,o,s){return!e&&typeof WebAssembly.instantiateStreaming=="function"&&!l(t)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(f=>{var v=WebAssembly.instantiateStreaming(f,o);return v.then(s,function(C){return ae(`wasm streaming compile failed: ${C}`),ae("falling back to ArrayBuffer instantiation"),I(t,o,s)})}):I(t,o,s)}function $(){var e={a:Zo};function t(s,f){return De=s.exports,K=De.ia,He(),gr=De.ma,k(De.ja),n(),De}d();function o(s){t(s.instance)}if(i.instantiateWasm)try{return i.instantiateWasm(e,t)}catch(s){ae(`Module.instantiateWasm callback failed with error: ${s}`),m(s)}return N(fe,g,e,o).catch(m),{}}var ee=e=>{for(;e.length>0;)e.shift()(i)};i.noExitRuntime;var j=[],p=0,D=e=>{var t=new O(e);return t.get_caught()||(t.set_caught(!0),p--),t.set_rethrown(!1),j.push(t),$r(t.excPtr),t.get_exception_ptr()},b=0,y=()=>{xe(0,0);var e=j.pop();Dr(e.excPtr),b=0};function O(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(t){oe[this.ptr+4>>2]=t},this.get_type=function(){return oe[this.ptr+4>>2]},this.set_destructor=function(t){oe[this.ptr+8>>2]=t},this.get_destructor=function(){return oe[this.ptr+8>>2]},this.set_caught=function(t){t=t?1:0,re[this.ptr+12>>0]=t},this.get_caught=function(){return re[this.ptr+12>>0]!=0},this.set_rethrown=function(t){t=t?1:0,re[this.ptr+13>>0]=t},this.get_rethrown=function(){return re[this.ptr+13>>0]!=0},this.init=function(t,o){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(o)},this.set_adjusted_ptr=function(t){oe[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return oe[this.ptr+16>>2]},this.get_exception_ptr=function(){var t=Er(this.get_type());if(t)return oe[this.excPtr>>2];var o=this.get_adjusted_ptr();return o!==0?o:this.excPtr}}var H=e=>{throw b||(b=e),b},Q=e=>{var t=b;if(!t)return Mt(0),0;var o=new O(t);o.set_adjusted_ptr(t);var s=o.get_type();if(!s)return Mt(0),t;for(var f in e){var v=e[f];if(v===0||v===s)break;var C=o.ptr+16;if(kr(v,s,C))return Mt(v),t}return Mt(s),t},U=()=>Q([]),ne=e=>Q([e]),te=(e,t)=>Q([e,t]),Y=()=>{var e=j.pop();e||c("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(j.push(e),e.set_rethrown(!0),e.set_caught(!1),p++),b=t,b},ye=(e,t,o)=>{var s=new O(e);throw s.init(t,o),b=e,p++,b},we=()=>p,J={},ve=e=>{for(;e.length;){var t=e.pop(),o=e.pop();o(t)}};function ce(e){return this.fromWireType(Z[e>>2])}var je={},Le={},ue={},Ee,Re=e=>{throw new Ee(e)},Be=(e,t,o)=>{e.forEach(function(S){ue[S]=t});function s(S){var A=o(S);A.length!==e.length&&Re("Mismatched type converter count");for(var z=0;z{Le.hasOwnProperty(S)?f[A]=Le[S]:(v.push(S),je.hasOwnProperty(S)||(je[S]=[]),je[S].push(()=>{f[A]=Le[S],++C,C===v.length&&s(f)}))}),v.length===0&&s(f)},at=e=>{var t=J[e];delete J[e];var o=t.rawConstructor,s=t.rawDestructor,f=t.fields,v=f.map(C=>C.getterReturnType).concat(f.map(C=>C.setterArgumentType));Be([e],v,C=>{var S={};return f.forEach((A,z)=>{var G=A.fieldName,ie=C[z],se=A.getter,le=A.getterContext,_e=C[z+f.length],Te=A.setter,Ce=A.setterContext;S[G]={read:Ne=>ie.fromWireType(se(le,Ne)),write:(Ne,L)=>{var X=[];Te(Ce,Ne,_e.toWireType(X,L)),ve(X)}}}),[{name:t.name,fromWireType:A=>{var z={};for(var G in S)z[G]=S[G].read(A);return s(A),z},toWireType:(A,z)=>{for(var G in S)if(!(G in z))throw new TypeError(`Missing field: "${G}"`);var ie=o();for(G in S)S[G].write(ie,z[G]);return A!==null&&A.push(s,ie),ie},argPackAdvance:Ze,readValueFromPointer:ce,destructorFunction:s}]})},Xe=(e,t,o,s,f)=>{},be=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Ke=e},Ke,me=e=>{for(var t="",o=e;ge[o];)t+=Ke[ge[o++]];return t},ze,pe=e=>{throw new ze(e)};function Ct(e,t){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var s=t.name;if(e||pe(`type "${s}" must have a positive integer typeid pointer`),Le.hasOwnProperty(e)){if(o.ignoreDuplicateRegistrations)return;pe(`Cannot register type '${s}' twice`)}if(Le[e]=t,delete ue[e],je.hasOwnProperty(e)){var f=je[e];delete je[e],f.forEach(v=>v())}}function Fe(e,t){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Ct(e,t,o)}var Ze=8,Pn=(e,t,o,s)=>{t=me(t),Fe(e,{name:t,fromWireType:function(f){return!!f},toWireType:function(f,v){return v?o:s},argPackAdvance:Ze,readValueFromPointer:function(f){return this.fromWireType(ge[f])},destructorFunction:null})},On=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),Wt=e=>{function t(o){return o.$$.ptrType.registeredClass.name}pe(t(e)+" instance already deleted")},Ht=!1,ur=e=>{},Tn=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},lr=e=>{e.count.value-=1;var t=e.count.value===0;t&&Tn(e)},dr=(e,t,o)=>{if(t===o)return e;if(o.baseClass===void 0)return null;var s=dr(e,t,o.baseClass);return s===null?null:o.downcast(s)},fr={},Mn=()=>Object.keys(St).length,Dn=()=>{var e=[];for(var t in St)St.hasOwnProperty(t)&&e.push(St[t]);return e},xt=[],Vt=()=>{for(;xt.length;){var e=xt.pop();e.$$.deleteScheduled=!1,e.delete()}},_t,$n=e=>{_t=e,xt.length&&_t&&_t(Vt)},kn=()=>{i.getInheritedInstanceCount=Mn,i.getLiveInheritedInstances=Dn,i.flushPendingDeletes=Vt,i.setDelayFunction=$n},St={},En=(e,t)=>{for(t===void 0&&pe("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},Rn=(e,t)=>(t=En(e,t),St[t]),kt=(e,t)=>{(!t.ptrType||!t.ptr)&&Re("makeClassHandle requires ptr and ptrType");var o=!!t.smartPtrType,s=!!t.smartPtr;return o!==s&&Re("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Pt(Object.create(e,{$$:{value:t,writable:!0}}))};function An(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var o=Rn(this.registeredClass,t);if(o!==void 0){if(o.$$.count.value===0)return o.$$.ptr=t,o.$$.smartPtr=e,o.clone();var s=o.clone();return this.destructor(e),s}function f(){return this.isSmartPointer?kt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):kt(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var v=this.registeredClass.getActualType(t),C=fr[v];if(!C)return f.call(this);var S;this.isConst?S=C.constPointerType:S=C.pointerType;var A=dr(t,this.registeredClass,S.registeredClass);return A===null?f.call(this):this.isSmartPointer?kt(S.registeredClass.instancePrototype,{ptrType:S,ptr:A,smartPtrType:this,smartPtr:e}):kt(S.registeredClass.instancePrototype,{ptrType:S,ptr:A})}var Pt=e=>typeof FinalizationRegistry>"u"?(Pt=t=>t,e):(Ht=new FinalizationRegistry(t=>{lr(t.$$)}),Pt=t=>{var o=t.$$,s=!!o.smartPtr;if(s){var f={$$:o};Ht.register(t,f,t)}return t},ur=t=>Ht.unregister(t),Pt(e)),In=()=>{Object.assign(Et.prototype,{isAliasOf(e){if(!(this instanceof Et)||!(e instanceof Et))return!1;var t=this.$$.ptrType.registeredClass,o=this.$$.ptr;e.$$=e.$$;for(var s=e.$$.ptrType.registeredClass,f=e.$$.ptr;t.baseClass;)o=t.upcast(o),t=t.baseClass;for(;s.baseClass;)f=s.upcast(f),s=s.baseClass;return t===s&&o===f},clone(){if(this.$$.ptr||Wt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=Pt(Object.create(Object.getPrototypeOf(this),{$$:{value:On(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||Wt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&pe("Object already scheduled for deletion"),ur(this),lr(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Wt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&pe("Object already scheduled for deletion"),xt.push(this),xt.length===1&&_t&&_t(Vt),this.$$.deleteScheduled=!0,this}})};function Et(){}var Ot=(e,t)=>Object.defineProperty(t,"name",{value:e}),hr=(e,t,o)=>{if(e[t].overloadTable===void 0){var s=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||pe(`Function '${o}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[s.argCount]=s}},Qt=(e,t,o)=>{i.hasOwnProperty(e)?((o===void 0||i[e].overloadTable!==void 0&&i[e].overloadTable[o]!==void 0)&&pe(`Cannot register public name '${e}' twice`),hr(i,e,e),i.hasOwnProperty(o)&&pe(`Cannot register multiple overloads of a function with the same number of arguments (${o})!`),i[e].overloadTable[o]=t):(i[e]=t,o!==void 0&&(i[e].numArguments=o))},jn=48,Bn=57,Fn=e=>{if(e===void 0)return"_unknown";e=e.replace(/[^a-zA-Z0-9_]/g,"$");var t=e.charCodeAt(0);return t>=jn&&t<=Bn?`_${e}`:e};function Nn(e,t,o,s,f,v,C,S){this.name=e,this.constructor=t,this.instancePrototype=o,this.rawDestructor=s,this.baseClass=f,this.getActualType=v,this.upcast=C,this.downcast=S,this.pureVirtualFunctions=[]}var Gt=(e,t,o)=>{for(;t!==o;)t.upcast||pe(`Expected null or instance of ${o.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function qn(e,t){if(t===null)return this.isReference&&pe(`null is not a valid ${this.name}`),0;t.$$||pe(`Cannot pass "${Zt(t)}" as a ${this.name}`),t.$$.ptr||pe(`Cannot pass deleted object as a pointer of type ${this.name}`);var o=t.$$.ptrType.registeredClass,s=Gt(t.$$.ptr,o,this.registeredClass);return s}function Ln(e,t){var o;if(t===null)return this.isReference&&pe(`null is not a valid ${this.name}`),this.isSmartPointer?(o=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,o),o):0;(!t||!t.$$)&&pe(`Cannot pass "${Zt(t)}" as a ${this.name}`),t.$$.ptr||pe(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&pe(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var s=t.$$.ptrType.registeredClass;if(o=Gt(t.$$.ptr,s,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&pe("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?o=t.$$.smartPtr:pe(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:o=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)o=t.$$.smartPtr;else{var f=t.clone();o=this.rawShare(o,nt.toHandle(()=>f.delete())),e!==null&&e.push(this.rawDestructor,o)}break;default:pe("Unsupporting sharing policy")}return o}function zn(e,t){if(t===null)return this.isReference&&pe(`null is not a valid ${this.name}`),0;t.$$||pe(`Cannot pass "${Zt(t)}" as a ${this.name}`),t.$$.ptr||pe(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&pe(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var o=t.$$.ptrType.registeredClass,s=Gt(t.$$.ptr,o,this.registeredClass);return s}function pr(e){return this.fromWireType(oe[e>>2])}var Un=()=>{Object.assign(Rt.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){var t;(t=this.rawDestructor)===null||t===void 0||t.call(this,e)},argPackAdvance:Ze,readValueFromPointer:pr,deleteObject(e){e!==null&&e.delete()},fromWireType:An})};function Rt(e,t,o,s,f,v,C,S,A,z,G){this.name=e,this.registeredClass=t,this.isReference=o,this.isConst=s,this.isSmartPointer=f,this.pointeeType=v,this.sharingPolicy=C,this.rawGetPointee=S,this.rawConstructor=A,this.rawShare=z,this.rawDestructor=G,!f&&t.baseClass===void 0?s?(this.toWireType=qn,this.destructorFunction=null):(this.toWireType=zn,this.destructorFunction=null):this.toWireType=Ln}var vr=(e,t,o)=>{i.hasOwnProperty(e)||Re("Replacing nonexistant public symbol"),i[e].overloadTable!==void 0&&o!==void 0?i[e].overloadTable[o]=t:(i[e]=t,i[e].argCount=o)},Wn=(e,t,o)=>{var s=i["dynCall_"+e];return o&&o.length?s.apply(null,[t].concat(o)):s.call(null,t)},At=[],gr,Se=e=>{var t=At[e];return t||(e>=At.length&&(At.length=e+1),At[e]=t=gr.get(e)),t},Hn=(e,t,o)=>{if(e.includes("j"))return Wn(e,t,o);var s=Se(t).apply(null,o);return s},Vn=(e,t)=>{var o=[];return function(){return o.length=0,Object.assign(o,arguments),Hn(e,t,o)}},Ye=(e,t)=>{e=me(e);function o(){return e.includes("j")?Vn(e,t):Se(t)}var s=o();return typeof s!="function"&&pe(`unknown function pointer with signature ${e}: ${t}`),s},Qn=(e,t)=>{var o=Ot(t,function(s){this.name=t,this.message=s;var f=new Error(s).stack;f!==void 0&&(this.stack=this.toString()+` -`+f.replace(/^Error(:[^\n]*)?\n/,""))});return o.prototype=Object.create(e.prototype),o.prototype.constructor=o,o.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},o},yr,mr=e=>{var t=Mr(e),o=me(t);return ot(t),o},It=(e,t)=>{var o=[],s={};function f(v){if(!s[v]&&!Le[v]){if(ue[v]){ue[v].forEach(f);return}o.push(v),s[v]=!0}}throw t.forEach(f),new yr(`${e}: `+o.map(mr).join([", "]))},Gn=(e,t,o,s,f,v,C,S,A,z,G,ie,se)=>{G=me(G),v=Ye(f,v),S&&(S=Ye(C,S)),z&&(z=Ye(A,z)),se=Ye(ie,se);var le=Fn(G);Qt(le,function(){It(`Cannot construct ${G} due to unbound types`,[s])}),Be([e,t,o],s?[s]:[],function(_e){_e=_e[0];var Te,Ce;s?(Te=_e.registeredClass,Ce=Te.instancePrototype):Ce=Et.prototype;var Ne=Ot(G,function(){if(Object.getPrototypeOf(this)!==L)throw new ze("Use 'new' to construct "+G);if(X.constructor_body===void 0)throw new ze(G+" has no accessible constructor");var jr=X.constructor_body[arguments.length];if(jr===void 0)throw new ze(`Tried to invoke ctor of ${G} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(X.constructor_body).toString()}) parameters instead!`);return jr.apply(this,arguments)}),L=Object.create(Ce,{constructor:{value:Ne}});Ne.prototype=L;var X=new Nn(G,Ne,L,se,Te,v,S,z);if(X.baseClass){var Me,Ae;(Ae=(Me=X.baseClass).__derivedClasses)!==null&&Ae!==void 0||(Me.__derivedClasses=[]),X.baseClass.__derivedClasses.push(X)}var ft=new Rt(G,X,!0,!1,!1),Ft=new Rt(G+"*",X,!1,!1,!1),Ir=new Rt(G+" const*",X,!1,!0,!1);return fr[e]={pointerType:Ft,constPointerType:Ir},vr(le,Ne),[ft,Ft,Ir]})},Yt=(e,t)=>{for(var o=[],s=0;s>2]);return o};function Yn(e){for(var t=1;t{var C=Yt(t,o);f=Ye(s,f),Be([],[e],function(S){S=S[0];var A=`constructor ${S.name}`;if(S.registeredClass.constructor_body===void 0&&(S.registeredClass.constructor_body=[]),S.registeredClass.constructor_body[t-1]!==void 0)throw new ze(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${S.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return S.registeredClass.constructor_body[t-1]=()=>{It(`Cannot construct ${S.name} due to unbound types`,C)},Be([],C,z=>(z.splice(1,0,null),S.registeredClass.constructor_body[t-1]=Jt(A,z,null,f,v),[])),[]})},wr=e=>{e=e.trim();const t=e.indexOf("(");return t!==-1?e.substr(0,t):e},Xn=(e,t,o,s,f,v,C,S,A)=>{var z=Yt(o,s);t=me(t),t=wr(t),v=Ye(f,v),Be([],[e],function(G){G=G[0];var ie=`${G.name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),S&&G.registeredClass.pureVirtualFunctions.push(t);function se(){It(`Cannot call ${ie} due to unbound types`,z)}var le=G.registeredClass.instancePrototype,_e=le[t];return _e===void 0||_e.overloadTable===void 0&&_e.className!==G.name&&_e.argCount===o-2?(se.argCount=o-2,se.className=G.name,le[t]=se):(hr(le,t,ie),le[t].overloadTable[o-2]=se),Be([],z,function(Te){var Ce=Jt(ie,Te,G,v,C);return le[t].overloadTable===void 0?(Ce.argCount=o-2,le[t]=Ce):le[t].overloadTable[o-2]=Ce,[]}),[]})};function Kn(){Object.assign(br.prototype,{get(e){return this.allocated[e]},has(e){return this.allocated[e]!==void 0},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function br(){this.allocated=[void 0],this.freelist=[]}var Qe=new br,Xt=e=>{e>=Qe.reserved&&--Qe.get(e).refcount===0&&Qe.free(e)},Zn=()=>{for(var e=0,t=Qe.reserved;t{Qe.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),Qe.reserved=Qe.allocated.length,i.count_emval_handles=Zn},nt={toValue:e=>(e||pe("Cannot use deleted val. handle = "+e),Qe.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Qe.allocate({refcount:1,value:e})}}},to=(e,t)=>{t=me(t),Fe(e,{name:t,fromWireType:o=>{var s=nt.toValue(o);return Xt(o),s},toWireType:(o,s)=>nt.toHandle(s),argPackAdvance:Ze,readValueFromPointer:ce,destructorFunction:null})},ro=(e,t,o)=>{switch(t){case 1:return o?function(s){return this.fromWireType(re[s>>0])}:function(s){return this.fromWireType(ge[s>>0])};case 2:return o?function(s){return this.fromWireType($e[s>>1])}:function(s){return this.fromWireType(he[s>>1])};case 4:return o?function(s){return this.fromWireType(Z[s>>2])}:function(s){return this.fromWireType(oe[s>>2])};default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},no=(e,t,o,s)=>{t=me(t);function f(){}f.values={},Fe(e,{name:t,constructor:f,fromWireType:function(v){return this.constructor.values[v]},toWireType:(v,C)=>C.value,argPackAdvance:Ze,readValueFromPointer:ro(t,o,s),destructorFunction:null}),Qt(t,f)},Kt=(e,t)=>{var o=Le[e];return o===void 0&&pe(t+" has unknown type "+mr(e)),o},oo=(e,t,o)=>{var s=Kt(e,"enum");t=me(t);var f=s.constructor,v=Object.create(s.constructor.prototype,{value:{value:o},constructor:{value:Ot(`${s.name}_${t}`,function(){})}});f.values[o]=v,f[t]=v},Zt=e=>{if(e===null)return"null";var t=typeof e;return t==="object"||t==="array"||t==="function"?e.toString():""+e},ao=(e,t)=>{switch(t){case 4:return function(o){return this.fromWireType(We[o>>2])};case 8:return function(o){return this.fromWireType(qe[o>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},io=(e,t,o)=>{t=me(t),Fe(e,{name:t,fromWireType:s=>s,toWireType:(s,f)=>f,argPackAdvance:Ze,readValueFromPointer:ao(t,o),destructorFunction:null})},so=(e,t,o,s,f,v,C)=>{var S=Yt(t,o);e=me(e),e=wr(e),f=Ye(s,f),Qt(e,function(){It(`Cannot call ${e} due to unbound types`,S)},t-1),Be([],S,function(A){var z=[A[0],null].concat(A.slice(1));return vr(e,Jt(e,z,null,f,v),t-1),[]})},co=(e,t,o)=>{switch(t){case 1:return o?s=>re[s>>0]:s=>ge[s>>0];case 2:return o?s=>$e[s>>1]:s=>he[s>>1];case 4:return o?s=>Z[s>>2]:s=>oe[s>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},uo=(e,t,o,s,f)=>{t=me(t);var v=G=>G;if(s===0){var C=32-8*o;v=G=>G<>>C}var S=t.includes("unsigned"),A=(G,ie)=>{},z;S?z=function(G,ie){return A(ie,this.name),ie>>>0}:z=function(G,ie){return A(ie,this.name),ie},Fe(e,{name:t,fromWireType:v,toWireType:z,argPackAdvance:Ze,readValueFromPointer:co(t,o,s!==0),destructorFunction:null})},lo=(e,t,o)=>{var s=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],f=s[t];function v(C){var S=oe[C>>2],A=oe[C+4>>2];return new f(re.buffer,A,S)}o=me(o),Fe(e,{name:o,fromWireType:v,argPackAdvance:Ze,readValueFromPointer:v},{ignoreDuplicateRegistrations:!0})},Cr=(e,t,o,s)=>{if(!(s>0))return 0;for(var f=o,v=o+s-1,C=0;C=55296&&S<=57343){var A=e.charCodeAt(++C);S=65536+((S&1023)<<10)|A&1023}if(S<=127){if(o>=v)break;t[o++]=S}else if(S<=2047){if(o+1>=v)break;t[o++]=192|S>>6,t[o++]=128|S&63}else if(S<=65535){if(o+2>=v)break;t[o++]=224|S>>12,t[o++]=128|S>>6&63,t[o++]=128|S&63}else{if(o+3>=v)break;t[o++]=240|S>>18,t[o++]=128|S>>12&63,t[o++]=128|S>>6&63,t[o++]=128|S&63}}return t[o]=0,o-f},fo=(e,t,o)=>Cr(e,ge,t,o),xr=e=>{for(var t=0,o=0;o=55296&&s<=57343?(t+=4,++o):t+=3}return t},_r=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,ho=(e,t,o)=>{for(var s=t+o,f=t;e[f]&&!(f>=s);)++f;if(f-t>16&&e.buffer&&_r)return _r.decode(e.subarray(t,f));for(var v="";t>10,56320|z&1023)}}return v},er=(e,t)=>e?ho(ge,e,t):"",po=(e,t)=>{t=me(t);var o=t==="std::string";Fe(e,{name:t,fromWireType(s){var f=oe[s>>2],v=s+4,C;if(o)for(var S=v,A=0;A<=f;++A){var z=v+A;if(A==f||ge[z]==0){var G=z-S,ie=er(S,G);C===void 0?C=ie:(C+="\0",C+=ie),S=z+1}}else{for(var se=new Array(f),A=0;A>2]=v,o&&C)fo(f,A,v+1);else if(C)for(var z=0;z255&&(ot(A),pe("String has UTF-16 code units that do not fit in 8 bits")),ge[A+z]=G}else for(var z=0;z{for(var o=e,s=o>>1,f=s+t/2;!(s>=f)&&he[s];)++s;if(o=s<<1,o-e>32&&Sr)return Sr.decode(ge.subarray(e,o));for(var v="",C=0;!(C>=t/2);++C){var S=$e[e+C*2>>1];if(S==0)break;v+=String.fromCharCode(S)}return v},go=(e,t,o)=>{var s;if((s=o)!==null&&s!==void 0||(o=2147483647),o<2)return 0;o-=2;for(var f=t,v=o>1]=S,t+=2}return $e[t>>1]=0,t-f},yo=e=>e.length*2,mo=(e,t)=>{for(var o=0,s="";!(o>=t/4);){var f=Z[e+o*4>>2];if(f==0)break;if(++o,f>=65536){var v=f-65536;s+=String.fromCharCode(55296|v>>10,56320|v&1023)}else s+=String.fromCharCode(f)}return s},wo=(e,t,o)=>{var s;if((s=o)!==null&&s!==void 0||(o=2147483647),o<4)return 0;for(var f=t,v=f+o-4,C=0;C=55296&&S<=57343){var A=e.charCodeAt(++C);S=65536+((S&1023)<<10)|A&1023}if(Z[t>>2]=S,t+=4,t+4>v)break}return Z[t>>2]=0,t-f},bo=e=>{for(var t=0,o=0;o=55296&&s<=57343&&++o,t+=4}return t},Co=(e,t,o)=>{o=me(o);var s,f,v,C,S;t===2?(s=vo,f=go,C=yo,v=()=>he,S=1):t===4&&(s=mo,f=wo,C=bo,v=()=>oe,S=2),Fe(e,{name:o,fromWireType:A=>{for(var z=oe[A>>2],G=v(),ie,se=A+4,le=0;le<=z;++le){var _e=A+4+le*t;if(le==z||G[_e>>S]==0){var Te=_e-se,Ce=s(se,Te);ie===void 0?ie=Ce:(ie+="\0",ie+=Ce),se=_e+t}}return ot(A),ie},toWireType:(A,z)=>{typeof z!="string"&&pe(`Cannot pass non-string to C++ string type ${o}`);var G=C(z),ie=nr(4+G+t);return oe[ie>>2]=G>>S,f(z,ie+4,G+t),A!==null&&A.push(ot,ie),ie},argPackAdvance:Ze,readValueFromPointer:ce,destructorFunction(A){ot(A)}})},xo=(e,t,o,s,f,v)=>{J[e]={name:me(t),rawConstructor:Ye(o,s),rawDestructor:Ye(f,v),fields:[]}},_o=(e,t,o,s,f,v,C,S,A,z)=>{J[e].fields.push({fieldName:me(t),getterReturnType:o,getter:Ye(s,f),getterContext:v,setterArgumentType:C,setter:Ye(S,A),setterContext:z})},So=(e,t)=>{t=me(t),Fe(e,{isVoid:!0,name:t,argPackAdvance:0,fromWireType:()=>{},toWireType:(o,s)=>{}})},tr=[],Po=(e,t,o,s)=>(e=tr[e],t=nt.toValue(t),e(null,t,o,s)),Oo={},To=e=>{var t=Oo[e];return t===void 0?me(e):t},Pr=()=>{if(typeof globalThis=="object")return globalThis;function e(t){t.$$$embind_global$$$=t;var o=typeof $$$embind_global$$$=="object"&&t.$$$embind_global$$$==t;return o||delete t.$$$embind_global$$$,o}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&e(global)?$$$embind_global$$$=global:typeof self=="object"&&e(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},Mo=e=>e===0?nt.toHandle(Pr()):(e=To(e),nt.toHandle(Pr()[e])),Do=e=>{var t=tr.length;return tr.push(e),t},$o=(e,t)=>{for(var o=new Array(e),s=0;s>2],"parameter "+s);return o},ko=Reflect.construct,Eo=(e,t,o)=>{var s=[],f=e.toWireType(s,o);return s.length&&(oe[t>>2]=nt.toHandle(s)),f},Ro=(e,t,o)=>{var s=$o(e,t),f=s.shift();e--;var v=new Array(e),C=(A,z,G,ie)=>{for(var se=0,le=0;leA.name).join(", ")}) => ${f.name}>`;return Do(Ot(S,C))},Ao=e=>{e>4&&(Qe.get(e).refcount+=1)},Io=e=>{var t=nt.toValue(e);ve(t),Xt(e)},jo=(e,t)=>{e=Kt(e,"_emval_take_value");var o=e.readValueFromPointer(t);return nt.toHandle(o)},Bo=()=>{c("")},Fo=(e,t,o)=>ge.copyWithin(e,t,t+o),No=()=>2147483648,qo=e=>{var t=K.buffer,o=(e-t.byteLength+65535)/65536;try{return K.grow(o),He(),1}catch{}},Lo=e=>{var t=ge.length;e>>>=0;var o=No();if(e>o)return!1;for(var s=(A,z)=>A+(z-A%z)%z,f=1;f<=4;f*=2){var v=t*(1+.2/f);v=Math.min(v,e+100663296);var C=Math.min(o,s(Math.max(e,v),65536)),S=qo(C);if(S)return!0}return!1},rr={},zo=()=>M||"./this.program",Tt=()=>{if(!Tt.strings){var e=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:e,_:zo()};for(var o in rr)rr[o]===void 0?delete t[o]:t[o]=rr[o];var s=[];for(var o in t)s.push(`${o}=${t[o]}`);Tt.strings=s}return Tt.strings},Uo=(e,t)=>{for(var o=0;o>0]=e.charCodeAt(o);re[t>>0]=0},Wo=(e,t)=>{var o=0;return Tt().forEach((s,f)=>{var v=t+o;oe[e+f*4>>2]=v,Uo(s,v),o+=s.length+1}),0},Ho=(e,t)=>{var o=Tt();oe[e>>2]=o.length;var s=0;return o.forEach(f=>s+=f.length+1),oe[t>>2]=s,0},Vo=e=>e,jt=e=>e%4===0&&(e%100!==0||e%400===0),Qo=(e,t)=>{for(var o=0,s=0;s<=t;o+=e[s++]);return o},Or=[31,29,31,30,31,30,31,31,30,31,30,31],Tr=[31,28,31,30,31,30,31,31,30,31,30,31],Go=(e,t)=>{for(var o=new Date(e.getTime());t>0;){var s=jt(o.getFullYear()),f=o.getMonth(),v=(s?Or:Tr)[f];if(t>v-o.getDate())t-=v-o.getDate()+1,o.setDate(1),f<11?o.setMonth(f+1):(o.setMonth(0),o.setFullYear(o.getFullYear()+1));else return o.setDate(o.getDate()+t),o}return o};function Yo(e,t,o){var s=xr(e)+1,f=new Array(s);return Cr(e,f,0,f.length),f}var Jo=(e,t)=>{re.set(e,t)},Xo=(e,t,o,s)=>{var f=oe[s+40>>2],v={tm_sec:Z[s>>2],tm_min:Z[s+4>>2],tm_hour:Z[s+8>>2],tm_mday:Z[s+12>>2],tm_mon:Z[s+16>>2],tm_year:Z[s+20>>2],tm_wday:Z[s+24>>2],tm_yday:Z[s+28>>2],tm_isdst:Z[s+32>>2],tm_gmtoff:Z[s+36>>2],tm_zone:f?er(f):""},C=er(o),S={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var A in S)C=C.replace(new RegExp(A,"g"),S[A]);var z=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],G=["January","February","March","April","May","June","July","August","September","October","November","December"];function ie(L,X,Me){for(var Ae=typeof L=="number"?L.toString():L||"";Ae.length0?1:0}var Ae;return(Ae=Me(L.getFullYear()-X.getFullYear()))===0&&(Ae=Me(L.getMonth()-X.getMonth()))===0&&(Ae=Me(L.getDate()-X.getDate())),Ae}function _e(L){switch(L.getDay()){case 0:return new Date(L.getFullYear()-1,11,29);case 1:return L;case 2:return new Date(L.getFullYear(),0,3);case 3:return new Date(L.getFullYear(),0,2);case 4:return new Date(L.getFullYear(),0,1);case 5:return new Date(L.getFullYear()-1,11,31);case 6:return new Date(L.getFullYear()-1,11,30)}}function Te(L){var X=Go(new Date(L.tm_year+1900,0,1),L.tm_yday),Me=new Date(X.getFullYear(),0,4),Ae=new Date(X.getFullYear()+1,0,4),ft=_e(Me),Ft=_e(Ae);return le(ft,X)<=0?le(Ft,X)<=0?X.getFullYear()+1:X.getFullYear():X.getFullYear()-1}var Ce={"%a":L=>z[L.tm_wday].substring(0,3),"%A":L=>z[L.tm_wday],"%b":L=>G[L.tm_mon].substring(0,3),"%B":L=>G[L.tm_mon],"%C":L=>{var X=L.tm_year+1900;return se(X/100|0,2)},"%d":L=>se(L.tm_mday,2),"%e":L=>ie(L.tm_mday,2," "),"%g":L=>Te(L).toString().substring(2),"%G":L=>Te(L),"%H":L=>se(L.tm_hour,2),"%I":L=>{var X=L.tm_hour;return X==0?X=12:X>12&&(X-=12),se(X,2)},"%j":L=>se(L.tm_mday+Qo(jt(L.tm_year+1900)?Or:Tr,L.tm_mon-1),3),"%m":L=>se(L.tm_mon+1,2),"%M":L=>se(L.tm_min,2),"%n":()=>` -`,"%p":L=>L.tm_hour>=0&&L.tm_hour<12?"AM":"PM","%S":L=>se(L.tm_sec,2),"%t":()=>" ","%u":L=>L.tm_wday||7,"%U":L=>{var X=L.tm_yday+7-L.tm_wday;return se(Math.floor(X/7),2)},"%V":L=>{var X=Math.floor((L.tm_yday+7-(L.tm_wday+6)%7)/7);if((L.tm_wday+371-L.tm_yday-2)%7<=2&&X++,X){if(X==53){var Me=(L.tm_wday+371-L.tm_yday)%7;Me!=4&&(Me!=3||!jt(L.tm_year))&&(X=1)}}else{X=52;var Ae=(L.tm_wday+7-L.tm_yday-1)%7;(Ae==4||Ae==5&&jt(L.tm_year%400-1))&&X++}return se(X,2)},"%w":L=>L.tm_wday,"%W":L=>{var X=L.tm_yday+7-(L.tm_wday+6)%7;return se(Math.floor(X/7),2)},"%y":L=>(L.tm_year+1900).toString().substring(2),"%Y":L=>L.tm_year+1900,"%z":L=>{var X=L.tm_gmtoff,Me=X>=0;return X=Math.abs(X)/60,X=X/60*100+X%60,(Me?"+":"-")+("0000"+X).slice(-4)},"%Z":L=>L.tm_zone,"%%":()=>"%"};C=C.replace(/%%/g,"\0\0");for(var A in Ce)C.includes(A)&&(C=C.replace(new RegExp(A,"g"),Ce[A](v)));C=C.replace(/\0\0/g,"%");var Ne=Yo(C);return Ne.length>t?0:(Jo(Ne,e),Ne.length-1)},Ko=(e,t,o,s,f)=>Xo(e,t,o,s);Ee=i.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},be(),ze=i.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},In(),kn(),Un(),yr=i.UnboundTypeError=Qn(Error,"UnboundTypeError"),Kn(),eo();var Zo={s:D,u:y,b:U,g:ne,q:te,J:Y,f:ye,V:we,d:H,da:at,Q:Xe,_:Pn,ca:Gn,ba:Jn,w:Xn,Y:to,x:no,h:oo,L:io,M:so,t:uo,o:lo,K:po,C:Co,A:xo,ea:_o,$:So,R:Po,ha:Xt,fa:Mo,Z:Ro,N:Ao,O:Io,aa:jo,B:Bo,X:Fo,W:Lo,T:Wo,U:Ho,E:va,D:oa,F:pa,n:ga,a:ea,e:ia,m:na,k:ca,H:fa,v:la,G:ha,z:ma,P:ba,l:sa,j:aa,c:ra,p:ta,I:da,r:ya,i:ua,y:wa,ga:Vo,S:Ko},De=$(),ot=i._free=e=>(ot=i._free=De.ka)(e),nr=i._malloc=e=>(nr=i._malloc=De.la)(e),Mr=e=>(Mr=De.na)(e),xe=(e,t)=>(xe=De.oa)(e,t),Mt=e=>(Mt=De.pa)(e),Pe=()=>(Pe=De.qa)(),Oe=e=>(Oe=De.ra)(e),Dr=e=>(Dr=De.sa)(e),$r=e=>($r=De.ta)(e),kr=(e,t,o)=>(kr=De.ua)(e,t,o),Er=e=>(Er=De.va)(e);i.dynCall_viijii=(e,t,o,s,f,v,C)=>(i.dynCall_viijii=De.wa)(e,t,o,s,f,v,C);var Rr=i.dynCall_jiiii=(e,t,o,s,f)=>(Rr=i.dynCall_jiiii=De.xa)(e,t,o,s,f);i.dynCall_iiiiij=(e,t,o,s,f,v,C)=>(i.dynCall_iiiiij=De.ya)(e,t,o,s,f,v,C),i.dynCall_iiiiijj=(e,t,o,s,f,v,C,S,A)=>(i.dynCall_iiiiijj=De.za)(e,t,o,s,f,v,C,S,A),i.dynCall_iiiiiijj=(e,t,o,s,f,v,C,S,A,z)=>(i.dynCall_iiiiiijj=De.Aa)(e,t,o,s,f,v,C,S,A,z);function ea(e,t){var o=Pe();try{return Se(e)(t)}catch(s){if(Oe(o),s!==s+0)throw s;xe(1,0)}}function ta(e,t,o,s){var f=Pe();try{Se(e)(t,o,s)}catch(v){if(Oe(f),v!==v+0)throw v;xe(1,0)}}function ra(e,t,o){var s=Pe();try{Se(e)(t,o)}catch(f){if(Oe(s),f!==f+0)throw f;xe(1,0)}}function na(e,t,o,s){var f=Pe();try{return Se(e)(t,o,s)}catch(v){if(Oe(f),v!==v+0)throw v;xe(1,0)}}function oa(e,t,o,s,f){var v=Pe();try{return Se(e)(t,o,s,f)}catch(C){if(Oe(v),C!==C+0)throw C;xe(1,0)}}function aa(e,t){var o=Pe();try{Se(e)(t)}catch(s){if(Oe(o),s!==s+0)throw s;xe(1,0)}}function ia(e,t,o){var s=Pe();try{return Se(e)(t,o)}catch(f){if(Oe(s),f!==f+0)throw f;xe(1,0)}}function sa(e){var t=Pe();try{Se(e)()}catch(o){if(Oe(t),o!==o+0)throw o;xe(1,0)}}function ca(e,t,o,s,f){var v=Pe();try{return Se(e)(t,o,s,f)}catch(C){if(Oe(v),C!==C+0)throw C;xe(1,0)}}function ua(e,t,o,s,f,v,C,S,A,z,G){var ie=Pe();try{Se(e)(t,o,s,f,v,C,S,A,z,G)}catch(se){if(Oe(ie),se!==se+0)throw se;xe(1,0)}}function la(e,t,o,s,f,v,C){var S=Pe();try{return Se(e)(t,o,s,f,v,C)}catch(A){if(Oe(S),A!==A+0)throw A;xe(1,0)}}function da(e,t,o,s,f){var v=Pe();try{Se(e)(t,o,s,f)}catch(C){if(Oe(v),C!==C+0)throw C;xe(1,0)}}function fa(e,t,o,s,f,v){var C=Pe();try{return Se(e)(t,o,s,f,v)}catch(S){if(Oe(C),S!==S+0)throw S;xe(1,0)}}function ha(e,t,o,s,f,v,C,S){var A=Pe();try{return Se(e)(t,o,s,f,v,C,S)}catch(z){if(Oe(A),z!==z+0)throw z;xe(1,0)}}function pa(e,t,o,s){var f=Pe();try{return Se(e)(t,o,s)}catch(v){if(Oe(f),v!==v+0)throw v;xe(1,0)}}function va(e,t,o,s){var f=Pe();try{return Se(e)(t,o,s)}catch(v){if(Oe(f),v!==v+0)throw v;xe(1,0)}}function ga(e){var t=Pe();try{return Se(e)()}catch(o){if(Oe(t),o!==o+0)throw o;xe(1,0)}}function ya(e,t,o,s,f,v,C,S){var A=Pe();try{Se(e)(t,o,s,f,v,C,S)}catch(z){if(Oe(A),z!==z+0)throw z;xe(1,0)}}function ma(e,t,o,s,f,v,C,S,A,z,G,ie){var se=Pe();try{return Se(e)(t,o,s,f,v,C,S,A,z,G,ie)}catch(le){if(Oe(se),le!==le+0)throw le;xe(1,0)}}function wa(e,t,o,s,f,v,C,S,A,z,G,ie,se,le,_e,Te){var Ce=Pe();try{Se(e)(t,o,s,f,v,C,S,A,z,G,ie,se,le,_e,Te)}catch(Ne){if(Oe(Ce),Ne!==Ne+0)throw Ne;xe(1,0)}}function ba(e,t,o,s,f){var v=Pe();try{return Rr(e,t,o,s,f)}catch(C){if(Oe(v),C!==C+0)throw C;xe(1,0)}}var Bt;w=function e(){Bt||Ar(),Bt||(w=e)};function Ar(){if(T>0||(Je(),T>0))return;function e(){Bt||(Bt=!0,i.calledRun=!0,!de&&(ut(),h(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),lt()))}i.setStatus?(i.setStatus("Running..."),setTimeout(function(){setTimeout(function(){i.setStatus("")},1),e()},1)):e()}if(i.preInit)for(typeof i.preInit=="function"&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return Ar(),a.ready}})();function _i(r){return sr(cr,r)}async function Si(r,a){return Ci(cr,r,a)}async function Pi(r,a){return xi(cr,r,a)}var $t;class ar extends EventTarget{constructor(a={}){var i;super(),Xa(this,$t,void 0);try{const h=(i=a==null?void 0:a.formats)==null?void 0:i.filter(m=>m!=="unknown");if((h==null?void 0:h.length)===0)throw new TypeError("Hint option provided, but is empty.");h==null||h.forEach(m=>{if(!Lt.has(m))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${m}' is not a valid enum value of type BarcodeFormat.`)}),Ka(this,$t,h??[]),_i().then(m=>{this.dispatchEvent(new CustomEvent("load",{detail:m}))}).catch(m=>{this.dispatchEvent(new CustomEvent("error",{detail:m}))})}catch(h){throw qr(h,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return Za.filter(a=>a!=="unknown")}async detect(a){try{const i=await ii(a);if(i===null)return[];let h;try{an(i)?h=await Si(i,{tryHarder:!0,formats:Nr(this,$t).map(m=>Lt.get(m))}):h=await Pi(i,{tryHarder:!0,formats:Nr(this,$t).map(m=>Lt.get(m))})}catch(m){throw console.error(m),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return h.map(m=>{const{topLeft:{x:_,y:M},topRight:{x:F,y:P},bottomLeft:{x:B,y:V},bottomRight:{x:W,y:ae}}=m.position,fe=Math.min(_,F,B,W),K=Math.min(M,P,V,ae),de=Math.max(_,F,B,W),re=Math.max(M,P,V,ae);return{boundingBox:new DOMRectReadOnly(fe,K,de-fe,re-K),rawValue:m.text,format:ei(m.format),cornerPoints:[{x:_,y:M},{x:F,y:P},{x:W,y:ae},{x:B,y:V}]}})}catch(i){throw qr(i,"Failed to execute 'detect' on 'BarcodeDetector'")}}}$t=new WeakMap;const ln=(r,a,i="error")=>{let h,m;const _=new Promise((M,F)=>{h=M,m=F,r.addEventListener(a,h),r.addEventListener(i,m)});return _.finally(()=>{r.removeEventListener(a,h),r.removeEventListener(i,m)}),_},Wr=r=>new Promise(a=>setTimeout(a,r));class dn extends Error{constructor(){super("this browser has no Stream API support"),this.name="StreamApiNotSupportedError"}}class Oi extends Error{constructor(){super("camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP."),this.name="InsecureContextError"}}class Ti extends Error{constructor(){super("Loading camera stream timed out after 6 seconds. If you are on iOS in PWA mode, this is a known issue (see https://github.com/gruhn/vue-qrcode-reader/issues/298)"),this.name="StreamLoadTimeoutError"}}const Mi=r=>{let a=!1,i;return(...h)=>(a||(i=r(h),a=!0),i)};function tt(r,a){if(r===!1)throw new Error(a??"assertion failure")}function Hr(r){throw new Error("this code should be unreachable")}function Di(){return navigator.platform.toUpperCase().includes("MAC")}let fn;async function $i(r){if(window.BarcodeDetector===void 0)return console.debug("[vue-qrcode-reader] Native BarcodeDetector not supported. Will use polyfill."),new ar({formats:r});const a=await window.BarcodeDetector.getSupportedFormats(),i=r.filter(h=>!a.includes(h));return i.length>0?(console.debug(`[vue-qrcode-reader] Native BarcodeDetector does not support formats ${JSON.stringify(i)}. Will use polyfill.`),new ar({formats:r})):Di()&&r.includes("pdf417")?(console.debug("[vue-qrcode-reader] Native BarcodeDetector is buggy for PDF417 codes on MacOS. Will use polyfill."),new ar({formats:r})):(console.debug("[vue-qrcode-reader] Will use native BarcodeDetector."),new window.BarcodeDetector({formats:r}))}async function hn(r){fn=await $i(r)}const ki=async(r,{detectHandler:a,locateHandler:i,minDelay:h,formats:m})=>{console.debug("[vue-qrcode-reader] start scanning"),await hn(m);const _=M=>async F=>{if(r.readyState===0)console.debug("[vue-qrcode-reader] stop scanning: video element readyState is 0");else{const{lastScanned:P,contentBefore:B,lastScanHadContent:V}=M;if(F-P!B.includes(de.rawValue));ae&&a(W);const fe=W.length>0;fe&&i(W),!fe&&V&&i(W);const K={lastScanned:F,lastScanHadContent:fe,contentBefore:ae?W.map(de=>de.rawValue):B};window.requestAnimationFrame(_(K))}}};_({lastScanned:performance.now(),contentBefore:[],lastScanHadContent:!1})(performance.now())};var pn={},Ue={};Object.defineProperty(Ue,"__esModule",{value:!0});Ue.compactObject=yn;Ue.deprecated=qi;var Ei=Ue.detectBrowser=Li;Ue.disableLog=Bi;Ue.disableWarnings=Fi;Ue.extractVersion=zt;Ue.filterStats=zi;Ue.log=Ni;Ue.walkStats=Ut;Ue.wrapPeerConnectionEvent=ji;function Ri(r,a,i){return a=Ai(a),a in r?Object.defineProperty(r,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[a]=i,r}function Ai(r){var a=Ii(r,"string");return st(a)==="symbol"?a:String(a)}function Ii(r,a){if(st(r)!=="object"||r===null)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var h=i.call(r,a);if(st(h)!=="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(r)}function st(r){"@babel/helpers - typeof";return st=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},st(r)}var vn=!0,gn=!0;function zt(r,a,i){var h=r.match(a);return h&&h.length>=i&&parseInt(h[i],10)}function ji(r,a,i){if(r.RTCPeerConnection){var h=r.RTCPeerConnection.prototype,m=h.addEventListener;h.addEventListener=function(M,F){if(M!==a)return m.apply(this,arguments);var P=function(B){var V=i(B);V&&(F.handleEvent?F.handleEvent(V):F(V))};return this._eventMap=this._eventMap||{},this._eventMap[a]||(this._eventMap[a]=new Map),this._eventMap[a].set(F,P),m.apply(this,[M,P])};var _=h.removeEventListener;h.removeEventListener=function(M,F){if(M!==a||!this._eventMap||!this._eventMap[a])return _.apply(this,arguments);if(!this._eventMap[a].has(F))return _.apply(this,arguments);var P=this._eventMap[a].get(F);return this._eventMap[a].delete(F),this._eventMap[a].size===0&&delete this._eventMap[a],Object.keys(this._eventMap).length===0&&delete this._eventMap,_.apply(this,[M,P])},Object.defineProperty(h,"on"+a,{get:function(){return this["_on"+a]},set:function(M){this["_on"+a]&&(this.removeEventListener(a,this["_on"+a]),delete this["_on"+a]),M&&this.addEventListener(a,this["_on"+a]=M)},enumerable:!0,configurable:!0})}}function Bi(r){return typeof r!="boolean"?new Error("Argument type: "+st(r)+". Please use a boolean."):(vn=r,r?"adapter.js logging disabled":"adapter.js logging enabled")}function Fi(r){return typeof r!="boolean"?new Error("Argument type: "+st(r)+". Please use a boolean."):(gn=!r,"adapter.js deprecation warnings "+(r?"disabled":"enabled"))}function Ni(){if((typeof window>"u"?"undefined":st(window))==="object"){if(vn)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function qi(r,a){gn&&console.warn(r+" is deprecated, please use "+a+" instead.")}function Li(r){var a={browser:null,version:null};if(typeof r>"u"||!r.navigator||!r.navigator.userAgent)return a.browser="Not a browser.",a;var i=r.navigator;if(i.mozGetUserMedia)a.browser="firefox",a.version=zt(i.userAgent,/Firefox\/(\d+)\./,1);else if(i.webkitGetUserMedia||r.isSecureContext===!1&&r.webkitRTCPeerConnection)a.browser="chrome",a.version=zt(i.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(r.RTCPeerConnection&&i.userAgent.match(/AppleWebKit\/(\d+)\./))a.browser="safari",a.version=zt(i.userAgent,/AppleWebKit\/(\d+)\./,1),a.supportsUnifiedPlan=r.RTCRtpTransceiver&&"currentDirection"in r.RTCRtpTransceiver.prototype;else return a.browser="Not a supported browser.",a;return a}function Vr(r){return Object.prototype.toString.call(r)==="[object Object]"}function yn(r){return Vr(r)?Object.keys(r).reduce(function(a,i){var h=Vr(r[i]),m=h?yn(r[i]):r[i],_=h&&!Object.keys(m).length;return m===void 0||_?a:Object.assign(a,Ri({},i,m))},{}):r}function Ut(r,a,i){!a||i.has(a.id)||(i.set(a.id,a),Object.keys(a).forEach(function(h){h.endsWith("Id")?Ut(r,r.get(a[h]),i):h.endsWith("Ids")&&a[h].forEach(function(m){Ut(r,r.get(m),i)})}))}function zi(r,a,i){var h=i?"outbound-rtp":"inbound-rtp",m=new Map;if(a===null)return m;var _=[];return r.forEach(function(M){M.type==="track"&&M.trackIdentifier===a.id&&_.push(M)}),_.forEach(function(M){r.forEach(function(F){F.type===h&&F.trackId===M.id&&Ut(r,F,m)})}),m}Object.defineProperty(pn,"__esModule",{value:!0});var Ui=pn.shimGetUserMedia=Vi,Wi=Hi(Ue);function mn(r){if(typeof WeakMap!="function")return null;var a=new WeakMap,i=new WeakMap;return(mn=function(h){return h?i:a})(r)}function Hi(r,a){if(r&&r.__esModule)return r;if(r===null||it(r)!=="object"&&typeof r!="function")return{default:r};var i=mn(a);if(i&&i.has(r))return i.get(r);var h={},m=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var _ in r)if(_!=="default"&&Object.prototype.hasOwnProperty.call(r,_)){var M=m?Object.getOwnPropertyDescriptor(r,_):null;M&&(M.get||M.set)?Object.defineProperty(h,_,M):h[_]=r[_]}return h.default=r,i&&i.set(r,h),h}function it(r){"@babel/helpers - typeof";return it=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},it(r)}var Qr=Wi.log;function Vi(r,a){var i=r&&r.navigator;if(i.mediaDevices){var h=function(P){if(it(P)!=="object"||P.mandatory||P.optional)return P;var B={};return Object.keys(P).forEach(function(V){if(!(V==="require"||V==="advanced"||V==="mediaSource")){var W=it(P[V])==="object"?P[V]:{ideal:P[V]};W.exact!==void 0&&typeof W.exact=="number"&&(W.min=W.max=W.exact);var ae=function(K,de){return K?K+de.charAt(0).toUpperCase()+de.slice(1):de==="deviceId"?"sourceId":de};if(W.ideal!==void 0){B.optional=B.optional||[];var fe={};typeof W.ideal=="number"?(fe[ae("min",V)]=W.ideal,B.optional.push(fe),fe={},fe[ae("max",V)]=W.ideal,B.optional.push(fe)):(fe[ae("",V)]=W.ideal,B.optional.push(fe))}W.exact!==void 0&&typeof W.exact!="number"?(B.mandatory=B.mandatory||{},B.mandatory[ae("",V)]=W.exact):["min","max"].forEach(function(K){W[K]!==void 0&&(B.mandatory=B.mandatory||{},B.mandatory[ae(K,V)]=W[K])})}}),P.advanced&&(B.optional=(B.optional||[]).concat(P.advanced)),B},m=function(P,B){if(a.version>=61)return B(P);if(P=JSON.parse(JSON.stringify(P)),P&&it(P.audio)==="object"){var V=function(K,de,re){de in K&&!(re in K)&&(K[re]=K[de],delete K[de])};P=JSON.parse(JSON.stringify(P)),V(P.audio,"autoGainControl","googAutoGainControl"),V(P.audio,"noiseSuppression","googNoiseSuppression"),P.audio=h(P.audio)}if(P&&it(P.video)==="object"){var W=P.video.facingMode;W=W&&(it(W)==="object"?W:{ideal:W});var ae=a.version<66;if(W&&(W.exact==="user"||W.exact==="environment"||W.ideal==="user"||W.ideal==="environment")&&!(i.mediaDevices.getSupportedConstraints&&i.mediaDevices.getSupportedConstraints().facingMode&&!ae)){delete P.video.facingMode;var fe;if(W.exact==="environment"||W.ideal==="environment"?fe=["back","rear"]:(W.exact==="user"||W.ideal==="user")&&(fe=["front"]),fe)return i.mediaDevices.enumerateDevices().then(function(K){K=K.filter(function(re){return re.kind==="videoinput"});var de=K.find(function(re){return fe.some(function(ge){return re.label.toLowerCase().includes(ge)})});return!de&&K.length&&fe.includes("back")&&(de=K[K.length-1]),de&&(P.video.deviceId=W.exact?{exact:de.deviceId}:{ideal:de.deviceId}),P.video=h(P.video),Qr("chrome: "+JSON.stringify(P)),B(P)})}P.video=h(P.video)}return Qr("chrome: "+JSON.stringify(P)),B(P)},_=function(P){return a.version>=64?P:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[P.name]||P.name,message:P.message,constraint:P.constraint||P.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}},M=function(P,B,V){m(P,function(W){i.webkitGetUserMedia(W,B,function(ae){V&&V(_(ae))})})};if(i.getUserMedia=M.bind(i),i.mediaDevices.getUserMedia){var F=i.mediaDevices.getUserMedia.bind(i.mediaDevices);i.mediaDevices.getUserMedia=function(P){return m(P,function(B){return F(B).then(function(V){if(B.audio&&!V.getAudioTracks().length||B.video&&!V.getVideoTracks().length)throw V.getTracks().forEach(function(W){W.stop()}),new DOMException("","NotFoundError");return V},function(V){return Promise.reject(_(V))})})}}}}var wn={};Object.defineProperty(wn,"__esModule",{value:!0});var Qi=wn.shimGetUserMedia=Ji,Gi=Yi(Ue);function bn(r){if(typeof WeakMap!="function")return null;var a=new WeakMap,i=new WeakMap;return(bn=function(h){return h?i:a})(r)}function Yi(r,a){if(r&&r.__esModule)return r;if(r===null||mt(r)!=="object"&&typeof r!="function")return{default:r};var i=bn(a);if(i&&i.has(r))return i.get(r);var h={},m=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var _ in r)if(_!=="default"&&Object.prototype.hasOwnProperty.call(r,_)){var M=m?Object.getOwnPropertyDescriptor(r,_):null;M&&(M.get||M.set)?Object.defineProperty(h,_,M):h[_]=r[_]}return h.default=r,i&&i.set(r,h),h}function mt(r){"@babel/helpers - typeof";return mt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},mt(r)}function Ji(r,a){var i=r&&r.navigator,h=r&&r.MediaStreamTrack;if(i.getUserMedia=function(P,B,V){Gi.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),i.mediaDevices.getUserMedia(P).then(B,V)},!(a.version>55&&"autoGainControl"in i.mediaDevices.getSupportedConstraints())){var m=function(P,B,V){B in P&&!(V in P)&&(P[V]=P[B],delete P[B])},_=i.mediaDevices.getUserMedia.bind(i.mediaDevices);if(i.mediaDevices.getUserMedia=function(P){return mt(P)==="object"&&mt(P.audio)==="object"&&(P=JSON.parse(JSON.stringify(P)),m(P.audio,"autoGainControl","mozAutoGainControl"),m(P.audio,"noiseSuppression","mozNoiseSuppression")),_(P)},h&&h.prototype.getSettings){var M=h.prototype.getSettings;h.prototype.getSettings=function(){var P=M.apply(this,arguments);return m(P,"mozAutoGainControl","autoGainControl"),m(P,"mozNoiseSuppression","noiseSuppression"),P}}if(h&&h.prototype.applyConstraints){var F=h.prototype.applyConstraints;h.prototype.applyConstraints=function(P){return this.kind==="audio"&&mt(P)==="object"&&(P=JSON.parse(JSON.stringify(P)),m(P,"autoGainControl","mozAutoGainControl"),m(P,"noiseSuppression","mozNoiseSuppression")),F.apply(this,[P])}}}}var rt={};Object.defineProperty(rt,"__esModule",{value:!0});rt.shimAudioContext=is;rt.shimCallbacksAPI=ts;rt.shimConstraints=_n;rt.shimCreateOfferLegacy=as;var Xi=rt.shimGetUserMedia=rs;rt.shimLocalStreamsAPI=Zi;rt.shimRTCIceServerUrls=ns;rt.shimRemoteStreamsAPI=es;rt.shimTrackEventTransceiver=os;var Cn=Ki(Ue);function xn(r){if(typeof WeakMap!="function")return null;var a=new WeakMap,i=new WeakMap;return(xn=function(h){return h?i:a})(r)}function Ki(r,a){if(r&&r.__esModule)return r;if(r===null||ct(r)!=="object"&&typeof r!="function")return{default:r};var i=xn(a);if(i&&i.has(r))return i.get(r);var h={},m=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var _ in r)if(_!=="default"&&Object.prototype.hasOwnProperty.call(r,_)){var M=m?Object.getOwnPropertyDescriptor(r,_):null;M&&(M.get||M.set)?Object.defineProperty(h,_,M):h[_]=r[_]}return h.default=r,i&&i.set(r,h),h}function ct(r){"@babel/helpers - typeof";return ct=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},ct(r)}function Zi(r){if(!(ct(r)!=="object"||!r.RTCPeerConnection)){if("getLocalStreams"in r.RTCPeerConnection.prototype||(r.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in r.RTCPeerConnection.prototype)){var a=r.RTCPeerConnection.prototype.addTrack;r.RTCPeerConnection.prototype.addStream=function(i){var h=this;this._localStreams||(this._localStreams=[]),this._localStreams.includes(i)||this._localStreams.push(i),i.getAudioTracks().forEach(function(m){return a.call(h,m,i)}),i.getVideoTracks().forEach(function(m){return a.call(h,m,i)})},r.RTCPeerConnection.prototype.addTrack=function(i){for(var h=this,m=arguments.length,_=new Array(m>1?m-1:0),M=1;M=0)){i._remoteStreams.push(m);var _=new Event("addstream");_.stream=m,i.dispatchEvent(_)}})}),a.apply(i,arguments)}}}function ts(r){if(!(ct(r)!=="object"||!r.RTCPeerConnection)){var a=r.RTCPeerConnection.prototype,i=a.createOffer,h=a.createAnswer,m=a.setLocalDescription,_=a.setRemoteDescription,M=a.addIceCandidate;a.createOffer=function(P,B){var V=arguments.length>=2?arguments[2]:arguments[0],W=i.apply(this,[V]);return B?(W.then(P,B),Promise.resolve()):W},a.createAnswer=function(P,B){var V=arguments.length>=2?arguments[2]:arguments[0],W=h.apply(this,[V]);return B?(W.then(P,B),Promise.resolve()):W};var F=function(P,B,V){var W=m.apply(this,[P]);return V?(W.then(B,V),Promise.resolve()):W};a.setLocalDescription=F,F=function(P,B,V){var W=_.apply(this,[P]);return V?(W.then(B,V),Promise.resolve()):W},a.setRemoteDescription=F,F=function(P,B,V){var W=M.apply(this,[P]);return V?(W.then(B,V),Promise.resolve()):W},a.addIceCandidate=F}}function rs(r){var a=r&&r.navigator;if(a.mediaDevices&&a.mediaDevices.getUserMedia){var i=a.mediaDevices,h=i.getUserMedia.bind(i);a.mediaDevices.getUserMedia=function(m){return h(_n(m))}}!a.getUserMedia&&a.mediaDevices&&a.mediaDevices.getUserMedia&&(a.getUserMedia=(function(m,_,M){a.mediaDevices.getUserMedia(m).then(_,M)}).bind(a))}function _n(r){return r&&r.video!==void 0?Object.assign({},r,{video:Cn.compactObject(r.video)}):r}function ns(r){if(r.RTCPeerConnection){var a=r.RTCPeerConnection;r.RTCPeerConnection=function(i,h){if(i&&i.iceServers){for(var m=[],_=0;_{const r=Ei(window);switch(r.browser){case"chrome":Ui(window,r);break;case"firefox":Qi(window,r);break;case"safari":Xi(window,r);break;default:throw new dn}});let wt=Promise.resolve({type:"stop",data:{}});async function Gr(r,a,i){var h,m,_;if(console.debug("[vue-qrcode-reader] starting camera with constraints: ",JSON.stringify(a)),window.isSecureContext!==!0)throw new Oi;if(((h=navigator==null?void 0:navigator.mediaDevices)==null?void 0:h.getUserMedia)===void 0)throw new dn;ss(),console.debug("[vue-qrcode-reader] calling getUserMedia");const M=await navigator.mediaDevices.getUserMedia({audio:!1,video:a});r.srcObject!==void 0?r.srcObject=M:r.mozSrcObject!==void 0?r.mozSrcObject=M:window.URL.createObjectURL?r.src=window.URL.createObjectURL(M):window.webkitURL?r.src=window.webkitURL.createObjectURL(M):r.src=M.id,r.play(),console.debug("[vue-qrcode-reader] waiting for video element to load"),await Promise.race([ln(r,"loadeddata"),Wr(6e3).then(()=>{throw new Ti})]),console.debug("[vue-qrcode-reader] video element loaded"),await Wr(500);const[F]=M.getVideoTracks(),P=(_=(m=F==null?void 0:F.getCapabilities)==null?void 0:m.call(F))!=null?_:{};let B=!1;return i&&P.torch&&(await F.applyConstraints({advanced:[{torch:!0}]}),B=!0),console.debug("[vue-qrcode-reader] camera ready"),{type:"start",data:{videoEl:r,stream:M,capabilities:P,constraints:a,isTorchOn:B}}}async function cs(r,{constraints:a,torch:i,restart:h=!1}){wt=wt.then(_=>{if(_.type==="start"){const{data:{videoEl:M,stream:F,constraints:P,isTorchOn:B}}=_;return!h&&r===M&&a===P&&i===B?_:Sn(M,F,B).then(()=>Gr(r,a,i))}else if(_.type==="stop"||_.type==="failed")return Gr(r,a,i);Hr()}).catch(_=>(console.debug(`[vue-qrcode-reader] starting camera failed with "${_}"`),{type:"failed",error:_}));const m=await wt;if(m.type==="stop")throw new Error("Something went wrong with the camera task queue (start task).");if(m.type==="failed")throw m.error;if(m.type==="start")return m.data.capabilities;Hr()}async function Sn(r,a,i){console.debug("[vue-qrcode-reader] stopping camera"),r.src="",r.srcObject=null,r.load(),await ln(r,"error");for(const h of a.getTracks())i!=null||await h.applyConstraints({advanced:[{torch:!1}]}),a.removeTrack(h),h.stop();return{type:"stop",data:{}}}async function qt(){if(wt=wt.then(r=>{if(r.type==="stop"||r.type==="failed")return r;const{data:{videoEl:a,stream:i,isTorchOn:h}}=r;return Sn(a,i,h)}),(await wt).type==="start")throw new Error("Something went wrong with the camera task queue (stop task).")}const us=Pa({__name:"QrcodeStream",props:{constraints:{default:()=>({facingMode:"environment"})},formats:{default:()=>["qr_code"]},paused:{type:Boolean,default:!1},torch:{type:Boolean,default:!1},track:{type:Function,default:void 0}},emits:["detect","camera-on","camera-off","error"],setup(r,{emit:a}){const i=r,h=a,m=dt(i.constraints),_=dt(i.formats);Dt(()=>i.constraints,(he,Z)=>{JSON.stringify(he)!==JSON.stringify(Z)&&(m.value=he)},{deep:!0}),Dt(()=>i.formats,(he,Z)=>{JSON.stringify(he)!==JSON.stringify(Z)&&(_.value=he)},{deep:!0});const M=dt(),F=dt(),P=dt(),B=dt(!1),V=dt(!1);Oa(()=>{V.value=!0}),Ta(()=>{qt()});const W=or(()=>({torch:i.torch,constraints:m.value,shouldStream:V.value&&!i.paused}));Dt(W,async he=>{const Z=P.value;tt(Z!==void 0,"cameraSettings watcher should never be triggered when component is not mounted. Thus video element should always be defined.");const oe=M.value;tt(oe!==void 0,"cameraSettings watcher should never be triggered when component is not mounted. Thus canvas should always be defined.");const We=oe.getContext("2d");if(tt(We!==null,"if cavnas is defined, canvas 2d context should also be non-null"),he.shouldStream){qt(),B.value=!1;try{const qe=await cs(Z,he);V.value?(B.value=!0,h("camera-on",qe)):await qt()}catch(qe){h("error",qe)}}else oe.width=Z.videoWidth,oe.height=Z.videoHeight,We.drawImage(Z,0,0,Z.videoWidth,Z.videoHeight),qt(),B.value=!1,h("camera-off")},{deep:!0}),Dt(_,async he=>{V.value&&await hn(he)});const ae=or(()=>W.value.shouldStream&&B.value);Dt(ae,he=>{if(he){tt(M.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus pause frame canvas is defined"),fe(M.value),tt(F.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus tracking canvas is defined"),fe(F.value);const Z=()=>i.track===void 0?500:40;tt(P.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus video element is defined"),ki(P.value,{detectHandler:oe=>h("detect",oe),formats:_.value,locateHandler:K,minDelay:Z()})}});const fe=he=>{const Z=he.getContext("2d");tt(Z!==null,"canvas 2d context should always be non-null"),Z.clearRect(0,0,he.width,he.height)},K=he=>{const Z=F.value;tt(Z!==void 0,"onLocate handler should only be called when component is mounted. Thus tracking canvas is always defined.");const oe=P.value;if(tt(oe!==void 0,"onLocate handler should only be called when component is mounted. Thus video element is always defined."),he.length===0||i.track===void 0)fe(Z);else{const We=oe.offsetWidth,qe=oe.offsetHeight,He=oe.videoWidth,Ge=oe.videoHeight,ke=Math.max(We/He,qe/Ge),Ve=He*ke,Je=Ge*ke,ut=Ve/He,lt=Je/Ge,R=(We-Ve)/2,k=(qe-Je)/2,E=({x:n,y:c})=>({x:Math.floor(n*ut),y:Math.floor(c*lt)}),T=({x:n,y:c})=>({x:Math.floor(n+R),y:Math.floor(c+k)}),w=he.map(n=>{const{boundingBox:c,cornerPoints:u}=n,{x:l,y:g}=T(E({x:c.x,y:c.y})),{x,y:q}=E({x:c.width,y:c.height});return{...n,cornerPoints:u.map(I=>T(E(I))),boundingBox:DOMRectReadOnly.fromRect({x:l,y:g,width:x,height:q})}});Z.width=oe.offsetWidth,Z.height=oe.offsetHeight;const d=Z.getContext("2d");tt(d!==null,"canvas 2d context should always be non-null"),i.track(w,d)}},de={width:"100%",height:"100%",position:"relative","z-index":"0"},re={width:"100%",height:"100%",position:"absolute",top:"0",left:"0"},ge={width:"100%",height:"100%","object-fit":"cover"},$e=or(()=>ae.value?ge:{...ge,visibility:"hidden",position:"absolute"});return(he,Z)=>(yt(),gt("div",{style:de},[Ie("video",{ref_key:"videoRef",ref:P,style:Da($e.value),autoplay:"",muted:"",playsinline:""},null,4),Ma(Ie("canvas",{id:"qrcode-stream-pause-frame",ref_key:"pauseFrameRef",ref:M,style:ge},null,512),[[$a,!ae.value]]),Ie("canvas",{id:"qrcode-stream-tracking-layer",ref_key:"trackingLayerRef",ref:F,style:re},null,512),Ie("div",{style:re},[ka(he.$slots,"default")])]))}});var ls=Object.getOwnPropertyDescriptor,ds=(r,a,i,h)=>{for(var m=h>1?void 0:h?ls(a,i):a,_=r.length-1,M;_>=0;_--)(M=r[_])&&(m=M(m)||m);return m};let ir=class extends Ea{constructor(){super(...arguments);et(this,"$notify");et(this,"$router");et(this,"activeDid","");et(this,"apiServer","");et(this,"givenName","");et(this,"hideRegisterPromptOnNewContact",!1);et(this,"isRegistered",!1);et(this,"qrValue","");et(this,"ETHR_DID_PREFIX",La)}async created(){const a=await Ra();this.activeDid=a.activeDid||"",this.apiServer=a.apiServer||"",this.givenName=a.firstName||"",this.hideRegisterPromptOnNewContact=!!a.hideRegisterPromptOnNewContact,this.isRegistered=!!a.isRegistered;const i=await za(this.activeDid);if(i){const h=(a.firstName||"")+(a.lastName?` ${a.lastName}`:"");this.qrValue=await Ua(i,!!a.isRegistered,h,a.profileImageUrl,!1)}}danger(a,i="Error",h=5e3){this.$notify({group:"alert",type:"danger",title:i,text:a},h)}async onScanDetect(a){var h;const i=(h=a[0])==null?void 0:h.rawValue;if(i){let m;try{const _=Wa(i);if(!_){this.$notify({group:"alert",type:"danger",title:"No Contact Info",text:"The contact info could not be parsed."},3e3);return}const{payload:M}=Ha(_);if(m={did:M.own.did||M.iss,name:M.own.name,nextPubKeyHashB64:M.own.nextPublicEncKeyHash,profileImageUrl:M.own.profileImageUrl,publicKeyBase64:M.own.publicEncKey,registered:M.own.registered},!m.did){this.danger("There is no DID.","Incomplete Contact");return}if(!Va(m.did)){this.danger("The DID must begin with 'did:'","Invalid DID");return}}catch(_){console.error("Error parsing QR info:",_),this.danger("Could not parse the QR info.","Read Error");return}try{await ht.open(),await ht.contacts.add(m);let _;this.activeDid?(await this.setVisibility(m,!0),m.seesMe=!0,_="They were added, and your activity is visible to them."):_="They were added.",this.$notify({group:"alert",type:"success",title:"Contact Added",text:_},3e3),this.isRegistered&&!this.hideRegisterPromptOnNewContact&&!m.registered&&setTimeout(()=>{this.$notify({group:"modal",type:"confirm",title:"Register",text:"Do you want to register them?",onCancel:async M=>{M&&(await ht.settings.update(Br,{hideRegisterPromptOnNewContact:M}),this.hideRegisterPromptOnNewContact=M)},onNo:async M=>{M&&(await ht.settings.update(Br,{hideRegisterPromptOnNewContact:M}),this.hideRegisterPromptOnNewContact=M)},onYes:async()=>{await this.register(m)},promptToStopAsking:!0},-1)},500)}catch(_){console.error("Error saving contact info:",_),this.$notify({group:"alert",type:"danger",title:"Contact Error",text:"Could not save contact info. Check if it already exists."},5e3)}}else this.$notify({group:"alert",type:"danger",title:"Invalid Contact QR Code",text:"No QR code detected with contact information."},5e3)}async setVisibility(a,i){const h=await Qa(this.activeDid,this.apiServer,this.axios,ht,a,i);h.error?this.danger(h.error,"Error Setting Visibility"):h.success||console.error("Got strange result from setting visibility:",h)}async register(a){var i,h,m;this.$notify({group:"alert",type:"toast",text:"",title:"Registration submitted..."},1e3);try{const _=await Ga(this.activeDid,this.apiServer,this.axios,a);_.success?(a.registered=!0,ht.contacts.update(a.did,{registered:!0}),this.$notify({group:"alert",type:"success",title:"Registration Success",text:(a.name||"That unnamed person")+" has been registered."},5e3)):this.$notify({group:"alert",type:"danger",title:"Registration Error",text:_.error||"Something went wrong during registration."},5e3)}catch(_){console.error("Error when registering:",_);let M="There was an error.";const F=_;F?(m=(h=(i=F.response)==null?void 0:i.data)==null?void 0:h.error)!=null&&m.message?M=F.response.data.error.message:F.message?M=F.message:M=JSON.stringify(F.toJSON()):M=_,this.$notify({group:"alert",type:"danger",title:"Registration Error",text:M},5e3)}}onScanError(a){console.error("Scan was invalid:",a),this.$notify({group:"alert",type:"danger",title:"Invalid Scan",text:"The scan was invalid."},5e3)}onCopyUrlToClipboard(){Fr().copy(this.qrValue).then(()=>{this.$notify({group:"alert",type:"toast",title:"Copied",text:"Contact URL was copied to clipboard."},2e3)})}onCopyDidToClipboard(){Fr().copy(this.activeDid).then(()=>{this.$notify({group:"alert",type:"info",title:"Copied",text:"Your DID was copied to the clipboard. Have them paste it in the box on their 'People' screen to add you."},5e3)})}};ir=ds([Aa({components:{QrcodeStream:us,QRCodeVue3:Ja,QuickNav:Na,UserNameDialog:qa}})],ir);const fs={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},hs={class:"mb-8"},ps={class:"text-lg text-center font-light relative px-7"},vs={key:0,class:"bg-amber-200 rounded-md overflow-hidden text-center px-4 py-3 mb-4"},gs={key:1,class:"text-center"},ys={key:2,class:"text-center"},ms={class:"text-center"};function ws(r,a,i,h,m,_){const M=vt("QuickNav"),F=vt("font-awesome"),P=vt("UserNameDialog"),B=vt("QRCodeVue3"),V=vt("router-link"),W=vt("qrcode-stream");return yt(),gt(Fa,null,[pt(M,{selected:"Profile"}),Ie("section",fs,[Ie("div",hs,[Ie("div",ps,[Ie("h1",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:a[0]||(a[0]=ae=>r.$router.back())},[pt(F,{icon:"chevron-left",class:"fa-fw"})])]),a[7]||(a[7]=Ie("h1",{id:"ViewHeading",class:"text-4xl text-center font-light pt-4"}," Your Contact Info ",-1)),r.givenName?ja("",!0):(yt(),gt("p",vs,[a[4]||(a[4]=Ie("span",{class:"text-red"},"Beware!",-1)),a[5]||(a[5]=Nt(" You aren't sharing your name, so quickly ")),a[6]||(a[6]=Ie("br",null,null,-1)),Ie("span",{class:"bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-1 rounded-md",onClick:a[1]||(a[1]=()=>r.$refs.userNameDialog.open(ae=>r.givenName=ae))}," click here to set it for them. ")]))]),pt(P,{ref:"userNameDialog"},null,512),r.activeDid&&r.activeDid.startsWith(r.ETHR_DID_PREFIX)?(yt(),gt("div",{key:0,class:"text-center",onClick:a[2]||(a[2]=ae=>r.onCopyUrlToClipboard())},[pt(B,{value:r.qrValue,"corners-square-options":{type:"extra-rounded"},"dots-options":{type:"square"},class:"flex justify-center"},null,8,["value"]),a[8]||(a[8]=Ie("span",null," Click the QR code to copy your contact info to your clipboard. ",-1))])):r.activeDid?(yt(),gt("div",gs,[Ie("span",{class:"text-blue-500",onClick:a[3]||(a[3]=ae=>r.onCopyDidToClipboard())}," Click here to copy your DID to your clipboard. "),a[9]||(a[9]=Ie("span",null," Then give it to them so they can paste it in their list of People. ",-1))])):(yt(),gt("div",ys,[a[11]||(a[11]=Nt(" You have no identitifiers yet, so ")),pt(V,{to:{name:"start"},class:"bg-blue-500 text-white px-1.5 py-1 rounded-md"},{default:Ba(()=>a[10]||(a[10]=[Nt(" create your identifier. ")])),_:1}),a[12]||(a[12]=Ie("br",null,null,-1)),a[13]||(a[13]=Nt(" If you don't that first, these contacts won't see your activity. "))])),Ie("div",ms,[a[14]||(a[14]=Ie("h1",{class:"text-4xl text-center font-light pt-6"},"Scan Contact Info",-1)),pt(W,{onDetect:r.onScanDetect,onError:r.onScanError},null,8,["onDetect","onError"]),a[15]||(a[15]=Ie("span",null," If you do not see a scanning camera window here, check your camera permissions. ",-1))])])],64)}const Ms=Ia(ir,[["render",ws]]);export{Ms as default}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ContactScanView-C0FSjMaw.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ContactScanView-C0FSjMaw.js deleted file mode 100644 index ab7b7a5..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ContactScanView-C0FSjMaw.js +++ /dev/null @@ -1 +0,0 @@ -import{V as p,C as u,_ as m,h,k as c,J as w,j as n,n as v,w as x,z as i,B as f}from"./main.common-DD7dqhZp.js";import"./index-BGoTPXII.js";var _=Object.getOwnPropertyDescriptor,g=(o,t,d,r)=>{for(var e=r>1?void 0:r?_(t,d):t,s=o.length-1,a;s>=0;s--)(a=o[s])&&(e=a(e)||e);return e};let l=class extends p{};l=g([u({components:{}})],l);const k={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},C={id:"ViewBreadcrumb",class:"mb-8"},y={class:"text-lg text-center font-light relative px-7"};function V(o,t,d,r,e,s){const a=i("font-awesome"),b=i("router-link");return f(),h("section",k,[c("div",C,[c("h1",y,[n(b,{to:{name:"account"},class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1"},{default:x(()=>[n(a,{icon:"chevron-left",class:"fa-fw"})]),_:1}),t[0]||(t[0]=v(" Scan Contact "))])]),t[1]||(t[1]=w('

Scan a QR Code…

…or Enter Contact Data

',7))])}const $=m(l,[["render",V]]);export{$ as default}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ContactsView-CiB3UJEn.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ContactsView-CiB3UJEn.js deleted file mode 100644 index 714627f..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ContactsView-CiB3UJEn.js +++ /dev/null @@ -1 +0,0 @@ -var H=Object.defineProperty;var V=(s,r,e)=>r in s?H(s,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[r]=e;var u=(s,r,e)=>V(s,typeof r!="symbol"?r+"":r,e);import{l as j,K as I,R as L,g as M,e as x,T as J,L as E,U as F,V as Y,W as A,b as G,P as W,Q as q,M as z,X as R,Y as Q,H as U}from"./index-ryzpKtgI.js";import{V as X,A as B,d as k,e as Z,u as ee,l as T,W as $,H as te,C as se,_ as oe,h as f,j as m,k as c,m as b,o as ie,w as N,s as ne,S as P,t as _,n as D,x as re,F as K,E as ae,z as S,B as p}from"./main.common-DD7dqhZp.js";import{u as de}from"./index-CZnn7ED5.js";import{Q as le}from"./QuickNav-C8jPGtUY.js";import{E as ce}from"./EntityIcon-DciUb57i.js";import{G as he}from"./GiftedDialog-DmRkVexW.js";import{O as ue}from"./OfferDialog-DDi7ax_Z.js";import{C as me}from"./ContactNameDialog-B32CzJRA.js";import{T as ge}from"./TopMessage-ZWDDjman.js";import{s as fe}from"./sort-DzTCGCnH.js";import"./_isString-B7bbuhPA.js";import"./index-BGoTPXII.js";var pe=Object.getOwnPropertyDescriptor,ye=(s,r,e,o)=>{for(var t=o>1?void 0:o?pe(r,e):r,i=s.length-1,n;i>=0;i--)(n=s[i])&&(t=n(t)||t);return t};let O=class extends X{constructor(){super(...arguments);u(this,"$notify");u(this,"$route");u(this,"$router");u(this,"activeDid","");u(this,"apiServer","");u(this,"contacts",[]);u(this,"contactInput","");u(this,"contactEdit",null);u(this,"contactNewName","");u(this,"contactsSelected",[]);u(this,"givenByMeDescriptions",{});u(this,"givenByMeConfirmed",{});u(this,"givenByMeUnconfirmed",{});u(this,"givenToMeDescriptions",{});u(this,"givenToMeConfirmed",{});u(this,"givenToMeUnconfirmed",{});u(this,"hideRegisterPromptOnNewContact",!1);u(this,"isRegistered",!1);u(this,"showDidCopy",!1);u(this,"showPubKeyCopy",!1);u(this,"showPubKeyHashCopy",!1);u(this,"showGiveNumbers",!1);u(this,"showGiveTotals",!0);u(this,"showGiveConfirmed",!0);u(this,"showLargeIdenticon");u(this,"AppString",B);u(this,"libsUtil",j)}async created(){await k.open();const e=await Z();this.activeDid=e.activeDid||"",this.apiServer=e.apiServer||"",this.isRegistered=!!e.isRegistered,await this.processContactJwt(),await this.processInviteJwt(),this.showGiveNumbers=!!e.showContactGivesInline,this.hideRegisterPromptOnNewContact=!!e.hideRegisterPromptOnNewContact,this.showGiveNumbers&&this.loadGives();const o=await k.contacts.toArray();this.contacts=o.sort((t,i)=>(t.name||"").localeCompare(i.name||""))}async processContactJwt(){const e=this.$route.query.contactJwt;if(e){const{payload:o}=I(e),t=o.own,i={did:t.did||o.iss,name:t.name,nextPubKeyHashB64:t.nextPublicEncKeyHash,profileImageUrl:t.profileImageUrl,publicKeyBase64:t.publicEncKey,registered:t.registered};await this.addContact(i),this.$router.push({path:"/contacts"})}}async processInviteJwt(){const e=this.$route.query.inviteJwt;if(e==="")this.$notify({group:"alert",type:"danger",title:"Blank Invite",text:"The invite was not included, which can happen when your iOS device cuts off the link. Try pasting the full link into a browser."},7e3);else if(e){this.activeDid||(this.activeDid=await L());const o=await M(this.activeDid);try{const t=await this.axios.post(this.apiServer+"/api/v2/claim",{jwtEncoded:e},{headers:o});if(t.status!=201)throw{error:{response:t}};await ee(this.activeDid,{isRegistered:!0}),this.isRegistered=!0,this.$notify({group:"alert",type:"success",title:"Registered",text:"You are now registered."},3e3),await new Promise(a=>setTimeout(a,1e3));const n=I(e).payload;this.$refs.contactNameDialog.open("Who Invited You?","",async a=>{await this.addContact({did:n.vc.credentialSubject.agent.identifier,name:a,registered:!0}),await new Promise(h=>setTimeout(h,1e3)),this.showOnboardingInfo()},async()=>{await this.addContact({did:n.vc.credentialSubject.agent.identifier,name:"(person who invited you)",registered:!0}),await new Promise(a=>setTimeout(a,1e3)),this.showOnboardingInfo()})}catch(t){const i="Error redeeming invite: "+x(t);T(i,!0);let n="Got an error sending the invite.";t.response&&t.response.data&&t.response.data.error?t.response.data.error.message?n=t.response.data.error.message:n=t.response.data.error:t.message&&(n=t.message),this.$notify({group:"alert",type:"danger",title:"Error with Invite",text:n},5e3)}this.$router.push({path:"/contacts"})}}contactNameNonBreakingSpace(e){return(e||B.NO_CONTACT_NAME).replace(/\s/g," ")}danger(e,o="Error",t=5e3){this.$notify({group:"alert",type:"danger",title:o,text:e},t)}warning(e,o="Error",t=5e3){this.$notify({group:"alert",type:"warning",title:o,text:e},t)}showOnboardingInfo(){this.$notify({group:"modal",type:"confirm",title:"They're Added To Your List",text:"Would you like to go to the main page now?",onYes:async()=>{this.$router.push({name:"home"})}},-1)}filteredContacts(){return this.showGiveNumbers?this.contactsSelected.length===0?this.contacts:this.contacts.filter(e=>this.contactsSelected.includes(e.did)):this.contacts}async loadGives(){if(!this.activeDid)return;const e=(o,t,i,n,a)=>{if(o.status===200){const h=o.data.data;for(const l of h){const y=a?l.recipientDid:l.agentDid;if(l.unit==="HUR"){if(l.amountConfirmed){const g=i[y]||0;i[y]=g+l.amount}else{const g=n[y]||0;n[y]=g+l.amount}!t[y]&&l.description&&(t[y]=l.description)}}}else console.error("Got bad response status & data of",o.status,o.data),this.$notify({group:"alert",type:"danger",title:"Retrieval Error",text:"Got an error retrieving your "+(a?"given":"received")+" data from the server."},3e3)};try{const o=await M(this.activeDid,this.$notify),t=this.apiServer+"/api/v2/report/gives?agentDid="+encodeURIComponent(this.activeDid),i=this.apiServer+"/api/v2/report/gives?recipientDid="+encodeURIComponent(this.activeDid),[n,a]=await Promise.all([this.axios.get(t,{headers:o}),this.axios.get(i,{headers:o})]),h={},l={},y={};e(n,h,l,y,!0),this.givenByMeDescriptions=h,this.givenByMeConfirmed=l,this.givenByMeUnconfirmed=y;const g={},w={},v={};e(a,g,w,v,!1),this.givenToMeDescriptions=g,this.givenToMeConfirmed=w,this.givenToMeUnconfirmed=v}catch(o){const t="Error loading gives: "+x(o);T(t,!0),this.$notify({group:"alert",type:"danger",title:"Load Error",text:"Got an error loading your gives."},3e3)}}async onClickNewContact(){const e=this.contactInput.trim();if(!e){this.danger("There was no contact info to add. Try the other green buttons.","No Contact");return}if(e.includes(J)){const o=E(e);this.$router.push({path:"/contact-import/"+o});return}if(e.includes(F)||e.includes(Y)){const o=E(e),{payload:t}=I(o),i=t.own,n={did:i.did||t.iss,name:i.name,nextPubKeyHashB64:i.nextPublicEncKeyHash,profileImageUrl:i.profileImageUrl,publicKeyBase64:i.publicEncKey,registered:i.registered};await this.addContact(n);return}if(e.startsWith(A)){const o=e.split(/\n/),t=[];for(const n of o)!n.trim()||n.startsWith(A)||t.push(this.addContactFromEndorserMobileLine(n));try{await Promise.all(t),this.$notify({group:"alert",type:"success",title:"Contacts Added",text:"Each contact was added. Nothing was sent to the server."},3e3)}catch(n){const a="Error adding contacts from CSV: "+x(n);T(a,!0),this.danger("An error occurred. Some contacts may have been added.")}const i=await k.contacts.toArray();this.contacts=i.sort((n,a)=>(n.name||"").localeCompare(a.name||""));return}if(e.startsWith("did:")){let o=e,t,i,n;const a=e.indexOf(",");if(a>-1){o=e.substring(0,a).trim(),t=e.substring(a+1).trim();const g=e.indexOf(",",a+1);if(g>-1){t=e.substring(a+1,g).trim(),i=e.substring(g+1).trim();const w=e.indexOf(",",g+1);w>-1&&(i=e.substring(g+1,w).trim(),n=e.substring(w+1).trim())}}let h=i;h&&/^[0-9A-Fa-f]{66}$/i.test(h)&&(h=G.Buffer.from(h,"hex").toString("base64"));let l=n;l&&/^[0-9A-Fa-f]{66}$/i.test(l)&&(l=G.Buffer.from(l,"hex").toString("base64"));const y={did:o,name:t,publicKeyBase64:h,nextPubKeyHashB64:l};await this.addContact(y);return}if(e.includes("[")){const o=e.substring(e.indexOf("["),e.lastIndexOf("]")+1);try{const t=JSON.parse(o);this.$router.push({name:"contact-import",query:{contacts:JSON.stringify(t)}})}catch(t){const i="Error adding contacts from array: "+x(t);T(i,!0),this.danger("The input could not be parsed.","Invalid Contact List")}return}this.danger("No contact info was found in that input.","No Contact Info")}async addContactFromEndorserMobileLine(e){let o=e,t="",i,n,a;const h=e.indexOf(",");if(h>-1){o=e.substring(0,h).trim(),t=e.substring(h+1).trim();const g=e.indexOf(",",h+1);if(g>-1){t=e.substring(h+1,g).trim(),i=e.substring(g+1).trim();const w=e.indexOf(",",g+1);if(w>-1){i=e.substring(g+1,w).trim(),n=e.substring(w+1).trim()=="true";const v=e.indexOf(",",w+1);v>-1&&(n=e.substring(w+1,v).trim()=="true",a=e.substring(v+1).trim()=="true")}}}let l=i;l&&/^[0-9A-Fa-f]{66}$/i.test(l)&&(l=G.Buffer.from(l,"hex").toString("base64"));const y={did:t,name:o,publicKeyBase64:l,seesMe:n,registered:a};return k.contacts.add(y)}async addContact(e){if(!e.did){this.danger("Cannot add a contact without a DID.","Incomplete Contact");return}if(!W(e.did)){this.danger("The DID must begin with 'did:'","Invalid DID");return}return k.contacts.add(e).then(()=>{const o=this.contacts.concat([e]);this.contacts=fe((i,n)=>(i.name||"").localeCompare(n.name||""),o);let t;this.activeDid?(this.setVisibility(e,!0,!1),e.seesMe=!0,t="They were added, and your activity is visible to them."):t="They were added.",this.contactInput="",this.isRegistered&&!this.hideRegisterPromptOnNewContact&&!e.registered&&setTimeout(()=>{this.$notify({group:"modal",type:"confirm",title:"Register",text:"Do you want to register them?",onCancel:async i=>{i&&(await $({hideRegisterPromptOnNewContact:i}),this.hideRegisterPromptOnNewContact=i)},onNo:async i=>{i&&(await $({hideRegisterPromptOnNewContact:i}),this.hideRegisterPromptOnNewContact=i)},onYes:async()=>{await this.register(e)},promptToStopAsking:!0},-1)},1e3),this.$notify({group:"alert",type:"success",title:"Contact Added",text:t},3e3)}).catch(o=>{var n;const t="Error when adding contact to storage: "+x(o);T(t,!0);let i="An error prevented this import.";((n=o.message)==null?void 0:n.indexOf("Key already exists in the object store."))>-1&&(i="A contact with that DID is already in your contact list. Edit them directly below."),o.name==="ConstraintError"&&(i+=" Check that the contact doesn't conflict with any you already have."),this.danger(i,"Contact Not Added",5e3)})}async confirmSetVisibility(e,o){const t=o?"Are you sure you want to make your activity visible to them?":"Are you sure you want to hide all your activity from them?";this.$notify({group:"modal",type:"confirm",title:"Set Visibility",text:t,onYes:async()=>{await this.setVisibility(e,o,!0)&&(e.seesMe=o)}},-1)}async register(e){var o;this.$notify({group:"alert",type:"toast",title:"Sent..."},1e3);try{const t=await q(this.activeDid,this.apiServer,this.axios,e);t.success?(e.registered=!0,await k.contacts.update(e.did,{registered:!0}),this.$notify({group:"alert",type:"success",title:"Registration Success",text:(e.name||"That unnamed person")+" has been registered."},3e3)):this.$notify({group:"alert",type:"danger",title:"Registration Error",text:t.error||"Something went wrong during registration."},5e3)}catch(t){const i="Error when registering: "+x(t);T(i,!0);let n="There was an error.";const a=t;a.isAxiosError?(o=a.response)!=null&&o.data&&typeof a.response.data=="object"&&"error"in a.response.data&&typeof a.response.data.error=="object"&&a.response.data.error!==null&&"message"in a.response.data.error?n=a.response.data.error.message:a.message?n=a.message:n=JSON.stringify(a.toJSON()):n=t,this.$notify({group:"alert",type:"danger",title:"Registration Error",text:n},5e3)}}async setVisibility(e,o,t){const i=await z(this.activeDid,this.apiServer,this.axios,k,e,o);if(i.success)return t&&this.$notify({group:"alert",type:"success",title:"Visibility Set",text:(e.name||"That user")+" can "+(o?"":"not ")+"see your activity."},3e3),!0;{console.error("Got strange result from setting visibility. It can happen when setting visibility on oneself.",i);const n=i.error||"Could not set visibility on the server.";return this.$notify({group:"alert",type:"danger",title:"Error Setting Visibility",text:n},5e3),!1}}confirmShowGiftedDialog(e,o){if(o===this.activeDid&&this.givenToMeUnconfirmed[e]>0){const t=this.givenToMeUnconfirmed[e]==1?"is":"are",i=this.givenToMeUnconfirmed[e]==1?"hour":"hours",n="There "+t+" "+this.givenToMeUnconfirmed[e]+" unconfirmed "+i+" from them. Would you like to confirm some of those hours?";this.$notify({group:"modal",type:"confirm",title:"Delete",text:n,onNo:async()=>{this.showGiftedDialog(e,o)},onYes:async()=>{this.$router.push({name:"contact-amounts",query:{contactDid:e}})}},-1)}else this.showGiftedDialog(e,o)}showGiftedDialog(e,o){let t,i;e&&(t={did:e,name:R(this.activeDid,this.contacts,e)}),o&&(i={did:o,name:R(this.activeDid,this.contacts,o)});let n,a="";e==this.activeDid?(n=h=>{const l=U(this.givenByMeUnconfirmed);l[o]=(l[o]||0)+h,this.givenByMeUnconfirmed=l},a="Given to "+((i==null?void 0:i.name)||"Someone Unnamed")):(n=h=>{const l=U(this.givenToMeUnconfirmed);l[e]=(l[e]||0)+h,this.givenToMeUnconfirmed=l},a="Received from "+((t==null?void 0:t.name)||"Someone Unnamed")),this.$refs.customGivenDialog.open(t,i,void 0,a,void 0,n)}openOfferDialog(e,o){this.$refs.customOfferDialog.open(e,o)}async toggleShowContactAmounts(){const e=!this.showGiveNumbers;try{await $({showContactGivesInline:e})}catch(o){const t="Error updating contact-amounts setting: "+x(o);T(t,!0),this.$notify({group:"alert",type:"danger",title:"Error Updating Contact Setting",text:"The setting may not have saved. Try again, maybe after restarting the app."},5e3)}this.showGiveNumbers=e,e&&Object.keys(this.givenByMeDescriptions).length===0&&Object.keys(this.givenByMeConfirmed).length===0&&Object.keys(this.givenByMeUnconfirmed).length===0&&Object.keys(this.givenToMeDescriptions).length===0&&Object.keys(this.givenToMeConfirmed).length===0&&Object.keys(this.givenToMeUnconfirmed).length===0&&this.loadGives()}toggleShowGiveTotals(){this.showGiveTotals?(this.showGiveTotals=!1,this.showGiveConfirmed=!0):this.showGiveConfirmed?(this.showGiveTotals=!1,this.showGiveConfirmed=!1):(this.showGiveTotals=!0,this.showGiveConfirmed=!0)}showGiveAmountsClassNames(){return{"from-slate-400":this.showGiveTotals,"to-slate-700":this.showGiveTotals,"from-green-400":!this.showGiveTotals&&this.showGiveConfirmed,"to-green-700":!this.showGiveTotals&&this.showGiveConfirmed,"from-yellow-400":!this.showGiveTotals&&!this.showGiveConfirmed,"to-yellow-700":!this.showGiveTotals&&!this.showGiveConfirmed}}async copySelectedContacts(){if(this.contactsSelected.length===0){this.danger("You must select contacts to copy.");return}const o=this.contacts.filter(n=>this.contactsSelected.includes(n.did)).map(n=>{const a={did:n.did,name:n.name};return n.nextPubKeyHashB64&&(a.nextPubKeyHashB64=n.nextPubKeyHashB64),n.profileImageUrl&&(a.profileImageUrl=n.profileImageUrl),n.publicKeyBase64&&(a.publicKeyBase64=n.publicKeyBase64),a}),t=await Q(this.activeDid,{contacts:o}),i=te+"/contact-import/"+t;de().copy(i).then(()=>{this.$notify({group:"alert",type:"info",title:"Copied",text:"The link for those contacts is now in the clipboard."},3e3)})}showCopySelectionsInfo(){this.$notify({group:"alert",type:"info",title:"Copying Contacts",text:"Contact info will include name, ID, profile image, and public key."},5e3)}async showOnboardMeetingDialog(){try{const e=await M(this.activeDid);(await this.axios.get(this.apiServer+"/api/partner/groupOnboardMember",{headers:e})).data.data?(await this.axios.get(this.apiServer+"/api/partner/groupOnboard",{headers:e})).data.data?this.$router.push({name:"onboard-meeting-setup"}):this.$router.push({name:"onboard-meeting-list"}):this.$notify({group:"modal",type:"confirm",title:"Onboarding Meeting",text:"Would you like to start a new meeting?",onYes:async()=>{this.$router.push({name:"onboard-meeting-setup"})},yesText:"Start New Meeting",onNo:async()=>{this.$router.push({name:"onboard-meeting-list"})},noText:"Join Existing Meeting"},-1)}catch(e){T("Error checking meeting status:"+x(e)),this.danger("There was an error checking your meeting status.","Meeting Error")}}};O=ye([se({components:{GiftedDialog:he,EntityIcon:ce,OfferDialog:ue,QuickNav:le,ContactNameDialog:me,TopMessage:ge}})],O);const we={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},be={id:"formAddNewContact",class:"mt-4 mb-4 flex items-stretch"},ve={key:0,class:"flex"},Ce={key:1,class:"flex"},xe={class:"flex items-center bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-1 mr-1 rounded-md"},Te={class:"flex items-center bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-1 mr-1 rounded-md"},Se={key:0,class:"flex justify-between"},ke={class:"w-full text-left"},_e={key:0},De=["checked"],Ne={class:"w-full text-right"},Ie={key:1,class:"flex justify-between mt-1"},Me={class:"w-full text-right"},Ge={class:"text-sm uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1 py-1 rounded-md"},$e={key:2,id:"listContacts",class:"border-t border-slate-300 mt-1"},Oe={class:"grow overflow-hidden"},Ee={class:"flex items-center"},Ae=["checked","onClick"],Re={class:"text-base font-semibold ml-2 w-1/3 truncate flex-shrink-0"},Ue={class:"flex items-center"},Be={class:"ml-4 text-sm overflow-hidden"},Pe={class:"ml-4 text-sm"},Ke={id:"ContactActions",class:"flex gap-1.5 mt-2"},He={key:0,class:"ml-auto flex gap-1.5"},Ve=["title","onClick"],je=["title","onClick"],Le=["onClick"],Je={key:3},Fe={key:4,class:"mt-2 w-full text-left"},Ye=["checked"],We={key:5,class:"fixed z-[100] top-0 inset-x-0 w-full"},qe={class:"absolute inset-0 h-screen flex flex-col items-center justify-center bg-slate-900/50"};function ze(s,r,e,o,t,i){const n=S("QuickNav"),a=S("TopMessage"),h=S("font-awesome"),l=S("router-link"),y=S("EntityIcon"),g=S("GiftedDialog"),w=S("OfferDialog"),v=S("ContactNameDialog");return p(),f(K,null,[m(n,{selected:"Contacts"}),m(a),c("section",we,[r[19]||(r[19]=c("h1",{id:"ViewHeading",class:"text-4xl text-center font-light"}," Your Contacts ",-1)),r[20]||(r[20]=c("div",{class:"flex justify-between py-2 mt-8"},[c("span"),c("span",null,[c("a",{href:"/help-onboarding",target:"_blank",class:"text-xs uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-1 rounded-md ml-1"}," Onboarding Guide ")])],-1)),c("div",be,[s.isRegistered?(p(),f("span",ve,[m(l,{to:{name:"invite-one"},class:"flex items-center bg-gradient-to-b from-green-400 to-green-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-1 mr-1 rounded-md"},{default:N(()=>[m(h,{icon:"envelope-open-text",class:"fa-fw text-2xl"})]),_:1}),c("button",{class:"flex items-center bg-gradient-to-b from-green-400 to-green-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-1 mr-1 rounded-md",onClick:r[0]||(r[0]=d=>s.showOnboardMeetingDialog())},[m(h,{icon:"chair",class:"fa-fw text-2xl"})])])):(p(),f("span",Ce,[c("span",xe,[m(h,{icon:"envelope-open-text",class:"fa-fw text-2xl",onClick:r[1]||(r[1]=d=>s.warning("You must get registered before you can create invites.","Not Registered"))})]),c("span",Te,[m(h,{icon:"chair",class:"fa-fw text-2xl",onClick:r[2]||(r[2]=d=>s.warning("You must get registered before you can initiate an onboarding meeting.","Not Registered"))})])])),m(l,{to:{name:"contact-qr"},class:"flex items-center bg-gradient-to-b from-green-400 to-green-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-1 mr-1 rounded-md"},{default:N(()=>[m(h,{icon:"qrcode",class:"fa-fw text-2xl"})]),_:1}),ie(c("textarea",{"onUpdate:modelValue":r[3]||(r[3]=d=>s.contactInput=d),type:"text",placeholder:"New URL or DID, Name, Public Key, Next Public Key Hash",class:"block w-full rounded-l border border-r-0 border-slate-400 px-3 py-2 h-10"},null,512),[[ne,s.contactInput]]),c("button",{class:"px-4 rounded-r bg-green-200 border border-l-0 border-green-400",onClick:r[4]||(r[4]=d=>s.onClickNewContact())},[m(h,{icon:"plus",class:"fa-fw"})])]),s.contacts.length>0?(p(),f("div",Se,[c("div",ke,[s.showGiveNumbers?b("",!0):(p(),f("div",_e,[c("input",{type:"checkbox",checked:s.contactsSelected.length===s.contacts.length,class:"align-middle ml-2 h-6 w-6","data-testId":"contactCheckAllTop",onClick:r[5]||(r[5]=d=>s.contactsSelected.length===s.contacts.length?s.contactsSelected=[]:s.contactsSelected=s.contacts.map(C=>C.did))},null,8,De),s.showGiveNumbers?b("",!0):(p(),f("button",{key:0,href:"",class:"text-md bg-gradient-to-b shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white ml-2 px-1 py-1 rounded-md",style:P(s.contactsSelected.length>0?"background-image: linear-gradient(to bottom, #3b82f6, #1e40af);":"background-image: linear-gradient(to bottom, #94a3b8, #374151);"),"data-testId":"copySelectedContactsButtonTop",onClick:r[6]||(r[6]=d=>s.copySelectedContacts())}," Copy Selections ",4)),c("button",{onClick:r[7]||(r[7]=d=>s.showCopySelectionsInfo())},[m(h,{icon:"circle-info",class:"text-xl text-blue-500 ml-4"})])]))]),c("div",Ne,[c("button",{href:"",class:"text-md bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1 py-1 rounded-md",onClick:r[8]||(r[8]=d=>s.toggleShowContactAmounts())},_(s.showGiveNumbers?"Hide Hours, Offer, etc":"See Hours, Offer, etc"),1)])])):b("",!0),s.showGiveNumbers?(p(),f("div",Ie,[c("div",Me,[r[13]||(r[13]=D(" In the following, only the most recent hours are included. To see more, click ")),c("span",Ge,[m(h,{icon:"file-lines",class:"fa-fw"})]),r[14]||(r[14]=c("br",null,null,-1)),c("button",{href:"",class:re(["text-md bg-gradient-to-b shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-1 rounded-md mt-1",s.showGiveAmountsClassNames()]),onClick:r[9]||(r[9]=d=>s.toggleShowGiveTotals())},[D(_(s.showGiveTotals?"Totals":s.showGiveConfirmed?"Confirmed Amounts":"Unconfirmed Amounts")+" ",1),m(h,{icon:"left-right",class:"fa-fw"})],2)])])):b("",!0),s.contacts.length>0?(p(),f("ul",$e,[(p(!0),f(K,null,ae(s.filteredContacts(),d=>(p(),f("li",{key:d.did,class:"border-b border-slate-300 pt-1 pb-1","data-testId":"contactListItem"},[c("div",Oe,[c("div",Ee,[m(y,{contact:d,"icon-size":24,class:"inline-block align-text-bottom border border-slate-300 rounded cursor-pointer",onClick:C=>s.showLargeIdenticon=d},null,8,["contact","onClick"]),s.showGiveNumbers?b("",!0):(p(),f("input",{key:0,type:"checkbox",checked:s.contactsSelected.includes(d.did),class:"ml-2 h-6 w-6 flex-shrink-0","data-testId":"contactCheckOne",onClick:C=>s.contactsSelected.includes(d.did)?s.contactsSelected.splice(s.contactsSelected.indexOf(d.did),1):s.contactsSelected.push(d.did)},null,8,Ae)),c("h2",Re,_(s.contactNameNonBreakingSpace(d.name)),1),c("span",null,[c("div",Ue,[m(l,{to:{path:"/did/"+encodeURIComponent(d.did)},title:"See more about this person"},{default:N(()=>[m(h,{icon:"circle-info",class:"text-xl text-blue-500 ml-4"})]),_:2},1032,["to"]),c("span",Be,_(s.libsUtil.shortDid(d.did)),1)]),c("div",Pe,_(d.notes),1)])]),c("div",Ke,[s.showGiveNumbers&&d.did!=s.activeDid?(p(),f("div",He,[c("button",{class:"text-sm bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-1.5 rounded-l-md",title:s.givenToMeDescriptions[d.did]||"",onClick:C=>s.confirmShowGiftedDialog(d.did,s.activeDid)},[r[15]||(r[15]=D(" From: ")),r[16]||(r[16]=c("br",null,null,-1)),D(" "+_(s.showGiveTotals?(s.givenToMeConfirmed[d.did]||0)+(s.givenToMeUnconfirmed[d.did]||0):s.showGiveConfirmed?s.givenToMeConfirmed[d.did]||0:s.givenToMeUnconfirmed[d.did]||0),1)],8,Ve),c("button",{class:"text-sm bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white -ml-1.5 px-2 py-1.5 rounded-r-md border-l",title:s.givenByMeDescriptions[d.did]||"",onClick:C=>s.confirmShowGiftedDialog(s.activeDid,d.did)},[r[17]||(r[17]=D(" To: ")),r[18]||(r[18]=c("br",null,null,-1)),D(" "+_(s.showGiveTotals?(s.givenByMeConfirmed[d.did]||0)+(s.givenByMeUnconfirmed[d.did]||0):s.showGiveConfirmed?s.givenByMeConfirmed[d.did]||0:s.givenByMeUnconfirmed[d.did]||0),1)],8,je),c("button",{class:"text-sm bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-1.5 rounded-md border border-blue-400","data-testId":"offerButton",onClick:C=>s.openOfferDialog(d.did,d.name)}," Offer ",8,Le),m(l,{to:{name:"contact-amounts",query:{contactDid:d.did}},class:"text-sm bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-1.5 rounded-md border border-slate-400",title:"See more given activity"},{default:N(()=>[m(h,{icon:"file-lines",class:"fa-fw"})]),_:2},1032,["to"])])):b("",!0)])])]))),128))])):(p(),f("p",Je,"There are no contacts.")),s.contacts.length>0?(p(),f("div",Fe,[s.showGiveNumbers?b("",!0):(p(),f("input",{key:0,type:"checkbox",checked:s.contactsSelected.length===s.contacts.length,class:"align-middle ml-2 h-6 w-6","data-testId":"contactCheckAllBottom",onClick:r[10]||(r[10]=d=>s.contactsSelected.length===s.contacts.length?s.contactsSelected=[]:s.contactsSelected=s.contacts.map(C=>C.did))},null,8,Ye)),s.showGiveNumbers?b("",!0):(p(),f("button",{key:1,href:"",class:"text-md bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white ml-2 px-1 py-1 rounded-md",style:P(s.contactsSelected.length>0?"background-image: linear-gradient(to bottom, #3b82f6, #1e40af);":"background-image: linear-gradient(to bottom, #94a3b8, #374151);"),onClick:r[11]||(r[11]=d=>s.copySelectedContacts())}," Copy Selections ",4))])):b("",!0),m(g,{ref:"customGivenDialog"},null,512),m(w,{ref:"customOfferDialog"},null,512),m(v,{ref:"contactNameDialog"},null,512),s.showLargeIdenticon?(p(),f("div",We,[c("div",qe,[m(y,{contact:s.showLargeIdenticon,"icon-size":512,class:"flex w-11/12 max-w-sm mx-auto mb-3 overflow-hidden bg-white rounded-lg shadow-lg",onClick:r[12]||(r[12]=d=>s.showLargeIdenticon=void 0)},null,8,["contact"])])])):b("",!0)])],64)}const ht=oe(O,[["render",ze]]);export{ht as default}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/DIDView-CYsX9_-v.css b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/DIDView-CYsX9_-v.css deleted file mode 100644 index ee9f244..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/DIDView-CYsX9_-v.css +++ /dev/null @@ -1 +0,0 @@ -.dialog-overlay{z-index:50;position:fixed;top:0;left:0;right:0;bottom:0;background-color:#00000080;display:flex;justify-content:center;align-items:center;padding:1.5rem}.dialog{background-color:#fff;padding:1rem;border-radius:.5rem;width:100%;max-width:500px} diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/DIDView-DsYtCrHy.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/DIDView-DsYtCrHy.js deleted file mode 100644 index 32e95c3..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/DIDView-DsYtCrHy.js +++ /dev/null @@ -1 +0,0 @@ -var z=Object.defineProperty;var G=(e,i,t)=>i in e?z(e,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[i]=t;var c=(e,i,t)=>G(e,typeof i!="symbol"?i+"":i,t);import{y as Y,d as P}from"./js-yaml-CxlQHuPU.js";import{V as Q,e as q,d as g,C as J,_ as H,h as u,j as h,k as n,m as y,n as k,t as f,w as U,y as b,F as R,z as v,B as d,E as Z}from"./main.common-DD7dqhZp.js";import{Q as K}from"./QuickNav-C8jPGtUY.js";import{I as W}from"./InfiniteScroll-DZwFAI4R.js";import{T as X}from"./TopMessage-ZWDDjman.js";import{l as ee,J as te,Z as ie,z as C,h as se,_ as I,Q as oe,g as O,M as ne}from"./index-ryzpKtgI.js";import{E as re}from"./EntityIcon-DciUb57i.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var ae=Object.getOwnPropertyDescriptor,le=(e,i,t,o)=>{for(var s=o>1?void 0:o?ae(i,t):i,a=e.length-1,r;a>=0;a--)(r=e[a])&&(s=r(s)||s);return s};let x=class extends Q{constructor(){super(...arguments);c(this,"$notify");c(this,"$route");c(this,"$router");c(this,"libsUtil",ee);c(this,"yaml",Y);c(this,"activeDid","");c(this,"apiServer","");c(this,"claims",[]);c(this,"contactFromDid");c(this,"contactYaml","");c(this,"hitEnd",!1);c(this,"isLoading",!1);c(this,"isMyDid",!1);c(this,"searchBox",null);c(this,"showDidDetails",!1);c(this,"showLargeIdenticonId");c(this,"showLargeIdenticonUrl");c(this,"viewingDid");c(this,"capitalizeAndInsertSpacesBeforeCaps",te);c(this,"didInfoForContact",ie);c(this,"displayAmount",C)}async mounted(){const t=await q();this.activeDid=t.activeDid||"",this.apiServer=t.apiServer||"";let s=window.location.pathname.substring(5);if(s||(s=this.activeDid,s&&this.$notify({group:"alert",type:"toast",title:"Your Info",text:"No user was specified so showing your info."},3e3)),s){this.viewingDid=decodeURIComponent(s),this.contactFromDid=await g.contacts.get(this.viewingDid),this.contactFromDid&&(this.contactYaml=P(this.contactFromDid)),await this.loadClaimsAbout();const a=await se();this.isMyDid=a.includes(this.viewingDid)}}async loadMoreData(t){this.claims.length>0&&!this.hitEnd&&t&&this.loadClaimsAbout()}confirmDeleteContact(t){let o="Are you sure you want to remove "+I(t,!1)+" from your contact list?";t.seesMe&&(o+=" Note that they can see your activity, so if you want to hide your activity from them then you should do that first."),this.$notify({group:"modal",type:"confirm",title:"Delete",text:o,onYes:async()=>{await this.deleteContact(t)}},-1)}async deleteContact(t){await g.open(),await g.contacts.delete(t.did),this.$notify({group:"alert",type:"success",title:"Deleted",text:"Contact has been removed."},3e3),this.$router.push({name:"contacts"})}async confirmRegister(t){this.$notify({group:"modal",type:"confirm",title:"Register",text:"Are you sure you want to register "+I(this.contactFromDid,!1)+(t.registered?" -- especially since they are already marked as registered":"")+"?",onYes:async()=>{await this.register(t)}},-1)}async register(t){var o,s,a;this.$notify({group:"alert",type:"toast",title:"Sent..."},1e3);try{const r=await oe(this.activeDid,this.apiServer,this.axios,t);r.success?(t.registered=!0,await g.contacts.update(t.did,{registered:!0}),this.$notify({group:"alert",type:"success",title:"Registration Success",text:(t.name||"That unnamed person")+" has been registered."},5e3)):this.$notify({group:"alert",type:"danger",title:"Registration Error",text:r.error||"Something went wrong during registration."},5e3)}catch(r){console.error("Error when registering:",r);let l="There was an error.";const m=r;m?(a=(s=(o=m.response)==null?void 0:o.data)==null?void 0:s.error)!=null&&a.message?l=m.response.data.error.message:m.message?l=m.message:l=JSON.stringify(m.toJSON()):l=r,this.$notify({group:"alert",type:"danger",title:"Registration Error",text:l},5e3)}}async loadClaimsAbout(){if(!this.viewingDid){console.error("This should never be called without a DID.");return}const t="claimContents="+encodeURIComponent(this.viewingDid);let o="";this.claims.length>0&&(o="&beforeId="+this.claims[this.claims.length-1].id);try{this.isLoading=!0;const s=await fetch(this.apiServer+"/api/v2/report/claims?"+t+o,{method:"GET",headers:await O(this.activeDid)});if(s.status!==200){const r=await s.text();console.error("Problem with full search:",r),this.$notify({group:"alert",type:"danger",title:"Error",text:"There was a problem accessing the server. Try again later."},5e3);return}const a=await s.json();this.claims=this.claims.concat(a.data),this.hitEnd=!a.hitLimit}catch(s){console.error("Error with feed load:",s),this.$notify({group:"alert",type:"danger",title:"Error",text:s.userMessage||"There was a problem retrieving claims."},3e3)}finally{this.isLoading=!1}}onClickLoadClaim(t){const o={path:"/claim/"+encodeURIComponent(t)};this.$router.push(o)}claimAmount(t){var o,s,a,r;if(t.claimType==="GiveAction"){const l=t.claim;return(o=l.object)!=null&&o.unitCode&&((s=l.object)!=null&&s.amountOfThisGood)?C(l.object.unitCode,l.object.amountOfThisGood):""}else if(t.claimType==="Offer"){const l=t.claim;return(a=l.includesObject)!=null&&a.unitCode&&((r=l.includesObject)!=null&&r.amountOfThisGood)?C(l.includesObject.unitCode,l.includesObject.amountOfThisGood):""}return""}claimDescription(t){return t.claim.name||t.claim.description||""}async confirmSetVisibility(t,o){const s=o?"Are you sure you want to make your activity visible to them?":"Are you sure you want to hide all your activity from them?";this.$notify({group:"modal",type:"confirm",title:"Set Visibility",text:s,onYes:async()=>{await this.setVisibility(t,o,!0)&&(t.seesMe=o)}},-1)}async setVisibility(t,o,s){const a=await ne(this.activeDid,this.apiServer,this.axios,g,t,o);if(a.success)return s&&this.$notify({group:"alert",type:"success",title:"Visibility Set",text:(t.name||"That user")+" can "+(o?"":"not ")+"see your activity."},3e3),!0;{console.error("Got strange result from setting visibility:",a);const r=a.error||"Could not set visibility on the server.";return this.$notify({group:"alert",type:"danger",title:"Error Setting Visibility",text:r},5e3),!1}}async checkVisibility(t){var a;const o=this.apiServer+"/api/report/canDidExplicitlySeeMe?did="+encodeURIComponent(t.did),s=await O(this.activeDid);if(!s.Authorization){this.$notify({group:"alert",type:"danger",title:"No Identity",text:"There is no identity to use to check visibility."},3e3);return}try{const r=await this.axios.get(o,{headers:s});if(r.status===200){const l=r.data;t.seesMe=l,await g.contacts.update(t.did,{seesMe:l}),this.$notify({group:"alert",type:"info",title:"Visibility Refreshed",text:I(t,!0)+" can "+(l?"":"not ")+"see your activity."},3e3)}else{console.error("Got bad server response checking visibility:",r);const l=((a=r.data.error)==null?void 0:a.message)||"Got bad server response.";this.$notify({group:"alert",type:"danger",title:"Error Checking Visibility",text:l},5e3)}}catch(r){console.error("Caught error from request to check visibility:",r),this.$notify({group:"alert",type:"danger",title:"Error Checking Visibility",text:"Check connectivity and try again."},3e3)}}};x=le([J({components:{EntityIcon:re,InfiniteScroll:W,QuickNav:K,TopMessage:X}})],x);const de={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},ce={id:"ViewBreadcrumb",class:"mb-8"},me={id:"ViewHeading",class:"text-lg text-center font-light relative px-7"},ue={key:0,class:"bg-slate-100 rounded-md overflow-hidden px-4 py-3 mb-4"},pe={class:"text-xl font-semibold"},he={key:0,class:"text-sm overflow-x-scroll px-4 py-3 bg-slate-100 rounded-md"},ye={class:"flex justify-center mt-4"},fe={key:0,class:"flex justify-between"},ge={class:"flex justify-between mt-4"},ve={class:"flex items-center"},be={key:0,class:"flex justify-between"},we={key:0},De={class:"flex justify-center"},ke={key:0,class:"fixed z-[100] top-0 inset-x-0 w-full"},Ce={class:"absolute inset-0 h-screen flex flex-col items-center justify-center bg-slate-900/50"},Ie={key:1,class:"bg-slate-100 rounded-md overflow-hidden px-4 py-3 mb-4"},xe={class:"text-xl font-semibold"},$e={key:2,class:"fixed left-6 bottom-24 text-center text-4xl leading-none bg-slate-400 text-white w-14 py-2.5 rounded-full"},Fe={key:3,class:"mt-4"},_e={class:"text-l font-bold text-center"},Se={class:"grid grid-cols-12 gap-4"},Te={class:"col-span-2"},Ve={class:"col-span-2"},Ae={class:"col-span-2"},Ee={class:"col-span-5"},Me={class:"col-span-1"},Le=["onClick"],je={key:4,class:"flex justify-center mt-4"},Ue={key:0},Re={key:1};function Oe(e,i,t,o,s,a){var $,F,_,S,T,V,A,E,M,L,j;const r=v("QuickNav"),l=v("TopMessage"),m=v("font-awesome"),B=v("router-link"),w=v("EntityIcon"),N=v("InfiniteScroll");return d(),u(R,null,[h(r,{selected:"Contacts"}),h(l),n("section",de,[n("div",ce,[n("h1",me,[n("button",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:i[0]||(i[0]=p=>e.$router.go(-1))},[h(m,{icon:"chevron-left",class:"fa-fw"})]),i[10]||(i[10]=k(" Identifier Details "))])]),e.contactFromDid?(d(),u("div",ue,[n("div",null,[n("h2",pe,[k(f((($=e.contactFromDid)==null?void 0:$.name)||"(no name)")+" ",1),h(B,{to:{name:"contact-edit",params:{did:(F=e.contactFromDid)==null?void 0:F.did}}},{default:U(()=>[h(m,{icon:"pen",class:"text-sm text-blue-500 ml-2 mb-1"})]),_:1},8,["to"])]),n("button",{class:"ml-2 mr-2 mt-4",onClick:i[1]||(i[1]=p=>e.showDidDetails=!e.showDidDetails)},[i[11]||(i[11]=k(" Details ")),e.showDidDetails?(d(),b(m,{key:0,icon:"chevron-down",class:"text-blue-400"})):(d(),b(m,{key:1,icon:"chevron-right",class:"text-blue-400"}))]),e.showDidDetails?(d(),u("pre",he,f(e.contactYaml),1)):y("",!0)]),n("div",ye,[(_=e.contactFromDid)!=null&&_.profileImageUrl?(d(),u("span",fe,[h(w,{"icon-size":96,"profile-image-url":(S=e.contactFromDid)==null?void 0:S.profileImageUrl,class:"inline-block align-text-bottom border border-slate-300 rounded",onClick:i[2]||(i[2]=p=>{var D;return e.showLargeIdenticonUrl=(D=e.contactFromDid)==null?void 0:D.profileImageUrl})},null,8,["profile-image-url"])])):y("",!0)]),n("div",ge,[n("div",ve,[e.activeDid?(d(),u("div",be,[n("div",null,[(T=e.contactFromDid)!=null&&T.seesMe&&e.contactFromDid.did!==e.activeDid?(d(),u("button",{key:0,class:"text-sm uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white mx-0.5 my-0.5 px-2 py-1.5 rounded-md",title:"They can see you",onClick:i[3]||(i[3]=p=>e.confirmSetVisibility(e.contactFromDid,!1))},[h(m,{icon:"eye",class:"fa-fw"})])):!((V=e.contactFromDid)!=null&&V.seesMe)&&((A=e.contactFromDid)==null?void 0:A.did)!==e.activeDid?(d(),u("button",{key:1,class:"text-sm uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white mx-0.5 my-0.5 px-2 py-1.5 rounded-md",title:"They cannot see you",onClick:i[4]||(i[4]=p=>e.confirmSetVisibility(e.contactFromDid,!0))},[h(m,{icon:"eye-slash",class:"fa-fw"})])):y("",!0),((E=e.contactFromDid)==null?void 0:E.did)!==e.activeDid?(d(),u("button",{key:2,class:"text-sm uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white mx-0.5 my-0.5 px-2 py-1.5 rounded-md",title:"Check Visibility",onClick:i[5]||(i[5]=p=>e.checkVisibility(e.contactFromDid))},[h(m,{icon:"rotate",class:"fa-fw"})])):y("",!0)]),((M=e.contactFromDid)==null?void 0:M.did)!==e.activeDid?(d(),u("button",{key:0,class:"text-sm uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white ml-6 mx-0.5 my-0.5 px-2 py-1.5 rounded-md",title:"Registration",onClick:i[6]||(i[6]=p=>e.confirmRegister(e.contactFromDid))},[(L=e.contactFromDid)!=null&&L.registered?(d(),b(m,{key:0,icon:"person-circle-check",class:"fa-fw"})):(d(),b(m,{key:1,icon:"person-circle-question",class:"fa-fw"}))])):y("",!0)])):y("",!0),n("button",{class:"text-sm uppercase bg-gradient-to-b from-rose-500 to-rose-800 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white ml-6 mx-0.5 my-0.5 px-2 py-1.5 rounded-md",title:"Delete",onClick:i[7]||(i[7]=p=>e.confirmDeleteContact(e.contactFromDid))},[h(m,{icon:"trash-can",class:"fa-fw"})])]),(j=e.contactFromDid)!=null&&j.profileImageUrl?y("",!0):(d(),u("div",we,[i[12]||(i[12]=n("div",null,"Auto-Generated Icon",-1)),n("div",De,[h(w,{"entity-id":e.viewingDid,"icon-size":64,class:"inline-block align-middle border border-slate-300 rounded-md mr-1",onClick:i[8]||(i[8]=p=>e.showLargeIdenticonId=e.viewingDid)},null,8,["entity-id"])])]))]),e.showLargeIdenticonId||e.showLargeIdenticonUrl?(d(),u("div",ke,[n("div",Ce,[h(w,{"entity-id":e.showLargeIdenticonId,"icon-size":512,"profile-image-url":e.showLargeIdenticonUrl,class:"flex w-11/12 max-w-sm mx-auto mb-3 overflow-hidden bg-white rounded-lg shadow-lg",onClick:i[9]||(i[9]=p=>{e.showLargeIdenticonId=void 0,e.showLargeIdenticonUrl=void 0})},null,8,["entity-id","profile-image-url"])])])):y("",!0)])):(d(),u("div",Ie,[n("div",null,[n("h2",xe,f(e.isMyDid?"You":"(no name)"),1)])])),e.isLoading?(d(),u("div",$e,[h(m,{icon:"spinner",class:"fa-spin-pulse"})])):y("",!0),e.claims.length>0?(d(),u("div",Fe,[n("div",_e," Claims That Involve "+f(e.isMyDid?"You":"Them"),1)])):y("",!0),h(N,{onReachedBottom:e.loadMoreData},{default:U(()=>[n("ul",null,[(d(!0),u(R,null,Z(e.claims,p=>(d(),u("li",{key:p.handleId,class:"border-b border-slate-300"},[n("div",Se,[n("span",Te,f(p.issuedAt.substring(0,10)),1),n("span",Ve,f(e.capitalizeAndInsertSpacesBeforeCaps(p.claimType)),1),n("span",Ae,f(e.claimAmount(p)),1),n("span",Ee,f(e.claimDescription(p)),1),n("span",Me,[n("a",{class:"cursor-pointer",onClick:D=>e.onClickLoadClaim(p.id)},[h(m,{icon:"file-lines",class:"pl-2 pt-1 text-blue-500"})],8,Le)])])]))),128))])]),_:1},8,["onReachedBottom"]),!e.isLoading&&e.claims.length===0?(d(),u("div",je,[e.isMyDid?(d(),u("span",Ue,"You have no claims yet.")):(d(),u("span",Re,"They are in no claims visible to you."))])):y("",!0)])],64)}const We=H(x,[["render",Oe]]);export{We as default}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/DiscoverView-DB9VWQSd.css b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/DiscoverView-DB9VWQSd.css deleted file mode 100644 index 52922c3..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/DiscoverView-DB9VWQSd.css +++ /dev/null @@ -1 +0,0 @@ -.numbered-marker{display:flex;align-items:center;justify-content:center;text-align:center;font-size:14px;font-weight:700;color:#fff;background:#00f;width:24px;height:24px;border-radius:50%;border:2px solid white} diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/DiscoverView-DkKWeZ06.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/DiscoverView-DkKWeZ06.js deleted file mode 100644 index 2bc3448..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/DiscoverView-DkKWeZ06.js +++ /dev/null @@ -1 +0,0 @@ -var $=Object.defineProperty;var x=(e,o,t)=>o in e?$(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t;var n=(e,o,t)=>x(e,typeof o!="symbol"?o+"":o,t);/* empty css */import{a as C}from"./leaflet-src-Dm7ILaeL.js";import{V as B,b as I,e as E,d as R,l as V,C as F,_ as O,h as p,j as f,k as r,m as b,S as q,o as z,s as Z,Y as U,x as g,n as L,t as y,w as M,F as j,z as A,B as u,E as D}from"./main.common-DD7dqhZp.js";import{v as Q,i as J}from"./vue-leaflet.es-DQekxOGR.js";import{Q as G}from"./QuickNav-C8jPGtUY.js";import{I as H}from"./InfiniteScroll-DZwFAI4R.js";import{P as W}from"./ProjectIcon-ChPLhl-Y.js";import{O as X}from"./OnboardingDialog-DKHXNqS_.js";import{T as K}from"./TopMessage-ZWDDjman.js";import{i as Y,h as _,$ as ee,g as T,e as te}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var se=Object.getOwnPropertyDescriptor,oe=(e,o,t,a)=>{for(var c=a>1?void 0:a?se(o,t):o,s=e.length-1,m;s>=0;s--)(m=e[s])&&(c=m(c)||c);return c};let k=class extends B{constructor(){super(...arguments);n(this,"$notify");n(this,"$router");n(this,"$route");n(this,"activeDid","");n(this,"allContacts",[]);n(this,"allMyDids",[]);n(this,"apiServer","");n(this,"isLoading",!1);n(this,"isLocalActive",!1);n(this,"isMappedActive",!1);n(this,"isAnywhereActive",!0);n(this,"isProjectsActive",!0);n(this,"isPeopleActive",!1);n(this,"isSearchVisible",!0);n(this,"localCenterLat",0);n(this,"localCenterLong",0);n(this,"localCount",-1);n(this,"markers",{});n(this,"partnerApiServer",I);n(this,"projects",[]);n(this,"remoteCount",-1);n(this,"searchBox",null);n(this,"searchTerms","");n(this,"tempSearchBox",null);n(this,"userProfiles",[]);n(this,"zoomedSoDoNotMove",!1);n(this,"didInfo",Y)}async mounted(){var c,s;this.searchTerms=((c=this.$route.query.searchText)==null?void 0:c.toString())||"";const t=!!this.$route.query.searchPeople,a=await E();this.activeDid=a.activeDid||"",this.apiServer=a.apiServer||"",this.partnerApiServer=a.partnerApiServer||this.partnerApiServer,this.searchBox=((s=a.searchBoxes)==null?void 0:s[0])||null,this.allContacts=await R.contacts.toArray(),this.allMyDids=await _(),a.finishedOnboarding||this.$refs.onboardingDialog.open(ee.Discover),t&&(this.isPeopleActive=!0,this.isProjectsActive=!1,this.isMappedActive=!0,this.isAnywhereActive=!1),this.isMappedActive||await this.searchSelected()}resetCounts(){this.localCount=-1,this.remoteCount=-1}async searchSelected(){if(this.isLocalActive)await this.searchLocal();else if(this.isMappedActive){const t=this.$refs.projectMap;this.requestTiles(t.leafletObject)}else await this.searchAll()}async searchAll(t){this.resetCounts(),t||(this.projects=[],this.userProfiles=[]);let a="claimContents="+encodeURIComponent(this.searchTerms);t&&(a=a+`&beforeId=${t}`);const c=this.isProjectsActive?this.apiServer+"/api/v2/report/plans":this.partnerApiServer+"/api/partner/userProfile";try{this.isLoading=!0;const s=await fetch(c+"?"+a,{method:"GET",headers:await T(this.activeDid)});if(s.status!==200)throw await s.text();const m=await s.json();if(this.isProjectsActive){this.userProfiles=[];const v=m.data;if(v)this.projects.push(...v),this.remoteCount=this.projects.length;else throw JSON.stringify(m)}else{this.projects=[];const v=m.data;if(v)this.userProfiles.push(...v),this.remoteCount=this.userProfiles.length;else throw JSON.stringify(m)}}catch(s){console.error("Error with search all:",s),console.error("Error with search all (error added): "+s),this.$notify({group:"alert",type:"danger",title:"Error Searching",text:s.userMessage||"There was a problem retrieving "+(this.isProjectsActive?"projects":"profiles")+"."},5e3)}finally{this.isLoading=!1}}async searchLocal(t){var v;this.resetCounts();const a=this.isMappedActive&&this.tempSearchBox||this.isLocalActive&&((v=this.searchBox)==null?void 0:v.bbox);if(!a){this.projects=[],this.userProfiles=[];return}t||(this.projects=[],this.userProfiles=[]);let s=["claimContents="+encodeURIComponent(this.searchTerms),"minLocLat="+a.minLat,"maxLocLat="+a.maxLat,"minLocLon="+a.westLong,"maxLocLon="+a.eastLong].join("&");t&&(s=s+`&beforeId=${t}`);const m=this.isProjectsActive?this.apiServer+"/api/v2/report/plansByLocation":this.partnerApiServer+"/api/partner/userProfile";try{this.isLoading=!0;const h=await fetch(m+"?"+s,{method:"GET",headers:await T(this.activeDid)});if(h.status!==200)throw await h.text();const d=await h.json();if(this.isProjectsActive){this.userProfiles=[];const l=d.data;if(l)this.projects.push(...l),this.localCount=this.projects.length;else throw JSON.stringify(d)}else{this.projects=[];const l=d.data;if(l)this.userProfiles.push(...l),this.localCount=this.userProfiles.length;else throw JSON.stringify(d)}}catch(h){console.error("Error with search local:",h),this.$notify({group:"alert",type:"danger",title:"Error",text:h.userMessage||"There was a problem retrieving "+(this.isProjectsActive?"projects":"profiles")+"."},5e3)}finally{this.isLoading=!1}}async loadMoreData(t){if(t){if(this.isProjectsActive&&this.projects.length>0){const a=this.projects[this.projects.length-1];this.isLocalActive||this.isMappedActive?this.searchLocal(a.rowId):this.isAnywhereActive&&this.searchAll(a.rowId)}else if(this.isPeopleActive&&this.userProfiles.length>0){const a=this.userProfiles[this.userProfiles.length-1];this.isLocalActive||this.isMappedActive?this.searchLocal(a.rowId||""):this.isAnywhereActive&&this.searchAll(a.rowId||"")}}}clearMarkers(){Object.values(this.markers).forEach(t=>t.remove()),this.markers={}}async onMapReady(t){t.setView([this.localCenterLat,this.localCenterLong],2),this.requestTiles(t)}onMoveStart(){}async onMoveEnd(t){this.zoomedSoDoNotMove?this.zoomedSoDoNotMove=!1:await this.requestTiles(t.target)}onZoomStart(){this.clearMarkers(),this.zoomedSoDoNotMove=!0}async onZoomEnd(t){await this.requestTiles(t.target)}async requestTiles(t){var a,c;try{const s=t.getBounds(),m=["minLocLat="+(s==null?void 0:s.getSouthWest().lat),"maxLocLat="+(s==null?void 0:s.getNorthEast().lat),"westLocLon="+(s==null?void 0:s.getSouthWest().lng),"eastLocLon="+(s==null?void 0:s.getNorthEast().lng)].join("&"),v=this.isProjectsActive?this.apiServer+"/api/v2/report/planCountsByBBox":this.partnerApiServer+"/api/partner/userProfileCountsByBBox",h=await fetch(v+"?"+m);if(h.status===200){this.clearMarkers();const d=await h.json();if(((c=(a=d.data)==null?void 0:a.tiles)==null?void 0:c.length)>0)for(const l of d.data.tiles){const w=(l.minFoundLat+l.maxFoundLat)/2,P=(l.minFoundLon+l.maxFoundLon)/2,S=C.divIcon({className:"numbered-marker",html:`${l.recordCount}`,iconSize:[24,24],iconAnchor:[12,12]}),i=C.marker([w,P],{icon:S});i.addTo(t),i.on("click",()=>{this.tempSearchBox={minLat:l.minFoundLat,maxLat:l.maxFoundLat,westLong:l.minFoundLon,eastLong:l.maxFoundLon},this.searchLocal()}),this.markers[""+l.indexLat+"X"+l.indexLon+"_"+l.minFoundLat+"X"+l.minFoundLon+"-"+l.maxFoundLat+"X"+l.maxFoundLon]=i}}else throw{message:"Got an error loading projects on the map.",response:{status:h.status,statusText:h.statusText,url:h.url}}}catch(s){V("Error loading projects on the map: "+te(s),!0),this.$notify({group:"alert",type:"danger",title:"Map Error",text:"There was a problem loading projects on the map."},3e3)}}onClickLoadItem(t){const a={path:this.isProjectsActive?"/project/"+encodeURIComponent(t):"/userProfile/"+encodeURIComponent(t)};this.$router.push(a)}computedLocalTabStyleClassNames(){return{"inline-block":!0,"py-3":!0,"rounded-t-lg":!0,"border-b-2":!0,active:this.isLocalActive,"text-black":this.isLocalActive,"border-black":this.isLocalActive,"font-semibold":this.isLocalActive,"text-blue-600":!this.isLocalActive,"border-transparent":!this.isLocalActive,"hover:border-slate-400":!this.isLocalActive}}computedMappedTabStyleClassNames(){return{"inline-block":!0,"py-3":!0,"rounded-t-lg":!0,"border-b-2":!0,active:this.isMappedActive,"text-black":this.isMappedActive,"border-black":this.isMappedActive,"font-semibold":this.isMappedActive,"text-blue-600":!this.isMappedActive,"border-transparent":!this.isMappedActive,"hover:border-slate-400":!this.isMappedActive}}computedRemoteTabStyleClassNames(){return{"inline-block":!0,"py-3":!0,"rounded-t-lg":!0,"border-b-2":!0,active:this.isAnywhereActive,"text-black":this.isAnywhereActive,"border-black":this.isAnywhereActive,"font-semibold":this.isAnywhereActive,"text-blue-600":!this.isAnywhereActive,"border-transparent":!this.isAnywhereActive,"hover:border-slate-400":!this.isAnywhereActive}}computedProjectsTabStyleClassNames(){return{"inline-block":!0,"py-3":!0,"rounded-t-lg":!0,"border-b-2":!0,active:this.isProjectsActive,"text-black":this.isProjectsActive,"border-black":this.isProjectsActive,"font-semibold":this.isProjectsActive,"text-blue-600":!this.isProjectsActive,"border-transparent":!this.isProjectsActive,"hover:border-slate-400":!this.isProjectsActive}}computedPeopleTabStyleClassNames(){return{"inline-block":!0,"py-3":!0,"rounded-t-lg":!0,"border-b-2":!0,active:this.isPeopleActive,"text-black":this.isPeopleActive,"border-black":this.isPeopleActive,"font-semibold":this.isPeopleActive,"text-blue-600":!this.isPeopleActive,"border-transparent":!this.isPeopleActive,"hover:border-slate-400":!this.isPeopleActive}}};k=oe([F({components:{InfiniteScroll:H,LMap:J,LTileLayer:Q,OnboardingDialog:X,ProjectIcon:W,QuickNav:G,TopMessage:K}})],k);const ie={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},re={class:"text-center text-slate-500 border-b border-slate-300 mb-4"},ae={class:"flex flex-wrap justify-center gap-4 -mb-px"},ne={class:"text-center text-slate-500 border-b border-slate-300"},le={class:"flex flex-wrap justify-center gap-4 -mb-px"},ce={key:0},he={class:"text-center"},de={key:1},pe={class:"mt-4 h-96 w-5/6 mx-auto"},ue={key:2,class:"fixed left-6 bottom-24 text-center text-4xl leading-none bg-slate-400 text-white w-14 py-2.5 rounded-full"},me={key:3,class:"text-center mt-8"},ve={class:"text-lg text-slate-500"},fe={key:0},Ae={key:0},be={key:1},ye={id:"listDiscoverResults"},ge=["onClick"],Le={class:"grow"},we={class:"text-base font-semibold"},Pe={class:"text-sm"},Se=["onClick"],je={class:"grow"},ke={class:"text-sm"},Ce={key:0,class:"mt-1 text-sm text-slate-600"},Me={key:1,class:"mt-1 text-xs text-slate-500"};function De(e,o,t,a,c,s){const m=A("QuickNav"),v=A("TopMessage"),h=A("OnboardingDialog"),d=A("font-awesome"),l=A("l-tile-layer"),w=A("l-map"),P=A("ProjectIcon"),S=A("InfiniteScroll");return u(),p(j,null,[f(m,{selected:"Discover"}),f(v),r("section",ie,[o[9]||(o[9]=r("h1",{id:"ViewHeading",class:"text-4xl text-center font-light"}," Discover Projects & People ",-1)),f(h,{ref:"onboardingDialog"},null,512),r("div",{id:"QuickSearch",class:"mt-8 mb-4 flex",style:q({visibility:e.isSearchVisible?"visible":"hidden"})},[z(r("input",{"onUpdate:modelValue":o[0]||(o[0]=i=>e.searchTerms=i),type:"text",placeholder:"Search…",class:"block w-full rounded-l border border-r-0 border-slate-400 px-3 py-2",onKeyup:o[1]||(o[1]=U(i=>e.searchSelected(),["enter"]))},null,544),[[Z,e.searchTerms]]),r("button",{class:"px-4 rounded-r bg-slate-200 border border-l-0 border-slate-400",onClick:o[2]||(o[2]=i=>e.searchSelected())},[f(d,{icon:"magnifying-glass",class:"fa-fw"})])],4),r("div",re,[r("ul",ae,[r("li",null,[r("a",{href:"#",class:g(e.computedProjectsTabStyleClassNames()),onClick:o[3]||(o[3]=i=>{e.projects=[],e.userProfiles=[],e.isProjectsActive=!0,e.isPeopleActive=!1,e.searchSelected()})}," Projects ",2)]),r("li",null,[r("a",{href:"#",class:g(e.computedPeopleTabStyleClassNames()),onClick:o[4]||(o[4]=i=>{e.projects=[],e.userProfiles=[],e.isProjectsActive=!1,e.isPeopleActive=!0,e.searchSelected()})}," People ",2)])])]),r("div",ne,[r("ul",le,[r("li",null,[r("a",{href:"#",class:g(e.computedLocalTabStyleClassNames()),onClick:o[5]||(o[5]=i=>{e.projects=[],e.userProfiles=[],e.isLocalActive=!0,e.isMappedActive=!1,e.isAnywhereActive=!1,e.isSearchVisible=!0,e.tempSearchBox=null,e.searchLocal()})}," Nearby ",2)]),r("li",null,[r("a",{href:"#",class:g(e.computedMappedTabStyleClassNames()),onClick:o[6]||(o[6]=i=>{e.projects=[],e.userProfiles=[],e.isLocalActive=!1,e.isMappedActive=!0,e.isAnywhereActive=!1,e.isSearchVisible=!1,e.searchTerms="",e.tempSearchBox=null})}," Mapped ",2)]),r("li",null,[r("a",{href:"#",class:g(e.computedRemoteTabStyleClassNames()),onClick:o[7]||(o[7]=i=>{e.projects=[],e.userProfiles=[],e.isLocalActive=!1,e.isMappedActive=!1,e.isAnywhereActive=!0,e.isSearchVisible=!0,e.tempSearchBox=null,e.searchAll()})}," Anywhere ",2)])])]),e.isLocalActive?(u(),p("div",ce,[r("div",he,[r("button",{class:"ml-2 mt-2 px-4 py-2 rounded-md bg-blue-200 text-blue-500",onClick:o[8]||(o[8]=i=>e.$router.push({name:"search-area"}))},[f(d,{icon:"location-dot",class:"fa-fw"}),L(" Select a "+y(e.searchBox?"Different":"")+" Location for Nearby Search ",1)])])])):b("",!0),e.isMappedActive&&!e.tempSearchBox?(u(),p("div",de,[r("div",pe,[f(w,{ref:"projectMap",onReady:e.onMapReady,onMoveend:e.onMoveEnd,onMovestart:e.onMoveStart,onZoomend:e.onZoomEnd,onZoomstart:e.onZoomStart},{default:M(()=>[f(l,{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png","layer-type":"base",name:"OpenStreetMap"})]),_:1},8,["onReady","onMoveend","onMovestart","onZoomend","onZoomstart"])])])):b("",!0),e.isLoading?(u(),p("div",ue,[f(d,{icon:"spinner",class:"fa-spin-pulse"})])):e.projects.length===0&&e.userProfiles.length===0?(u(),p("div",me,[r("p",ve,[e.isLocalActive?(u(),p("span",fe,[e.searchBox?(u(),p("span",Ae," None found in the selected area. ")):b("",!0)])):e.isAnywhereActive?(u(),p("span",be,"No projects were found with that search.")):b("",!0)])])):b("",!0),f(S,{onReachedBottom:e.loadMoreData},{default:M(()=>[r("ul",ye,[e.isProjectsActive?(u(!0),p(j,{key:0},D(e.projects,i=>(u(),p("li",{key:i.handleId,class:"border-b border-slate-300"},[r("a",{class:"block py-4 flex gap-4 cursor-pointer",onClick:N=>e.onClickLoadItem(i.handleId)},[r("div",null,[f(P,{"entity-id":i.handleId,"icon-size":48,"image-url":i.image,class:"block border border-slate-300 rounded-md max-h-12 max-w-12"},null,8,["entity-id","image-url"])]),r("div",Le,[r("h2",we,y(i.name),1),r("div",Pe,[f(d,{icon:"user",class:"fa-fw text-slate-400"}),L(" "+y(e.didInfo(i.issuerDid,e.activeDid,e.allMyDids,e.allContacts)),1)])])],8,ge)]))),128)):(u(!0),p(j,{key:1},D(e.userProfiles,i=>(u(),p("li",{key:i.issuerDid,class:"border-b border-slate-300"},[r("a",{class:"block py-4 flex gap-4 cursor-pointer",onClick:N=>e.onClickLoadItem((i==null?void 0:i.rowId)||"")},[r("div",je,[r("div",ke,[f(d,{icon:"user",class:"fa-fw text-slate-400"}),L(" "+y(e.didInfo(i.issuerDid,e.activeDid,e.allMyDids,e.allContacts)),1)]),i.description?(u(),p("p",Ce,y(i.description),1)):b("",!0),e.isAnywhereActive&&i.locLat&&i.locLon?(u(),p("div",Me,[f(d,{icon:"location-dot",class:"fa-fw"}),L(" "+y((i.locLat>0?"North":"South")+" in "+(i.locLon>0?"Eastern":"Western")+" Hemisphere"),1)])):b("",!0)])],8,Se)]))),128))])]),_:1},8,["onReachedBottom"])])],64)}const Qe=O(k,[["render",De]]);export{Qe as default}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/EntityIcon-DciUb57i.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/EntityIcon-DciUb57i.js deleted file mode 100644 index 19ac4ca..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/EntityIcon-DciUb57i.js +++ /dev/null @@ -1 +0,0 @@ -var B=Object.defineProperty;var P=(a,l,e)=>l in a?B(a,l,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[l]=e;var C=(a,l,e)=>P(a,typeof l!="symbol"?l+"":l,e);import{a1 as H,C as I,V as O,_ as L,h as j,B as R}from"./main.common-DD7dqhZp.js";function d(a){return a.replace(/&/g,"&").replace(/'/g,"'").replace(/"/g,""").replace(//g,">")}function T(a){var l,e,t,i,c,r,o;const n=(l=a.meta)===null||l===void 0?void 0:l.title,f=(e=a.meta)===null||e===void 0?void 0:e.creator,s=(t=a.meta)===null||t===void 0?void 0:t.source,u=(c=(i=a.meta)===null||i===void 0?void 0:i.license)===null||c===void 0?void 0:c.url,v=E(a);return!n&&!f&&!s&&!u&&!v?"":''+(n?`${d(n)}`:"")+(f?`${d(f)}`:"")+(s?`${d((o=(r=a.meta)===null||r===void 0?void 0:r.source)!==null&&o!==void 0?o:"")}`:"")+(u?`${d(u)}`:"")+(v?`${d(v)}`:"")+""}function E(a){var l,e,t,i,c,r,o,n,f,s,u,v,h,_,y;let g=!((l=a.meta)===null||l===void 0)&&l.title?`„${(e=a.meta)===null||e===void 0?void 0:e.title}”`:"Design",Z=`„${(i=(t=a.meta)===null||t===void 0?void 0:t.creator)!==null&&i!==void 0?i:"Unknown"}”`;!((c=a.meta)===null||c===void 0)&&c.source&&(g+=` (${a.meta.source})`);let b="";return((o=(r=a.meta)===null||r===void 0?void 0:r.license)===null||o===void 0?void 0:o.name)!=="MIT"&&((n=a.meta)===null||n===void 0?void 0:n.creator)!=="DiceBear"&&(!((f=a.meta)===null||f===void 0)&&f.title)&&(b+="Remix of "),b+=`${g} by ${Z}`,!((u=(s=a.meta)===null||s===void 0?void 0:s.license)===null||u===void 0)&&u.name&&(b+=`, licensed under „${(h=(v=a.meta)===null||v===void 0?void 0:v.license)===null||h===void 0?void 0:h.name}”`,!((y=(_=a.meta)===null||_===void 0?void 0:_.license)===null||y===void 0)&&y.url&&(b+=` (${a.meta.license.url})`)),b}function G(a){var l,e,t,i,c,r,o,n,f;const s=E(a);return{"IPTC:ObjectName":(l=a.meta)===null||l===void 0?void 0:l.title,"XMP-dc:Title":(e=a.meta)===null||e===void 0?void 0:e.title,"IPTC:CopyrightNotice":s,"XMP-dc:Rights":s,"IPTC:By-line":(t=a.meta)===null||t===void 0?void 0:t.creator,"XMP-dc:Creator":(i=a.meta)===null||i===void 0?void 0:i.creator,"IPTC:Credit":(c=a.meta)===null||c===void 0?void 0:c.creator,"XMP-photoshop:Credit":(r=a.meta)===null||r===void 0?void 0:r.creator,"XMP-plus:LicensorURL":(o=a.meta)===null||o===void 0?void 0:o.source,"XMP-xmpRights:WebStatement":(f=(n=a.meta)===null||n===void 0?void 0:n.license)===null||f===void 0?void 0:f.url}}const S=-2147483648,W=2147483647;function N(a){return a^=a<<13,a^=a>>17,a^=a<<5,a}function X(a){let l=0;for(let e=0;el=N(l),t=(i,c)=>Math.floor((e()-S)/(W-S)*(c+1-i)+i);return{seed:a,next:e,bool(i=50){return t(0,100)<=i},integer(i,c){return t(i,c)},pick(i,c){var r;return i.length===0?(e(),c):(r=i[t(0,i.length-1)])!==null&&r!==void 0?r:c},shuffle(i){const c=w(e().toString());return i.sort(()=>c.integer(-1,1))},string(i,c="abcdefghijklmnopqrstuvwxyz1234567890"){const r=w(e().toString());let o="";for(let n=0;n`;switch(t){case"solid":return f+a.body;case"gradientLinear":return``+a.body}}function Y(a,l){let{width:e,height:t,x:i,y:c}=$(a),r=l?(l-100)/100:0,o=(e/2+i)*r*-1,n=(t/2+c)*r*-1;return`${a.body}`}function J(a,l,e){let t=$(a),i=(t.width+t.x*2)*((l??0)/100),c=(t.height+t.y*2)*((e??0)/100);return`${a.body}`}function K(a,l){let{width:e,height:t,x:i,y:c}=$(a);return`${a.body}`}function Q(a){let{width:l,x:e}=$(a);return`${a.body}`}function a1(a,l){let{width:e,height:t,x:i,y:c}=$(a),r=l?e*l/100:0,o=l?t*l/100:0;return`${a.body}`}function l1(a){const l={xmlns:"http://www.w3.org/2000/svg",...a.attributes};return Object.keys(l).map(e=>`${d(e)}="${d(l[e])}"`).join(" ")}function e1(a){const l=w(Math.random().toString()),e={};return a.body.replace(/(id="|url\(#)([a-z0-9-_]+)([")])/gi,(t,i,c,r)=>(e[c]=e[c]||l.string(8),`${i}${e[c]}${r}`))}const i1={properties:{seed:{type:"string"},flip:{type:"boolean",default:!1},rotate:{type:"integer",minimum:0,maximum:360,default:0},scale:{type:"integer",minimum:0,maximum:200,default:100},radius:{type:"integer",minimum:0,maximum:50,default:0},size:{type:"integer",minimum:1},backgroundColor:{type:"array",items:{type:"string",pattern:"^(transparent|[a-fA-F0-9]{6})$"}},backgroundType:{type:"array",items:{type:"string",enum:["solid","gradientLinear"]},default:["solid"]},backgroundRotation:{type:"array",items:{type:"integer",minimum:-360,maximum:360},default:[0,360]},translateX:{type:"integer",minimum:-100,maximum:100,default:0},translateY:{type:"integer",minimum:-100,maximum:100,default:0},clip:{type:"boolean",default:!0},randomizeIds:{type:"boolean",default:!1,examples:[!0,!1]}}};function z(a){var l;let e={},t=(l=a.properties)!==null&&l!==void 0?l:{};return Object.keys(t).forEach(i=>{let c=t[i];typeof c=="object"&&c.default!==void 0&&(Array.isArray(c.default)?e[i]=[...c.default]:typeof c.default=="object"?e[i]={...c.default}:e[i]=c.default)}),e}function t1(a,l){var e;let t={...z(i1),...z((e=a.schema)!==null&&e!==void 0?e:{}),...l};return JSON.parse(JSON.stringify(t))}function V(a){switch(a){case"svg":return"image/svg+xml";case"png":case"jpeg":return`image/${a}`;default:throw new Error(`Unsupported format: ${a}`)}}function c1(a,l=512){let e=l;return a=a.replace(/]*)/,(t,i)=>{const c=i.match(/width="([^"]+)"/);return c&&(e=parseInt(c[1])),i.match(/width="([^"]+)"/)?i=i.replace(/width="([^"]+)"/,`width="${e}"`):i+=` width="${e}"`,i.match(/height="([^"]+)"/)?i=i.replace(/height="([^"]+)"/,`height="${e}"`):i+=` height="${e}"`,`F(a,l,e),toFile:t=>n1(t,a,l,e),toArrayBuffer:()=>d1(a,l,e)}};async function F(a,l,e){return l==="svg"?`data:${V(l)};utf8,${encodeURIComponent(a)}`:(await U(a,l,e)).toDataURL(V(l))}async function d1(a,l,e){if(l==="svg")return r1().encode(a);const t=await U(a,l,e);return await new Promise((i,c)=>{t.toBlob(r=>{r?i(r.arrayBuffer()):c(new Error("Could not create blob"))},V(l))})}async function n1(a,l,e,t){const i=document.createElement("a");i.href=await F(l,e,t),i.download=a,i.click(),i.remove()}async function U(a,l,e){e&&console.warn("The `exif` option is not supported in the browser version of `@dicebear/converter`. \nPlease use the node version of `@dicebear/converter` to generate images with exif data.");let{svg:t,size:i}=c1(a);const c=document.createElement("canvas");c.width=i,c.height=i;const r=c.getContext("2d");if(r===null)throw new Error("Could not get canvas context");l==="jpeg"&&(r.fillStyle="white",r.fillRect(0,0,i,i));var o=document.createElement("img");return o.width=i,o.height=i,o.setAttribute("src",await F(t,"svg")),new Promise((n,f)=>{o.onload=()=>{r.drawImage(o,0,0,i,i),n(c)},o.onerror=s=>f(s)})}function D(a){return a==="transparent"?a:`#${a}`}function o1(a,l){var e;let t;l.length<=2?(a.next(),t=l):t=a.shuffle(l),t.length===0&&(t=["transparent"]);const i=t[0],c=(e=t[1])!==null&&e!==void 0?e:t[0];return{primary:D(i),secondary:D(c)}}function f1(a,l={}){var e,t,i,c,r;l=t1(a,l);const o=w(l.seed),n=a.create({prng:o,options:l}),{primary:f,secondary:s}=o1(o,(e=l.backgroundColor)!==null&&e!==void 0?e:[]),u=o.pick((t=l.backgroundType)!==null&&t!==void 0?t:[],"solid"),v=o.integer(!((i=l.backgroundRotation)===null||i===void 0)&&i.length?Math.min(...l.backgroundRotation):0,!((c=l.backgroundRotation)===null||c===void 0)&&c.length?Math.max(...l.backgroundRotation):0);l.size&&(n.attributes.width=l.size.toString(),n.attributes.height=l.size.toString()),l.scale!==void 0&&l.scale!==100&&(n.body=Y(n,l.scale)),l.flip&&(n.body=Q(n)),l.rotate&&(n.body=K(n,l.rotate)),(l.translateX||l.translateY)&&(n.body=J(n,l.translateX,l.translateY)),f!=="transparent"&&s!=="transparent"&&(n.body=q(n,f,s,u,v)),(l.radius||l.clip)&&(n.body=a1(n,(r=l.radius)!==null&&r!==void 0?r:0)),l.randomizeIds&&(n.body=e1(n));const h=l1(n),_=T(a),y=G(a),g=`${_}${n.body}`;return{toString:()=>g,toJson:()=>{var Z;return{svg:g,extra:{primaryBackgroundColor:f,secondaryBackgroundColor:s,backgroundType:u,backgroundRotation:v,...(Z=n.extra)===null||Z===void 0?void 0:Z.call(n)}}},toDataUriSync:()=>`data:image/svg+xml;utf8,${encodeURIComponent(g)}`,...x(g,"svg"),png:({includeExif:Z=!1}={})=>x(g,"png",Z?y:void 0),jpeg:({includeExif:Z=!1}={})=>x(g,"jpeg",Z?y:void 0)}}const s1={circle:(a,l)=>{var e,t,i,c,r,o,n,f,s,u,v,h;return`${(t=(e=a.clothing)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.mouth)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}${(o=(r=a.nose)===null||r===void 0?void 0:r.value(a,l))!==null&&o!==void 0?o:""}${(f=(n=a.eyes)===null||n===void 0?void 0:n.value(a,l))!==null&&f!==void 0?f:""}${(u=(s=a.eyebrows)===null||s===void 0?void 0:s.value(a,l))!==null&&u!==void 0?u:""}${(h=(v=a.top)===null||v===void 0?void 0:v.value(a,l))!==null&&h!==void 0?h:""}`},default:(a,l)=>{var e,t,i,c,r,o,n,f,s,u,v,h;return`${(t=(e=a.clothing)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.mouth)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}${(o=(r=a.nose)===null||r===void 0?void 0:r.value(a,l))!==null&&o!==void 0?o:""}${(f=(n=a.eyes)===null||n===void 0?void 0:n.value(a,l))!==null&&f!==void 0?f:""}${(u=(s=a.eyebrows)===null||s===void 0?void 0:s.value(a,l))!==null&&u!==void 0?u:""}${(h=(v=a.top)===null||v===void 0?void 0:v.value(a,l))!==null&&h!==void 0?h:""}`}},u1={blazerAndShirt:(a,l)=>``,blazerAndSweater:(a,l)=>``,collarAndSweater:(a,l)=>``,graphicShirt:(a,l)=>{var e,t;return`${(t=(e=a.clothingGraphic)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}`},hoodie:(a,l)=>``,overall:(a,l)=>``,shirtCrewNeck:(a,l)=>``,shirtScoopNeck:(a,l)=>``,shirtVNeck:(a,l)=>``},v1={concerned:(a,l)=>'',default:(a,l)=>'',disbelief:(a,l)=>'',eating:(a,l)=>'',grimace:(a,l)=>'',sad:(a,l)=>'',screamOpen:(a,l)=>'',serious:(a,l)=>'',smile:(a,l)=>'',tongue:(a,l)=>'',twinkle:(a,l)=>'',vomit:(a,l)=>''},h1={default:(a,l)=>''},p1={closed:(a,l)=>'',cry:(a,l)=>'',default:(a,l)=>'',eyeRoll:(a,l)=>'',happy:(a,l)=>'',hearts:(a,l)=>'',side:(a,l)=>'',squint:(a,l)=>'',surprised:(a,l)=>'',winkWacky:(a,l)=>'',wink:(a,l)=>'',xDizzy:(a,l)=>''},g1={angryNatural:(a,l)=>'',defaultNatural:(a,l)=>'',flatNatural:(a,l)=>'',frownNatural:(a,l)=>'',raisedExcitedNatural:(a,l)=>'',sadConcernedNatural:(a,l)=>'',unibrowNatural:(a,l)=>'',upDownNatural:(a,l)=>'',angry:(a,l)=>'',default:(a,l)=>'',raisedExcited:(a,l)=>'',sadConcerned:(a,l)=>'',upDown:(a,l)=>''},Z1={eyepatch:(a,l)=>{var e,t;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}`},hat:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},hijab:(a,l)=>{var e,t;return`${(t=(e=a.accessories)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}`},turban:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},winterHat1:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},winterHat02:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},winterHat03:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},winterHat04:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},bob:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},bun:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},curly:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},curvy:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},dreads:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},frida:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},fro:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},froBand:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},longButNotTooLong:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},miaWallace:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},shavedSides:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},straight02:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},straight01:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},straightAndStrand:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},dreads01:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},dreads02:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},frizzle:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},shaggy:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},shaggyMullet:(a,l)=>{var e,t,i,c;return`${(t=(e=a.accessories)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.facialHair)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},shortCurly:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},shortFlat:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},shortRound:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},shortWaved:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},sides:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},theCaesar:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},theCaesarAndSidePart:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`},bigHair:(a,l)=>{var e,t,i,c;return`${(t=(e=a.facialHair)===null||e===void 0?void 0:e.value(a,l))!==null&&t!==void 0?t:""}${(c=(i=a.accessories)===null||i===void 0?void 0:i.value(a,l))!==null&&c!==void 0?c:""}`}},m1={beardLight:(a,l)=>``,beardMagestic:(a,l)=>``,beardMedium:(a,l)=>``,moustacheFancy:(a,l)=>``,moustacheMagnum:(a,l)=>``},M1={kurt:(a,l)=>``,prescription01:(a,l)=>``,prescription02:(a,l)=>``,round:(a,l)=>``,sunglasses:(a,l)=>``,wayfarers:(a,l)=>``},y1={bat:(a,l)=>'',bear:(a,l)=>'',cumbia:(a,l)=>'',deer:(a,l)=>'',diamond:(a,l)=>'',hola:(a,l)=>'',pizza:(a,l)=>'',resist:(a,l)=>'',skull:(a,l)=>'',skullOutline:(a,l)=>''},$1=Object.freeze(Object.defineProperty({__proto__:null,accessories:M1,clothing:u1,clothingGraphic:y1,eyebrows:g1,eyes:p1,facialHair:m1,mouth:v1,nose:h1,style:s1,top:Z1},Symbol.toStringTag,{value:"Module"}));function p({prng:a,group:l,values:e=[]}){const t=$1,i=a.pick(e);if(i&&t[l][i])return{name:i,value:t[l][i]}}function _1({prng:a,options:l}){const e=p({prng:a,group:"style",values:l.style}),t=p({prng:a,group:"clothing",values:l.clothing}),i=p({prng:a,group:"mouth",values:l.mouth}),c=p({prng:a,group:"nose",values:l.nose}),r=p({prng:a,group:"eyes",values:l.eyes}),o=p({prng:a,group:"eyebrows",values:l.eyebrows}),n=p({prng:a,group:"top",values:l.top}),f=p({prng:a,group:"facialHair",values:l.facialHair}),s=p({prng:a,group:"accessories",values:l.accessories}),u=p({prng:a,group:"clothingGraphic",values:l.clothingGraphic});return{style:e,clothing:t,mouth:i,nose:c,eyes:r,eyebrows:o,top:a.bool(l.topProbability)?n:void 0,facialHair:a.bool(l.facialHairProbability)?f:void 0,accessories:a.bool(l.accessoriesProbability)?s:void 0,clothingGraphic:u}}function m(a){return a==="transparent"?a:`#${a}`}function b1({prng:a,options:l}){var e,t,i,c,r,o,n;return{accessories:m(a.pick((e=l.accessoriesColor)!==null&&e!==void 0?e:[],"transparent")),clothes:m(a.pick((t=l.clothesColor)!==null&&t!==void 0?t:[],"transparent")),hat:m(a.pick((i=l.hatColor)!==null&&i!==void 0?i:[],"transparent")),hair:m(a.pick((c=l.hairColor)!==null&&c!==void 0?c:[],"transparent")),skin:m(a.pick((r=l.skinColor)!==null&&r!==void 0?r:[],"transparent")),facialHair:m(a.pick((o=l.facialHairColor)!==null&&o!==void 0?o:[],"transparent")),background:m(a.pick((n=l.backgroundColor)!==null&&n!==void 0?n:[],"transparent"))}}function C1({prng:a,options:l,components:e,colors:t}){var i,c;((i=e.style)===null||i===void 0?void 0:i.name)==="circle"&&(l.backgroundColor=[]),((c=e.style)===null||c===void 0?void 0:c.name)!=="circle"&&l.backgroundColor&&l.backgroundColor.length===1&&l.backgroundColor[0]==="65c9ff"&&(l.backgroundColor=[])}const A1={$schema:"http://json-schema.org/draft-07/schema#",properties:{accessories:{type:"array",items:{type:"string",enum:["kurt","prescription01","prescription02","round","sunglasses","wayfarers"]},default:["kurt","prescription01","prescription02","round","sunglasses","wayfarers"]},accessoriesColor:{type:"array",items:{type:"string",pattern:"^(transparent|[a-fA-F0-9]{6})$"},default:["262e33","65c9ff","5199e4","25557c","e6e6e6","929598","3c4f5c","b1e2ff","a7ffc4","ffdeb5","ffafb9","ffffb1","ff488e","ff5c5c","ffffff"]},accessoriesProbability:{type:"integer",minimum:0,maximum:100,default:10},backgroundColor:{type:"array",items:{type:"string",pattern:"^(transparent|[a-fA-F0-9]{6})$"},default:["65c9ff"]},clothesColor:{type:"array",items:{type:"string",pattern:"^(transparent|[a-fA-F0-9]{6})$"},default:["262e33","65c9ff","5199e4","25557c","e6e6e6","929598","3c4f5c","b1e2ff","a7ffc4","ffafb9","ffffb1","ff488e","ff5c5c","ffffff"]},clothing:{type:"array",items:{type:"string",enum:["blazerAndShirt","blazerAndSweater","collarAndSweater","graphicShirt","hoodie","overall","shirtCrewNeck","shirtScoopNeck","shirtVNeck"]},default:["blazerAndShirt","blazerAndSweater","collarAndSweater","graphicShirt","hoodie","overall","shirtCrewNeck","shirtScoopNeck","shirtVNeck"]},clothingGraphic:{type:"array",items:{type:"string",enum:["bat","bear","cumbia","deer","diamond","hola","pizza","resist","skull","skullOutline"]},default:["bat","bear","cumbia","deer","diamond","hola","pizza","resist","skull","skullOutline"]},eyebrows:{type:"array",items:{type:"string",enum:["angryNatural","defaultNatural","flatNatural","frownNatural","raisedExcitedNatural","sadConcernedNatural","unibrowNatural","upDownNatural","angry","default","raisedExcited","sadConcerned","upDown"]},default:["angryNatural","defaultNatural","flatNatural","frownNatural","raisedExcitedNatural","sadConcernedNatural","unibrowNatural","upDownNatural","angry","default","raisedExcited","sadConcerned","upDown"]},eyes:{type:"array",items:{type:"string",enum:["closed","cry","default","eyeRoll","happy","hearts","side","squint","surprised","winkWacky","wink","xDizzy"]},default:["closed","cry","default","eyeRoll","happy","hearts","side","squint","surprised","winkWacky","wink","xDizzy"]},facialHair:{type:"array",items:{type:"string",enum:["beardLight","beardMagestic","beardMedium","moustacheFancy","moustacheMagnum"]},default:["beardLight","beardMagestic","beardMedium","moustacheFancy","moustacheMagnum"]},facialHairColor:{type:"array",items:{type:"string",pattern:"^(transparent|[a-fA-F0-9]{6})$"},default:["a55728","2c1b18","b58143","d6b370","724133","4a312c","f59797","ecdcbf","c93305","e8e1e1"]},facialHairProbability:{type:"integer",minimum:0,maximum:100,default:10},hairColor:{type:"array",items:{type:"string",pattern:"^(transparent|[a-fA-F0-9]{6})$"},default:["a55728","2c1b18","b58143","d6b370","724133","4a312c","f59797","ecdcbf","c93305","e8e1e1"]},hatColor:{type:"array",items:{type:"string",pattern:"^(transparent|[a-fA-F0-9]{6})$"},default:["262e33","65c9ff","5199e4","25557c","e6e6e6","929598","3c4f5c","b1e2ff","a7ffc4","ffdeb5","ffafb9","ffffb1","ff488e","ff5c5c","ffffff"]},mouth:{type:"array",items:{type:"string",enum:["concerned","default","disbelief","eating","grimace","sad","screamOpen","serious","smile","tongue","twinkle","vomit"]},default:["concerned","default","disbelief","eating","grimace","sad","screamOpen","serious","smile","tongue","twinkle","vomit"]},nose:{type:"array",items:{type:"string",enum:["default"]},default:["default"]},skinColor:{type:"array",items:{type:"string",pattern:"^(transparent|[a-fA-F0-9]{6})$"},default:["614335","d08b5b","ae5d29","edb98a","ffdbb4","fd9841","f8d25c"]},style:{type:"array",items:{type:"string",enum:["circle","default"]},default:["default"]},top:{type:"array",items:{type:"string",enum:["eyepatch","hat","hijab","turban","winterHat1","winterHat02","winterHat03","winterHat04","bob","bun","curly","curvy","dreads","frida","fro","froBand","longButNotTooLong","miaWallace","shavedSides","straight02","straight01","straightAndStrand","dreads01","dreads02","frizzle","shaggy","shaggyMullet","shortCurly","shortFlat","shortRound","shortWaved","sides","theCaesar","theCaesarAndSidePart","bigHair"]},default:["eyepatch","hat","hijab","turban","winterHat1","winterHat02","winterHat03","winterHat04","bob","bun","curly","curvy","dreads","frida","fro","froBand","longButNotTooLong","miaWallace","shavedSides","straight02","straight01","straightAndStrand","dreads01","dreads02","frizzle","shaggy","shaggyMullet","shortCurly","shortFlat","shortRound","shortWaved","sides","theCaesar","theCaesarAndSidePart","bigHair"]},topProbability:{type:"integer",minimum:0,maximum:100,default:100}}},w1={title:"Avataaars",creator:"Pablo Stanley",source:"https://avataaars.com/",homepage:"https://twitter.com/pablostanley",license:{name:"Free for personal and commercial use",url:"https://avataaars.com/"}},H1=({prng:a,options:l})=>{var e,t;const i=_1({prng:a,options:l}),c=b1({prng:a,options:l});return C1({prng:a,options:l,components:i,colors:c}),{attributes:{viewBox:"0 0 280 280",fill:"none","shape-rendering":"auto"},body:`${(t=(e=i.style)===null||e===void 0?void 0:e.value(i,c))!==null&&t!==void 0?t:""}`,extra:()=>({...Object.entries(i).reduce((r,[o,n])=>(r[o]=n==null?void 0:n.name,r),{}),...Object.entries(c).reduce((r,[o,n])=>(r[`${o}Color`]=n,r),{})})}},k1=Object.freeze(Object.defineProperty({__proto__:null,create:H1,meta:w1,schema:A1},Symbol.toStringTag,{value:"Module"}));var x1=Object.defineProperty,V1=Object.getOwnPropertyDescriptor,A=(a,l,e,t)=>{for(var i=t>1?void 0:t?V1(l,e):l,c=a.length-1,r;c>=0;c--)(r=a[c])&&(i=(t?r(l,e,i):r(i))||i);return t&&i&&x1(l,e,i),i};let M=class extends O{constructor(){super(...arguments);C(this,"contact");C(this,"entityId","");C(this,"iconSize",0);C(this,"profileImageUrl","")}generateIcon(){var t,i;const e=((t=this.contact)==null?void 0:t.profileImageUrl)||this.profileImageUrl;if(e)return``;{const c=((i=this.contact)==null?void 0:i.did)||this.entityId;if(!c)return``;const r={seed:c||"",size:this.iconSize};return f1(k1,r).toString()}}};A([H],M.prototype,"contact",2);A([H],M.prototype,"entityId",2);A([H],M.prototype,"iconSize",2);A([H],M.prototype,"profileImageUrl",2);M=A([I],M);const F1=["innerHTML"];function S1(a,l,e,t,i,c){return R(),j("div",{class:"w-fit",innerHTML:a.generateIcon()},null,8,F1)}const N1=L(M,[["render",S1]]);export{N1 as E}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/GiftedDetailsView-Biz6UhaP.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/GiftedDetailsView-Biz6UhaP.js deleted file mode 100644 index fe5e140..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/GiftedDetailsView-Biz6UhaP.js +++ /dev/null @@ -1,3 +0,0 @@ -var z=Object.defineProperty;var K=(t,e,s)=>e in t?z(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var r=(t,e,s)=>K(t,typeof e!="symbol"?e+"":e,s);import{V as X,e as Z,d as _,a as H,C as ee,_ as te,h as m,j as g,k as i,m as b,o as f,t as y,s as Q,y as v,q as j,w as ie,n as W,F as re,z as T,B as h}from"./main.common-DD7dqhZp.js";import{I as oe}from"./ImageMethodDialog-zrU-VGNm.js";import{Q as se}from"./QuickNav-C8jPGtUY.js";import{T as ae}from"./TopMessage-ZWDDjman.js";import{l as ne,h as le,i as J,a0 as L,g as de,a1 as pe,a2 as he,a3 as ce,a4 as ue}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./PhotoDialog-DZbf20A6.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var ge=Object.getOwnPropertyDescriptor,me=(t,e,s,c)=>{for(var a=c>1?void 0:c?ge(e,s):e,p=t.length-1,d;p>=0;p--)(d=t[p])&&(a=d(a)||a);return a};let I=class extends X{constructor(){super(...arguments);r(this,"$notify");r(this,"$route");r(this,"$router");r(this,"activeDid","");r(this,"apiServer","");r(this,"amountInput","0");r(this,"description","");r(this,"destinationPathAfter","");r(this,"fulfillsProjectId","");r(this,"fulfillsProjectName","a project");r(this,"givenToProject",!1);r(this,"givenToRecipient",!1);r(this,"giverDid","");r(this,"giverName","");r(this,"hideBackButton",!1);r(this,"imageUrl","");r(this,"isTrade",!1);r(this,"message","");r(this,"offerId","");r(this,"prevCredToEdit");r(this,"providerProjectId","");r(this,"providerProjectName","a project");r(this,"providedByProject",!1);r(this,"providedByGiver",!1);r(this,"recipientDid","");r(this,"recipientName","");r(this,"showGeneralAdvanced",!1);r(this,"unitCode","HUR");r(this,"libsUtil",ne)}async mounted(){var P,o,$,C,D,k,U,x,N,E,G,A,B,S,q,R,M,O,V,F;try{this.prevCredToEdit=this.$route.query.prevCredToEdit?JSON.parse(this.$route.query.prevCredToEdit):void 0}catch{this.$notify({group:"alert",type:"danger",title:"Retrieval Error",text:"The previous record isn't available for editing. If you submit, you'll create a new record."},6e3)}const e=($=(o=(P=this.prevCredToEdit)==null?void 0:P.claim)==null?void 0:o.object)==null?void 0:$.amountOfThisGood;this.amountInput=this.$route.query.amountInput||(e?String(e):"")||this.amountInput,this.description=this.$route.query.description||((D=(C=this.prevCredToEdit)==null?void 0:C.claim)==null?void 0:D.description)||this.description,this.destinationPathAfter=this.$route.query.destinationPathAfter||"",this.giverDid=this.$route.query.giverDid||((x=(U=(k=this.prevCredToEdit)==null?void 0:k.claim)==null?void 0:U.agent)==null?void 0:x.identifier)||this.giverDid,this.giverName=this.$route.query.giverName||"",this.hideBackButton=this.$route.query.hideBackButton==="true",this.message=this.$route.query.message||"";const s=(E=(N=this.prevCredToEdit)==null?void 0:N.claim)==null?void 0:E.fulfills,c=Array.isArray(s)?s:s?[s]:[],a=c.find(l=>l["@type"]==="Offer");this.offerId=this.$route.query.offerId||(a==null?void 0:a.identifier)||this.offerId;const p=c.find(l=>l["@type"]==="PlanAction");this.fulfillsProjectId=this.$route.query.fulfillsProjectId||(p==null?void 0:p.identifier)||this.fulfillsProjectId;const d=(A=(G=this.prevCredToEdit)==null?void 0:G.claim)==null?void 0:A.provider,n=(Array.isArray(d)?d:d?[d]:[]).find(l=>l["@type"]==="PlanAction");this.providerProjectId=this.$route.query.providerProjectId||(n==null?void 0:n.identifier)||this.providerProjectId,this.recipientDid=this.$route.query.recipientDid||((q=(S=(B=this.prevCredToEdit)==null?void 0:B.claim)==null?void 0:S.recipient)==null?void 0:q.identifier),this.recipientName=this.$route.query.recipientName||"",this.unitCode=this.$route.query.unitCode||((O=(M=(R=this.prevCredToEdit)==null?void 0:R.claim)==null?void 0:M.object)==null?void 0:O.unitCode)||this.unitCode,this.imageUrl=this.$route.query.imageUrl||((F=(V=this.prevCredToEdit)==null?void 0:V.claim)==null?void 0:F.image)||localStorage.getItem("imageUrl")||this.imageUrl,this.$route.query.shareTitle&&(this.description=(this.$route.query.shareTitle||"")+(this.description?` -`+this.description:"")),this.$route.query.shareText&&(this.description=(this.description?this.description+` -`:"")+(this.$route.query.shareText||"")),this.$route.query.shareUrl&&(this.imageUrl=this.$route.query.shareUrl);const w=await Z();if(this.apiServer=w.apiServer||"",this.activeDid=w.activeDid||"",this.giverDid&&!this.giverName||this.recipientDid&&!this.recipientName){const l=await _.contacts.toArray(),Y=await le();this.giverDid&&!this.giverName&&(this.giverName=J(this.giverDid,this.activeDid,Y,l)),this.recipientDid&&!this.recipientName&&(this.recipientName=J(this.recipientDid,this.activeDid,Y,l))}if(this.givenToProject=!!this.fulfillsProjectId,this.givenToRecipient=!this.givenToProject&&!!this.recipientDid,this.providedByProject=!!this.providerProjectId,this.providedByGiver=!this.providedByProject&&!!this.giverDid,this.showGeneralAdvanced=!!w.showGeneralAdvanced,this.fulfillsProjectId){const l=await L(this.fulfillsProjectId,this.axios,this.apiServer,this.activeDid);this.fulfillsProjectName=l!=null&&l.name?`the project "${l.name}"`:"a project"}if(this.providerProjectId){const l=await L(this.providerProjectId,this.axios,this.apiServer,this.activeDid);this.providerProjectName=l!=null&&l.name?`the project "${l.name}"`:"a project"}}changeUnitCode(){const e=Object.keys(this.libsUtil.UNIT_SHORT),s=e.indexOf(this.unitCode);this.unitCode=e[(s+1)%e.length]}increment(){this.amountInput=`${(parseFloat(this.amountInput)||0)+1}`}decrement(){this.amountInput=`${Math.max(0,(parseFloat(this.amountInput)||1)-1)}`}cancel(){this.deleteImage(),this.destinationPathAfter?this.$router.push({path:this.destinationPathAfter}):this.$router.back()}cancelBack(){this.deleteImage(),this.$router.back()}openImageDialog(){this.$refs.imageDialog.open(e=>{this.imageUrl=e},"GiveAction")}confirmDeleteImage(){this.$notify({group:"modal",type:"confirm",title:"Are you sure you want to delete the image?",text:"",onYes:this.deleteImage},-1)}async deleteImage(){if(this.imageUrl)try{const e=await de(this.activeDid);window.location.hostname==="localhost"&&!H.includes("localhost")&&console.log("Using shared image API server, so only users on that server can play with images.");const s=await this.axios.delete(H+"/image/"+encodeURIComponent(this.imageUrl),{headers:e});if(s.status!==204){console.error("Problem deleting image:",s),this.$notify({group:"alert",type:"danger",title:"Error",text:"There was a problem deleting the image."},5e3);return}localStorage.removeItem("imageUrl"),this.imageUrl=""}catch(e){console.error("Error deleting image:",e),e.response.status===404?(console.log("Weird: the image was already deleted.",e),localStorage.removeItem("imageUrl"),this.imageUrl=""):this.$notify({group:"alert",type:"danger",title:"Error",text:"There was an error deleting the image."},5e3)}}async confirm(){if(!this.activeDid){this.$notify({group:"alert",type:"danger",title:"Error",text:"You must select an identifier before you can record a give."},2e3);return}if(parseFloat(this.amountInput)<0){this.$notify({group:"alert",type:"danger",text:"You may not send a negative number.",title:""},2e3);return}if(!this.description&&!parseFloat(this.amountInput)){this.$notify({group:"alert",type:"danger",title:"Error",text:`You must enter a description or some number of ${this.libsUtil.UNIT_LONG[this.unitCode]}.`},2e3);return}this.$notify({group:"alert",type:"toast",text:"Recording the give...",title:""},1e3),await this.recordGive()}notifyUserOfGiver(){this.giverDid?this.$notify({group:"alert",type:"warning",title:"Unavailable",text:"You cannot assign both a giver and a project."},3e3):this.$notify({group:"alert",type:"warning",title:"Go To The Contacts Page",text:"To assign a giver, you must open this page from a contact."},3e3)}notifyUserOfRecipient(){this.recipientDid?this.$notify({group:"alert",type:"warning",title:"Unavailable",text:"You cannot assign both to a recipient and to a project."},3e3):this.$notify({group:"alert",type:"warning",title:"Go To The Contacts Page",text:"To assign to a recipient, you must open this page from a contact."},3e3)}notifyUserOfProvidingProject(){this.providerProjectId?this.$notify({group:"alert",type:"warning",title:"Unavailable",text:"You cannot select both a giving project and person."},3e3):this.$notify({group:"alert",type:"warning",title:"Go To The Project Page",text:"To select a project as a provider, you must open this page through a project."},3e3)}notifyUserFulfillsProject(){this.fulfillsProjectId?this.$notify({group:"alert",type:"warning",title:"Unavailable",text:"You cannot assign both to a project and to a recipient."},3e3):this.$notify({group:"alert",type:"warning",title:"Go To The Project Page",text:"To assign to a project, you must open this page through a project."},3e3)}async recordGive(){var e,s,c;try{const a=this.providedByGiver?this.giverDid:void 0,p=this.givenToRecipient?this.recipientDid:void 0,d=this.givenToProject?this.fulfillsProjectId:void 0;let u;if(this.prevCredToEdit?u=await pe(this.axios,this.apiServer,this.prevCredToEdit,this.activeDid,a,p,this.description,parseFloat(this.amountInput),this.unitCode,d,this.offerId,this.isTrade,this.imageUrl,this.providerProjectId):u=await he(this.axios,this.apiServer,this.activeDid,a,p,this.description,parseFloat(this.amountInput),this.unitCode,d,this.offerId,this.isTrade,this.imageUrl,this.providerProjectId),u.type==="error"||this.isGiveCreationError(u.response)){const n=this.getGiveCreationErrorMessage(u);console.error("Error with give creation result:",u),this.$notify({group:"alert",type:"danger",title:"Error",text:n||"There was an error creating the give."},5e3)}else this.$notify({group:"alert",type:"success",title:"Success",text:`That ${this.isTrade?"trade":"gift"} was recorded.`},3e3),localStorage.removeItem("imageUrl"),this.destinationPathAfter?this.$router.push({path:this.destinationPathAfter}):this.$router.back()}catch(a){console.error("Error with give recordation caught:",a);const p=a.userMessage||((c=(s=(e=a.response)==null?void 0:e.data)==null?void 0:s.error)==null?void 0:c.message)||"There was an error recording the give.";this.$notify({group:"alert",type:"danger",title:"Error",text:p},5e3)}}constructGiveParam(){var d,u;const e=this.providedByGiver?this.giverDid:void 0,s=this.givenToRecipient?this.recipientDid:void 0,c=this.givenToProject?this.fulfillsProjectId:void 0,a=ce((d=this.prevCredToEdit)==null?void 0:d.claim,e,s,this.description,parseFloat(this.amountInput),this.unitCode,c,this.offerId,this.isTrade,this.imageUrl,this.providerProjectId,(u=this.prevCredToEdit)==null?void 0:u.id);return JSON.stringify(a)}isGiveCreationError(e){var s;return e.status!==201||((s=e.data)==null?void 0:s.error)}getGiveCreationErrorMessage(e){var s,c,a,p,d;return((s=e.error)==null?void 0:s.userMessage)||((c=e.error)==null?void 0:c.error)||((d=(p=(a=e.response)==null?void 0:a.data)==null?void 0:p.error)==null?void 0:d.message)}explainData(){this.$notify({group:"alert",type:"success",title:"Data Sharing",text:ue},7e3)}};I=me([ee({components:{ImageMethodDialog:oe,QuickNav:se,TopMessage:ae}})],I);const ve={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},fe={key:0,class:"text-lg text-center font-light relative px-7"},ye={class:"text-xl font-bold text-center mb-4"},be={class:"flex flex-row justify-center"},we={class:"flex justify-center mt-4","data-testId":"imagery"},je={key:0,class:"flex justify-between"},Te=["href"],Pe=["src"],Ie={key:1},$e={class:"mt-4 flex justify-between gap-2"},Ce={class:"flex-grow border border-slate-400 p-2 rounded-md"},De={class:"flex"},ke={class:"text-sm mt-1"},Ue={class:"flex"},xe={class:"text-sm mt-1"},Ne={class:"flex-shrink flex justify-center items-center"},Ee={class:"flex-grow border border-slate-400 p-2 rounded-md"},Ge={class:"flex"},Ae={class:"text-sm mt-1"},Be={class:"flex"},Se={class:"text-sm mt-1"},qe={class:"mt-8 flex"},Re={key:1,class:"mt-4 flex"},Me={class:"text-center mb-2 mt-6 italic"},Oe={class:"grid grid-cols-1 sm:grid-cols-2 gap-2"};function Ve(t,e,s,c,a,p){const d=T("QuickNav"),u=T("TopMessage"),n=T("font-awesome"),w=T("ImageMethodDialog"),P=T("router-link");return h(),m(re,null,[g(d),g(u),i("section",ve,[t.hideBackButton?b("",!0):(h(),m("div",fe,[i("h1",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:e[0]||(e[0]=o=>t.cancelBack())},[g(n,{icon:"chevron-left",class:"fa-fw"})])])),e[22]||(e[22]=i("h1",{class:"text-4xl text-center font-light px-4 mb-4"},"What Was Given",-1)),i("h1",ye,[i("span",null," From "+y(t.providedByProject?t.providerProjectName:t.providedByGiver?t.giverName:"someone not named"),1),e[18]||(e[18]=i("br",null,null,-1)),i("span",null," to "+y(t.givenToProject?t.fulfillsProjectName:t.givenToRecipient?t.recipientName:"someone not named"),1)]),f(i("textarea",{"onUpdate:modelValue":e[1]||(e[1]=o=>t.description=o),class:"block w-full rounded border border-slate-400 mb-2 px-3 py-2",placeholder:"What was received"},null,512),[[Q,t.description]]),i("div",be,[i("span",{class:"rounded-l border border-r-0 border-slate-400 bg-slate-200 text-center text-blue-500 px-2 py-2 w-20",onClick:e[2]||(e[2]=o=>t.changeUnitCode())},y(t.libsUtil.UNIT_SHORT[t.unitCode]||t.unitCode),1),i("div",{class:"border border-r-0 border-slate-400 bg-slate-200 px-4 py-2",onClick:e[3]||(e[3]=o=>t.amountInput==="0"?null:t.decrement())},[g(n,{icon:"chevron-left"})]),f(i("input",{"onUpdate:modelValue":e[4]||(e[4]=o=>t.amountInput=o),type:"number",class:"border border-r-0 border-slate-400 px-2 py-2 text-center w-20"},null,512),[[Q,t.amountInput]]),i("div",{class:"rounded-r border border-slate-400 bg-slate-200 px-4 py-2",onClick:e[5]||(e[5]=o=>t.increment())},[g(n,{icon:"chevron-right"})])]),i("div",we,[t.imageUrl?(h(),m("span",je,[i("a",{href:t.imageUrl,target:"_blank"},[i("img",{src:t.imageUrl,class:"h-24 rounded-xl"},null,8,Pe)],8,Te),g(n,{icon:"trash-can",class:"text-red-500 fa-fw ml-8 mt-10",onClick:t.confirmDeleteImage},null,8,["onClick"])])):(h(),m("span",Ie,[g(n,{icon:"camera",class:"bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-2 rounded-md",onClick:t.openImageDialog},null,8,["onClick"])]))]),g(w,{ref:"imageDialog"},null,512),i("div",$e,[i("div",Ce,[i("div",De,[t.giverDid&&!t.providedByProject?f((h(),m("input",{key:0,"onUpdate:modelValue":e[6]||(e[6]=o=>t.providedByGiver=o),type:"checkbox",class:"h-6 w-6 mr-2"},null,512)),[[j,t.providedByGiver]]):(h(),v(n,{key:1,icon:"square",class:"mr-2 bg-white text-white h-5 w-5 px-0.5 py-0.5 rounded-sm"})),i("label",ke,y(t.giverDid?"This was provided by "+t.giverName+".":"No named individual gave."),1),!t.giverDid||t.providedByProject?(h(),v(n,{key:2,icon:"info-circle",class:"-mt-1 bg-white text-slate-500 h-5 w-5 px-0.5 py-0.5 rounded-sm",onClick:e[7]||(e[7]=o=>t.notifyUserOfGiver())})):b("",!0)]),i("div",Ue,[t.providerProjectId&&!t.providedByGiver?f((h(),m("input",{key:0,"onUpdate:modelValue":e[8]||(e[8]=o=>t.providedByProject=o),type:"checkbox",class:"h-6 w-6 mr-2"},null,512)),[[j,t.providedByProject]]):(h(),v(n,{key:1,icon:"square",class:"mr-2 bg-white text-white h-5 w-5 px-0.5 py-0.5 rounded-sm"})),i("label",xe,y(t.providerProjectId?"This was provided by "+t.providerProjectName+".":"This was not provided by a project."),1),!t.providerProjectId||t.providedByGiver?(h(),v(n,{key:2,icon:"info-circle",class:"-mt-1 bg-white text-slate-500 h-5 w-5 px-0.5 py-0.5 rounded-sm",onClick:e[9]||(e[9]=o=>t.notifyUserOfProvidingProject())})):b("",!0)])]),i("div",Ne,[g(n,{icon:"arrow-right",class:"fa-fw h-7"})]),i("div",Ee,[i("div",Ge,[t.recipientDid&&!t.givenToProject?f((h(),m("input",{key:0,"onUpdate:modelValue":e[10]||(e[10]=o=>t.givenToRecipient=o),type:"checkbox",class:"h-6 w-6 mr-2"},null,512)),[[j,t.givenToRecipient]]):(h(),v(n,{key:1,icon:"square",class:"mr-2 bg-white text-white h-5 w-5 px-0.5 py-0.5 rounded-sm"})),i("label",Ae,y(t.recipientDid?"This was given to "+t.recipientName+".":"No individual benefitted."),1),!t.recipientDid||t.givenToProject?(h(),v(n,{key:2,icon:"info-circle",class:"-mt-1 bg-white text-slate-500 h-5 w-5 px-0.5 py-0.5 rounded-sm",onClick:e[11]||(e[11]=o=>t.notifyUserOfRecipient())})):b("",!0)]),i("div",Be,[t.fulfillsProjectId&&!t.givenToRecipient?f((h(),m("input",{key:0,"onUpdate:modelValue":e[12]||(e[12]=o=>t.givenToProject=o),type:"checkbox",class:"h-6 w-6 mr-2"},null,512)),[[j,t.givenToProject]]):(h(),v(n,{key:1,icon:"square",class:"mr-2 bg-white text-white h-5 w-5 px-0.5 py-0.5 rounded-sm"})),i("label",Se,y(t.fulfillsProjectId?"This was given to "+t.fulfillsProjectName+". ":"No project benefitted."),1),!t.fulfillsProjectId||t.givenToRecipient?(h(),v(n,{key:2,icon:"info-circle",class:"-mt-1 bg-white text-slate-500 h-5 w-5 px-0.5 py-0.5 rounded-sm",onClick:e[13]||(e[13]=o=>t.notifyUserFulfillsProject())})):b("",!0)])])]),i("div",qe,[f(i("input",{"onUpdate:modelValue":e[14]||(e[14]=o=>t.isTrade=o),type:"checkbox",class:"h-6 w-6 mr-2"},null,512),[[j,t.isTrade]]),e[19]||(e[19]=i("label",{class:"text-sm mt-1"},"This was a trade (not a gift)",-1))]),t.showGeneralAdvanced?(h(),m("div",Re,[g(P,{to:{name:"claim-add-raw",query:{claim:t.constructGiveParam()}},class:"text-blue-500"},{default:ie(()=>e[20]||(e[20]=[W(" Edit Raw Data ")])),_:1},8,["to"])])):b("",!0),i("p",Me,[e[21]||(e[21]=W(" Sign & Send to publish to the world ")),g(n,{icon:"circle-info",class:"pl-2 text-blue-500 cursor-pointer",onClick:e[15]||(e[15]=o=>t.explainData())})]),i("div",Oe,[i("button",{class:"block w-full text-center text-lg font-bold uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md",onClick:e[16]||(e[16]=(...o)=>t.confirm&&t.confirm(...o))}," Sign & Send "),i("button",{class:"block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md",onClick:e[17]||(e[17]=(...o)=>t.cancel&&t.cancel(...o))}," Cancel ")])])],64)}const Ze=te(I,[["render",Ve]]);export{Ze as default}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/GiftedDialog-DmRkVexW.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/GiftedDialog-DmRkVexW.js deleted file mode 100644 index a70c76c..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/GiftedDialog-DmRkVexW.js +++ /dev/null @@ -1 +0,0 @@ -var D=Object.defineProperty;var x=(e,t,r)=>t in e?D(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var s=(e,t,r)=>x(e,typeof t!="symbol"?t+"":t,r);import{a1 as $,C as S,V as T,e as j,d as P,_ as U,z as b,h as k,m as E,B as G,k as l,o as y,t as I,s as C,j as h,w as M,n as w}from"./main.common-DD7dqhZp.js";import{l as O,h as V,i as N,a2 as A,ar as F,a4 as R}from"./index-ryzpKtgI.js";var H=Object.defineProperty,B=Object.getOwnPropertyDescriptor,g=(e,t,r,i)=>{for(var o=i>1?void 0:i?B(t,r):t,d=e.length-1,a;d>=0;d--)(a=e[d])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&H(t,r,o),o};let c=class extends T{constructor(){super(...arguments);s(this,"$notify");s(this,"fromProjectId","");s(this,"toProjectId","");s(this,"activeDid","");s(this,"allContacts",[]);s(this,"allMyDids",[]);s(this,"apiServer","");s(this,"amountInput","0");s(this,"callbackOnSuccess",()=>{});s(this,"customTitle");s(this,"description","");s(this,"giver");s(this,"isTrade",!1);s(this,"offerId","");s(this,"prompt","");s(this,"receiver");s(this,"unitCode","HUR");s(this,"visible",!1);s(this,"libsUtil",O)}async open(r,i,o,d,a,n=()=>{}){this.customTitle=d,this.giver=r,this.prompt=a||"",this.receiver=i,this.amountInput="0",this.callbackOnSuccess=n,this.offerId=o||"";try{const u=await j();this.apiServer=u.apiServer||"",this.activeDid=u.activeDid||"",this.allContacts=await P.contacts.toArray(),this.allMyDids=await V(),this.giver&&!this.giver.name&&(this.giver.name=N(this.giver.did,this.activeDid,this.allMyDids,this.allContacts))}catch(u){console.error("Error retrieving settings from database:",u),this.$notify({group:"alert",type:"danger",title:"Error",text:u.message||"There was an error retrieving your settings."},-1)}this.visible=!0}close(){this.visible=!1}changeUnitCode(){const r=Object.keys(this.libsUtil.UNIT_SHORT),i=r.indexOf(this.unitCode);this.unitCode=r[(i+1)%r.length]}increment(){this.amountInput=`${(parseFloat(this.amountInput)||0)+1}`}decrement(){this.amountInput=`${Math.max(0,(parseFloat(this.amountInput)||1)-1)}`}cancel(){this.close(),this.eraseValues()}eraseValues(){this.description="",this.giver=void 0,this.amountInput="0",this.prompt="",this.unitCode="HUR"}async confirm(){var r,i;if(!this.activeDid){this.$notify({group:"alert",type:"danger",title:"Error",text:"You must select an identifier before you can record a give."},3e3);return}if(parseFloat(this.amountInput)<0){this.$notify({group:"alert",type:"danger",text:"You may not send a negative number.",title:""},2e3);return}if(!this.description&&!parseFloat(this.amountInput)){this.$notify({group:"alert",type:"danger",title:"Error",text:`You must enter a description or some number of ${this.libsUtil.UNIT_LONG[this.unitCode]}.`},2e3);return}this.close(),this.$notify({group:"alert",type:"toast",text:"Recording the give...",title:""},1e3),await this.recordGive(((r=this.giver)==null?void 0:r.did)||null,((i=this.receiver)==null?void 0:i.did)||null,this.description,parseFloat(this.amountInput),this.unitCode).then(()=>{this.eraseValues()})}async recordGive(r,i,o,d,a="HUR"){try{const n=await A(this.axios,this.apiServer,this.activeDid,r,i,o,d,a,this.toProjectId,this.offerId,this.isTrade,void 0,this.fromProjectId);if(n.type==="error"||this.isGiveCreationError(n.response)){const u=this.getGiveCreationErrorMessage(n);console.error("Error with give creation result:",n),this.$notify({group:"alert",type:"danger",title:"Error",text:u||"There was an error creating the give."},-1)}else this.$notify({group:"alert",type:"success",title:"Success",text:`That ${this.isTrade?"trade":"gift"} was recorded.`},7e3),this.callbackOnSuccess&&this.callbackOnSuccess(d)}catch(n){console.error("Error with give recordation caught:",n);const u=n.userMessage||F(n)||"There was an error recording the give.";this.$notify({group:"alert",type:"danger",title:"Error",text:u},-1)}}isGiveCreationError(r){var i;return r.status!==201||((i=r.data)==null?void 0:i.error)}getGiveCreationErrorMessage(r){var i,o,d,a,n;return((i=r.error)==null?void 0:i.userMessage)||((o=r.error)==null?void 0:o.error)||((n=(a=(d=r.response)==null?void 0:d.data)==null?void 0:a.error)==null?void 0:n.message)}explainData(){this.$notify({group:"alert",type:"success",title:"Data Sharing",text:R},-1)}};g([$()],c.prototype,"fromProjectId",2);g([$()],c.prototype,"toProjectId",2);c=g([S],c);const Y={key:0,class:"dialog-overlay"},q={class:"dialog"},z={class:"text-xl font-bold text-center mb-4"},L=["placeholder"],W={class:"flex flex-row justify-center"},_={class:"mt-4 flex justify-center"},J={class:"text-center mb-2 mt-6 italic"},K={class:"grid grid-cols-1 sm:grid-cols-2 gap-2"};function Q(e,t,r,i,o,d){var u,m,v,f;const a=b("font-awesome"),n=b("router-link");return e.visible?(G(),k("div",Y,[l("div",q,[l("h1",z,I(e.customTitle),1),y(l("input",{"onUpdate:modelValue":t[0]||(t[0]=p=>e.description=p),type:"text",class:"block w-full rounded border border-slate-400 mb-2 px-3 py-2",placeholder:e.prompt||"What was given?"},null,8,L),[[C,e.description]]),l("div",W,[l("span",{class:"rounded-l border border-r-0 border-slate-400 bg-slate-200 text-center text-blue-500 px-2 py-2 w-20",onClick:t[1]||(t[1]=p=>e.changeUnitCode())},I(e.libsUtil.UNIT_SHORT[e.unitCode]||e.unitCode),1),l("div",{class:"border border-r-0 border-slate-400 bg-slate-200 px-4 py-2",onClick:t[2]||(t[2]=p=>e.amountInput==="0"?null:e.decrement())},[h(a,{icon:"chevron-left"})]),y(l("input",{id:"inputGivenAmount","onUpdate:modelValue":t[3]||(t[3]=p=>e.amountInput=p),type:"number",class:"border border-r-0 border-slate-400 px-2 py-2 text-center w-20"},null,512),[[C,e.amountInput]]),l("div",{class:"rounded-r border border-slate-400 bg-slate-200 px-4 py-2",onClick:t[4]||(t[4]=p=>e.increment())},[h(a,{icon:"chevron-right"})])]),l("div",_,[l("span",null,[h(n,{to:{name:"gifted-details",query:{amountInput:e.amountInput,description:e.description,giverDid:(u=e.giver)==null?void 0:u.did,giverName:(m=e.giver)==null?void 0:m.name,offerId:e.offerId,fulfillsProjectId:e.toProjectId,providerProjectId:e.fromProjectId,recipientDid:(v=e.receiver)==null?void 0:v.did,recipientName:(f=e.receiver)==null?void 0:f.name,unitCode:e.unitCode}},class:"text-blue-500"},{default:M(()=>t[8]||(t[8]=[w(" Photo & more options ... ")])),_:1},8,["to"])])]),l("p",J,[t[9]||(t[9]=w(" Sign & Send to publish to the world ")),h(a,{icon:"circle-info",class:"pl-2 text-blue-500 cursor-pointer",onClick:t[5]||(t[5]=p=>e.explainData())})]),l("div",K,[l("button",{class:"block w-full text-center text-lg font-bold uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md",onClick:t[6]||(t[6]=(...p)=>e.confirm&&e.confirm(...p))}," Sign & Send "),l("button",{class:"block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md",onClick:t[7]||(t[7]=(...p)=>e.cancel&&e.cancel(...p))}," Cancel ")])])])):E("",!0)}const re=U(c,[["render",Q]]);export{re as G}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/HelpNotificationTypesView-76lSXFAL.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/HelpNotificationTypesView-76lSXFAL.js deleted file mode 100644 index dfbbf9c..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/HelpNotificationTypesView-76lSXFAL.js +++ /dev/null @@ -1 +0,0 @@ -import{V as m,C as d,_ as v,h as w,j as l,k as e,n as r,w as g,F as x,z as p,B as b}from"./main.common-DD7dqhZp.js";import{Q as h}from"./QuickNav-C8jPGtUY.js";import"./index-BGoTPXII.js";var N=Object.getOwnPropertyDescriptor,k=(o,t,f,a)=>{for(var i=a>1?void 0:a?N(t,f):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(i=s(i)||i);return i};let u=class extends m{};u=k([d({components:{QuickNav:h}})],u);const T={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},V={class:"mb-8"},C={class:"text-lg text-center font-light relative px-7"};function $(o,t,f,a,i,n){const s=p("QuickNav"),c=p("font-awesome"),y=p("router-link");return b(),w(x,null,[l(s),e("section",T,[e("div",V,[e("div",C,[e("h1",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:t[0]||(t[0]=_=>o.$router.back())},[l(c,{icon:"chevron-left",class:"fa-fw"})])]),t[1]||(t[1]=e("h1",{id:"ViewHeading",class:"text-4xl text-center font-light pt-4 mb-8"}," Notification Types ",-1))]),e("div",null,[t[6]||(t[6]=e("p",null,"There are two types of notifications:",-1)),t[7]||(t[7]=e("h2",{class:"text-xl font-semibold mt-4"},"Reminder Notifications",-1)),t[8]||(t[8]=e("div",null,[e("p",null," The Reminder Notification will be sent to you daily with a specific message, at whatever time you choose. Use it to remind yourself to act, for example: pause and consider who has given you something, so you can record thanks in here. "),e("p",null," This is a reliable message, but it doesn't contain any details about activity that might be especially interesting to you. ")],-1)),t[9]||(t[9]=e("h2",{class:"text-xl font-semibold mt-4"},"New Activity Notifications",-1)),e("div",null,[t[5]||(t[5]=e("p",null," The New Activity Notification will be sent to you when there is new, relevant activity for you. It will only trigger if something involves you or a project of interest; it will not bug you for other, general activity. ",-1)),e("p",null,[t[3]||(t[3]=r(" This type is not as reliable as a Reminder Notification because mobile devices often suppress such notifications to save battery. (If you want to quickly check for relevant activity daily, use the Reminder Notification and open the app and look for a large green button that points out new activity that is personal to you. We are working on other ways to notify you more reliably -- ")),l(y,{class:"text-blue-500",to:"/help"},{default:g(()=>t[2]||(t[2]=[r("go here to follow us or contact us")])),_:1}),t[4]||(t[4]=r(".) "))])])])])],64)}const j=v(u,[["render",$]]);export{j as default}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/HelpNotificationsView-BOcgCbHz.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/HelpNotificationsView-BOcgCbHz.js deleted file mode 100644 index cb83d75..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/HelpNotificationsView-BOcgCbHz.js +++ /dev/null @@ -1 +0,0 @@ -var w=Object.defineProperty;var y=(o,t,s)=>t in o?w(o,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):o[t]=s;var h=(o,t,s)=>y(o,typeof t!="symbol"?t+"":t,s);import{V as v,d as x,M as k,C as S,_ as C,h as q,j as l,k as e,J as g,n as r,w as N,F as P,z as f,B as I}from"./main.common-DD7dqhZp.js";import{Q as T}from"./QuickNav-C8jPGtUY.js";import{a5 as A,a as O}from"./index-ryzpKtgI.js";import{P as $}from"./PushNotificationPermission-BPu7cCY7.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var M=Object.getOwnPropertyDescriptor,W=(o,t,s,i)=>{for(var n=i>1?void 0:i?M(t,s):t,u=o.length-1,d;u>=0;u--)(d=o[u])&&(n=d(n)||n);return n};let m=class extends v{constructor(){super(...arguments);h(this,"$notify");h(this,"$router");h(this,"subscriptionJSON")}async mounted(){var s;try{const i=await((s=navigator.serviceWorker)==null?void 0:s.ready),n=await(i==null?void 0:i.pushManager.getSubscription());this.subscriptionJSON=n==null?void 0:n.toJSON()}catch(i){console.error("Mount error:",i)}}alertWebPushSubscription(){alert(JSON.stringify(this.subscriptionJSON))}async sendTestWebPushMessage(s=!1){if(!this.subscriptionJSON){this.$notify({group:"alert",type:"danger",title:"Not Subscribed",text:"You must enable notifications before testing the web push."},5e3);return}try{await A(this.subscriptionJSON,s),this.$notify({group:"alert",type:"success",title:"Test Web Push Sent",text:"Check your device for the test web push message"+(s?".":" if there are new items in your feed.")},5e3)}catch(i){console.error("Got an error sending test notification:",i),this.$notify({group:"alert",type:"danger",title:"Error Sending Test",text:"Got an error sending the test web push notification."},5e3)}}showTestNotification(){var i;const s="It Worked";(i=navigator.serviceWorker)==null||i.ready.then(n=>n.showNotification(s,{body:"This is your test notification."})).then(()=>{this.$notify({group:"alert",type:"success",title:"Sent",text:`A notification was triggered, so one should show on your device entitled '${s}'.`},5e3)}).catch(n=>{console.error("Got a notification error:",n),this.$notify({group:"alert",type:"danger",title:"Failed",text:"Got an error sending a notification."},5e3)})}showNotificationChoice(){this.$refs.pushNotificationPermission.open(O,async(s,i,n)=>{s&&(await x.settings.update(k,{notifyingReminderMessage:n,notifyingReminderTime:i}),this.notifyingReminder=!0,this.notifyingReminderMessage=n||"",this.notifyingReminderTime=i)})}};m=W([S({components:{PushNotificationPermission:$,QuickNav:T}})],m);const D="/assets/chrome-install-pwa-DuUggvhZ.png",F="/assets/mac-installed-app-settings-B9fFiuKk.png",V="/assets/windows-system-enable-notifications-Dpjdl83C.png",R={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},B={class:"mb-8"},E={class:"text-lg text-center font-light relative px-7"},G={href:"https://developer.mozilla.org/en-US/docs/Web/API/Push_API#browser_compatibility",class:"text-blue-500",target:"_blank"},H={class:"px-2"},J={href:"https://developer.mozilla.org/en-US/docs/Web/API/Push_API#browser_compatibility",class:"text-blue-500",target:"_blank"};function Y(o,t,s,i,n,u){const d=f("QuickNav"),p=f("font-awesome"),b=f("PushNotificationPermission"),c=f("router-link");return I(),q(P,null,[l(d),e("section",R,[e("div",B,[e("div",E,[e("h1",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:t[0]||(t[0]=a=>o.$router.back())},[l(p,{icon:"chevron-left",class:"fa-fw"})])]),t[8]||(t[8]=e("h1",{id:"ViewHeading",class:"text-4xl text-center font-light pt-4 mb-8"}," Notification Help ",-1))]),e("div",null,[t[27]||(t[27]=e("p",null,"Here are ways to test notifications and get them working.",-1)),t[28]||(t[28]=e("h2",{class:"text-xl font-semibold mt-4"},"Full Test",-1)),e("div",null,[e("p",null,[t[9]||(t[9]=r(" If this works then you're all set. ")),e("button",{class:"block w-full text-center text-md bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md mb-2",onClick:t[1]||(t[1]=a=>o.sendTestWebPushMessage(!0))}," Send Yourself a Test Web Push Message (Through Push Server but Skipping Client Filter) ")])]),t[29]||(t[29]=e("h2",{class:"text-xl font-semibold mt-4"},"Android Users",-1)),t[30]||(t[30]=e("div",null,[e("p",null," Note that you may not receive notifications when the app is in the background. When you're done working, close the app, and then you'll get the reminder notifications. ")],-1)),t[31]||(t[31]=e("h2",{class:"text-xl font-semibold mt-4"}," If this app doesn't support notifications... ",-1)),t[32]||(t[32]=e("div",null,[e("p",null,[r(' To be notified of interesting updates, install this app on your device (as opposed to using it inside the browser app). In Chrome, it may prompt you, and you can also look for the "Install" command in the browser settings; on the the desktop, look for this icon in the address bar: '),e("img",{src:D,alt:"Chrome 'install' icon",class:"ml-4"})])],-1)),t[33]||(t[33]=e("h2",{class:"text-xl font-semibold mt-4"}," If you must enable notifications... ",-1)),e("div",null,[e("p",null,[e("button",{class:"text-blue-500",onClick:t[2]||(t[2]=a=>o.showNotificationChoice())}," Click here. "),l(b,{ref:"pushNotificationPermission"},null,512)])]),t[34]||(t[34]=g('

If you're waiting for system initialization...

... and it never stops, then there is a problem with the underlying service worker or push server mechanism in your browser. Your best bet is to follow the "Reinstall" steps below or use a different browser.

Check App Permissions

In Apple iOS, check "Settings" -> "Notifications", look for the Time Safari app (or the browser you're using), and make sure notifications are enabled.

In Android, hold on to the app icon, then select "App Info", then "Notifications" and make sure they're enabled. If it's still a problem then go further:

If you installed the app with Chrome, make sure there are no other tabs with it open. Here are some ways to clear caches that can mess things up (and note that this clears out data from the installed app -- which is good to do while the app is installed):

  • Go to Chrome "App Info", then "Storage & Cache" and "Clear Storage".
  • Go to Chrome "Settings", then "Privacy and Security" and "Clear "Clear browsing data", then "Cookies and site data". Make sure the "Time Range" at the top shows "All time".

On a Mac, go to "Settings" and check "Notifications". Mac app settings

Check Browser Permissions

',5)),e("div",null,[t[11]||(t[11]=e("p",null,"In Apple iOS, check Settings -> Notifications.",-1)),t[12]||(t[12]=e("p",null,"In Android, check Settings -> Notifications.",-1)),t[13]||(t[13]=r(" You can find more details about compatibility ")),e("a",G,[t[10]||(t[10]=r(" here ")),l(p,{icon:"arrow-up-right-from-square",class:"fa-fw"})])]),t[35]||(t[35]=e("h2",{class:"text-xl font-semibold mt-4"}," Check Operating System (OS) Permissions ",-1)),e("div",H,[t[16]||(t[16]=g('

Mobile Phone - Apple iOS

Notifications require iOS 16.4 or higher. To check your iOS version, go to Settings > General > About > Software Version.

Mobile Phone - Google Android

We recommend Chrome. It must be version 42 or higher. Check your version under Settings -> About Chrome.

Desktop - Mac

See "System Settings" -> "Notifications" and make sure it is enabled for the browser you're using. Note that these notifications require Mac OS 13; see your macOS version under Apple -> "About This Mac".

Desktop - Windows

In Windows, check "Settings" -> "Notifications". Windows system settings
',1)),e("div",null,[t[15]||(t[15]=r(" You can find more details about compatibility ")),e("a",J,[t[14]||(t[14]=r(" here ")),l(p,{icon:"arrow-up-right-from-square",class:"fa-fw"})])])]),t[36]||(t[36]=e("h2",{class:"text-xl font-semibold mt-4"},"Reinstall",-1)),e("div",null,[t[19]||(t[19]=e("p",null," If all else fails, it's best to start over. ",-1)),e("p",null,[t[17]||(t[17]=r(" Of course, you'll want to back up all your data first -- all seeds as well as the contacts & settings -- on the Profile ")),l(p,{icon:"circle-user"}),t[18]||(t[18]=r(" page. "))]),t[20]||(t[20]=e("p",null," Here are instructions to uninstall the app and clear out caches and storage. Note that you should first ensure check that the browser tabs with Time Safari are closed. (If any are open then that will interfere with your refresh.) ",-1)),t[21]||(t[21]=e("ul",{class:"ml-4 list-disc"},[e("li",null,[r(" Clear cache. "),e("ul",null,[e("li",null,' In mobile, look for the browser app settings. This is true even for an installed app: go to the browser which you used to initially visit timesafari.app, because those settings affect the app. Look for "Delete browsing data" in the "Settings", under "Privacy and Security". '),e("li",null,' In Chrome, go to `chrome://settings/cookies` and "all site data and permissions" for timesafari.app; in Firefox, go to `about:preferences` and search for "cache" then "Manage Data" for timesafari.app. Also manually remove the IndexedDB data if the DBs still show.) ')])]),e("li",null,' Clear notification permission. (In Chrome, go to `chrome://settings/content/notifications`; in Firefox, go to `about:preferences` and search for "notifications".) '),e("li",null," Unregister service worker. (In Chrome, go to `chrome://serviceworker-internals/`; in Firefox, go to `about:serviceworkers`.) "),e("li",null,' Clear "Cache Storage". (In Chrome, in dev tools under "Application"; in Firefox, in dev tools under "Storage".) ')],-1)),t[22]||(t[22]=e("p",null,"Then reinstall the app.",-1))]),t[37]||(t[37]=e("h2",{class:"text-xl font-semibold mt-4"},"Tests",-1)),e("button",{class:"block w-full text-center text-md bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md mt-4 mb-2",onClick:t[3]||(t[3]=a=>o.showTestNotification())}," Send Test Notification Directly to Device (Not Through Push Server) "),t[38]||(t[38]=e("p",null,` If that didn't show a notification on your device, the problem is that your browser or your operating system are not allowing notifications through. See "Check App Permissions" and "Check Browser Permissions" and "Check Operating System (OS) Permissions" above. `,-1)),e("button",{class:"block w-full text-center text-md bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md mt-4 mb-2",onClick:t[4]||(t[4]=a=>o.alertWebPushSubscription())}," Show Web Push Subscription Info "),e("p",null,[t[23]||(t[23]=r(' If that showed "null" then the notification is not active. ')),e("button",{class:"text-blue-500",onClick:t[5]||(t[5]=a=>o.showNotificationChoice())}," Click here. ")]),e("button",{class:"block w-full text-center text-md bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md mt-4 mb-2",onClick:t[6]||(t[6]=a=>o.sendTestWebPushMessage(!0))}," Send Yourself a Test Web Push Message (Through Push Server but Skipping Client Filter) "),t[39]||(t[39]=e("p",null," If that didn't show a notification on your device, there is a problem getting to the push server. Disable notifications and then enable them again. ",-1)),e("button",{class:"block w-full text-center text-md bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md mt-4 mb-2",onClick:t[7]||(t[7]=a=>o.sendTestWebPushMessage())}," Send Yourself a Test Web Push Message (Through Push Server and Client Filter) "),e("p",null,[t[25]||(t[25]=r(" If you don't see a message, it could be that there is nothing new for you to see. If the previous test worked, then things should work fine. If you notice a full 24 hours where you get no notification and you know that there are new items that should show, gather as many details as possible and go to the bottom of ")),l(c,{to:"help",class:"text-blue-500"},{default:N(()=>t[24]||(t[24]=[r(" this page ")])),_:1}),t[26]||(t[26]=r(" for ways to contact us. "))])])])],64)}const tt=C(m,[["render",Y]]);export{tt as default}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/HelpOnboardingView-CcWgFmX6.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/HelpOnboardingView-CcWgFmX6.js deleted file mode 100644 index 1a07471..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/HelpOnboardingView-CcWgFmX6.js +++ /dev/null @@ -1 +0,0 @@ -import{V as f,C as h,_ as g,h as x,k as e,n as o,j as i,w as y,z as u,B as v}from"./main.common-DD7dqhZp.js";import{Q as b}from"./QuickNav-C8jPGtUY.js";import"./index-BGoTPXII.js";var w=Object.getOwnPropertyDescriptor,k=(l,t,p,a)=>{for(var s=a>1?void 0:a?w(t,p):t,r=l.length-1,n;r>=0;r--)(n=l[r])&&(s=n(s)||s);return s};let d=class extends f{};d=k([h({components:{QuickNav:b}})],d);const T={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},C={class:"ml-4"},c={class:"ml-4"};function S(l,t,p,a,s,r){const n=u("font-awesome"),m=u("router-link");return v(),x("section",T,[t[21]||(t[21]=e("div",{class:"mb-8"},[e("h1",{id:"ViewHeading",class:"text-4xl text-center font-light pt-4 mb-8"}," Time Safari Onboarding Instructions ")],-1)),e("p",null,[t[0]||(t[0]=o(" To invite someone the easiest way, send them a link that you generate from this page: ")),i(m,{to:{name:"invite-one"},class:"bg-gradient-to-b from-green-400 to-green-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md"},{default:y(()=>[i(n,{icon:"envelope-open-text",class:"fa-fw text-xl"})]),_:1})]),t[22]||(t[22]=e("p",null,"Then watch that page to see when they accept their invite.",-1)),e("p",null,[t[1]||(t[1]=o(" (That page is also reachable from the Contacts ")),i(n,{icon:"users"}),t[2]||(t[2]=o(" page though the invitation ")),i(n,{icon:"envelope-open-text"}),t[3]||(t[3]=o(" icon.) "))]),t[23]||(t[23]=e("h1",{class:"mt-4 font-bold text-xl"},"Next Steps",-1)),t[24]||(t[24]=o(" Although not totally necessary, backups are important to understand. ")),e("div",C,[t[6]||(t[6]=e("h1",{class:"font-bold text-xl"},"Without a backup, you can lose data.",-1)),e("div",null,[e("p",null,[t[4]||(t[4]=o(" Exporting backups (from the Account ")),i(n,{icon:"circle-user"}),t[5]||(t[5]=o(" screen) is important for the case where they lose their device. This is especially true for the Identifier Seed: that is theirs and and theirs alone, and currently nobody else can recover it if they lose it. The good thing is that anyone can create a new account and simply inform their network of their new ID. "))])])]),t[25]||(t[25]=e("h1",{class:"mt-4 font-bold text-xl"},"Advanced",-1)),t[26]||(t[26]=o(" The following are optional steps for even more functionality. ")),e("div",c,[t[15]||(t[15]=e("h1",{class:"font-bold text-xl"},"Add Contact & Register",-1)),e("p",null,[t[7]||(t[7]=o(" You share even more information such as your picture and name when you share with your QR code at these links: ")),i(n,{icon:"qrcode"})]),t[16]||(t[16]=e("p",null," Scanning those with your cameras will automatically register people and add them to each other's contact lists. ",-1)),t[17]||(t[17]=e("p",null," The following are more detailed manual steps: ",-1)),e("div",null,[t[12]||(t[12]=e("p",null," 1) Have them follow their yellow prompts. ",-1)),e("p",null,[t[8]||(t[8]=o(" 2) Scan their QR, or have them tap on it to copy their info and send it to you. Then you can add them to your Contacts ")),i(n,{icon:"users"})]),e("p",null,[t[9]||(t[9]=o(" 3) You can register them at their info page ")),i(n,{icon:"circle-info"}),t[10]||(t[10]=o(" and click on the register button ")),i(n,{icon:"person-circle-question"})]),e("p",null,[t[11]||(t[11]=o(" 4) Add yourself to their Contacts ")),i(n,{icon:"users"})])]),t[18]||(t[18]=e("h1",{class:"font-bold text-xl"},"Install",-1)),t[19]||(t[19]=e("div",null,[e("p",null,' Have them visit TimeSafari.app in a browser, preferably Chrome or Safari, and then look for the "Install" selection which adds this app to their desktop. This enables other things, like the ability to "share" a photo from their device directly to Time Safari, and it makes notifications more reliable. ')],-1)),t[20]||(t[20]=e("h1",{class:"font-bold text-xl"},"Enable Notifications",-1)),e("div",null,[e("p",null,[t[13]||(t[13]=o(" Enable notifications from the Account page ")),i(n,{icon:"circle-user"}),t[14]||(t[14]=o(". Those notifications might show up on the device depending on your settings. For the most reliable habits, set an alarm or do some other ritual to record gratitude every day. "))])])])])}const H=g(d,[["render",S]]);export{H as default}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/HelpView-pr-0AKMM.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/HelpView-pr-0AKMM.js deleted file mode 100644 index eb49d9c..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/HelpView-pr-0AKMM.js +++ /dev/null @@ -1 +0,0 @@ -var P=Object.defineProperty;var V=(i,e,a)=>e in i?P(i,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):i[e]=a;var r=(i,e,a)=>V(i,typeof e!="symbol"?e+"":e,a);import{V as F,e as z,u as B,C as q,_ as N,h as p,j as s,k as t,J as $,n as o,m,w as u,o as b,v as x,t as k,F as E,z as g,B as c}from"./main.common-DD7dqhZp.js";import{u as M}from"./index-CZnn7ED5.js";import{Q as W}from"./QuickNav-C8jPGtUY.js";import"./index-BGoTPXII.js";const I="timesafari",T="0.4.4",C="TimeSafari Desktop Application",S={name:"TimeSafari Team"},j={dev:"vite --config vite.config.dev.mts",serve:"vite preview",build:"VITE_GIT_HASH=`git log -1 --pretty=format:%h` vite build",lint:"eslint --ext .js,.ts,.vue --ignore-path .gitignore src","lint-fix":"eslint --ext .js,.ts,.vue --ignore-path .gitignore --fix src",prebuild:"eslint --ext .js,.ts,.vue --ignore-path .gitignore src && node sw_combine.js","test-local":"npx playwright test -c playwright.config-local.ts --trace on","test-all":"npm run build && npx playwright test -c playwright.config-local.ts --trace on","clean:electron":"rimraf dist-electron","build:pywebview":"vite build --config vite.config.pywebview.mts","build:electron":"npm run clean:electron && vite build --config vite.config.electron.mts && node scripts/build-electron.js","build:capacitor":"vite build --config vite.config.capacitor.mts","build:web":"vite build --config vite.config.web.mts","electron:dev":"npm run build && electron dist-electron","electron:start":"electron dist-electron","electron:build-linux":"npm run build:electron && electron-builder --linux AppImage","electron:build-linux-deb":"npm run build:electron && electron-builder --linux deb","electron:build-linux-prod":"NODE_ENV=production npm run build:electron && electron-builder --linux AppImage","build:electron-prod":"NODE_ENV=production npm run build:electron","pywebview:dev":"vite build --config vite.config.pywebview.mts && .venv/bin/python src/pywebview/main.py","pywebview:build":"vite build --config vite.config.pywebview.mts && .venv/bin/python src/pywebview/main.py","pywebview:package-linux":"vite build --mode pywebview --config vite.config.pywebview.mts && .venv/bin/python -m PyInstaller --name TimeSafari --add-data 'dist:www' src/pywebview/main.py","pywebview:package-win":"vite build --mode pywebview --config vite.config.pywebview.mts && .venv/Scripts/python -m PyInstaller --name TimeSafari --add-data 'dist;www' src/pywebview/main.py","pywebview:package-mac":"vite build --mode pywebview --config vite.config.pywebview.mts && .venv/bin/python -m PyInstaller --name TimeSafari --add-data 'dist:www' src/pywebview/main.py","build:did-generator":"tsc -p test-scripts/tsconfig.json","generate-did":"node test-scripts/dist/did_generator.js"},D={"@capacitor/android":"^6.2.0","@capacitor/app":"^6.0.0","@capacitor/cli":"^6.2.0","@capacitor/core":"^6.2.0","@capacitor/ios":"^6.2.0","@dicebear/collection":"^5.4.1","@dicebear/core":"^5.4.1","@ethersproject/hdnode":"^5.7.0","@fortawesome/fontawesome-svg-core":"^6.5.1","@fortawesome/free-solid-svg-icons":"^6.5.1","@fortawesome/vue-fontawesome":"^3.0.6","@peculiar/asn1-ecc":"^2.3.8","@peculiar/asn1-schema":"^2.3.8","@pvermeer/dexie-encrypted-addon":"^3.0.0","@simplewebauthn/browser":"^10.0.0","@simplewebauthn/server":"^10.0.0","@tweenjs/tween.js":"^21.1.1","@types/qrcode":"^1.5.5","@veramo/core":"^5.6.0","@veramo/credential-w3c":"^5.6.0","@veramo/data-store":"^5.6.0","@veramo/did-manager":"^5.6.0","@veramo/did-provider-ethr":"^5.6.0","@veramo/did-provider-peer":"^6.0.0","@veramo/did-resolver":"^5.6.0","@veramo/key-manager":"^5.6.0","@vue-leaflet/vue-leaflet":"^0.10.1","@vueuse/core":"^12.3.0","@zxing/text-encoding":"^0.9.0","asn1-ber":"^1.2.2",axios:"^1.6.8","cbor-x":"^1.5.9","class-transformer":"^0.5.1",dexie:"^3.2.7","dexie-export-import":"^4.1.4","did-jwt":"^7.4.7","did-resolver":"^4.1.0","ethereum-cryptography":"^2.1.3","ethereumjs-util":"^7.1.5",jdenticon:"^3.2.0","js-generate-password":"^0.1.9","js-yaml":"^4.1.0",leaflet:"^1.9.4","localstorage-slim":"^2.7.0","lru-cache":"^10.2.0",luxon:"^3.4.4",merkletreejs:"^0.3.11","nostr-tools":"^2.10.4",notiwind:"^2.0.2",papaparse:"^5.4.1",pina:"^0.20.2204228","pinia-plugin-persistedstate":"^3.2.1","qr-code-generator-vue3":"^1.4.21",qrcode:"^1.5.4",ramda:"^0.29.1","readable-stream":"^4.5.2","reflect-metadata":"^0.1.14","register-service-worker":"^1.7.2","simple-vue-camera":"^1.1.3",sqlite3:"^5.1.7","stream-browserify":"^3.0.0",three:"^0.156.1","ua-parser-js":"^1.0.37",vue:"^3.5.13","vue-axios":"^3.5.2","vue-facing-decorator":"^3.0.4","vue-picture-cropper":"^0.7.0","vue-qrcode-reader":"^5.5.3","vue-router":"^4.5.0","web-did-resolver":"^2.0.27",zod:"^3.24.2",dotenv:"^16.0.3"},G={"@playwright/test":"^1.45.2","@types/dom-webcodecs":"^0.1.7","@types/js-yaml":"^4.0.9","@types/leaflet":"^1.9.8","@types/luxon":"^3.4.2","@types/node":"^20.14.11","@types/node-fetch":"^2.6.12","@types/ramda":"^0.29.11","@types/sqlite3":"^3.1.11","@types/three":"^0.155.1","@types/ua-parser-js":"^0.7.39","@typescript-eslint/eslint-plugin":"^6.21.0","@typescript-eslint/parser":"^6.21.0","@vitejs/plugin-vue":"^5.2.1","@vue/eslint-config-typescript":"^11.0.3",autoprefixer:"^10.4.19",concurrently:"^8.2.2",electron:"^33.2.1","electron-builder":"^25.1.8",eslint:"^8.57.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.2.1","eslint-plugin-vue":"^9.32.0","fs-extra":"^11.3.0",markdownlint:"^0.37.4","markdownlint-cli":"^0.44.0","npm-check-updates":"^17.1.13",postcss:"^8.4.38",prettier:"^3.2.5",rimraf:"^6.0.1",tailwindcss:"^3.4.1",typescript:"~5.2.2",vite:"^5.2.0","vite-plugin-pwa":"^0.19.8"},A="./dist-electron/main.js",H={appId:"org.timesafari.app",productName:"TimeSafari",directories:{output:"dist-electron-packages"},files:["dist-electron/**/*","src/electron/**/*","main.js"],extraResources:[{from:"dist-electron",to:"."}],linux:{target:["AppImage","deb"],category:"Office",icon:"build/icon.png"},asar:!0},O={name:I,version:T,description:C,author:S,scripts:j,dependencies:D,devDependencies:G,main:A,build:H},Y=Object.freeze(Object.defineProperty({__proto__:null,author:S,build:H,default:O,dependencies:D,description:C,devDependencies:G,main:A,name:I,scripts:j,version:T},Symbol.toStringTag,{value:"Module"}));var R=Object.getOwnPropertyDescriptor,L=(i,e,a,w)=>{for(var h=w>1?void 0:w?R(e,a):e,f=i.length-1,y;f>=0;f--)(y=i[f])&&(h=y(h)||h);return h};let v=class extends F{constructor(){super(...arguments);r(this,"$notify");r(this,"$router");r(this,"package",Y);r(this,"commitHash");r(this,"showAlpha",!1);r(this,"showBasics",!1);r(this,"showCommunity",!1);r(this,"showGovernance",!1);r(this,"showGroup",!1);r(this,"showDidCopy",!1);r(this,"showVerifiable",!1)}doCopyTwoSecRedo(e,a){a(),M().copy(e).then(()=>setTimeout(a,2e3))}async unsetFinishedOnboarding(){const e=await z();e.activeDid&&await B(e.activeDid,{finishedOnboarding:!1}),this.$router.push({name:"home"})}};v=L([q({components:{QuickNav:W}})],v);const Q="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2013.0.2,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%2014948)%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.0//EN'%20'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'%3e%3csvg%20version='1.0'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='64px'%20height='64px'%20viewBox='5.5%20-3.5%2064%2064'%20enable-background='new%205.5%20-3.5%2064%2064'%20xml:space='preserve'%3e%3cg%3e%3ccircle%20fill='%23FFFFFF'%20cx='37.785'%20cy='28.501'%20r='28.836'/%3e%3cpath%20d='M37.441-3.5c8.951,0,16.572,3.125,22.857,9.372c3.008,3.009,5.295,6.448,6.857,10.314%20c1.561,3.867,2.344,7.971,2.344,12.314c0,4.381-0.773,8.486-2.314,12.313c-1.543,3.828-3.82,7.21-6.828,10.143%20c-3.123,3.085-6.666,5.448-10.629,7.086c-3.961,1.638-8.057,2.457-12.285,2.457s-8.276-0.808-12.143-2.429%20c-3.866-1.618-7.333-3.961-10.4-7.027c-3.067-3.066-5.4-6.524-7-10.372S5.5,32.767,5.5,28.5c0-4.229,0.809-8.295,2.428-12.2%20c1.619-3.905,3.972-7.4,7.057-10.486C21.08-0.394,28.565-3.5,37.441-3.5z%20M37.557,2.272c-7.314,0-13.467,2.553-18.458,7.657%20c-2.515,2.553-4.448,5.419-5.8,8.6c-1.354,3.181-2.029,6.505-2.029,9.972c0,3.429,0.675,6.734,2.029,9.913%20c1.353,3.183,3.285,6.021,5.8,8.516c2.514,2.496,5.351,4.399,8.515,5.715c3.161,1.314,6.476,1.971,9.943,1.971%20c3.428,0,6.75-0.665,9.973-1.999c3.219-1.335,6.121-3.257,8.713-5.771c4.99-4.876,7.484-10.99,7.484-18.344%20c0-3.543-0.648-6.895-1.943-10.057c-1.293-3.162-3.18-5.98-5.654-8.458C50.984,4.844,44.795,2.272,37.557,2.272z%20M37.156,23.187%20l-4.287,2.229c-0.458-0.951-1.019-1.619-1.685-2c-0.667-0.38-1.286-0.571-1.858-0.571c-2.856,0-4.286,1.885-4.286,5.657%20c0,1.714,0.362,3.084,1.085,4.113c0.724,1.029,1.791,1.544,3.201,1.544c1.867,0,3.181-0.915,3.944-2.743l3.942,2%20c-0.838,1.563-2,2.791-3.486,3.686c-1.484,0.896-3.123,1.343-4.914,1.343c-2.857,0-5.163-0.875-6.915-2.629%20c-1.752-1.752-2.628-4.19-2.628-7.313c0-3.048,0.886-5.466,2.657-7.257c1.771-1.79,4.009-2.686,6.715-2.686%20C32.604,18.558,35.441,20.101,37.156,23.187z%20M55.613,23.187l-4.229,2.229c-0.457-0.951-1.02-1.619-1.686-2%20c-0.668-0.38-1.307-0.571-1.914-0.571c-2.857,0-4.287,1.885-4.287,5.657c0,1.714,0.363,3.084,1.086,4.113%20c0.723,1.029,1.789,1.544,3.201,1.544c1.865,0,3.18-0.915,3.941-2.743l4,2c-0.875,1.563-2.057,2.791-3.541,3.686%20c-1.486,0.896-3.105,1.343-4.857,1.343c-2.896,0-5.209-0.875-6.941-2.629c-1.736-1.752-2.602-4.19-2.602-7.313%20c0-3.048,0.885-5.466,2.658-7.257c1.77-1.79,4.008-2.686,6.713-2.686C51.117,18.558,53.938,20.101,55.613,23.187z'/%3e%3c/g%3e%3c/svg%3e",U="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2013.0.2,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%2014948)%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='64px'%20height='64px'%20viewBox='-0.5%200.5%2064%2064'%20enable-background='new%20-0.5%200.5%2064%2064'%20xml:space='preserve'%3e%3cg%3e%3ccircle%20fill='%23FFFFFF'%20cx='31.325'%20cy='32.873'%20r='30.096'/%3e%3cpath%20id='text2809_1_'%20d='M31.5,14.08c-10.565,0-13.222,9.969-13.222,18.42c0,8.452,2.656,18.42,13.222,18.42%20c10.564,0,13.221-9.968,13.221-18.42C44.721,24.049,42.064,14.08,31.5,14.08z%20M31.5,21.026c0.429,0,0.82,0.066,1.188,0.157%20c0.761,0.656,1.133,1.561,0.403,2.823l-7.036,12.93c-0.216-1.636-0.247-3.24-0.247-4.437C25.808,28.777,26.066,21.026,31.5,21.026z%20M36.766,26.987c0.373,1.984,0.426,4.056,0.426,5.513c0,3.723-0.258,11.475-5.69,11.475c-0.428,0-0.822-0.045-1.188-0.136%20c-0.07-0.021-0.134-0.043-0.202-0.067c-0.112-0.032-0.23-0.068-0.336-0.11c-1.21-0.515-1.972-1.446-0.874-3.093L36.766,26.987z'/%3e%3cpath%20id='path2815_1_'%20d='M31.433,0.5c-8.877,0-16.359,3.09-22.454,9.3c-3.087,3.087-5.443,6.607-7.082,10.532%20C0.297,24.219-0.5,28.271-0.5,32.5c0,4.268,0.797,8.32,2.397,12.168c1.6,3.85,3.921,7.312,6.969,10.396%20c3.085,3.049,6.549,5.399,10.398,7.037c3.886,1.602,7.939,2.398,12.169,2.398c4.229,0,8.34-0.826,12.303-2.465%20c3.962-1.639,7.496-3.994,10.621-7.081c3.011-2.933,5.289-6.297,6.812-10.106C62.73,41,63.5,36.883,63.5,32.5%20c0-4.343-0.77-8.454-2.33-12.303c-1.562-3.885-3.848-7.32-6.857-10.33C48.025,3.619,40.385,0.5,31.433,0.5z%20M31.567,6.259%20c7.238,0,13.412,2.566,18.554,7.709c2.477,2.477,4.375,5.31,5.67,8.471c1.296,3.162,1.949,6.518,1.949,10.061%20c0,7.354-2.516,13.454-7.506,18.33c-2.592,2.516-5.502,4.447-8.74,5.781c-3.2,1.334-6.498,1.994-9.927,1.994%20c-3.468,0-6.788-0.653-9.949-1.948c-3.163-1.334-6.001-3.238-8.516-5.716c-2.515-2.514-4.455-5.353-5.826-8.516%20c-1.333-3.199-2.017-6.498-2.017-9.927c0-3.467,0.684-6.787,2.017-9.949c1.371-3.2,3.312-6.074,5.826-8.628%20C18.092,8.818,24.252,6.259,31.567,6.259z'/%3e%3c/g%3e%3c/svg%3e",J={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},K={class:"mb-8"},Z={class:"text-lg text-center font-light relative px-7"},X={class:"ml-4"},_={class:"list-disc list-outside ml-4"},ee={class:"p-2"},te={key:0},oe={class:"p-2"},ie={key:0},se={class:"p-2"},ne={key:0},re={class:"p-2"},ae={key:0},le={class:"p-2"},de={key:0},ue={class:"p-2"},pe={key:0},ce={class:"px-4"},me={class:"list-disc list-outside ml-4"},he={class:"list-disc list-outside ml-4"},fe={class:"list-disc list-outside ml-4"},ye={class:"px-4"},we={class:"list-disc list-outside ml-4"},ge={class:"list-disc list-outside ml-4"},ve={class:"list-disc list-outside ml-4"},be={style:{display:"inline","align-items":"center"}},xe={class:"list-disc list-outside ml-4"};function ke(i,e,a,w,h,f){const y=g("QuickNav"),n=g("font-awesome"),l=g("router-link");return c(),p(E,null,[s(y),t("section",J,[t("div",K,[t("div",Z,[t("h1",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:e[0]||(e[0]=d=>i.$router.back())},[s(n,{icon:"chevron-left",class:"fa-fw"})])]),e[9]||(e[9]=t("h1",{id:"ViewHeading",class:"text-4xl text-center font-light pt-4 mb-8"}," Help ",-1))]),t("div",null,[e[83]||(e[83]=t("p",null," This app focuses on gifts & gratitude, using them to build cool things together with your network. ",-1)),t("p",X,[e[10]||(e[10]=o(" If you'd like to see the page-by-page help, ")),t("span",{class:"text-blue-500 cursor-pointer",onClick:e[1]||(e[1]=d=>i.unsetFinishedOnboarding())},"click here"),e[11]||(e[11]=o(". "))]),e[84]||(e[84]=t("h2",{class:"text-xl font-semibold"},"What is the idea here?",-1)),e[85]||(e[85]=t("p",null," We are building networks of people who want to grow good society from the ground up, using modern technology that connects people peer-to-peer. First of all, let's showcase gratitude: see what people have given, and recognize gifts you've seen. This is done in a way that leaves a permanent record -- one that came from you, and one that the recipient can prove it was for them. This can be personally gratifying, but it extends to broader work: volunteers get confirmation of activity, and they can selectively show off their contributions and network. ",-1)),e[86]||(e[86]=t("p",{class:"mt-2"}," With this, you highlight giving and you also offer help -- which could be conditional on others' contributions, too. You can record your own ideas and invite others to collaborate. It's a way to organize & build with the resource that everyone has in equal amounts: time. ",-1)),e[87]||(e[87]=t("p",{class:"mt-2"}," Note that your personal data is safe: your ID is only shared with those you allow. Neither your name nor your contacts' names are shared with anyone -- even our servers -- though you can explicitly share it with other individuals if you choose. ",-1)),e[88]||(e[88]=t("h2",{class:"text-xl font-semibold"},"I want to know more because...",-1)),t("ul",_,[t("li",ee,[t("div",{class:"text-blue-500",onClick:e[2]||(e[2]=d=>i.showAlpha=!i.showAlpha)},"... I'm a member of Alpha chat."),i.showAlpha?(c(),p("div",te,e[12]||(e[12]=[t("p",null," This is a project for public benefit. You are invited to add your gratitude and propose projects on a distributable ledger. ",-1),t("p",null," The underlying data is on a merkle tree with each verifiable claim, signature and all. The chain includes individual IDs for discovery & visibility, so not all data is distributed -- yet. The goal is to eventually distribute the data on people's devices with their chosen network, where anyone could host their own chain of provenance if they choose. The formats follow standard schemas (eg. schema.org) to encourage interoperability. We're currently at the beginning phase where we're trusting the server to keep IDs private. It's all open-source, and we expect to have a professional audit someday. ",-1),t("p",null," A person's network of contacts is similar: the server currently knows some of the links between people to allow discovery and visibility. However, even that will be manageable on personal devices someday. ",-1),t("p",null,` There are no tokens to maintain the chain: the purpose is to create software that communities and activists can easily join and use. We're betting that this is a case where network participants have the motivation to run the software. The protocol is meant to be lightweight enough that non-technical people can run it on inexpensive devices they already own. There may be cases for MPC or ZKP in the future when they are more widespread and standard, but our preference is to engineer as simply as possible with "white-magic" cryptography over those "black-magic" functions. `,-1),t("p",null," Let's make real distributed computing and shared data happen, starting with our own small networks. ",-1),t("p",null," ... and exemplify the fun along the way. ",-1)]))):m("",!0)]),t("li",oe,[t("div",{class:"text-blue-500",onClick:e[3]||(e[3]=d=>i.showGroup=!i.showGroup)},"... I want to find a group I'll enjoy working with."),i.showGroup?(c(),p("div",ie,e[13]||(e[13]=[t("p",null," This app encourages people to offer small bits of time to one another. It's a way to run experiments with other people... tests of working together, which can start small and easy but build into cooperation with people who are like-minded and who work well together. ",-1),t("p",null," Search the projects and place an offer on an interesting one -- or create your own project and see who offers to help. After your first experiment, you can give and get confirmation about the work, which you might choose to show to future contacts. ",-1)]))):m("",!0)]),t("li",se,[t("div",{class:"text-blue-500",onClick:e[4]||(e[4]=d=>i.showCommunity=!i.showCommunity)},"... I want to participate in community projects."),i.showCommunity?(c(),p("div",ne,e[14]||(e[14]=[t("p",null," These are mostly at the beginning stages, so any of them will appreciate your offers that show interest. In fact, your offers can include your preferences, which give the project owners indications of how to proceed. ",-1),t("p",null," Search through the projects for issues of interest, locally as well as globally. If you don't see any projects that interest you, create your own and see what kind of offers you get. ",-1)]))):m("",!0)]),t("li",re,[t("div",{class:"text-blue-500",onClick:e[5]||(e[5]=d=>i.showVerifiable=!i.showVerifiable)},"... I want to build with verifiable, private data."),i.showVerifiable?(c(),p("div",ae,e[15]||(e[15]=[t("p",null," Make your claims and get others to confirm them. Then you can use the API to pull your copy of all that data, both claims from you and claims from others about you. These are hard-and-fast credentials that can be shown to others, along with their verifiable time and signature. ",-1),t("p",null," Furthermore, you can use your network to verify claims by other people, even if they haven't given you visibility. First, on the claim screen you can see if the server detects anyone who is a direct link between you, so you can reach out to those in-between people for more info. If there isn't anyone who is directly in between then you can reach out with a message to your network. ",-1),t("p",null," This app generated an identifier, based on public & private keys located on your device. That ID is only shared with our server and with people you explicitly allow. The other information -- like gratitude and contributions and projects -- are published to a server that protects your ID. (Someday, your devices will share directly P2P and not need a server... you can choose your levels of discovery and privacy.) What this means is that you are in charge of your network, and we provide tools and reporting to help you connect with your network for references and reputation. ",-1)]))):m("",!0)]),t("li",le,[t("div",{class:"text-blue-500",onClick:e[6]||(e[6]=d=>i.showGovernance=!i.showGovernance)},"... I want to build governance organically."),i.showGovernance?(c(),p("div",de,e[16]||(e[16]=[t("p",null," This requires motivated, dedicated citizens. The good thing is that dedication the primary ingredient; add coordination and we can find ways to replace monopolistic systems. ",-1),t("p",null," Add projects for your main areas of interest, and offer commitments to projects to kick-start some initiatives. ",-1),t("p",null," One other feature worth emphasizing: you build a history of credentials, ones that are verifiably yours. But one other good thing is that you get support from those who confirm your activity. You can share this support in a way that others can validate the data for themselves from people in their own network. This kind of reputable project and history of performance is good evidence for your ability to take responsibility for important initiatives. ",-1)]))):m("",!0)]),t("li",ue,[t("div",{class:"text-blue-500",onClick:e[7]||(e[7]=d=>i.showBasics=!i.showBasics)},"... I want to supply life's basics freely."),i.showBasics?(c(),p("div",pe,[t("p",null,[e[20]||(e[20]=o(" This platform is not optimal for balancing needs and resources at this point, but we continuously seek out and list those kinds of projects. Watch our blog, and watch the project list for words like ")),s(l,{class:"text-blue-500",to:"/discover?searchText=sharing"},{default:u(()=>e[17]||(e[17]=[o('"sharing"')])),_:1}),e[21]||(e[21]=o(" or ")),s(l,{class:"text-blue-500",to:"/discover?searchText=basic"},{default:u(()=>e[18]||(e[18]=[o('"basic"')])),_:1}),e[22]||(e[22]=o(" or ")),s(l,{class:"text-blue-500",to:"/discover?searchText=free"},{default:u(()=>e[19]||(e[19]=[o('"free"')])),_:1}),e[23]||(e[23]=o(". "))])])):m("",!0)])]),e[89]||(e[89]=t("h2",{class:"text-xl font-semibold"},"How do I get started?",-1)),t("p",null,[e[24]||(e[24]=o(" Someone -- like the person who told you about this app -- needs to register you on the Contacts ")),s(n,{icon:"users",class:"fa-fw"}),e[25]||(e[25]=o(" page. If you heard about this from our outreach, feel free to contact us (below) for a chat. After someone registers you, you can register others. "))]),e[90]||(e[90]=t("p",null,' Then you can record your appreciation for... whatever: select any contact on the home page (or "Unnamed") and send it. The main goal is to record what people have given you, to grow giving economies. You can also record your own ideas for projects. Each claim is recorded on a custom ledger. ',-1)),e[91]||(e[91]=t("p",null," The day after being registered, you'll be able to able to register others, too. Note that there are limits to how many others you can register. Take your time to bring people on... make it an opportunity to get to know their projects, and to show off your own. ",-1)),e[92]||(e[92]=t("h2",{class:"text-xl font-semibold"},"How do I add someone else?",-1)),t("p",null,[e[27]||(e[27]=t("a",{href:"/help-onboarding",target:"_blank",class:"text-blue-500"}," Use these instructions. ",-1)),e[28]||(e[28]=o(" To start scanning, go to the ")),s(l,{class:"text-blue-500",to:"/contact-qr"},{default:u(()=>e[26]||(e[26]=[o("contact-scanning page.")])),_:1})]),t("p",null,[e[29]||(e[29]=o(" If they are not nearby to scan QR codes, you each can tap on the QR code and paste it into the text box on the Contacts ")),s(n,{icon:"users",class:"fa-fw"}),e[30]||(e[30]=o(" page. "))]),e[93]||(e[93]=t("h2",{class:"text-xl font-semibold"}," I had an identifier, but I reinstalled and I got a new one automatically. How do I restore my old one? ",-1)),t("p",null,[e[32]||(e[32]=o(" Go ")),s(l,{class:"text-blue-500",to:"/import-account"},{default:u(()=>e[31]||(e[31]=[o("import your identifier")])),_:1}),e[33]||(e[33]=o(". "))]),e[94]||(e[94]=t("h2",{class:"text-xl font-semibold"},"How do I backup all my data?",-1)),e[95]||(e[95]=t("p",null," There are four sets of data to backup: the identifier secrets; the private text data that isn't as sensitive such as settings and contacts; the private image for yourself; and the data that you have sent to the public. ",-1)),t("div",ce,[e[43]||(e[43]=t("h2",{class:"text-xl font-semibold"}," How do I backup my identifier (secret) data? ",-1)),t("ul",me,[t("li",null,[e[34]||(e[34]=o(" Go to Your Identity ")),s(n,{icon:"circle-user",class:"fa-fw"}),e[35]||(e[35]=o(" page. "))]),e[36]||(e[36]=t("li",null,' Click on "Backup Identifier Seed" and follow the instructions. ',-1)),e[37]||(e[37]=t("li",null," If you have other identifiers, switch to each one and repeat those steps. ",-1))]),e[44]||(e[44]=t("h2",{class:"text-xl font-semibold"}," How do I backup my other private text data like settings & contacts? ",-1)),t("ul",he,[t("li",null,[e[38]||(e[38]=o(" Go to Your Identity ")),s(n,{icon:"circle-user",class:"fa-fw"}),e[39]||(e[39]=o(" page. "))]),e[40]||(e[40]=t("li",null,` Click on "Download Settings...". That will save a file to your downloads folder. That is your backup, so put it someplace where you won't lose it. `,-1))]),e[45]||(e[45]=t("h2",{class:"text-xl font-semibold"}," How do I backup my profile image? ",-1)),t("ul",fe,[t("li",null,[e[41]||(e[41]=o(" Go to Your Identity ")),s(n,{icon:"circle-user",class:"fa-fw"}),e[42]||(e[42]=o(" page, tap on your image, and save it. "))])]),e[46]||(e[46]=t("h2",{class:"text-xl font-semibold"}," How do I backup other data I've posted? ",-1)),e[47]||(e[47]=t("ul",{class:"list-disc list-outside ml-4"},[t("li",null,[o(" This requires use of the API, so investigate the endpoints "),t("a",{href:"https://api.endorser.ch/",target:"_blank",class:"text-blue-500"},"here"),o(' (particularly the "claim" endpoints). ')])],-1))]),e[96]||(e[96]=t("h2",{class:"text-xl font-semibold"},"How do I restore my data?",-1)),e[97]||(e[97]=t("p",null," There are two steps to restore your data: the identity secrets, then the other data such as settings, contacts, etc. ",-1)),t("div",ye,[e[52]||(e[52]=t("h2",{class:"text-xl font-semibold"}," How do I restore my identifier (secret) data? ",-1)),t("ul",we,[t("li",null,[s(l,{class:"text-blue-500",to:"/import-account"},{default:u(()=>e[48]||(e[48]=[o(" Go to the import page ")])),_:1}),e[49]||(e[49]=o(" and enter the seed phrase you backed up. "))])]),e[53]||(e[53]=t("h2",{class:"text-xl font-semibold"}," How do I restore my other (non-identifier-secret) data? ",-1)),t("ul",ge,[t("li",null,[e[50]||(e[50]=o(" Go to Your Identity ")),s(n,{icon:"circle-user",class:"fa-fw"}),e[51]||(e[51]=o(' page, click Advanced, and follow the instructions for the Contacts & Settings Database "Import". Beware that this will erase your existing contact & settings. '))])])]),e[98]||(e[98]=t("h2",{class:"text-xl font-semibold"},"How do I create another identity?",-1)),t("p",null,[e[55]||(e[55]=o(' Before doing this, beware that it is an advanced feature that affects functionality (eg. the words "Alt ID" next to results, backup features). You can ')),s(l,{to:"start",class:"text-blue-500"},{default:u(()=>e[54]||(e[54]=[o(" create another identity here. ")])),_:1})]),e[99]||(e[99]=$('

How do I erase my data from my device?

Before doing this, you may want to back up your data with the instructions above.

  • Mobile
    • Home Screen: hold down on the icon, and choose to delete it
    • Chrome: Settings -> Privacy and Security -> Clear Browsing Data
    • DuckDuckGo: long hold -> Clear Data (takes effect immediately)
  • Desktop
    • Chrome: Clear at "chrome://settings/content/all" and also clear under dev tools Application
    • Firefox: Navigate to "about:preferences", Manage Data, find timesafari.app and select, hit Remove Selected, then Save Changes
    • Safari: Settings -> Privacy -> Manage Website Data, search for timesafari.app and select, hit Remove Selected, then Done.

To erase your data from our servers, contact us (below).

How do I get higher limits?

Let's talk. Contact us (below).

How do I access even more functionality?

',7)),t("p",null,[e[56]||(e[56]=o(' There is an "Advanced" section at the bottom of the Profile ')),s(n,{icon:"circle-user"}),e[57]||(e[57]=o(" page. "))]),e[100]||(e[100]=t("p",null,[o(" There is even more functionality in a mobile app (and more documentation) at "),t("a",{href:"https://endorser.ch",target:"_blank",class:"text-blue-500"}," EndorserSearch.com ")],-1)),e[101]||(e[101]=t("h2",{class:"text-xl font-semibold"}," I know there is a record from someone, so why can't I see that info? ",-1)),t("p",null,[e[58]||(e[58]=o(" If you don't see anything associated with a person, this is typically because they have not given you permission to see their information. Ask them to add you to their contact list, and ask specifically to make sure the eye next to your name is open like this ")),s(n,{icon:"eye",class:"fa-fw"}),e[59]||(e[59]=o(" and not closed like this ")),s(n,{icon:"eye-slash",class:"fa-fw"}),e[60]||(e[60]=o(". "))]),e[102]||(e[102]=t("p",null," Sometimes the reason you don't see something is because the search results are limited. Go to the bottom and make sure to load all the data on a list. If you still don't see it, try a search or view on a different page. ",-1)),e[103]||(e[103]=t("h2",{class:"text-xl font-semibold"}," Where do I get help with notifications? ",-1)),t("p",null,[s(l,{class:"text-blue-500",to:"/help-notifications"},{default:u(()=>e[61]||(e[61]=[o("Here.")])),_:1})]),e[104]||(e[104]=t("h2",{class:"text-xl font-semibold"}," This app is misbehaving, like showing me a blank screen or failing to show my personal data. What can I do? ",-1)),e[105]||(e[105]=t("p",null," First, note that clearing the cache will clear all your identity and contact info, so we recommend doing other things first -- and only clearing when have your backups ready. ",-1)),t("ul",ve,[e[64]||(e[64]=t("li",null," Drag down on the screen to refresh it; do that multiple times, because it sometimes takes multiple tries for the app to refresh to the latest version. You can see the version information at the bottom of this page; the best way to determine the latest version is to open this page in an incognito/private browser window and look at the version there. ",-1)),e[65]||(e[65]=t("li",null," Close all tabs that have Time Safari open; it can be difficult to find them all, and you may have to close all your tabs. In addition, it may be running as an installed app, so look for any Time Safari app that may be running outside a browser. ",-1)),t("li",null,[e[62]||(e[62]=o(" There may be a problem with your identity. Go to the Identity ")),s(n,{icon:"circle-user",class:"fa-fw"}),e[63]||(e[63]=o(' page, then "Advanced", and "Switch Identifier" and you may see helpful info there. If it shows a problem, try adding your identifier again. '))]),e[66]||(e[66]=t("li",null,[o(" It can help to reregister the service worker: "),t("ul",null,[t("li",null,' In Chrome, open a tab to "chrome://serviceworker-internals", find "timesafari.app", and click "Unregister".'),t("li",null,' In Firefox, open a tab to "about:serviceworkers", find "timesafari.app", and click "Unregister". '),t("li",null,[t("a",{href:"https://duckduckgo.com/?q=unregister+service+worker",target:"_blank",class:"text-blue-500"},"Search"),o(" for instructions for other browsers.")])]),o(" Then reload Time Safari. ")],-1)),e[67]||(e[67]=t("li",null," Restart your device. ",-1))]),e[106]||(e[106]=t("p",null,' If you still have problems, you can clear the cache (see "erase my data" above) and even uninstall and reinstall the app -- just be sure to have your backups ready or be prepared to restart with a new identity and recreate your network. Nobody else has access to your identity or contact information because this app is designed to give you full control over your data. ',-1)),e[107]||(e[107]=t("h2",{class:"text-xl font-semibold"},"What are the terms & conditions and the privacy policy?",-1)),t("p",be,[e[73]||(e[73]=o(" This work is public domain. (If you like rules, reference ")),e[74]||(e[74]=t("a",{href:"http://creativecommons.org/publicdomain/zero/1.0?ref=chooser-v1",target:"_blank",rel:"license noopener noreferrer"},[t("span",{class:"text-blue-500 mr-1"},"CC0 1.0"),t("img",{src:Q,alt:"CC circle",width:"20",class:"display: inline"}),t("img",{src:U,alt:"CC zero",width:"20",style:{display:"inline"}})],-1)),e[75]||(e[75]=o(" .) This is offered freely, with the hope that it helps but without any warranty or guarantee; if it helps you then enjoy using it, but if you may try to forcibly collect damages for things you think it should do (or not do) then don't use it. ")),e[76]||(e[76]=t("br",null,null,-1)),e[77]||(e[77]=o(" As for data & privacy: ")),t("ul",xe,[t("li",null,[e[68]||(e[68]=o(" If using notifications, a server stores push token data. That can be revoked at any time by disabling notifications on the Profile ")),s(n,{icon:"circle-user",class:"fa-fw"}),e[69]||(e[69]=o(" page. "))]),e[70]||(e[70]=t("li",null," If sending images, a server stores them, too. They can be removed by editing the claim and deleting them. ",-1)),e[71]||(e[71]=t("li",null," If sending other partner system data (eg. to Trustroots) a public key and message data are stored on a server. Those can be removed via direct personal request. ",-1)),e[72]||(e[72]=t("li",null,[o(" For all other claim data, "),t("a",{href:"https://endorser.ch/privacy-policy",target:"_blank",class:"text-blue-500"}," the Endorser Service has this Privacy Policy. ")],-1))])]),e[108]||(e[108]=t("h2",{class:"text-xl font-semibold"},"How can I contribute?",-1)),t("p",null,[e[79]||(e[79]=o(" If you have skills, contact us below. If you have Bitcoin, donate to ")),t("button",{class:"text-blue-500 ml-2",onClick:e[8]||(e[8]=d=>i.doCopyTwoSecRedo("bc1q90v4ted6cpt63tjfh2lvd5xzfc67sd4g9w8xma",()=>i.showDidCopy=!i.showDidCopy))},[e[78]||(e[78]=o(" bc1q90v4ted6cpt63tjfh2lvd5xzfc67sd4g9w8xma ")),b(s(n,{icon:"copy",class:"text-sm text-slate-400 fa-fw"},null,512),[[x,!i.showDidCopy]]),b(s(n,{icon:"circle-check",class:"text-sm text-green-500 fa-fw"},null,512),[[x,i.showDidCopy]])]),e[80]||(e[80]=o(" You can donate online via ")),e[81]||(e[81]=t("a",{href:"https://www.patreon.com/TimeSafari",target:"_blank",class:"text-blue-500"},"Patreon here",-1)),e[82]||(e[82]=o(". For other donations, contact us. "))]),e[109]||(e[109]=t("h2",{class:"text-xl font-semibold"},"Where can I read more?",-1)),e[110]||(e[110]=t("p",null,[o(" This is part of the "),t("a",{href:"https://livesofgiving.org",target:"_blank",class:"text-blue-500"}," Lives of Giving "),o(" initiative. ")],-1)),e[111]||(e[111]=t("h2",{class:"text-xl font-semibold"},"What app version is this?",-1)),t("p",null,k(i.package.version)+" ("+k(i.commitHash)+")",1),e[112]||(e[112]=t("h2",{class:"text-xl font-semibold"}," I have other questions or feedback, like getting a new profile or removing my data or requesting an improvement. ",-1)),e[113]||(e[113]=t("p",null,[o(" Contact us at "),t("a",{href:"mailto:info@TimeSafari.app",class:"text-blue-500"},"info@TimeSafari.app")],-1))])])],64)}const De=N(v,[["render",ke]]);export{De as default}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/HomeView-BUammUSs.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/HomeView-BUammUSs.js deleted file mode 100644 index c1cfbce..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/HomeView-BUammUSs.js +++ /dev/null @@ -1 +0,0 @@ -var tt=Object.defineProperty;var it=(t,e,i)=>e in t?tt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var u=(t,e,i)=>it(t,typeof e!="symbol"?e+"":e,i);import{a0 as ot,C as te,V as ie,A as Ke,d as j,_ as oe,z as D,h as y,m as N,B as g,k as n,n as U,j as C,t as T,e as Q,M as ee,o as Re,q as Ge,y as H,w as R,F as he,E as ke,a1 as Ne,p as st,T as at,a2 as nt,a3 as rt,l as He,a4 as ze,u as lt,x as dt}from"./main.common-DD7dqhZp.js";import{E as ct}from"./EntityIcon-DciUb57i.js";import{G as ut}from"./GiftedDialog-DmRkVexW.js";import{v as ht,u as pt,i as bt,m as mt}from"./vue-leaflet.es-DQekxOGR.js";import{I as ft}from"./InfiniteScroll-DZwFAI4R.js";import{O as wt}from"./OnboardingDialog-DKHXNqS_.js";import{Q as gt}from"./QuickNav-C8jPGtUY.js";import{T as vt}from"./TopMessage-ZWDDjman.js";import{U as yt}from"./UserNameDialog-BV49F4GW.js";import{h as xt,R as kt,f as Ct,a7 as _t,a8 as Ot,$ as It,a0 as We,a9 as At,Z as qe,n as Ye,g as Nt}from"./index-ryzpKtgI.js";import{_ as Dt}from"./blank-square-D9dGgMJw.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var Ce={exports:{}};(function(t,e){(function(i,r){var h="1.0.40",b="",p="?",O="function",I="undefined",_="object",S="string",F="major",o="model",l="name",s="type",a="vendor",d="version",$="architecture",G="console",c="mobile",m="tablet",E="smarttv",M="wearable",be="embedded",me=500,se="Amazon",Y="Apple",De="ASUS",Te="BlackBerry",ae="Browser",ne="Chrome",Xe="Edge",re="Firefox",K="Google",Se="Huawei",fe="LG",we="Microsoft",$e="Motorola",J="Opera",X="Samsung",Ee="Sharp",le="Sony",ge="Xiaomi",ve="Zebra",Fe="Facebook",Pe="Chromium OS",Ue="Mac OS",je=" Browser",Ze=function(v,x){var w={};for(var A in v)x[A]&&x[A].length%2===0?w[A]=x[A].concat(v[A]):w[A]=v[A];return w},de=function(v){for(var x={},w=0;w0?k.length===2?typeof k[1]==O?this[k[0]]=k[1].call(this,V):this[k[0]]=k[1]:k.length===3?typeof k[1]===O&&!(k[1].exec&&k[1].test)?this[k[0]]=V?k[1].call(this,V,k[2]):r:this[k[0]]=V?V.replace(k[1],k[2]):r:k.length===4&&(this[k[0]]=V?k[3].call(this,V.replace(k[1],k[2])):r):this[k]=V||r;w+=2}},ce=function(v,x){for(var w in x)if(typeof x[w]===_&&x[w].length>0){for(var A=0;A2&&(f[o]="iPad",f[s]=m),f},this.getEngine=function(){var f={};return f[l]=r,f[d]=r,Z.call(f,A,B.engine),f},this.getOS=function(){var f={};return f[l]=r,f[d]=r,Z.call(f,A,B.os),k&&!f[l]&&L&&L.platform&&L.platform!="Unknown"&&(f[l]=L.platform.replace(/chrome os/i,Pe).replace(/macos/i,Ue)),f},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return A},this.setUA=function(f){return A=typeof f===S&&f.length>me?ye(f,me):f,this},this.setUA(A),this};P.VERSION=h,P.BROWSER=de([l,d,F]),P.CPU=de([$]),P.DEVICE=de([o,a,s,G,c,E,m,M,be]),P.ENGINE=P.OS=de([l,d]),t.exports&&(e=t.exports=P),e.UAParser=P;var W=typeof i!==I&&(i.jQuery||i.Zepto);if(W&&!W.ua){var ue=new P;W.ua=ue.getResult(),W.ua.get=function(){return ue.getUA()},W.ua.set=function(v){ue.setUA(v);var x=ue.getResult();for(var w in x)W.ua[w]=x[w]}}})(typeof window=="object"?window:ot)})(Ce,Ce.exports);var Je=Ce.exports,Tt=Object.getOwnPropertyDescriptor,St=(t,e,i,r)=>{for(var h=r>1?void 0:r?Tt(e,i):e,b=t.length-1,p;b>=0;b--)(p=t[b])&&(h=p(h)||h);return h};let _e=class extends ie{constructor(){super(...arguments);u(this,"$notify");u(this,"$router");u(this,"CATEGORY_CONTACTS",1);u(this,"CATEGORY_IDEAS",0);u(this,"IDEAS",["What food did someone make? (How did it free up your time for something? Was something doable because it eased your stress?)","What did a family member do? (How did you take better action because it made you feel loved?)","What compliment did someone give you? (What task could you tackle because it boosted your confidence?)","Who is someone you can always rely on, and how did they demonstrate that? (What project tasks were enabled because you could depend on them?)","What did you see someone give to someone else? (What is the effect of the positivity you gained from seeing that?)","What is a way that someone helped you even though you have never met? (What different action did you take due to that newfound perspective or inspiration?)","How did a musician or author or artist inspire you? (What were you motivated to do more creatively because of that?)","What inspiration did you get from someone who handled tragedy well? (What could you accomplish with better grace or resilience after seeing their example?)","What is something worth respect that an organization gave you? (How did their contribution improve the situation or enable new activities?)","Who last gave you a good laugh? (What kind of bond or revitalization did that bring to a situation?)","What do you recall someone giving you while you were young? (How did it bring excitement or teach a skill or ignite a passion that resulted in improvements in your life?)","Who forgave you or overlooked a mistake? (How did that free you or build trust that enabled better relationships?)","What is a way an ancestor contributed to your life? (What in your life is now possible because of their efforts? What challenges are you undertaking knowing of their lives?)","What kind of help did someone at work give you? (How did that help with team progress? How did that lift your professional growth?)","How did a teacher or mentor or great example help you? (How did their guidance enhance your attitude or actions?)","What is a surprise gift you received? (What extra possibilities did it give you?)"]);u(this,"callbackOnFullGiftInfo");u(this,"currentCategory",this.CATEGORY_IDEAS);u(this,"currentContact");u(this,"currentIdeaIndex",0);u(this,"numContacts",0);u(this,"shownContactDbIndices",[]);u(this,"visible",!1);u(this,"AppString",Ke)}async open(e){this.visible=!0,this.callbackOnFullGiftInfo=e,await j.open(),this.numContacts=await j.contacts.count(),this.shownContactDbIndices=new Array(this.numContacts)}cancel(){this.currentCategory=this.CATEGORY_IDEAS,this.currentContact=void 0,this.currentIdeaIndex=0,this.numContacts=0,this.shownContactDbIndices=[],this.visible=!1}proceed(){var e;this.visible=!1,this.currentCategory===this.CATEGORY_IDEAS?this.$router.push({name:"contact-gift",query:{prompt:this.IDEAS[this.currentIdeaIndex]}}):(e=this.callbackOnFullGiftInfo)==null||e.call(this,this.currentContact)}async nextIdea(){this.currentCategory===this.CATEGORY_IDEAS?(this.currentIdeaIndex++,this.currentIdeaIndex===this.IDEAS.length&&this.findNextUnshownContact()):this.findNextUnshownContact()}async prevIdea(){this.currentCategory===this.CATEGORY_IDEAS?(this.currentIdeaIndex--,this.currentIdeaIndex<0&&this.findNextUnshownContact()):this.findNextUnshownContact()}nextIdeaPastContacts(){this.currentContact=void 0,this.shownContactDbIndices=new Array(this.numContacts),this.currentCategory=this.CATEGORY_IDEAS,this.currentIdeaIndex=this.currentIdeaIndex>=this.IDEAS.length?0:this.IDEAS.length-1}async findNextUnshownContact(){this.currentCategory===this.CATEGORY_IDEAS&&(this.shownContactDbIndices=new Array(this.numContacts)),this.currentCategory=this.CATEGORY_CONTACTS;let e=Math.floor(Math.random()*this.numContacts),i=0;for(;this.shownContactDbIndices[e]!=null&&i++=this.numContacts?this.nextIdeaPastContacts():(await j.open(),this.currentContact=await j.contacts.offset(e).first(),this.shownContactDbIndices[e]=!0)}};_e=St([te],_e);const $t={key:0,class:"dialog-overlay"},Et={class:"dialog"},Ft={class:"text-xl font-bold text-center relative"},Pt={class:"mt-2 flex justify-between"},Ut={class:"m-2"},jt={key:0},Bt={class:"text-center text-lg"},Vt={key:1},Mt={class:"text-center"},Lt={key:0,class:"text-orange-500 text-lg"},Rt={key:1},Gt={class:"text-lg"},Ht={class:"flex justify-between"};function zt(t,e,i,r,h,b){const p=D("font-awesome");return t.visible?(g(),y("div",$t,[n("div",Et,[n("h1",Ft,[e[5]||(e[5]=U(" Here's one: ")),n("div",{class:"text-lg text-center p-2 leading-none absolute right-0 -top-1",onClick:e[0]||(e[0]=(...O)=>t.cancel&&t.cancel(...O))},[C(p,{icon:"xmark",class:"w-[1em]"})])]),n("span",Pt,[t.currentCategory===t.CATEGORY_IDEAS?(g(),y("span",{key:0,class:"rounded-l border border-slate-400 bg-slate-200 px-4 py-2 flex",onClick:e[1]||(e[1]=O=>t.prevIdea())},[C(p,{icon:"chevron-left",class:"m-auto"})])):N("",!0),n("div",Ut,[t.currentCategory===t.CATEGORY_IDEAS?(g(),y("span",jt,[n("p",Bt,T(t.IDEAS[t.currentIdeaIndex]),1)])):N("",!0),t.currentCategory===t.CATEGORY_CONTACTS?(g(),y("div",Vt,[n("p",Mt,[t.currentContact==null?(g(),y("span",Lt," That's all your contacts. ")):(g(),y("span",Rt,[n("span",Gt,[U(" Did "+T(t.currentContact.name||t.AppString.NO_CONTACT_NAME)+" ",1),e[6]||(e[6]=n("br",null,null,-1)),e[7]||(e[7]=U(" or someone near them do anything – maybe a while ago? "))]),n("span",Ht,[e[9]||(e[9]=n("span",null,null,-1)),n("button",{class:"text-center bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md mt-4",onClick:e[2]||(e[2]=O=>t.nextIdeaPastContacts())},[e[8]||(e[8]=U(" Skip Contacts ")),C(p,{icon:"forward"})])])]))])])):N("",!0)]),n("span",{class:"rounded-r border border-slate-400 bg-slate-200 px-4 py-2 flex",onClick:e[3]||(e[3]=O=>t.nextIdea())},[C(p,{icon:"chevron-right",class:"m-auto"})])]),n("button",{class:"block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md mt-4",onClick:e[4]||(e[4]=(...O)=>t.proceed&&t.proceed(...O))}," That's it! ")])])):N("",!0)}const Wt=oe(_e,[["render",zt]]);var qt=Object.getOwnPropertyDescriptor,Yt=(t,e,i,r)=>{for(var h=r>1?void 0:r?qt(e,i):e,b=t.length-1,p;b>=0;b--)(p=t[b])&&(h=p(h)||h);return h};let Oe=class extends ie{constructor(){super(...arguments);u(this,"$router");u(this,"onCloseIfChanged",()=>{});u(this,"hasSearchBox",!1);u(this,"hasVisibleDid",!1);u(this,"isNearby",!1);u(this,"settingChanged",!1);u(this,"visible",!1)}async open(i){this.onCloseIfChanged=i;const r=await Q();this.hasVisibleDid=!!r.filterFeedByVisible,this.isNearby=!!r.filterFeedByNearby,r.searchBoxes&&r.searchBoxes.length>0&&(this.hasSearchBox=!0),this.settingChanged=!1,this.visible=!0}async toggleHasVisibleDid(){this.settingChanged=!0,this.hasVisibleDid=!this.hasVisibleDid,await j.settings.update(ee,{filterFeedByVisible:this.hasVisibleDid})}async toggleNearby(){this.settingChanged=!0,this.isNearby=!this.isNearby,await j.settings.update(ee,{filterFeedByNearby:this.isNearby})}async clearAll(){(this.hasVisibleDid||this.isNearby)&&(this.settingChanged=!0),await j.settings.update(ee,{filterFeedByNearby:!1,filterFeedByVisible:!1}),this.hasVisibleDid=!1,this.isNearby=!1}async setAll(){(!this.hasVisibleDid||!this.isNearby)&&(this.settingChanged=!0),await j.settings.update(ee,{filterFeedByNearby:!0,filterFeedByVisible:!0}),this.hasVisibleDid=!0,this.isNearby=!0}close(){this.settingChanged&&this.onCloseIfChanged(),this.visible=!1}done(){this.close()}};Oe=Yt([te({components:{LRectangle:mt,LMap:bt,LMarker:pt,LTileLayer:ht}})],Oe);const Kt={key:0,id:"dialogFeedFilters",class:"dialog-overlay"},Jt={class:"dialog"},Xt={class:"grid grid-cols-1 gap-2"},Zt={class:"relative ml-2"},Qt={key:0,class:"relative ml-2"},ei={key:1,class:"relative ml-2"},ti={class:"grid grid-cols-1 sm:grid-cols-3 gap-2 mt-4"};function ii(t,e,i,r,h,b){return t.visible?(g(),y("div",Kt,[n("div",Jt,[e[15]||(e[15]=n("h1",{class:"text-xl font-bold text-center mb-4"},"Feed Filters",-1)),e[16]||(e[16]=n("p",{class:"mb-4 font-bold"},"Show only activities that…",-1)),n("div",Xt,[n("div",{class:"flex items-center justify-between cursor-pointer",onClick:e[1]||(e[1]=p=>t.toggleHasVisibleDid())},[e[9]||(e[9]=n("div",null,"Include someone visible to me",-1)),n("div",Zt,[Re(n("input",{"onUpdate:modelValue":e[0]||(e[0]=p=>t.hasVisibleDid=p),type:"checkbox",name:"toggleFilterFromMyContacts",class:"sr-only"},null,512),[[Ge,t.hasVisibleDid]]),e[7]||(e[7]=n("div",{class:"block bg-slate-500 w-14 h-8 rounded-full"},null,-1)),e[8]||(e[8]=n("div",{class:"dot absolute left-1 top-1 bg-slate-400 w-6 h-6 rounded-full transition"},null,-1))])]),e[14]||(e[14]=n("em",null,"or",-1)),n("div",{class:"flex items-center justify-between cursor-pointer",onClick:e[3]||(e[3]=p=>t.hasSearchBox?t.toggleNearby():t.$router.push({name:"search-area"}))},[e[13]||(e[13]=n("div",null,"Are nearby",-1)),t.hasSearchBox?(g(),y("div",Qt,[Re(n("input",{"onUpdate:modelValue":e[2]||(e[2]=p=>t.isNearby=p),type:"checkbox",name:"toggleFilterNearby",class:"sr-only"},null,512),[[Ge,t.isNearby]]),e[10]||(e[10]=n("div",{class:"block bg-slate-500 w-14 h-8 rounded-full"},null,-1)),e[11]||(e[11]=n("div",{class:"dot absolute left-1 top-1 bg-slate-400 w-6 h-6 rounded-full transition"},null,-1))])):(g(),y("div",ei,e[12]||(e[12]=[n("button",{class:"ml-2 px-4 py-2 rounded-md bg-blue-200 text-blue-500"}," Select Location ",-1)])))])]),n("div",ti,[n("button",{class:"block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md",onClick:e[4]||(e[4]=p=>t.setAll())}," Set All "),n("button",{class:"block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md",onClick:e[5]||(e[5]=p=>t.clearAll())}," Clear All "),n("button",{class:"block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md",onClick:e[6]||(e[6]=p=>t.done())}," Done ")])])])):N("",!0)}const oi=oe(Oe,[["render",ii]]);var si=Object.getOwnPropertyDescriptor,ai=(t,e,i,r)=>{for(var h=r>1?void 0:r?si(e,i):e,b=t.length-1,p;b>=0;b--)(p=t[b])&&(h=p(h)||h);return h};let Ie=class extends ie{constructor(){super(...arguments);u(this,"$notify");u(this,"title","");u(this,"text","");u(this,"option1Text","");u(this,"option2Text","");u(this,"option3Text","");u(this,"onOption1");u(this,"onOption2");u(this,"onOption3");u(this,"onCancel")}open(e){this.title=e.title,this.text=e.text,this.option1Text=e.option1Text||"",this.option2Text=e.option2Text||"",this.option3Text=e.option3Text||"",this.onOption1=e.onOption1,this.onOption2=e.onOption2,this.onOption3=e.onOption3,this.onCancel=e.onCancel,this.$notify({group:"customModal",type:"confirm",title:this.title,text:this.text,option1Text:this.option1Text,option2Text:this.option2Text,option3Text:this.option3Text,onOption1:this.onOption1,onOption2:this.onOption2,onOption3:this.onOption3,onCancel:this.onCancel},-1)}handleOption1(e){this.onOption1&&this.onOption1(),e("string that does not matter")}handleOption2(e){this.onOption2&&this.onOption2(),e("string that does not matter")}handleOption3(e){this.onOption3&&this.onOption3(),e("string that does not matter")}handleCancel(e){this.onCancel&&this.onCancel(),e("string that does not matter")}};Ie=ai([te],Ie);const ni={class:"fixed z-[100] top-0 inset-x-0 w-full"},ri={class:"absolute inset-0 h-screen flex flex-col items-center justify-center bg-slate-900/50"},li={class:"flex w-11/12 max-w-sm mx-auto mb-3 overflow-hidden bg-white rounded-lg shadow-lg"},di={class:"w-full px-6 py-6 text-slate-900 text-center"},ci={class:"font-semibold text-lg"},ui={class:"text-sm mb-2"},hi=["onClick"],pi=["onClick"],bi=["onClick"],mi=["onClick"];function fi(t,e,i,r,h,b){const p=D("Notification"),O=D("NotificationGroup");return g(),H(O,{group:"customModal"},{default:R(()=>[n("div",ni,[C(p,{enter:"transform ease-out duration-300 transition","enter-from":"translate-y-2 opacity-0 sm:translate-y-4","enter-to":"translate-y-0 opacity-100 sm:translate-y-0",leave:"transition ease-in duration-500","leave-from":"opacity-100","leave-to":"opacity-0",move:"transition duration-500","move-delay":"delay-300"},{default:R(({notifications:I,close:_})=>[(g(!0),y(he,null,ke(I,S=>(g(),y("div",{key:S.id,class:"w-full",role:"alert"},[n("div",ri,[n("div",li,[n("div",di,[n("span",ci,T(t.title),1),n("p",ui,T(t.text),1),n("button",{class:"block w-full text-center text-md font-bold capitalize bg-blue-800 text-white px-2 py-2 rounded-md mb-2",onClick:F=>t.handleOption1(_)},T(t.option1Text),9,hi),n("button",{class:"block w-full text-center text-md font-bold capitalize bg-blue-700 text-white px-2 py-2 rounded-md mb-2",onClick:F=>t.handleOption2(_)},T(t.option2Text),9,pi),n("button",{class:"block w-full text-center text-md font-bold capitalize bg-blue-600 text-white px-2 py-2 rounded-md mb-2",onClick:F=>t.handleOption3(_)},T(t.option3Text),9,bi),n("button",{class:"block w-full text-center text-md font-bold capitalize bg-slate-600 text-white px-2 py-2 rounded-md",onClick:F=>t.handleCancel(_)}," Cancel ",8,mi)])])])]))),128))]),_:1})])]),_:1})}const wi=oe(Ie,[["render",fi]]);var gi=Object.defineProperty,vi=Object.getOwnPropertyDescriptor,pe=(t,e,i,r)=>{for(var h=r>1?void 0:r?vi(e,i):e,b=t.length-1,p;b>=0;b--)(p=t[b])&&(h=(r?p(e,i,h):p(h))||h);return r&&h&&gi(e,i,h),h};let q=class extends ie{constructor(){super(...arguments);u(this,"imageUrl");u(this,"imageData");u(this,"isOpen");u(this,"userAgent",new Je.UAParser)}get isMobile(){const i=this.userAgent.getOS().name;return i==="iOS"||i==="Android"}close(){this.$emit("update:isOpen",!1)}async handleShare(){const i=this.userAgent.getOS().name;try{(i==="iOS"||i==="Android")&&(navigator.share?await navigator.share({url:this.imageUrl}):window.open(this.imageUrl,"_blank"))}catch(r){console.warn("Share failed, opening in new tab:",r),window.open(this.imageUrl,"_blank")}}};pe([Ne()],q.prototype,"imageUrl",2);pe([Ne()],q.prototype,"imageData",2);pe([Ne()],q.prototype,"isOpen",2);q=pe([te({emits:["update:isOpen"]})],q);const yi={key:0,class:"fixed inset-0 z-50 flex flex-col bg-black/90"},xi={class:"h-16 flex justify-between items-center px-4 bg-black"},ki={class:"flex-1 flex items-center justify-center p-2"},Ci={class:"w-full h-full flex items-center justify-center"},_i=["src"];function Oi(t,e,i,r,h,b){const p=D("font-awesome");return g(),H(nt,{to:"body"},[C(at,{name:"fade"},{default:R(()=>[t.isOpen?(g(),y("div",yi,[n("div",xi,[n("button",{class:"text-white text-2xl p-2 rounded-full hover:bg-white/10",onClick:e[0]||(e[0]=(...O)=>t.close&&t.close(...O))},[C(p,{icon:"xmark"})]),t.isMobile?(g(),y("button",{key:0,class:"text-white text-xl p-2 rounded-full hover:bg-white/10",onClick:e[1]||(e[1]=(...O)=>t.handleShare&&t.handleShare(...O))},[C(p,{icon:"ellipsis"})])):N("",!0)]),n("div",ki,[n("div",Ci,[n("img",{src:t.imageUrl,class:"max-h-[calc(100vh-5rem)] w-full h-full object-contain",alt:"expanded shared content",onClick:e[2]||(e[2]=st(()=>{},["stop"]))},null,8,_i)])])])):N("",!0)]),_:1})])}const Ii=oe(q,[["render",Oi],["__scopeId","data-v-409cf6bd"]]);var Ai=Object.getOwnPropertyDescriptor,Ni=(t,e,i,r)=>{for(var h=r>1?void 0:r?Ai(e,i):e,b=t.length-1,p;b>=0;b--)(p=t[b])&&(h=p(h)||h);return h};let Ae=class extends ie{constructor(){super(...arguments);u(this,"$notify");u(this,"$router");u(this,"AppString",Ke);u(this,"PASSKEYS_ENABLED",rt);u(this,"activeDid","");u(this,"allContacts",[]);u(this,"allMyDids",[]);u(this,"apiServer","");u(this,"feedData",[]);u(this,"feedPreviousOldestId");u(this,"feedLastViewedClaimId");u(this,"givenName","");u(this,"isAnyFeedFilterOn",!1);u(this,"isCreatingIdentifier",!1);u(this,"isFeedFilteredByVisible",!1);u(this,"isFeedFilteredByNearby",!1);u(this,"isFeedLoading",!0);u(this,"isRegistered",!1);u(this,"lastAckedOfferToUserJwtId");u(this,"lastAckedOfferToUserProjectsJwtId");u(this,"newOffersToUserHitLimit",!1);u(this,"newOffersToUserProjectsHitLimit",!1);u(this,"numNewOffersToUser",0);u(this,"numNewOffersToUserProjects",0);u(this,"searchBoxes",[]);u(this,"showShortcutBvc",!1);u(this,"userAgentInfo",new Je.UAParser);u(this,"selectedImage","");u(this,"selectedImageData",null);u(this,"isImageViewerOpen",!1);u(this,"imageCache",new Map)}async mounted(){try{await this.initializeIdentity(),await this.loadSettings(),await this.loadContacts(),await this.checkRegistrationStatus(),await this.loadFeedData(),await this.loadNewOffers(),await this.checkOnboarding()}catch(i){this.handleError(i)}}async initializeIdentity(){try{if(this.allMyDids=await xt(),this.allMyDids.length===0){this.isCreatingIdentifier=!0;const i=await kt();this.isCreatingIdentifier=!1,this.allMyDids=[i]}}catch(i){He("Error retrieving all account DIDs on home page:"+i,!0)}}async loadSettings(){const i=await Q();this.apiServer=i.apiServer||"",this.activeDid=i.activeDid||"",this.feedLastViewedClaimId=i.lastViewedClaimId,this.givenName=i.firstName||"",this.isFeedFilteredByVisible=!!i.filterFeedByVisible,this.isFeedFilteredByNearby=!!i.filterFeedByNearby,this.isRegistered=!!i.isRegistered,this.lastAckedOfferToUserJwtId=i.lastAckedOfferToUserJwtId,this.lastAckedOfferToUserProjectsJwtId=i.lastAckedOfferToUserProjectsJwtId,this.searchBoxes=i.searchBoxes||[],this.showShortcutBvc=!!i.showShortcutBvc,this.isAnyFeedFilterOn=ze(i)}async loadContacts(){this.allContacts=await j.contacts.toArray()}async checkRegistrationStatus(){if(!this.isRegistered&&this.activeDid)try{(await Ct(this.apiServer,this.axios,this.activeDid)).status===200&&(await lt(this.activeDid,{apiServer:this.apiServer,isRegistered:!0,...await Q()}),this.isRegistered=!0)}catch{}}async loadFeedData(){await this.updateAllFeed()}async loadNewOffers(){if(this.activeDid){const i=await _t(this.axios,this.apiServer,this.activeDid,this.lastAckedOfferToUserJwtId);this.numNewOffersToUser=i.data.length,this.newOffersToUserHitLimit=i.hitLimit;const r=await Ot(this.axios,this.apiServer,this.activeDid,this.lastAckedOfferToUserProjectsJwtId);this.numNewOffersToUserProjects=r.data.length,this.newOffersToUserProjectsHitLimit=r.hitLimit}}async checkOnboarding(){(await Q()).finishedOnboarding||this.$refs.onboardingDialog.open(It.Home)}handleError(i){He("Error retrieving settings or feed: "+i,!0),this.$notify({group:"alert",type:"danger",title:"Error",text:i.userMessage||"There was an error retrieving your settings or the latest activity."},5e3)}resultsAreFiltered(){return this.isFeedFilteredByVisible||this.isFeedFilteredByNearby}notificationsSupported(){return"Notification"in window}async reloadFeedOnChange(){const i=await Q();this.isFeedFilteredByVisible=!!i.filterFeedByVisible,this.isFeedFilteredByNearby=!!i.filterFeedByNearby,this.isAnyFeedFilterOn=ze(i),this.feedData=[],this.feedPreviousOldestId=void 0,await this.updateAllFeed()}async loadMoreGives(i){i&&!this.isFeedLoading&&await this.updateAllFeed()}latLongInAnySearchBox(i,r){for(const h of this.searchBoxes)if(h.bbox.westLong<=r&&r<=h.bbox.eastLong&&h.bbox.minLat<=i&&i<=h.bbox.maxLat)return!0}async updateAllFeed(){this.isFeedLoading=!0;let i=!0;await this.retrieveGives(this.apiServer,this.feedPreviousOldestId).then(async r=>{var h,b,p,O;if(r.data.length>0){i=!1;for(const I of r.data){const _=I.fullClaim.claim||I.fullClaim,S=((h=_.agent)==null?void 0:h.identifier)||((b=_.agent)==null?void 0:b.did),F=((p=_.recipient)==null?void 0:p.identifier)||((O=_.recipient)==null?void 0:O.did),o=await We(I.fulfillsPlanHandleId,this.axios,this.apiServer,this.activeDid);let l=!1;if(this.isFeedFilteredByVisible&&At(I)&&(l=!0),!l&&this.isFeedFilteredByNearby&&I.fulfillsPlanHandleId&&o!=null&&o.locLat&&o!=null&&o.locLon&&this.latLongInAnySearchBox(o.locLat,o.locLon)&&(l=!0),this.isAnyFeedFilterOn&&!l)continue;const s=Array.isArray(_.provider)?_.provider[0]:_.provider,a=await We(s==null?void 0:s.identifier,this.axios,this.apiServer,this.activeDid),d={...I,jwtId:I.jwtId,giver:qe(S,this.activeDid,Ye(S,this.allContacts),this.allMyDids),image:_.image,providerPlanHandleId:s==null?void 0:s.identifier,providerPlanName:a==null?void 0:a.name,recipientProjectName:o==null?void 0:o.name,receiver:qe(F,this.activeDid,Ye(F,this.allContacts),this.allMyDids)};this.feedData.push(d)}this.feedPreviousOldestId=r.data[r.data.length-1].jwtId,(this.feedLastViewedClaimId==null||this.feedLastViewedClaimId{console.error("Error with feed load:",r),this.$notify({group:"alert",type:"danger",title:"Feed Error",text:r.userMessage||"There was an error retrieving feed data."},-1)}),this.feedData.length===0&&!i&&await this.updateAllFeed(),this.isFeedLoading=!1}async retrieveGives(i,r){const h=r==null?"":"&beforeId="+r,b=!!r,p=await Nt(this.activeDid,b?void 0:this.$notify),O=await fetch(i+"/api/v2/report/gives?giftNotTrade=true"+h,{method:"GET",headers:p});if(!O.ok)throw await O.text();const I=await O.json();if(I.data)return I;throw JSON.stringify(I)}giveDescription(i){var O;const r=i.fullClaim.claim||i.fullClaim;let h=(O=r.object)!=null&&O.amountOfThisGood?this.displayAmount(r.object.unitCode,r.object.amountOfThisGood):"";r.description&&(h&&(h=" (and "+h+")"),h=r.description+h),h||(h="something not described");const b=i.giver,p=i.receiver;if(b.known&&p.known)return`${b.displayName} gave to ${p.displayName}: ${h}`;if(b.known)return i.recipientProjectName?`${b.displayName} gave: ${h} (to the project "${i.recipientProjectName}")`:`${b.displayName} gave: ${h} (to ${p.displayName})`;if(p.known)return i.providerPlanName?`${p.displayName} received: ${h} (from the project "${i.providerPlanName}")`:`${p.displayName} received: ${h} (from ${b.displayName})`;{let I="";return i.providerPlanName||i.recipientProjectName?(i.providerPlanName?I=`from the project "${i.providerPlanName}"`:I=`from ${b.displayName}`,i.recipientProjectName?I+=` to the project "${i.recipientProjectName}"`:I+=` to ${p.displayName}`):b.displayName===p.displayName?I=`between two who are ${b.displayName}`:I=`from ${b.displayName} to ${p.displayName}`,h+" ("+I+")"}}goToActivityToUserPage(){this.$router.push({name:"new-activity"})}onClickLoadClaim(i){const r={path:"/claim/"+encodeURIComponent(i)};this.$router.push(r)}displayAmount(i,r){return""+r+" "+this.currencyShortWordForCode(i,r===1)}currencyShortWordForCode(i,r){return i==="HUR"?r?"hour":"hours":i}openDialog(i,r){this.$refs.customDialog.open(i,{did:this.activeDid,name:"you"},void 0,"Given by "+((i==null?void 0:i.name)||"someone not named"),r)}openGiftedPrompts(){this.$refs.giftedPrompts.open((i,r)=>this.openDialog(i,r))}openFeedFilters(){this.$refs.feedFilters.open(this.reloadFeedOnChange)}toastUser(i){this.$notify({group:"alert",type:"toast",title:"FYI",text:i},2e3)}computeKnownPersonIconStyleClassNames(i){return i?"text-slate-500":"text-slate-100"}showNameThenIdDialog(){this.givenName?this.promptForShareMethod():this.$refs.userNameDialog.open(()=>{this.promptForShareMethod()})}promptForShareMethod(){this.$refs.choiceButtonDialog.open({title:"How can you share your info?",text:"",option1Text:"We are in a meeting together",option2Text:"We are nearby with cameras",option3Text:"We will share some other way",onOption1:()=>{this.$router.push({name:"onboard-meeting-list"})},onOption2:()=>{this.$router.push({name:"contact-qr"})},onOption3:()=>{this.$router.push({name:"share-my-contact-info"})}})}async cacheImageData(i,r){try{this.imageCache.set(r,null)}catch(h){console.warn("Failed to cache image:",h)}}async openImageViewer(i){this.selectedImageData=this.imageCache.get(i)??null,this.selectedImage=i,this.isImageViewerOpen=!0}};Ae=Ni([te({components:{EntityIcon:ct,FeedFilters:oi,GiftedDialog:ut,GiftedPrompts:Wt,InfiniteScroll:ft,OnboardingDialog:wt,ChoiceButtonDialog:wi,QuickNav:gt,TopMessage:vt,UserNameDialog:yt,ImageViewer:Ii}})],Ae);const Di={id:"Content",class:"p-2 pb-24 max-w-3xl mx-auto"},Ti={id:"ViewHeading",class:"text-4xl text-center font-light mb-8"},Si={class:"mb-8 mt-8"},$i={key:0,class:"mb-4"},Ei={class:"mb-8"},Fi={key:0},Pi={class:"text-slate-500 text-center italic mt-4 mb-4"},Ui={key:1},ji={class:"mb-4"},Bi={key:0,id:"noticeSomeoneMustRegisterYou",class:"bg-amber-200 rounded-md overflow-hidden text-center px-4 py-3 mb-4"},Vi={class:"block text-center"},Mi={key:0,class:"flex justify-end w-full"},Li={key:1,id:"sectionRecordSomethingGiven"},Ri={class:"flex"},Gi={class:"grid grid-cols-4 sm:grid-cols-5 md:grid-cols-6 gap-x-3 gap-y-5 text-center mt-4"},Hi={key:0,class:"text-sm"},zi=["onClick"],Wi={class:"text-xs text-blue-500 font-medium text-ellipsis whitespace-nowrap overflow-hidden cursor-pointer"},qi={class:"relative"},Yi={class:"bg-slate-100 rounded-md px-4 py-3 mt-4 mb-4"},Ki={class:"flex items-center mb-4"},Ji={class:"text-xl font-bold"},Xi={class:"text-xs text-white"},Zi={class:"flex justify-center"},Qi={key:0,class:"bg-gradient-to-b from-green-400 to-green-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] m-1 px-4 py-4 rounded-md text-white"},eo={class:"block text-center text-6xl","data-testId":"newDirectOffersActivityNumber"},to={class:"text-center"},io={key:1,class:"bg-gradient-to-b from-green-400 to-green-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] m-1 px-4 py-4 rounded-md text-white"},oo={class:"block text-center text-6xl","data-testId":"newOffersToUserProjectsActivityNumber"},so={class:"text-center"},ao={id:"listLatestActivity",class:"border-t border-slate-300"},no={key:0,class:"border-b border-slate-300 text-orange-400 pb-2 mb-2 font-bold text-sm"},ro={class:"grid grid-cols-12"},lo={class:"pt-1 col-span-1 justify-self-start"},co={class:"col-span-10 justify-self-stretch overflow-hidden"},uo={class:"pl-2 block break-words"},ho=["onClick"],po={class:"col-span-1 justify-self-end"},bo={key:1,class:"w-full"},mo=["onClick"],fo=["src","onLoad"],wo={key:0},go={class:"text-slate-500 text-center italic mt-4 mb-4"},vo={key:1};function yo(t,e,i,r,h,b){const p=D("QuickNav"),O=D("TopMessage"),I=D("OnboardingDialog"),_=D("font-awesome"),S=D("router-link"),F=D("UserNameDialog"),o=D("EntityIcon"),l=D("GiftedDialog"),s=D("GiftedPrompts"),a=D("FeedFilters"),d=D("InfiniteScroll"),$=D("ChoiceButtonDialog"),G=D("ImageViewer");return g(),y(he,null,[C(p,{selected:"Home"}),C(O),n("section",Di,[n("h1",Ti,T(t.AppString.APP_NAME),1),C(I,{ref:"onboardingDialog"},null,512),n("div",Si,[N("",!0)]),t.showShortcutBvc?(g(),y("div",$i,[C(S,{to:{name:"quick-action-bvc"},class:"block text-center text-md font-bold bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white mt-2 px-2 py-3 rounded-md"},{default:R(()=>e[20]||(e[20]=[U(" Bountiful Voluntaryist Community Actions ")])),_:1})])):N("",!0),n("div",Ei,[t.isCreatingIdentifier?(g(),y("div",Fi,[n("p",Pi,[C(_,{icon:"spinner",class:"fa-spin-pulse"}),e[21]||(e[21]=U(" Loading… "))])])):(g(),y("div",Ui,[n("div",ji,[t.isRegistered?(g(),y("div",Li,[n("div",Ri,[e[24]||(e[24]=n("h2",{class:"text-xl font-bold"},"What have you seen someone do?",-1)),n("button",{class:"ml-2 block text-xs text-center bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1 rounded-md",onClick:e[1]||(e[1]=c=>t.openGiftedPrompts())},[C(_,{icon:"lightbulb",class:"fa-fw"})])]),n("ul",Gi,[n("li",{onClick:e[2]||(e[2]=c=>t.openDialog())},e[25]||(e[25]=[n("img",{src:Dt,class:"mx-auto border border-blue-500 rounded-md mb-1 cursor-pointer"},null,-1),n("h3",{class:"text-xs text-blue-500 italic font-medium text-ellipsis whitespace-nowrap overflow-hidden cursor-pointer"}," Unnamed/Unknown ",-1)])),t.allContacts.length===0?(g(),y("li",Hi," (Add friends to see more people worthy of recognition.) ")):N("",!0),(g(!0),y(he,null,ke(t.allContacts.slice(0,6),c=>(g(),y("li",{key:c.did,onClick:m=>t.openDialog(c)},[C(o,{contact:c,"icon-size":64,class:"mx-auto border border-blue-500 rounded-md mb-1 cursor-pointer"},null,8,["contact"]),n("h3",Wi,T(c.name||c.did),1)],8,zi))),128)),n("li",null,[t.allContacts.length>=6?(g(),H(S,{key:0,to:{name:"contact-gift"},class:"flex align-bottom text-xs text-blue-500 mt-12 cursor-pointer"},{default:R(()=>e[26]||(e[26]=[U(" ... or someone else... ")])),_:1})):N("",!0)])])])):(g(),y("div",Bi,[e[23]||(e[23]=U(" To share, someone must register you. ")),n("div",Vi,[n("button",{class:"text-md font-bold bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white mt-2 px-2 py-3 rounded-md",onClick:e[0]||(e[0]=c=>t.showNameThenIdDialog())}," Show them "+T(t.PASSKEYS_ENABLED?"default":"your")+" identifier info ",1)]),C(F,{ref:"userNameDialog"},null,512),t.PASSKEYS_ENABLED?(g(),y("div",Mi,[C(S,{to:{name:"start"},class:"block text-right text-md font-bold bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white mt-2 px-2 py-3 rounded-md"},{default:R(()=>e[22]||(e[22]=[U(" See all your options first ")])),_:1})])):N("",!0)]))])]))]),C(l,{ref:"customDialog"},null,512),C(s,{ref:"giftedPrompts"},null,512),C(a,{ref:"feedFilters"},null,512),n("div",qi,[t.isRegistered?(g(),y("button",{key:0,class:"absolute right-6 bottom-0 transform translate-y-1/2 text-center text-4xl leading-none bg-green-600 text-white w-14 py-2.5 rounded-full",onClick:e[3]||(e[3]=c=>t.openDialog())},[C(_,{icon:"plus",class:"fa-fw"})])):N("",!0)]),n("div",Yi,[n("div",Ki,[n("h2",Ji,[e[27]||(e[27]=U(" Latest Activity ")),n("button",{onClick:e[4]||(e[4]=c=>t.openFeedFilters())},[n("span",Xi,[t.resultsAreFiltered()?(g(),H(_,{key:0,icon:"filter",class:"bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] px-1 py-1.5 rounded-md"})):(g(),H(_,{key:1,icon:"filter",class:"bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] px-1 py-1.5 rounded-md"}))])])])]),n("div",{class:"border-t p-2 border-slate-300",onClick:e[5]||(e[5]=c=>t.goToActivityToUserPage())},[n("div",Zi,[t.numNewOffersToUser?(g(),y("div",Qi,[n("span",eo,T(t.numNewOffersToUser)+T(t.newOffersToUserHitLimit?"+":""),1),n("p",to," new offer"+T(t.numNewOffersToUser===1?"":"s")+" to you ",1)])):N("",!0),t.numNewOffersToUserProjects?(g(),y("div",io,[n("span",oo,T(t.numNewOffersToUserProjects)+T(t.newOffersToUserProjectsHitLimit?"+":""),1),n("p",so," new offer"+T(t.numNewOffersToUserProjects===1?"":"s")+" to your projects ",1)])):N("",!0)]),e[28]||(e[28]=n("div",{class:"flex justify-end mt-2"},[n("button",{class:"text-blue-500"},"View All New Activity For You")],-1))]),C(d,{onReachedBottom:t.loadMoreGives},{default:R(()=>[n("ul",ao,[(g(!0),y(he,null,ke(t.feedData,c=>(g(),y("li",{key:c.jwtId,class:"border-b border-slate-300 py-2"},[c.jwtId==t.feedLastViewedClaimId?(g(),y("div",no," You've already seen all the following ")):N("",!0),n("div",ro,[n("span",lo,[n("span",null,[C(_,{icon:"circle-user",class:dt(t.computeKnownPersonIconStyleClassNames(c.giver.known||c.receiver.known)),onClick:e[6]||(e[6]=m=>t.toastUser("This involves your contacts."))},null,8,["class"]),C(_,{icon:"gift",class:"pl-3 text-slate-500",onClick:e[7]||(e[7]=m=>t.toastUser("This is a gift."))})])]),n("span",co,[n("span",uo,T(t.giveDescription(c)),1),n("a",{onClick:m=>t.onClickLoadClaim(c.jwtId)},[C(_,{icon:"file-lines",class:"pl-2 text-slate-500 cursor-pointer"})],8,ho)]),n("span",po,[c.fulfillsPlanHandleId?(g(),H(S,{key:0,to:"/project/"+encodeURIComponent(c.fulfillsPlanHandleId)},{default:R(()=>[C(_,{icon:"hammer",class:"text-blue-500"})]),_:2},1032,["to"])):N("",!0),c.providerPlanHandleId?(g(),H(S,{key:1,to:"/project/"+encodeURIComponent(c.providerPlanHandleId)},{default:R(()=>[C(_,{icon:"hammer",class:"text-blue-500"})]),_:2},1032,["to"])):N("",!0)])]),c.image?(g(),y("div",bo,[n("div",{class:"cursor-pointer",onClick:m=>t.openImageViewer(c.image)},[n("img",{src:c.image,class:"w-full aspect-[3/2] object-cover rounded-xl mt-2",alt:"shared content",onLoad:m=>t.cacheImageData(m,c.image)},null,40,fo)],8,mo)])):N("",!0)]))),128))])]),_:1},8,["onReachedBottom"]),t.isFeedLoading?(g(),y("div",wo,[n("p",go,[C(_,{icon:"spinner",class:"fa-spin-pulse"}),e[29]||(e[29]=U(" Loading… "))])])):N("",!0),!t.isFeedLoading&&t.feedData.length===0?(g(),y("div",vo,e[30]||(e[30]=[n("p",{class:"text-slate-500 text-center italic mt-4 mb-4"}," No claims match your filters. ",-1)]))):N("",!0)])]),C($,{ref:"choiceButtonDialog"},null,512),C(G,{"is-open":t.isImageViewerOpen,"onUpdate:isOpen":e[8]||(e[8]=c=>t.isImageViewerOpen=c),"image-url":t.selectedImage,"image-data":t.selectedImageData},null,8,["is-open","image-url","image-data"])],64)}const Vo=oe(Ae,[["render",yo]]);export{Vo as default}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/HomeView-D3AT-qTA.css b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/HomeView-D3AT-qTA.css deleted file mode 100644 index a8799a3..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/HomeView-D3AT-qTA.css +++ /dev/null @@ -1 +0,0 @@ -.dialog-overlay{z-index:50;position:fixed;top:0;left:0;right:0;bottom:0;background-color:#00000080;display:flex;justify-content:center;align-items:center;padding:1.5rem}#dialogFeedFilters.dialog-overlay{z-index:100;overflow:scroll}.dialog{background-color:#fff;padding:1rem;border-radius:.5rem;width:100%;max-width:500px}.fade-enter-active[data-v-409cf6bd],.fade-leave-active[data-v-409cf6bd]{transition:opacity .2s ease}.fade-enter-from[data-v-409cf6bd],.fade-leave-to[data-v-409cf6bd]{opacity:0} diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/IdentitySwitcherView-BYk59nuq.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/IdentitySwitcherView-BYk59nuq.js deleted file mode 100644 index fc3e28c..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/IdentitySwitcherView-BYk59nuq.js +++ /dev/null @@ -1 +0,0 @@ -var D=Object.defineProperty;var I=(e,t,i)=>t in e?D(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var a=(e,t,i)=>I(e,typeof t!="symbol"?t+"":t,i);import{V as S,e as C,d as b,M as A,a5 as $,C as B,_ as V,h as m,j as u,k as s,m as N,n as f,w as g,t as k,F as _,E as T,z as y,B as r,y as h}from"./main.common-DD7dqhZp.js";import{Q as E}from"./QuickNav-C8jPGtUY.js";import{aa as Y}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var j=Object.getOwnPropertyDescriptor,P=(e,t,i,c)=>{for(var o=c>1?void 0:c?j(t,i):t,n=e.length-1,p;n>=0;n--)(p=e[n])&&(o=p(o)||o);return o};let v=class extends S{constructor(){super(...arguments);a(this,"$notify");a(this,"$router");a(this,"activeDid","");a(this,"activeDidInIdentities",!1);a(this,"apiServer","");a(this,"apiServerInput","");a(this,"otherIdentities",[])}async created(){try{const i=await C();this.activeDid=i.activeDid||"",this.apiServer=i.apiServer||"",this.apiServerInput=i.apiServer||"";const c=await Y();for(let o=0;o{await(await $).accounts.delete(i),this.otherIdentities=this.otherIdentities.filter(o=>o.id!==i)}},-1)}notifyCannotDelete(){this.$notify({group:"alert",type:"warning",title:"Cannot Delete",text:"You cannot delete the active identity. Set to another identity or 'no identity' first."},3e3)}};v=P([B({components:{QuickNav:E}})],v);const Q={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},F={id:"ViewBreadcrumb",class:"mb-8"},M={class:"text-lg text-center font-light relative px-7"},O={key:0,class:"block bg-slate-100 rounded-md flex items-center px-4 py-3 mb-4"},L={class:"text-sm text-slate-500"},q={class:"overflow-hidden truncate"},z={class:"mb-4"},G={class:"flex items-center justify-between mb-2"},K=["onClick"],R={class:"flex-grow overflow-hidden"},H={class:"text-sm text-slate-500 truncate"};function J(e,t,i,c,o,n){const p=y("QuickNav"),d=y("font-awesome"),x=y("router-link");return r(),m(_,null,[u(p,{selected:"Profile"}),s("section",Q,[s("div",F,[s("h1",M,[u(x,{to:{name:"account"},class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1"},{default:g(()=>[u(d,{icon:"chevron-left",class:"fa-fw"})]),_:1}),t[2]||(t[2]=f(" Switch Identity "))])]),e.activeDid&&!e.activeDidInIdentities?(r(),m("div",O,[u(d,{icon:"circle-check",class:"fa-fw text-red-600 text-xl mr-3"}),s("div",L,[s("div",q,[t[3]||(t[3]=s("b",null,"ID:",-1)),t[4]||(t[4]=f()),s("code",null,k(e.activeDid),1)]),t[5]||(t[5]=s("b",null,"There is a data corruption error: this identity is selected but it is not in storage. You cannot send any more claims with this identity until you import the seed again. This may require reinstalling the app; if you know how, you can also clear out the TimeSafariAccounts IndexedDB. Be sure to back up all your Settings & Contacts first.",-1))])])):N("",!0),s("ul",z,[(r(!0),m(_,null,T(e.otherIdentities,l=>(r(),m("li",{key:l.did},[s("div",G,[s("div",{class:"flex flex-grow items-center bg-slate-100 rounded-md px-4 py-3 mb-2 truncate cursor-pointer",onClick:w=>e.switchAccount(l.did)},[l.did===e.activeDid?(r(),h(d,{key:0,icon:"circle-check",class:"fa-fw text-blue-600 text-xl mr-3"})):(r(),h(d,{key:1,icon:"circle",class:"fa-fw text-slate-400 text-xl mr-3"})),s("span",R,[s("div",H,[t[6]||(t[6]=s("b",null,"ID:",-1)),t[7]||(t[7]=f()),s("code",null,k(l.did),1)])])],8,K),s("div",null,[l.did===e.activeDid?(r(),h(d,{key:0,icon:"trash-can",class:"text-slate-400 text-xl ml-2 mr-2 cursor-pointer",onClick:t[0]||(t[0]=w=>e.notifyCannotDelete())})):(r(),h(d,{key:1,icon:"trash-can",class:"text-red-600 text-xl ml-2 mr-2 cursor-pointer",onClick:w=>e.deleteAccount(l.id)},null,8,["onClick"]))])])]))),128))]),u(x,{id:"start-link",to:{name:"start"},class:"block text-center text-lg font-bold uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md mb-2"},{default:g(()=>t[8]||(t[8]=[f(" Add Another Identity… ")])),_:1}),s("a",{href:"#",class:"block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md mb-8",onClick:t[1]||(t[1]=l=>e.switchAccount("0"))}," No Identity ")])],64)}const ot=V(v,[["render",J]]);export{ot as default}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ImageMethodDialog-CTvzd81h.css b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ImageMethodDialog-CTvzd81h.css deleted file mode 100644 index d682377..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ImageMethodDialog-CTvzd81h.css +++ /dev/null @@ -1 +0,0 @@ -.dialog-overlay{z-index:50;position:fixed;top:0;left:0;right:0;bottom:0;background-color:#00000080;display:flex;justify-content:center;align-items:center;padding:1.5rem}.dialog{background-color:#fff;padding:1rem;border-radius:.5rem;width:100%;max-width:700px} diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ImageMethodDialog-zrU-VGNm.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ImageMethodDialog-zrU-VGNm.js deleted file mode 100644 index 4daecd8..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ImageMethodDialog-zrU-VGNm.js +++ /dev/null @@ -1 +0,0 @@ -var v=Object.defineProperty;var y=(t,e,o)=>e in t?v(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o;var r=(t,e,o)=>y(t,typeof e!="symbol"?e+"":e,o);import{f as w,C as _,V as k,a6 as x,_ as C,z as h,h as u,B as d,m as D,j as g,k as a,n as U,o as $,s as P,y as f,F as B}from"./main.common-DD7dqhZp.js";import{P as I}from"./PhotoDialog-DZbf20A6.js";var T=Object.getOwnPropertyDescriptor,V=(t,e,o,s)=>{for(var l=s>1?void 0:s?T(e,o):e,p=t.length-1,i;p>=0;p--)(i=t[p])&&(l=i(l)||l);return l};const b=w();let m=class extends k{constructor(){super(...arguments);r(this,"$notify");r(this,"claimType");r(this,"crop",!1);r(this,"imageCallback",()=>{});r(this,"imageUrl");r(this,"visible",!1)}open(o,s,l){this.claimType=s,this.crop=!!l,this.imageCallback=o,this.visible=!0}openPhotoDialog(o,s){this.visible=!1,this.$refs.photoDialog.open(this.imageCallback,this.claimType,this.crop,o,s)}async uploadImageFile(o){this.visible=!1,b.value=o.target.files[0];const s=b.value;if(s!=null){const l=new FileReader;l.onload=async p=>{var c;const i=(c=p.target)==null?void 0:c.result;if(i){const n=new Blob([new Uint8Array(i)],{type:s.type});this.openPhotoDialog(n,s.name)}},l.readAsArrayBuffer(s)}}async acceptUrl(){if(this.visible=!1,this.crop)try{const o=await x.get(this.imageUrl,{responseType:"blob"}),l=new URL(this.imageUrl).pathname.split("/").pop();this.$refs.photoDialog.open(this.imageCallback,this.claimType,this.crop,o.data,l)}catch{this.$notify({group:"alert",type:"danger",title:"Error",text:"There was an error retrieving that image."},5e3)}else this.imageCallback(this.imageUrl)}close(){this.visible=!1}};m=V([_({components:{PhotoDialog:I}})],m);const F={key:0,class:"dialog-overlay z-[60]"},N={class:"dialog relative"},R={class:"text-lg text-center font-light relative z-50"},A={class:"text-center mt-8"},M={class:"mt-4"},z={class:"mt-4"},O={class:"mt-2"},j={class:"ml-2"};function E(t,e,o,s,l,p){const i=h("font-awesome"),c=h("PhotoDialog");return d(),u(B,null,[t.visible?(d(),u("div",F,[a("div",N,[a("div",R,[e[4]||(e[4]=a("div",{id:"ViewHeading",class:"text-center font-bold absolute top-0 left-0 right-0 px-4 py-0.5 bg-black/50 text-white leading-none"}," Add Photo ",-1)),a("div",{class:"text-lg text-center px-2 py-0.5 leading-none absolute right-0 top-0 text-white",onClick:e[0]||(e[0]=n=>t.close())},[g(i,{icon:"xmark",class:"w-[1em]"})])]),a("div",null,[a("div",A,[a("div",null,[g(i,{icon:"camera",class:"bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-2 rounded-md",onClick:e[1]||(e[1]=n=>t.openPhotoDialog())})]),a("div",M,[a("input",{type:"file",onChange:e[2]||(e[2]=(...n)=>t.uploadImageFile&&t.uploadImageFile(...n))},null,32)]),a("div",z,[a("span",O,[e[5]||(e[5]=U(" ... or paste a URL: ")),$(a("input",{"onUpdate:modelValue":e[3]||(e[3]=n=>t.imageUrl=n),type:"text",class:"border-2"},null,512),[[P,t.imageUrl]])]),a("span",j,[t.imageUrl?(d(),f(i,{key:0,icon:"check",class:"bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-2 rounded-md cursor-pointer",onClick:t.acceptUrl},null,8,["onClick"])):(d(),f(i,{key:1,icon:"check",class:"text-white bg-white px-2 py-2"}))])])])])])])):D("",!0),g(c,{ref:"photoDialog"},null,512)],64)}const J=C(m,[["render",E]]);export{J as I}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ImportAccountView-Ceo5D7dW.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ImportAccountView-Ceo5D7dW.js deleted file mode 100644 index 4424215..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ImportAccountView-Ceo5D7dW.js +++ /dev/null @@ -1 +0,0 @@ -var w=Object.defineProperty;var y=(t,e,r)=>e in t?w(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var s=(t,e,r)=>y(t,typeof e!="symbol"?e+"":e,r);import{V as x,A as h,e as E,a5 as A,d as g,M as k,C,_ as P,h as u,k as o,o as m,m as c,n as v,j as S,s as f,q as I,z as T,B as p}from"./main.common-DD7dqhZp.js";import{ab as $,G as V,ac as N,ad as O}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var R=Object.getOwnPropertyDescriptor,_=(t,e,r,n)=>{for(var a=n>1?void 0:n?R(e,r):e,d=t.length-1,l;d>=0;d--)(l=t[d])&&(a=l(a)||a);return a};let b=class extends x{constructor(){super(...arguments);s(this,"TEST_USER_0_MNEMONIC","rigid shrug mobile smart veteran half all pond toilet brave review universe ship congress found yard skate elite apology jar uniform subway slender luggage");s(this,"UPORT_DERIVATION_PATH","m/7696500'/0'/0'/0'");s(this,"AppString",h);s(this,"$notify");s(this,"$router");s(this,"apiServer","");s(this,"address","");s(this,"derivationPath",$);s(this,"mnemonic","");s(this,"numAccounts",0);s(this,"privateHex","");s(this,"publicHex","");s(this,"showAdvanced",!1);s(this,"shouldErase",!1)}async created(){this.numAccounts=await V();const r=await E();this.apiServer=r.apiServer||""}onCancelClick(){this.$router.back()}isNotProdServer(){return this.apiServer!==h.PROD_ENDORSER_API_SERVER}async fromMnemonic(){const r=this.mnemonic.trim().toLowerCase();try{[this.address,this.privateHex,this.publicHex]=N(r,this.derivationPath);const n=O(this.address,this.publicHex,this.privateHex,this.derivationPath),a=await A;this.shouldErase&&await a.accounts.clear(),await a.accounts.add({dateCreated:new Date().toISOString(),derivationPath:this.derivationPath,did:n.did,identity:JSON.stringify(n),mnemonic:r,publicKeyHex:n.keys[0].publicKeyHex}),await g.open(),await g.settings.update(k,{activeDid:n.did}),this.$router.push({name:"account"})}catch(n){console.error("Error saving mnemonic & updating settings:",n),n=="Error: invalid mnemonic"?this.$notify({group:"alert",type:"danger",title:"Invalid Mnemonic",text:"Please check your mnemonic and try again."},5e3):this.$notify({group:"alert",type:"danger",title:"Error",text:"Got an error creating that identifier."},5e3)}}};b=_([C({components:{}})],b);const D={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},H={id:"ViewBreadcrumb",class:"mb-8"},M={class:"text-lg text-center font-light relative px-7"},U={key:0},B={class:"ml-4"},j={key:0,class:"mt-4"},F={key:1,class:"mt-4 text-blue-500"},G={class:"mt-8"},K={class:"grid grid-cols-1 sm:grid-cols-2 gap-2"};function L(t,e,r,n,a,d){const l=T("font-awesome");return p(),u("section",D,[o("div",H,[o("h1",M,[o("button",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:e[0]||(e[0]=i=>t.$router.go(-1))},[S(l,{icon:"chevron-left"})]),e[9]||(e[9]=v(" Import Existing Identifier "))])]),e[13]||(e[13]=o("p",{class:"text-center text-xl mb-4 font-light"}," Enter your seed phrase below to import your identifier on this device. ",-1)),m(o("textarea",{id:"seed-input","onUpdate:modelValue":e[1]||(e[1]=i=>t.mnemonic=i),type:"text",placeholder:"Seed Phrase",class:"block w-full rounded border border-slate-400 mb-4 px-3 py-2"},null,512),[[f,t.mnemonic]]),o("h3",{class:"text-sm uppercase font-semibold mb-3",onClick:e[2]||(e[2]=i=>t.showAdvanced=!t.showAdvanced)}," Advanced "),t.showAdvanced?(p(),u("div",U,[e[12]||(e[12]=v(" Enter a custom derivation path ")),m(o("input",{"onUpdate:modelValue":e[3]||(e[3]=i=>t.derivationPath=i),type:"text",class:"block w-full rounded border border-slate-400 mb-2 px-3 py-2"},null,512),[[f,t.derivationPath]]),o("span",B,[e[10]||(e[10]=v(" For previous uPort or Endorser users, ")),o("a",{class:"text-blue-500",onClick:e[4]||(e[4]=i=>t.derivationPath=t.UPORT_DERIVATION_PATH)}," click here to use that value. ")]),t.numAccounts==1?(p(),u("div",j,[m(o("input",{"onUpdate:modelValue":e[5]||(e[5]=i=>t.shouldErase=i),type:"checkbox",class:"mr-2"},null,512),[[I,t.shouldErase]]),e[11]||(e[11]=o("label",null,"Erase the previous identifier.",-1))])):c("",!0),t.isNotProdServer()?(p(),u("div",F,[o("button",{onClick:e[6]||(e[6]=i=>t.mnemonic=t.TEST_USER_0_MNEMONIC)}," Use mnemonic for Test User #0 ")])):c("",!0)])):c("",!0),o("div",G,[o("div",K,[o("button",{class:"block w-full text-center text-lg font-bold uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md",onClick:e[7]||(e[7]=i=>t.fromMnemonic())}," Import "),o("button",{type:"button",class:"block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md",onClick:e[8]||(e[8]=i=>t.onCancelClick())}," Cancel ")])])])}const Z=P(b,[["render",L]]);export{Z as default}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ImportDerivedAccountView-CtHBjHll.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ImportDerivedAccountView-CtHBjHll.js deleted file mode 100644 index 28a697e..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ImportDerivedAccountView-CtHBjHll.js +++ /dev/null @@ -1 +0,0 @@ -var b=Object.defineProperty;var g=(e,t,s)=>t in e?b(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var l=(e,t,s)=>g(e,typeof t!="symbol"?t+"":t,s);import{V as _,a5 as w,d as x,M as D,C as A,_ as k,h as u,k as n,n as C,j as P,m as $,F as I,E,z as O,B as m,y,t as V}from"./main.common-DD7dqhZp.js";import{ab as F,ae as B,af as T,ac as N,ad as S}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var H=Object.getOwnPropertyDescriptor,j=(e,t,s,i)=>{for(var o=i>1?void 0:i?H(t,s):t,c=e.length-1,r;c>=0;c--)(r=e[c])&&(o=r(o)||o);return o};let h=class extends _{constructor(){super(...arguments);l(this,"$route");l(this,"$router");l(this,"derivationPath",F);l(this,"didArrays",[]);l(this,"selectedArrayFirstDid","")}async mounted(){const t=await B(),s={};t.forEach(i=>{const o=s[i.mnemonic]||[];s[i.mnemonic]=o.concat([i.did])}),this.didArrays=Object.values(s),this.selectedArrayFirstDid=this.didArrays[0][0]}onCancelClick(){this.$router.back()}switchAccount(t){this.selectedArrayFirstDid=t}async incrementDerivation(){const t=this.didArrays.find(d=>d[0]===this.selectedArrayFirstDid)||[],s=await w,i=await s.accounts.where("did").anyOf(...t).toArray(),o=i[0];i.slice(1).forEach(d=>{d.derivationPath>o.derivationPath&&(o.derivationPath=d.derivationPath)});const c=T(o.derivationPath),r=o.mnemonic,[a,v,f]=N(r,c),p=S(a,f,v,c);try{await s.accounts.add({dateCreated:new Date().toISOString(),derivationPath:c,did:p.did,identity:JSON.stringify(p),mnemonic:r,publicKeyHex:p.keys[0].publicKeyHex}),await x.open(),await x.settings.update(D,{activeDid:p.did}),this.$router.push({name:"account"})}catch(d){console.error("Error saving mnemonic & updating settings:",d)}}};h=j([A({components:{}})],h);const M={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},K={id:"ViewBreadcrumb",class:"mb-8"},R={class:"text-lg text-center font-light relative px-7"},L={key:0},W={class:"mb-4"},z=["onClick"],G={class:"overflow-hidden"},J={class:"text-sm text-slate-500 truncate"},U={class:"mt-8"},Y={class:"grid grid-cols-1 sm:grid-cols-2 gap-2"};function q(e,t,s,i,o,c){const r=O("font-awesome");return m(),u("section",M,[n("div",K,[n("h1",R,[n("button",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:t[0]||(t[0]=a=>e.$router.go(-1))},[P(r,{icon:"chevron-left"})]),t[3]||(t[3]=C(" Derive from Existing Identity "))])]),n("div",null,[t[4]||(t[4]=n("p",{class:"text-center text-xl mb-4 font-light"}," Will increment the maximum known derivation path from the existing seed. ",-1)),e.didArrays.length>1?(m(),u("p",L," Choose existing DIDs from same seed phrase to compute derivation. ")):$("",!0),n("ul",W,[(m(!0),u(I,null,E(e.didArrays,a=>(m(),u("li",{key:a[0],class:"block bg-slate-100 rounded-md flex items-center px-4 py-3 mb-2",onClick:v=>e.switchAccount(a[0])},[a[0]==e.selectedArrayFirstDid?(m(),y(r,{key:0,icon:"circle",class:"fa-fw text-blue-500 text-xl mr-3"})):(m(),y(r,{key:1,icon:"circle",class:"fa-fw text-slate-400 text-xl mr-3"})),n("span",G,[n("div",J,[n("code",null,V(a.join(",")),1)])])],8,z))),128))])]),n("div",U,[n("div",Y,[n("button",{class:"block w-full text-center text-lg font-bold uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md",onClick:t[1]||(t[1]=a=>e.incrementDerivation())}," Increment and Import "),n("button",{type:"button",class:"block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md",onClick:t[2]||(t[2]=a=>e.onCancelClick())}," Cancel ")])])])}const nt=k(h,[["render",q]]);export{nt as default}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/InfiniteScroll-DZwFAI4R.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/InfiniteScroll-DZwFAI4R.js deleted file mode 100644 index a2feeec..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/InfiniteScroll-DZwFAI4R.js +++ /dev/null @@ -1 +0,0 @@ -var p=Object.defineProperty;var d=(r,e,t)=>e in r?p(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var a=(r,e,t)=>d(r,typeof e!="symbol"?e+"":e,t);import{a1 as f,aw as h,C as u,V as v,_,h as b,B as I,U as $,k as x}from"./main.common-DD7dqhZp.js";var m=Object.defineProperty,y=Object.getOwnPropertyDescriptor,l=(r,e,t,n)=>{for(var s=n>1?void 0:n?y(e,t):e,i=r.length-1,c;i>=0;i--)(c=r[i])&&(s=(n?c(e,t,s):c(s))||s);return n&&s&&m(e,t,s),s};let o=class extends v{constructor(){super(...arguments);a(this,"distance");a(this,"observer");a(this,"isInitialRender",!0)}updated(){if(!this.observer){const t={root:null,rootMargin:`0px 0px ${this.distance}px 0px`,threshold:1};this.observer=new IntersectionObserver(this.handleIntersection,t),this.observer.observe(this.$refs.sentinel)}}beforeUnmount(){this.observer&&this.observer.disconnect()}handleIntersection(t){return!!t[0].isIntersecting}};l([f({default:200})],o.prototype,"distance",2);l([h("reached-bottom")],o.prototype,"handleIntersection",1);o=l([u],o);const O={ref:"scrollContainer"},w={ref:"sentinel",style:{height:"1px"}};function B(r,e,t,n,s,i){return I(),b("div",O,[$(r.$slots,"default"),x("div",w,null,512)],512)}const g=_(o,[["render",B]]);export{g as I}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/InviteOneAcceptView-B4mm6cID.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/InviteOneAcceptView-B4mm6cID.js deleted file mode 100644 index e497a46..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/InviteOneAcceptView-B4mm6cID.js +++ /dev/null @@ -1 +0,0 @@ -var w=Object.defineProperty;var g=(i,t,e)=>t in i?w(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var a=(i,t,e)=>g(i,typeof t!="symbol"?t+"":t,e);import{V as y,d as I,e as k,l as x,H as v,C as $,_ as A,h as l,j as h,k as c,o as b,s as J,F as E,z as u,B as p}from"./main.common-DD7dqhZp.js";import{Q as D}from"./QuickNav-C8jPGtUY.js";import{R as V,K as C,e as S}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var F=Object.getOwnPropertyDescriptor,O=(i,t,e,s)=>{for(var n=s>1?void 0:s?F(t,e):t,r=i.length-1,o;r>=0;r--)(o=i[r])&&(n=o(n)||n);return n};let d=class extends y{constructor(){super(...arguments);a(this,"$notify");a(this,"$router");a(this,"$route");a(this,"activeDid","");a(this,"apiServer","");a(this,"checkingInvite",!0);a(this,"inputJwt","")}async mounted(){this.checkingInvite=!0,await I.open();const e=await k();this.activeDid=e.activeDid||"",this.apiServer=e.apiServer||"",this.activeDid||(this.activeDid=await V());const s=this.$route.params.jwt||"";await this.processInvite(s,!1),this.checkingInvite=!1}async processInvite(e,s){this.checkingInvite=!0;try{const n=this.extractJwtFromInput(e);if(!n){this.handleMissingJwt(s);return}await this.validateAndRedirect(n)}catch(n){this.handleError(n,s)}finally{this.checkingInvite=!1}}extractJwtFromInput(e){const s=e??"",n=s.match(/(https?:\/\/[^\s]+)/);if(n!=null&&n[1]){const o=n[1].match(/\/invite-one-accept\/([^?]+)/);if(o!=null&&o[1])return o[1]}const r=s.match(/(ey[\w.-]+)/);return r!=null&&r[1]?r[1]:""}async validateAndRedirect(e){C(e),this.$router.push({name:"contacts",query:{inviteJwt:e}})}handleMissingJwt(e){e&&this.$notify({group:"alert",type:"danger",title:"Missing Invite",text:"There was no invite. Paste the entire text that has the data."},5e3)}handleError(e,s){const n="Error accepting invite: "+S(e);x(n,!0),s&&this.$notify({group:"alert",type:"danger",title:"Error",text:"There was an error processing that invite."},3e3)}async checkInvite(e){(e.endsWith(v)||e.endsWith(v+"/")||e.endsWith("invite-one-accept")||e.endsWith("invite-one-accept/"))&&this.$notify({group:"alert",type:"danger",title:"Error",text:"That is only part of the invite data; it's missing some at the end. Try another way to get the full data."},5e3)}};d=O([$({components:{QuickNav:D}})],d);const P={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},T={key:0,class:"text-lg text-center font-light relative px-7"},N={key:1,class:"text-center mt-4"};function R(i,t,e,s,n,r){const o=u("QuickNav"),m=u("font-awesome");return p(),l(E,null,[h(o,{selected:"Invite"}),c("section",P,[i.checkingInvite?(p(),l("div",T,[h(m,{icon:"spinner",class:"fa-spin-pulse"})])):(p(),l("div",N,[t[3]||(t[3]=c("p",null,"That invitation did not work.",-1)),t[4]||(t[4]=c("p",{class:"mt-2"}," Go back to your invite message and copy the entire text, then paste it here. ",-1)),t[5]||(t[5]=c("p",{class:"mt-2"}," If the data looks correct, try Chrome. (For example, iOS may have cut off the invite data, or it may have shown a preview that stole your invite.) If it still complains, you may need the person who invited you to send a new one. ",-1)),b(c("textarea",{"onUpdate:modelValue":t[0]||(t[0]=f=>i.inputJwt=f),placeholder:"Paste invitation...",class:"mt-4 border-2 border-gray-300 p-2 rounded",cols:"30",onInput:t[1]||(t[1]=()=>i.checkInvite(i.inputJwt))},null,544),[[J,i.inputJwt]]),t[6]||(t[6]=c("br",null,null,-1)),c("button",{class:"ml-2 p-2 bg-blue-500 text-white rounded",onClick:t[2]||(t[2]=()=>i.processInvite(i.inputJwt,!0))}," Accept ")]))])],64)}const H=A(d,[["render",R]]);export{H as default}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/InviteOneView-BeYvBmK8.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/InviteOneView-BeYvBmK8.js deleted file mode 100644 index b0b74e1..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/InviteOneView-BeYvBmK8.js +++ /dev/null @@ -1 +0,0 @@ -var V=Object.defineProperty;var B=(s,t,e)=>t in s?V(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e;var d=(s,t,e)=>B(s,typeof t!="symbol"?t+"":t,e);import{C as T,V as _,_ as E,h as p,m as x,B as c,k as n,n as f,o as D,t as v,s as A,d as w,e as j,a6 as b,A as M,H as L,j as g,F as N,E as Y,z as m,y as F}from"./main.common-DD7dqhZp.js";import{u as S}from"./index-CZnn7ED5.js";import{C as P}from"./ContactNameDialog-B32CzJRA.js";import{Q as U}from"./QuickNav-C8jPGtUY.js";import{T as W}from"./TopMessage-ZWDDjman.js";import{g as k,ag as Q}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./_isString-B7bbuhPA.js";var G=Object.getOwnPropertyDescriptor,H=(s,t,e,a)=>{for(var r=a>1?void 0:a?G(t,e):t,i=s.length-1,l;i>=0;i--)(l=s[i])&&(r=l(r)||r);return r};let I=class extends _{constructor(){super(...arguments);d(this,"$notify");d(this,"callback",()=>{});d(this,"inviteIdentifier","");d(this,"text","");d(this,"visible",!1);d(this,"expiresAt",new Date(Date.now()+1e3*60*60*24*7).toISOString().substring(0,10))}async open(e,a){this.callback=a,this.inviteIdentifier=e,this.visible=!0}async onClickSaveChanges(){this.expiresAt?(this.callback(this.text,this.expiresAt),this.visible=!1):this.$notify({group:"alert",type:"warning",title:"Needs Expiration",text:"You must select an expiration date."},5e3)}onClickCancel(){this.visible=!1}};I=H([T],I);const J={key:0,class:"dialog-overlay"},z={class:"dialog"},q={class:"mt-8"},K={class:"grid grid-cols-1 sm:grid-cols-2 gap-2"};function X(s,t,e,a,r,i){return s.visible?(c(),p("div",J,[n("div",z,[t[4]||(t[4]=n("h1",{class:"text-xl font-bold text-center mb-4"},"Invitation & Notes",-1)),f(" These are optional notes for your use; they are comments to help you recall who it is when they accept it. These notes are sent to the server. If you want to store your own way, the invitation ID is: "+v(s.inviteIdentifier)+" ",1),D(n("input",{"onUpdate:modelValue":t[0]||(t[0]=l=>s.text=l),type:"text",placeholder:"Notes",class:"block w-full rounded border border-slate-400 mb-4 px-3 py-2"},null,512),[[A,s.text]]),t[5]||(t[5]=f(" Expiration ")),D(n("input",{"onUpdate:modelValue":t[1]||(t[1]=l=>s.expiresAt=l),type:"date",class:"block rounded border border-slate-400 mb-4 px-3 py-2"},null,512),[[A,s.expiresAt]]),n("div",q,[n("div",K,[n("button",{type:"button",class:"block w-full text-center text-lg font-bold uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md mb-2",onClick:t[2]||(t[2]=l=>s.onClickSaveChanges())}," Save "),n("button",{type:"button",class:"block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md mb-2",onClick:t[3]||(t[3]=l=>s.onClickCancel())}," Cancel ")])])])])):x("",!0)}const Z=E(I,[["render",X]]);var ee=Object.getOwnPropertyDescriptor,te=(s,t,e,a)=>{for(var r=a>1?void 0:a?ee(t,e):t,i=s.length-1,l;i>=0;i--)(l=s[i])&&(r=l(r)||r);return r};let $=class extends _{constructor(){super(...arguments);d(this,"$notify");d(this,"$router");d(this,"invites",[]);d(this,"activeDid","");d(this,"apiServer","");d(this,"contactsRedeemed",{});d(this,"isRegistered",!1);d(this,"showAppleWarning",!1)}async mounted(){try{await w.open();const e=await j();this.activeDid=e.activeDid||"",this.apiServer=e.apiServer||"",this.isRegistered=!!e.isRegistered;const a=await k(this.activeDid),r=await b.get(this.apiServer+"/api/userUtil/invite",{headers:a});this.invites=r.data.data;const i=await w.contacts.toArray();for(const l of this.invites){const h=i.find(u=>u.did===l.redeemedBy);h&&l.redeemedBy&&(this.contactsRedeemed[l.redeemedBy]=h)}}catch(e){console.error("Error fetching invites:",e),this.$notify({group:"alert",type:"danger",title:"Load Error",text:"Got an error loading your invites."},5e3)}}getTruncatedInviteId(e){return e.length<=9?e:`${e.slice(0,6)}...`}getTruncatedRedeemedBy(e){return e?this.contactsRedeemed[e]?this.contactsRedeemed[e].name||M.NO_CONTACT_NAME:e.length<=19?e:`${e.slice(0,13)}...${e.slice(-3)}`:""}inviteLink(e){return L+"/invite-one-accept/"+e}copyInviteAndNotify(e,a){S().copy(this.inviteLink(a)),this.$notify({group:"alert",type:"success",title:"Copied",text:"Your clipboard now contains the link for invite "+e},5e3)}showInvite(e,a,r){let i=`Your clipboard now contains the invite ID ${e}`;a?i+=" (This invite has been used.)":r&&(i+=" (This invite has expired.)"),S().copy(e),this.$notify({group:"alert",type:"success",title:"Copied",text:i},5e3)}lookForErrorAndNotify(e,a,r){console.error(a,"-",e);let i=r;e.response&&e.response.data&&e.response.data.error&&(e.response.data.error.message?i=e.response.data.error.message:i=e.response.data.error),this.$notify({group:"alert",type:"danger",title:a,text:i},5e3)}async createInvite(){const e=Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2);this.$refs.inviteDialog.open(e,async(a,r)=>{try{const i=await k(this.activeDid);if(!r)throw{response:{data:{error:"You must select an expiration date."}}};const l=(new Date(r).getTime()-Date.now())/1e3,h=await Q(this.activeDid,void 0,e,l);await b.post(this.apiServer+"/api/userUtil/invite",{inviteJwt:h,notes:a},{headers:i});const u={inviteIdentifier:e,expiresAt:r,jwt:h,notes:a,redeemedAt:null,redeemedBy:null};this.invites=[u,...this.invites]}catch(i){this.lookForErrorAndNotify(i,"Error Creating Invite","Got an error creating your invite.")}})}addNewContact(e,a){this.$refs.contactNameDialog.open("To Whom Did You Send The Invite?","Their name will be added to your contact list.",r=>{const i={did:e,name:r,registered:!0};w.contacts.add(i),this.contactsRedeemed[e]=i,this.$notify({group:"alert",type:"success",title:"Contact Added",text:`${r} has been added to your contacts.`},3e3)},()=>{},a)}deleteInvite(e,a){this.$notify({group:"modal",type:"confirm",title:"Delete Invite?",text:`Are you sure you want to erase the invite for "${a}"? (There is no undo.)`,onYes:async()=>{const r=await k(this.activeDid);try{const i=await b.delete(this.apiServer+"/api/userUtil/invite/"+e,{headers:r});if(i.status!==204)throw i.data;this.invites=this.invites.filter(l=>l.inviteIdentifier!==e),this.$notify({group:"alert",type:"success",title:"Deleted",text:"Invite deleted."},3e3)}catch(i){this.lookForErrorAndNotify(i,"Error Deleting Invite","Got an error deleting your invite.")}}},-1)}};$=te([T({components:{ContactNameDialog:P,QuickNav:U,TopMessage:W,InviteDialog:Z}})],$);const se={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},ie={class:"text-lg text-center font-light relative px-7"},ne={class:"ml-8 mt-4 list-outside list-disc w-5/6"},oe={key:1},re={key:1,class:"mt-6"},ae={class:"min-w-full bg-white"},le=["title","onClick"],de=["title","onClick"],ce=["data-testId"],pe={class:"text-center"},ue={class:"text-center"},he={key:2,class:"mt-6 text-center"};function ge(s,t,e,a,r,i){const l=m("QuickNav"),h=m("TopMessage"),u=m("font-awesome"),R=m("InviteDialog"),O=m("ContactNameDialog");return c(),p(N,null,[g(l,{selected:"Invite"}),g(h),n("section",se,[n("div",ie,[n("h1",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:t[0]||(t[0]=o=>s.$router.back())},[g(u,{icon:"chevron-left",class:"fa-fw"})])]),t[7]||(t[7]=n("h1",{class:"text-4xl text-center font-light"},"Invitations",-1)),n("ul",ne,[n("li",null,[t[3]||(t[3]=f(" Note when sending ")),s.showAppleWarning?(c(),p("span",oe," to Apple users: their links often fail because their device cuts off part of the link. You might need to send it to them some other way, like in an email. ")):(c(),p("span",{key:0,class:"text-blue-500 cursor-pointer",onClick:t[1]||(t[1]=o=>s.showAppleWarning=!s.showAppleWarning)}," to Apple users... "))])]),s.isRegistered?(c(),p("button",{key:0,class:"fixed right-6 top-12 text-center text-4xl leading-none bg-green-600 text-white w-14 py-2.5 rounded-full",onClick:t[2]||(t[2]=o=>s.createInvite())},[g(u,{icon:"plus",class:"fa-fw"})])):x("",!0),g(R,{ref:"inviteDialog"},null,512),s.invites.length?(c(),p("div",re,[n("table",ae,[t[6]||(t[6]=n("thead",null,[n("tr",null,[n("th",{class:"py-2"},[f(" ID "),n("br"),f(" (click for link) ")]),n("th",{class:"py-2"},"Notes"),n("th",{class:"py-2"},"Expires At"),n("th",{class:"py-2"},"Redeemed")])],-1)),n("tbody",null,[(c(!0),p(N,null,Y(s.invites,o=>{var C;return c(),p("tr",{key:o.inviteIdentifier,class:"border-t py-2"},[n("td",null,[!o.redeemedAt&&o.expiresAt>new Date().toISOString()?(c(),p("span",{key:0,class:"text-center text-blue-500 cursor-pointer",title:s.inviteLink(o.jwt),onClick:y=>s.copyInviteAndNotify(o.inviteIdentifier,o.jwt)},v(s.getTruncatedInviteId(o.inviteIdentifier)),9,le)):(c(),p("span",{key:1,class:"text-center text-slate-500 cursor-pointer",title:s.inviteLink(o.jwt),onClick:y=>s.showInvite(o.inviteIdentifier,!!o.redeemedAt,o.expiresAts.addNewContact(o.redeemedBy,o.notes)},null,8,["onClick"])):x("",!0)]),n("td",null,[g(u,{icon:"trash-can",class:"text-red-600 text-xl ml-2 mr-2 cursor-pointer",onClick:y=>s.deleteInvite(o.inviteIdentifier,o.notes)},null,8,["onClick"])])])}),128))])]),g(O,{ref:"contactNameDialog"},null,512)])):(c(),p("p",he,"No invites found."))])],64)}const De=E($,[["render",ge]]);export{De as default}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/MembersList-BOHRjd7y.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/MembersList-BOHRjd7y.js deleted file mode 100644 index 9f26761..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/MembersList-BOHRjd7y.js +++ /dev/null @@ -1 +0,0 @@ -var T=Object.defineProperty;var _=(t,s,e)=>s in t?T(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e;var d=(t,s,e)=>_(t,typeof s!="symbol"?s+"":s,e);import{a1 as $,C as O,V as S,e as j,l as p,d as b,_ as z,z as M,h as l,B as c,j as h,k as a,m as u,t as v,n as f,x as A,F as D,E as F}from"./main.common-DD7dqhZp.js";import{l as N,g as k,e as w,ar as x,ax as L,Q as R}from"./index-ryzpKtgI.js";var E=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=(t,s,e,r)=>{for(var o=r>1?void 0:r?I(s,e):s,m=t.length-1,i;m>=0;m--)(i=t[m])&&(o=(r?i(s,e,o):i(o))||o);return r&&o&&E(s,e,o),o};let g=class extends S{constructor(){super(...arguments);d(this,"$notify");d(this,"libsUtil",N);d(this,"password");d(this,"showOrganizerTools");d(this,"decryptedMembers",[]);d(this,"firstName","");d(this,"isLoading",!0);d(this,"isOrganizer",!1);d(this,"members",[]);d(this,"missingPassword",!1);d(this,"missingMyself",!1);d(this,"activeDid","");d(this,"apiServer","");d(this,"contacts",[])}async created(){const e=await j();this.activeDid=e.activeDid||"",this.apiServer=e.apiServer||"",this.firstName=e.firstName||"",await this.fetchMembers(),await this.loadContacts()}async fetchMembers(){try{this.isLoading=!0;const e=await k(this.activeDid),r=await this.axios.get(`${this.apiServer}/api/partner/groupOnboardMembers`,{headers:e});r.data&&r.data.data&&(this.members=r.data.data,await this.decryptMemberContents())}catch(e){p("Error fetching members: "+w(e),!0),this.$emit("error",x(e)||"Failed to fetch members.")}finally{this.isLoading=!1}}async decryptMemberContents(){if(this.decryptedMembers=[],!this.password){this.missingPassword=!0;return}let e=!0,r=!1;for(const o of this.members){try{const m=await L(o.content,this.password),i=JSON.parse(m);this.decryptedMembers.push({member:o,name:i.name,did:i.did,isRegistered:!!i.isRegistered}),e&&i.did===this.activeDid&&(this.isOrganizer=!0),i.did===this.activeDid&&(r=!0)}catch{}e=!1}this.missingMyself=!r}decryptionErrorMessage(){return this.isOrganizer?this.decryptedMembers.lengthe.member.admitted):this.decryptedMembers}informAboutAdmission(){this.$notify({group:"alert",type:"info",title:"Admission info",text:"This is to register people in Time Safari and to admit them to the meeting. A '+' symbol means they are not yet admitted and you can register and admit them. A '-' means you can remove them, but they will stay registered."},1e4)}informAboutAddingContact(e){e?this.$notify({group:"alert",type:"info",title:"Contact Exists",text:"They are in your contacts. If you want to remove them, you must do that from the contacts screen."},1e4):this.$notify({group:"alert",type:"info",title:"Contact Available",text:"This is to add them to your contacts. If you want to remove them later, you must do that from the contacts screen."},1e4)}async loadContacts(){this.contacts=await b.contacts.toArray()}getContactFor(e){return this.contacts.find(r=>r.did===e)}checkWhetherContactBeforeAdmitting(e){const r=this.getContactFor(e.did);!e.member.admitted&&!r?this.$notify({group:"modal",type:"confirm",title:"Add as Contact First?",text:"This person is not in your contacts. Would you like to add them as a contact first?",yesText:"Add as Contact",noText:"Skip Adding Contact",onYes:async()=>{await this.addAsContact(e),await this.toggleAdmission(e)},onNo:async()=>{this.$notify({group:"modal",type:"confirm",title:"Continue Without Adding?",text:"Are you sure you want to proceed with admission? If they are not a contact, you will not know their name after this meeting.",yesText:"Continue",onYes:async()=>{await this.toggleAdmission(e)},onCancel:async()=>{}},-1)}},-1):this.toggleAdmission(e)}async toggleAdmission(e){try{const r=await k(this.activeDid);await this.axios.put(`${this.apiServer}/api/partner/groupOnboardMember/${e.member.memberId}`,{admitted:!e.member.admitted},{headers:r}),e.member.admitted=!e.member.admitted;const o=this.getContactFor(e.did);if(e.member.admitted&&!e.isRegistered&&!(o!=null&&o.registered)){const m=o||{did:e.did,name:e.name};try{const i=await R(this.activeDid,this.apiServer,this.axios,m);if(i.success)e.isRegistered=!0,o&&(await b.contacts.update(e.did,{registered:!0}),o.registered=!0),this.$notify({group:"alert",type:"success",title:"Registered",text:"Besides being admitted, they were also registered."},3e3);else throw i}catch(i){const n=x(i)||(i==null?void 0:i.error)||"";this.$notify({group:"alert",type:"warning",title:"Registration failed",text:"They were admitted to the meeting. However, registration failed. You can register them from the contacts screen. "+n},12e3)}}}catch(r){p("Error toggling admission: "+w(r),!0),this.$emit("error",x(r)||"Failed to update member admission status.")}}async addAsContact(e){var r;try{const o={did:e.did,name:e.name};await b.contacts.add(o),this.contacts.push(o),this.$notify({group:"alert",type:"success",title:"Contact Added",text:"They were added to your contacts."},3e3)}catch(o){p("Error adding contact: "+w(o),!0);let m="An error prevented adding this contact.";o instanceof Error&&((r=o.message)==null?void 0:r.indexOf("already exists"))>-1&&(m="This person is already in your contact list."),this.$notify({group:"alert",type:"danger",title:"Contact Not Added",text:m},5e3)}}};C([$({required:!0})],g.prototype,"password",2);C([$({default:!1})],g.prototype,"showOrganizerTools",2);g=C([O],g);const B={class:"space-y-4"},P={key:0,class:"mt-16 text-center text-4xl bg-slate-400 text-white w-14 py-2.5 rounded-full mx-auto"},V={key:1},Y={class:"text-center text-red-600 py-4"},W={key:0,class:"py-4 text-red-600"},U={key:1,class:"py-4 text-red-600"},H={key:0,class:"inline-flex items-center flex-wrap"},q={class:"inline-flex items-center"},J={class:"mx-2 min-w-[24px] min-h-[24px] w-6 h-6 flex items-center justify-center rounded-full bg-blue-100 text-blue-600"},Q={class:"mx-2 min-w-[24px] min-h-[24px] w-6 h-6 flex items-center justify-center rounded-full bg-blue-100 text-blue-600"},G={key:0,class:"inline-flex items-center"},K={class:"mx-2 w-8 h-8 flex items-center justify-center rounded-full bg-green-100 text-green-600"},X={class:"flex justify-center"},Z={class:"flex items-center justify-between"},ee={class:"flex items-center"},te={class:"text-lg font-medium"},se={key:0,class:"flex justify-end"},ie=["onClick"],oe=["onClick"],re={class:"flex"},ne={key:0,class:"flex items-center"},ae=["title","onClick"],de={class:"text-sm text-gray-600 truncate"},le={key:2,class:"flex justify-center mt-4"},ce={key:3,class:"text-gray-500 py-4"};function me(t,s,e,r,o,m){const i=M("font-awesome");return c(),l("div",B,[t.isLoading?(c(),l("div",P,[h(i,{icon:"spinner",class:"fa-spin-pulse"})])):(c(),l("div",V,[a("div",Y,v(t.decryptionErrorMessage()),1),t.missingMyself?(c(),l("div",W," You are not currently admitted by the organizer. ")):u("",!0),t.firstName?u("",!0):(c(),l("div",U," Your name is not set, so others may not recognize you. Reload this page to set it. ")),a("div",null,[t.membersToShow().length>0&&t.showOrganizerTools&&t.isOrganizer?(c(),l("span",H,[a("span",q,[s[3]||(s[3]=f(" • Click ")),a("span",J,[h(i,{icon:"plus",class:"text-sm"})]),s[4]||(s[4]=f(" / ")),a("span",Q,[h(i,{icon:"minus",class:"text-sm"})]),s[5]||(s[5]=f(" to add/remove them to/from the meeting. "))])])):u("",!0)]),a("div",null,[t.membersToShow().length>0?(c(),l("span",G,[s[6]||(s[6]=f(" • Click ")),a("span",K,[h(i,{icon:"circle-user",class:"text-xl"})]),s[7]||(s[7]=f(" to add them to your contacts. "))])):u("",!0)]),a("div",X,[a("button",{class:"w-8 h-8 flex items-center justify-center rounded-full bg-blue-100 text-blue-600 hover:bg-blue-200 hover:text-blue-800 transition-colors",title:"Refresh members list",onClick:s[0]||(s[0]=(...n)=>t.fetchMembers&&t.fetchMembers(...n))},[h(i,{icon:"rotate",class:A({"fa-spin":t.isLoading})},null,8,["class"])])]),(c(!0),l(D,null,F(t.membersToShow(),n=>(c(),l("div",{key:n.member.memberId,class:"mt-2 p-4 bg-gray-50 rounded-lg"},[a("div",Z,[a("div",ee,[a("h3",te,v(n.name),1),!t.getContactFor(n.did)&&n.did!==t.activeDid?(c(),l("div",se,[a("button",{class:"ml-2 w-8 h-8 flex items-center justify-center rounded-full bg-green-100 text-green-600 hover:bg-green-200 hover:text-green-800 transition-colors",title:"Add as contact",onClick:y=>t.addAsContact(n)},[h(i,{icon:"circle-user",class:"text-xl"})],8,ie)])):u("",!0),n.did!==t.activeDid?(c(),l("button",{key:1,class:"ml-2 mb-2 w-6 h-6 flex items-center justify-center rounded-full bg-slate-100 text-slate-500 hover:bg-slate-200 hover:text-slate-800 transition-colors",title:"Contact info",onClick:y=>t.informAboutAddingContact(t.getContactFor(n.did)!==void 0)},[h(i,{icon:"circle-info",class:"text-base"})],8,oe)):u("",!0)]),a("div",re,[t.showOrganizerTools&&t.isOrganizer&&n.did!==t.activeDid?(c(),l("span",ne,[a("button",{class:"mr-2 w-6 h-6 flex items-center justify-center rounded-full bg-blue-100 text-blue-600 hover:bg-blue-200 hover:text-blue-800 transition-colors",title:n.member.admitted?"Remove member":"Admit member",onClick:y=>t.checkWhetherContactBeforeAdmitting(n)},[h(i,{icon:n.member.admitted?"minus":"plus",class:"text-sm"},null,8,["icon"])],8,ae),a("button",{class:"mr-2 mb-2 w-6 h-6 flex items-center justify-center rounded-full bg-slate-100 text-slate-500 hover:bg-slate-200 hover:text-slate-800 transition-colors",title:"Admission info",onClick:s[1]||(s[1]=y=>t.informAboutAdmission())},[h(i,{icon:"circle-info",class:"text-base"})])])):u("",!0)])]),a("p",de,v(n.did),1)]))),128)),t.membersToShow().length>0?(c(),l("div",le,[a("button",{class:"w-8 h-8 flex items-center justify-center rounded-full bg-blue-100 text-blue-600 hover:bg-blue-200 hover:text-blue-800 transition-colors",title:"Refresh members list",onClick:s[2]||(s[2]=(...n)=>t.fetchMembers&&t.fetchMembers(...n))},[h(i,{icon:"rotate",class:A({"fa-spin":t.isLoading})},null,8,["class"])])])):u("",!0),t.members.length===0?(c(),l("p",ce," No members have joined this meeting yet ")):u("",!0)]))])}const ye=z(g,[["render",me]]);export{ye as M}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/NewActivityView-DGm2GpQB.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/NewActivityView-DGm2GpQB.js deleted file mode 100644 index f31bf84..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/NewActivityView-DGm2GpQB.js +++ /dev/null @@ -1 +0,0 @@ -var A=Object.defineProperty;var I=(e,t,o)=>t in e?A(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var i=(e,t,o)=>I(e,typeof t!="symbol"?t+"":t,o);import{V as P,e as b,d as x,u as h,C,_ as $,h as f,j as w,k as r,m as u,n as c,y,t as a,w as v,F as T,E as g,z as U,B as l}from"./main.common-DD7dqhZp.js";import{G as J}from"./GiftedDialog-DmRkVexW.js";import{Q as N}from"./QuickNav-C8jPGtUY.js";import{E as S}from"./EntityIcon-DciUb57i.js";import{i as M,z as R,h as V,a7 as _,a8 as L}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var B=Object.getOwnPropertyDescriptor,H=(e,t,o,n)=>{for(var d=n>1?void 0:n?B(t,o):t,m=e.length-1,O;m>=0;m--)(O=e[m])&&(d=O(d)||d);return d};let j=class extends P{constructor(){super(...arguments);i(this,"$notify");i(this,"$router");i(this,"activeDid","");i(this,"allContacts",[]);i(this,"allMyDids",[]);i(this,"apiServer","");i(this,"lastAckedOfferToUserJwtId","");i(this,"lastAckedOfferToUserProjectsJwtId","");i(this,"newOffersToUser",[]);i(this,"newOffersToUserHitLimit",!1);i(this,"newOffersToUserProjects",[]);i(this,"newOffersToUserProjectsHitLimit",!1);i(this,"showOffersDetails",!1);i(this,"showOffersToUserProjectsDetails",!1);i(this,"didInfo",M);i(this,"displayAmount",R)}async created(){try{const o=await b();this.apiServer=o.apiServer||"",this.activeDid=o.activeDid||"",this.lastAckedOfferToUserJwtId=o.lastAckedOfferToUserJwtId||"",this.lastAckedOfferToUserProjectsJwtId=o.lastAckedOfferToUserProjectsJwtId||"",this.allContacts=await x.contacts.toArray(),this.allMyDids=await V();const n=await _(this.axios,this.apiServer,this.activeDid,this.lastAckedOfferToUserJwtId);this.newOffersToUser=n.data,this.newOffersToUserHitLimit=n.hitLimit;const d=await L(this.axios,this.apiServer,this.activeDid,this.lastAckedOfferToUserProjectsJwtId);this.newOffersToUserProjects=d.data,this.newOffersToUserProjectsHitLimit=d.hitLimit}catch(o){console.error("Error retrieving settings & contacts:",o),this.$notify({group:"alert",type:"danger",title:"Error",text:o.message||"There was an error retrieving your activity."},5e3)}}async expandOffersToUserAndMarkRead(){this.showOffersDetails=!this.showOffersDetails,this.showOffersDetails&&(await h(this.activeDid,{lastAckedOfferToUserJwtId:this.newOffersToUser[0].jwtId}),this.$notify({group:"alert",type:"info",title:"Marked as Read",text:"The offers are marked as viewed. Click in the list to keep them as new."},5e3))}async markOffersAsReadStartingWith(o){const n=this.newOffersToUser.findIndex(d=>d.jwtId===o);n!==-1&&nd.jwtId===o);n!==-1&&ne.$router.back())}),t[3]||(t[3]=c(" New Activity For You "))])]),r("div",W,[r("div",null,[r("span",Y,a(e.newOffersToUser.length)+a(e.newOffersToUserHitLimit?"+":""),1),r("span",z,"New Offer"+a(e.newOffersToUser.length===1?"":"s")+" To You",1),e.newOffersToUser.length>0?(l(),y(p,{key:0,icon:e.showOffersDetails?"chevron-down":"chevron-right",class:"cursor-pointer ml-4 mr-4 text-lg",onClick:t[1]||(t[1]=s=>e.expandOffersToUserAndMarkRead())},null,8,["icon"])):u("",!0)]),w(k,{to:"/recent-offers-to-user",class:"text-blue-500"},{default:v(()=>t[4]||(t[4]=[c(" See all ")])),_:1})]),e.showOffersDetails?(l(),f("div",G,[r("ul",q,[(l(!0),f(T,null,g(e.newOffersToUser,s=>(l(),f("li",{key:s.jwtId,class:"mt-4 relative group"},[r("span",null,a(e.didInfo(s.offeredByDid,e.activeDid,e.allMyDids,e.allContacts)),1),t[6]||(t[6]=c(" offered ")),s.objectDescription?(l(),f("span",K,a(s.objectDescription),1)):u("",!0),c(a(s.objectDescription&&s.amount?", and ":"")+" ",1),s.amount?(l(),f("span",X,a(e.displayAmount(s.unit,s.amount)),1)):u("",!0),w(k,{to:{path:"/claim/"+encodeURIComponent(s.jwtId)},class:"text-blue-500"},{default:v(()=>[w(p,{icon:"file-lines",class:"pl-2 text-blue-500 cursor-pointer"})]),_:2},1032,["to"]),r("div",{class:"absolute left-0 w-full text-left text-gray-500 text-sm hidden group-hover:flex cursor-pointer items-center",onClick:D=>e.markOffersAsReadStartingWith(s.jwtId)},t[5]||(t[5]=[r("span",{class:"inline-block w-8 h-px bg-gray-500 mr-2"},null,-1),c(" Click to keep all above as new offers ")]),8,Z)]))),128))])])):u("",!0),r("div",ee,[r("div",null,[r("span",te,a(e.newOffersToUserProjects.length)+a(e.newOffersToUserProjectsHitLimit?"+":""),1),r("span",se,"New Offer"+a(e.newOffersToUserProjects.length===1?"":"s")+" To Your Projects",1),e.newOffersToUserProjects.length>0?(l(),y(p,{key:0,icon:e.showOffersToUserProjectsDetails?"chevron-down":"chevron-right",class:"cursor-pointer ml-4 mr-4 text-lg",onClick:t[2]||(t[2]=s=>e.expandOffersToUserProjectsAndMarkRead())},null,8,["icon"])):u("",!0)]),w(k,{to:"/recent-offers-to-user-projects",class:"text-blue-500"},{default:v(()=>t[7]||(t[7]=[c(" See all ")])),_:1})]),e.showOffersToUserProjectsDetails?(l(),f("div",re,[r("ul",oe,[(l(!0),f(T,null,g(e.newOffersToUserProjects,s=>(l(),f("li",{key:s.jwtId,class:"mt-4 relative group"},[r("span",null,a(e.didInfo(s.offeredByDid,e.activeDid,e.allMyDids,e.allContacts)),1),t[9]||(t[9]=c(" offered ")),s.objectDescription?(l(),f("span",ie,a(s.objectDescription),1)):u("",!0),c(a(s.objectDescription&&s.amount?", and ":"")+" ",1),s.amount?(l(),f("span",ae,a(e.displayAmount(s.unit,s.amount)),1)):u("",!0),t[10]||(t[10]=c(" to ")),r("span",null,a(s.planName),1),w(k,{to:{path:"/claim/"+encodeURIComponent(s.jwtId)},class:"text-blue-500"},{default:v(()=>[w(p,{icon:"file-lines",class:"pl-2 text-blue-500 cursor-pointer"})]),_:2},1032,["to"]),r("div",{class:"absolute left-0 w-full text-left text-gray-500 text-sm hidden group-hover:flex cursor-pointer items-center",onClick:D=>e.markOffersToUserProjectsAsReadStartingWith(s.jwtId)},t[8]||(t[8]=[r("span",{class:"inline-block w-8 h-px bg-gray-500 mr-2"},null,-1),c(" Click to keep all above as new offers ")]),8,ne)]))),128))])])):u("",!0)])],64)}const ve=$(j,[["render",le]]);export{ve as default}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/NewEditAccountView-B1OhdTIn.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/NewEditAccountView-B1OhdTIn.js deleted file mode 100644 index 7e6bd93..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/NewEditAccountView-B1OhdTIn.js +++ /dev/null @@ -1 +0,0 @@ -var p=Object.defineProperty;var u=(t,e,s)=>e in t?p(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var c=(t,e,s)=>u(t,typeof e!="symbol"?e+"":e,s);import{V as m,e as b,d as g,M as v,C as w,_ as f,h as x,k as o,o as _,n as C,j as N,s as k,z as h,B as $}from"./main.common-DD7dqhZp.js";import"./index-BGoTPXII.js";var y=Object.getOwnPropertyDescriptor,V=(t,e,s,i)=>{for(var n=i>1?void 0:i?y(e,s):e,a=t.length-1,r;a>=0;a--)(r=t[a])&&(n=r(n)||n);return n};let d=class extends m{constructor(){super(...arguments);c(this,"$router");c(this,"givenName","")}async created(){const s=await b();this.givenName=(s.firstName||"")+(s.lastName?` ${s.lastName}`:"")}async onClickSaveChanges(){await g.settings.update(v,{firstName:this.givenName,lastName:""}),this.$router.back()}onClickCancel(){this.$router.back()}};d=V([w({components:{}})],d);const E={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},S={id:"ViewBreadcrumb",class:"mb-8"},A={class:"text-lg text-center font-light relative px-7"},B={class:"mt-8"},T={class:"grid grid-cols-1 sm:grid-cols-2 gap-2"};function D(t,e,s,i,n,a){const r=h("font-awesome");return $(),x("section",E,[o("div",S,[o("h1",A,[o("button",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:e[0]||(e[0]=l=>t.$router.back())},[N(r,{icon:"chevron-left",class:"fa-fw"})]),e[4]||(e[4]=C(" Edit Identity "))])]),_(o("input",{"onUpdate:modelValue":e[1]||(e[1]=l=>t.givenName=l),type:"text",placeholder:"Name",class:"block w-full rounded border border-slate-400 mb-4 px-3 py-2"},null,512),[[k,t.givenName]]),o("div",B,[o("div",T,[o("button",{type:"button",class:"block w-full text-center text-lg font-bold uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md mb-2",onClick:e[2]||(e[2]=l=>t.onClickSaveChanges())}," Save Changes "),o("button",{type:"button",class:"block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md mb-2",onClick:e[3]||(e[3]=l=>t.onClickCancel())}," Cancel ")])])])}const P=f(d,[["render",D]]);export{P as default}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/NewEditProjectView-DeSG79Yx.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/NewEditProjectView-DeSG79Yx.js deleted file mode 100644 index 8b59b6b..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/NewEditProjectView-DeSG79Yx.js +++ /dev/null @@ -1 +0,0 @@ -var Di=Object.defineProperty;var Ki=(t,e,n)=>e in t?Di(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var q=(t,e,n)=>Ki(t,typeof e!="symbol"?e+"":e,n);/* empty css */import{D as nn}from"./datetime-BDQ5ptpc.js";import{V as Pi,e as Ar,a as Sr,b as qi,C as Mi,_ as ji,h as ae,j as Nt,k as _,o as bt,m as $e,n as rn,t as on,s as Ht,q as Ir,w as Vi,p as zi,x as $r,F as Fi,z as ce,B as Gt,y as Zi}from"./main.common-DD7dqhZp.js";import{v as Gi,u as Wi,i as Yi}from"./vue-leaflet.es-DQekxOGR.js";import{I as Ji}from"./ImageMethodDialog-zrU-VGNm.js";import{Q as Xi}from"./QuickNav-C8jPGtUY.js";import{G as Qi,g as Te,I as ts,at as es}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./PhotoDialog-DZbf20A6.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";function Tr(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function to(t,...e){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function ns(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Tr(t.outputLen),Tr(t.blockLen)}function Oe(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function rs(t,e){to(t);const n=e.outputLen;if(t.lengtht instanceof Uint8Array,an=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),mt=(t,e)=>t<<32-e|t>>>e,os=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!os)throw new Error("Non little-endian hardware is not supported");function is(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function Pn(t){if(typeof t=="string"&&(t=is(t)),!eo(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}function ss(...t){const e=new Uint8Array(t.reduce((r,o)=>r+o.length,0));let n=0;return t.forEach(r=>{if(!eo(r))throw new Error("Uint8Array expected");e.set(r,n),n+=r.length}),e}let no=class{clone(){return this._cloneInto()}};function as(t){const e=r=>t().update(Pn(r)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}function ro(t=32){if(sn&&typeof sn.getRandomValues=="function")return sn.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}function cs(t,e,n,r){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,n,r);const o=BigInt(32),i=BigInt(4294967295),a=Number(n>>o&i),c=Number(n&i),s=r?4:0,l=r?0:4;t.setUint32(e+s,a,r),t.setUint32(e+l,c,r)}let ls=class extends no{constructor(e,n,r,o){super(),this.blockLen=e,this.outputLen=n,this.padOffset=r,this.isLE=o,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=an(this.buffer)}update(e){Oe(this);const{view:n,buffer:r,blockLen:o}=this;e=Pn(e);const i=e.length;for(let a=0;ao-a&&(this.process(r,0),a=0);for(let f=a;fu.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;ft&e^~t&n,ds=(t,e,n)=>t&e^t&n^e&n,us=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Rt=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Ot=new Uint32Array(64);let hs=class extends ls{constructor(){super(64,32,8,!1),this.A=Rt[0]|0,this.B=Rt[1]|0,this.C=Rt[2]|0,this.D=Rt[3]|0,this.E=Rt[4]|0,this.F=Rt[5]|0,this.G=Rt[6]|0,this.H=Rt[7]|0}get(){const{A:e,B:n,C:r,D:o,E:i,F:a,G:c,H:s}=this;return[e,n,r,o,i,a,c,s]}set(e,n,r,o,i,a,c,s){this.A=e|0,this.B=n|0,this.C=r|0,this.D=o|0,this.E=i|0,this.F=a|0,this.G=c|0,this.H=s|0}process(e,n){for(let f=0;f<16;f++,n+=4)Ot[f]=e.getUint32(n,!1);for(let f=16;f<64;f++){const g=Ot[f-15],p=Ot[f-2],y=mt(g,7)^mt(g,18)^g>>>3,d=mt(p,17)^mt(p,19)^p>>>10;Ot[f]=d+Ot[f-7]+y+Ot[f-16]|0}let{A:r,B:o,C:i,D:a,E:c,F:s,G:l,H:u}=this;for(let f=0;f<64;f++){const g=mt(c,6)^mt(c,11)^mt(c,25),p=u+g+fs(c,s,l)+us[f]+Ot[f]|0,d=(mt(r,2)^mt(r,13)^mt(r,22))+ds(r,o,i)|0;u=l,l=s,s=c,c=a+p|0,a=i,i=o,o=r,r=p+d|0}r=r+this.A|0,o=o+this.B|0,i=i+this.C|0,a=a+this.D|0,c=c+this.E|0,s=s+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(r,o,i,a,c,s,l,u)}roundClean(){Ot.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};const xn=as(()=>new hs);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const oo=BigInt(0),Me=BigInt(1),ps=BigInt(2),je=t=>t instanceof Uint8Array,gs=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function ue(t){if(!je(t))throw new Error("Uint8Array expected");let e="";for(let n=0;nr+o.length,0));let n=0;return t.forEach(r=>{if(!je(r))throw new Error("Uint8Array expected");e.set(r,n),n+=r.length}),e}function ws(t,e){if(t.length!==e.length)return!1;for(let n=0;noo;t>>=Me,e+=1);return e}function Es(t,e){return t>>BigInt(e)&Me}const xs=(t,e,n)=>t|(n?Me:oo)<(ps<new Uint8Array(t),Lr=t=>Uint8Array.from(t);function so(t,e,n){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");let r=cn(t),o=cn(t),i=0;const a=()=>{r.fill(1),o.fill(0),i=0},c=(...f)=>n(o,r,...f),s=(f=cn())=>{o=c(Lr([0]),f),r=c(),f.length!==0&&(o=c(Lr([1]),f),r=c())},l=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let f=0;const g=[];for(;f{a(),s(f);let p;for(;!(p=g(l()));)s();return a(),p}}const vs={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",stringOrUint8Array:t=>typeof t=="string"||t instanceof Uint8Array,isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function Se(t,e,n={}){const r=(o,i,a)=>{const c=vs[i];if(typeof c!="function")throw new Error(`Invalid validator "${i}", expected function`);const s=t[o];if(!(a&&s===void 0)&&!c(s,t))throw new Error(`Invalid param ${String(o)}=${s} (${typeof s}), expected ${i}`)};for(const[o,i]of Object.entries(e))r(o,i,!1);for(const[o,i]of Object.entries(n))r(o,i,!0);return t}const Bs=Object.freeze(Object.defineProperty({__proto__:null,bitGet:Es,bitLen:ms,bitMask:Vn,bitSet:xs,bytesToHex:ue,bytesToNumberBE:it,bytesToNumberLE:Mn,concatBytes:ne,createHmacDrbg:so,ensureBytes:tt,equalBytes:ws,hexToBytes:he,hexToNumber:qn,numberToBytesBE:Vt,numberToBytesLE:jn,numberToHexUnpadded:io,numberToVarBytesBE:ys,utf8ToBytes:bs,validateObject:Se},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const G=BigInt(0),z=BigInt(1),Wt=BigInt(2),As=BigInt(3),vn=BigInt(4),Ur=BigInt(5),Cr=BigInt(8);BigInt(9);BigInt(16);function X(t,e){const n=t%e;return n>=G?n:e+n}function Ss(t,e,n){if(n<=G||e 0");if(n===z)return G;let r=z;for(;e>G;)e&z&&(r=r*t%n),t=t*t%n,e>>=z;return r}function ft(t,e,n){let r=t;for(;e-- >G;)r*=r,r%=n;return r}function Bn(t,e){if(t===G||e<=G)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let n=X(t,e),r=e,o=G,i=z;for(;n!==G;){const c=r/n,s=r%n,l=o-i*c;r=n,n=s,o=i,i=l}if(r!==z)throw new Error("invert: does not exist");return X(o,e)}function Is(t){const e=(t-z)/Wt;let n,r,o;for(n=t-z,r=0;n%Wt===G;n/=Wt,r++);for(o=Wt;o(r[o]="function",r),e);return Se(t,n)}function Us(t,e,n){if(n 0");if(n===G)return t.ONE;if(n===z)return e;let r=t.ONE,o=e;for(;n>G;)n&z&&(r=t.mul(r,o)),o=t.sqr(o),n>>=z;return r}function Cs(t,e){const n=new Array(e.length),r=e.reduce((i,a,c)=>t.is0(a)?i:(n[c]=i,t.mul(i,a)),t.ONE),o=t.inv(r);return e.reduceRight((i,a,c)=>t.is0(a)?i:(n[c]=t.mul(i,n[c]),t.mul(i,a)),o),n}function ao(t,e){const n=e!==void 0?e:t.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function ks(t,e,n=!1,r={}){if(t<=G)throw new Error(`Expected Field ORDER > 0, got ${t}`);const{nBitLength:o,nByteLength:i}=ao(t,e);if(i>2048)throw new Error("Field lengths over 2048 bytes are not supported");const a=$s(t),c=Object.freeze({ORDER:t,BITS:o,BYTES:i,MASK:Vn(o),ZERO:G,ONE:z,create:s=>X(s,t),isValid:s=>{if(typeof s!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof s}`);return G<=s&&ss===G,isOdd:s=>(s&z)===z,neg:s=>X(-s,t),eql:(s,l)=>s===l,sqr:s=>X(s*s,t),add:(s,l)=>X(s+l,t),sub:(s,l)=>X(s-l,t),mul:(s,l)=>X(s*l,t),pow:(s,l)=>Us(c,s,l),div:(s,l)=>X(s*Bn(l,t),t),sqrN:s=>s*s,addN:(s,l)=>s+l,subN:(s,l)=>s-l,mulN:(s,l)=>s*l,inv:s=>Bn(s,t),sqrt:r.sqrt||(s=>a(c,s)),invertBatch:s=>Cs(c,s),cmov:(s,l,u)=>u?l:s,toBytes:s=>n?jn(s,i):Vt(s,i),fromBytes:s=>{if(s.length!==i)throw new Error(`Fp.fromBytes: expected ${i}, got ${s.length}`);return n?Mn(s):it(s)}});return Object.freeze(c)}function co(t){if(typeof t!="bigint")throw new Error("field order must be bigint");const e=t.toString(2).length;return Math.ceil(e/8)}function lo(t){const e=co(t);return e+Math.ceil(e/2)}function Ns(t,e,n=!1){const r=t.length,o=co(e),i=lo(e);if(r<16||r1024)throw new Error(`expected ${i}-1024 bytes of input, got ${r}`);const a=n?it(t):Mn(t),c=X(a,e-z)+z;return n?jn(c,o):Vt(c,o)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Hs=BigInt(0),ln=BigInt(1);function Rs(t,e){const n=(o,i)=>{const a=i.negate();return o?a:i},r=o=>{const i=Math.ceil(e/o)+1,a=2**(o-1);return{windows:i,windowSize:a}};return{constTimeNegate:n,unsafeLadder(o,i){let a=t.ZERO,c=o;for(;i>Hs;)i&ln&&(a=a.add(c)),c=c.double(),i>>=ln;return a},precomputeWindow(o,i){const{windows:a,windowSize:c}=r(i),s=[];let l=o,u=l;for(let f=0;f>=p,h>s&&(h-=g,a+=ln);const w=d,v=d+Math.abs(h)-1,x=y%2!==0,$=h<0;h===0?u=u.add(n(x,i[w])):l=l.add(n($,i[v]))}return{p:l,f:u}},wNAFCached(o,i,a,c){const s=o._WINDOW_SIZE||1;let l=i.get(o);return l||(l=this.precomputeWindow(o,s),s!==1&&i.set(o,c(l))),this.wNAF(s,l,a)}}}function fo(t){return Ls(t.Fp),Se(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...ao(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Os(t){const e=fo(t);Se(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:n,Fp:r,a:o}=e;if(n){if(!r.eql(o,r.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof n!="object"||typeof n.beta!="bigint"||typeof n.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}const{bytesToNumberBE:_s,hexToBytes:Ds}=Bs,Xt={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(t){const{Err:e}=Xt;if(t.length<2||t[0]!==2)throw new e("Invalid signature integer tag");const n=t[1],r=t.subarray(2,n+2);if(!n||r.length!==n)throw new e("Invalid signature integer: wrong length");if(r[0]&128)throw new e("Invalid signature integer: negative");if(r[0]===0&&!(r[1]&128))throw new e("Invalid signature integer: unnecessary leading zero");return{d:_s(r),l:t.subarray(n+2)}},toSig(t){const{Err:e}=Xt,n=typeof t=="string"?Ds(t):t;if(!(n instanceof Uint8Array))throw new Error("ui8a expected");let r=n.length;if(r<2||n[0]!=48)throw new e("Invalid signature tag");if(n[1]!==r-2)throw new e("Invalid signature: incorrect length");const{d:o,l:i}=Xt._parseInt(n.subarray(2)),{d:a,l:c}=Xt._parseInt(i);if(c.length)throw new e("Invalid signature: left bytes after parsing");return{r:o,s:a}},hexFromSig(t){const e=l=>Number.parseInt(l[0],16)&8?"00"+l:l,n=l=>{const u=l.toString(16);return u.length&1?`0${u}`:u},r=e(n(t.s)),o=e(n(t.r)),i=r.length/2,a=o.length/2,c=n(i),s=n(a);return`30${n(a+i+4)}02${s}${o}02${c}${r}`}},At=BigInt(0),ut=BigInt(1);BigInt(2);const kr=BigInt(3);BigInt(4);function Ks(t){const e=Os(t),{Fp:n}=e,r=e.toBytes||((y,d,h)=>{const w=d.toAffine();return ne(Uint8Array.from([4]),n.toBytes(w.x),n.toBytes(w.y))}),o=e.fromBytes||(y=>{const d=y.subarray(1),h=n.fromBytes(d.subarray(0,n.BYTES)),w=n.fromBytes(d.subarray(n.BYTES,2*n.BYTES));return{x:h,y:w}});function i(y){const{a:d,b:h}=e,w=n.sqr(y),v=n.mul(w,y);return n.add(n.add(v,n.mul(y,d)),h)}if(!n.eql(n.sqr(e.Gy),i(e.Gx)))throw new Error("bad generator point: equation left != right");function a(y){return typeof y=="bigint"&&Atn.eql(x,n.ZERO);return v(h)&&v(w)?f.ZERO:new f(h,w,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(d){const h=n.invertBatch(d.map(w=>w.pz));return d.map((w,v)=>w.toAffine(h[v])).map(f.fromAffine)}static fromHex(d){const h=f.fromAffine(o(tt("pointHex",d)));return h.assertValidity(),h}static fromPrivateKey(d){return f.BASE.multiply(s(d))}_setWindowSize(d){this._WINDOW_SIZE=d,l.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!n.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:d,y:h}=this.toAffine();if(!n.isValid(d)||!n.isValid(h))throw new Error("bad point: x or y not FE");const w=n.sqr(h),v=i(d);if(!n.eql(w,v))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:d}=this.toAffine();if(n.isOdd)return!n.isOdd(d);throw new Error("Field doesn't support isOdd")}equals(d){u(d);const{px:h,py:w,pz:v}=this,{px:x,py:$,pz:S}=d,E=n.eql(n.mul(h,S),n.mul(x,v)),B=n.eql(n.mul(w,S),n.mul($,v));return E&&B}negate(){return new f(this.px,n.neg(this.py),this.pz)}double(){const{a:d,b:h}=e,w=n.mul(h,kr),{px:v,py:x,pz:$}=this;let S=n.ZERO,E=n.ZERO,B=n.ZERO,A=n.mul(v,v),N=n.mul(x,x),U=n.mul($,$),T=n.mul(v,x);return T=n.add(T,T),B=n.mul(v,$),B=n.add(B,B),S=n.mul(d,B),E=n.mul(w,U),E=n.add(S,E),S=n.sub(N,E),E=n.add(N,E),E=n.mul(S,E),S=n.mul(T,S),B=n.mul(w,B),U=n.mul(d,U),T=n.sub(A,U),T=n.mul(d,T),T=n.add(T,B),B=n.add(A,A),A=n.add(B,A),A=n.add(A,U),A=n.mul(A,T),E=n.add(E,A),U=n.mul(x,$),U=n.add(U,U),A=n.mul(U,T),S=n.sub(S,A),B=n.mul(U,N),B=n.add(B,B),B=n.add(B,B),new f(S,E,B)}add(d){u(d);const{px:h,py:w,pz:v}=this,{px:x,py:$,pz:S}=d;let E=n.ZERO,B=n.ZERO,A=n.ZERO;const N=e.a,U=n.mul(e.b,kr);let T=n.mul(h,x),H=n.mul(w,$),R=n.mul(v,S),P=n.add(h,w),b=n.add(x,$);P=n.mul(P,b),b=n.add(T,H),P=n.sub(P,b),b=n.add(h,v);let m=n.add(x,S);return b=n.mul(b,m),m=n.add(T,R),b=n.sub(b,m),m=n.add(w,v),E=n.add($,S),m=n.mul(m,E),E=n.add(H,R),m=n.sub(m,E),A=n.mul(N,b),E=n.mul(U,R),A=n.add(E,A),E=n.sub(H,A),A=n.add(H,A),B=n.mul(E,A),H=n.add(T,T),H=n.add(H,T),R=n.mul(N,R),b=n.mul(U,b),H=n.add(H,R),R=n.sub(T,R),R=n.mul(N,R),b=n.add(b,R),T=n.mul(H,b),B=n.add(B,T),T=n.mul(m,b),E=n.mul(P,E),E=n.sub(E,T),T=n.mul(P,H),A=n.mul(m,A),A=n.add(A,T),new f(E,B,A)}subtract(d){return this.add(d.negate())}is0(){return this.equals(f.ZERO)}wNAF(d){return p.wNAFCached(this,l,d,h=>{const w=n.invertBatch(h.map(v=>v.pz));return h.map((v,x)=>v.toAffine(w[x])).map(f.fromAffine)})}multiplyUnsafe(d){const h=f.ZERO;if(d===At)return h;if(c(d),d===ut)return this;const{endo:w}=e;if(!w)return p.unsafeLadder(this,d);let{k1neg:v,k1:x,k2neg:$,k2:S}=w.splitScalar(d),E=h,B=h,A=this;for(;x>At||S>At;)x&ut&&(E=E.add(A)),S&ut&&(B=B.add(A)),A=A.double(),x>>=ut,S>>=ut;return v&&(E=E.negate()),$&&(B=B.negate()),B=new f(n.mul(B.px,w.beta),B.py,B.pz),E.add(B)}multiply(d){c(d);let h=d,w,v;const{endo:x}=e;if(x){const{k1neg:$,k1:S,k2neg:E,k2:B}=x.splitScalar(h);let{p:A,f:N}=this.wNAF(S),{p:U,f:T}=this.wNAF(B);A=p.constTimeNegate($,A),U=p.constTimeNegate(E,U),U=new f(n.mul(U.px,x.beta),U.py,U.pz),w=A.add(U),v=N.add(T)}else{const{p:$,f:S}=this.wNAF(h);w=$,v=S}return f.normalizeZ([w,v])[0]}multiplyAndAddUnsafe(d,h,w){const v=f.BASE,x=(S,E)=>E===At||E===ut||!S.equals(v)?S.multiplyUnsafe(E):S.multiply(E),$=x(this,h).add(x(d,w));return $.is0()?void 0:$}toAffine(d){const{px:h,py:w,pz:v}=this,x=this.is0();d==null&&(d=x?n.ONE:n.inv(v));const $=n.mul(h,d),S=n.mul(w,d),E=n.mul(v,d);if(x)return{x:n.ZERO,y:n.ZERO};if(!n.eql(E,n.ONE))throw new Error("invZ was invalid");return{x:$,y:S}}isTorsionFree(){const{h:d,isTorsionFree:h}=e;if(d===ut)return!0;if(h)return h(f,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:d,clearCofactor:h}=e;return d===ut?this:h?h(f,this):this.multiplyUnsafe(e.h)}toRawBytes(d=!0){return this.assertValidity(),r(f,this,d)}toHex(d=!0){return ue(this.toRawBytes(d))}}f.BASE=new f(e.Gx,e.Gy,n.ONE),f.ZERO=new f(n.ZERO,n.ONE,n.ZERO);const g=e.nBitLength,p=Rs(f,e.endo?Math.ceil(g/2):g);return{CURVE:e,ProjectivePoint:f,normPrivateKeyToScalar:s,weierstrassEquation:i,isWithinCurveOrder:a}}function Ps(t){const e=fo(t);return Se(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function qs(t){const e=Ps(t),{Fp:n,n:r}=e,o=n.BYTES+1,i=2*n.BYTES+1;function a(b){return Atue(Vt(b,e.nByteLength));function y(b){const m=r>>ut;return b>m}function d(b){return y(b)?c(-b):b}const h=(b,m,I)=>it(b.slice(m,I));class w{constructor(m,I,C){this.r=m,this.s=I,this.recovery=C,this.assertValidity()}static fromCompact(m){const I=e.nByteLength;return m=tt("compactSignature",m,I*2),new w(h(m,0,I),h(m,I,2*I))}static fromDER(m){const{r:I,s:C}=Xt.toSig(tt("DER",m));return new w(I,C)}assertValidity(){if(!g(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!g(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(m){return new w(this.r,this.s,m)}recoverPublicKey(m){const{r:I,s:C,recovery:L}=this,k=B(tt("msgHash",m));if(L==null||![0,1,2,3].includes(L))throw new Error("recovery id invalid");const D=L===2||L===3?I+e.n:I;if(D>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const O=L&1?"03":"02",Z=l.fromHex(O+p(D)),Y=s(D),st=c(-k*Y),gt=c(C*Y),J=l.BASE.multiplyAndAddUnsafe(Z,st,gt);if(!J)throw new Error("point at infinify");return J.assertValidity(),J}hasHighS(){return y(this.s)}normalizeS(){return this.hasHighS()?new w(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return he(this.toDERHex())}toDERHex(){return Xt.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return he(this.toCompactHex())}toCompactHex(){return p(this.r)+p(this.s)}}const v={isValidPrivateKey(b){try{return u(b),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const b=lo(e.n);return Ns(e.randomBytes(b),e.n)},precompute(b=8,m=l.BASE){return m._setWindowSize(b),m.multiply(BigInt(3)),m}};function x(b,m=!0){return l.fromPrivateKey(b).toRawBytes(m)}function $(b){const m=b instanceof Uint8Array,I=typeof b=="string",C=(m||I)&&b.length;return m?C===o||C===i:I?C===2*o||C===2*i:b instanceof l}function S(b,m,I=!0){if($(b))throw new Error("first arg must be private key");if(!$(m))throw new Error("second arg must be public key");return l.fromHex(m).multiply(u(b)).toRawBytes(I)}const E=e.bits2int||function(b){const m=it(b),I=b.length*8-e.nBitLength;return I>0?m>>BigInt(I):m},B=e.bits2int_modN||function(b){return c(E(b))},A=Vn(e.nBitLength);function N(b){if(typeof b!="bigint")throw new Error("bigint expected");if(!(At<=b&&bnt in I))throw new Error("sign() legacy options not supported");const{hash:C,randomBytes:L}=e;let{lowS:k,prehash:D,extraEntropy:O}=I;k==null&&(k=!0),b=tt("msgHash",b),D&&(b=tt("prehashed msgHash",C(b)));const Z=B(b),Y=u(m),st=[N(Y),N(Z)];if(O!=null){const nt=O===!0?L(n.BYTES):O;st.push(tt("extraEntropy",nt))}const gt=ne(...st),J=Z;function Zt(nt){const at=E(nt);if(!g(at))return;const be=s(at),ct=l.BASE.multiply(at).toAffine(),j=c(ct.x);if(j===At)return;const lt=c(be*c(J+j*Y));if(lt===At)return;let me=(ct.x===j?0:2)|Number(ct.y&ut),Ee=lt;return k&&y(lt)&&(Ee=d(lt),me^=1),new w(j,Ee,me)}return{seed:gt,k2sig:Zt}}const T={lowS:e.lowS,prehash:!1},H={lowS:e.lowS,prehash:!1};function R(b,m,I=T){const{seed:C,k2sig:L}=U(b,m,I),k=e;return so(k.hash.outputLen,k.nByteLength,k.hmac)(C,L)}l.BASE._setWindowSize(8);function P(b,m,I,C=H){var ct;const L=b;if(m=tt("msgHash",m),I=tt("publicKey",I),"strict"in C)throw new Error("options.strict was renamed to lowS");const{lowS:k,prehash:D}=C;let O,Z;try{if(typeof L=="string"||L instanceof Uint8Array)try{O=w.fromDER(L)}catch(j){if(!(j instanceof Xt.Err))throw j;O=w.fromCompact(L)}else if(typeof L=="object"&&typeof L.r=="bigint"&&typeof L.s=="bigint"){const{r:j,s:lt}=L;O=new w(j,lt)}else throw new Error("PARSE");Z=l.fromHex(I)}catch(j){if(j.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(k&&O.hasHighS())return!1;D&&(m=e.hash(m));const{r:Y,s:st}=O,gt=B(m),J=s(st),Zt=c(gt*J),nt=c(Y*J),at=(ct=l.BASE.multiplyAndAddUnsafe(Z,Zt,nt))==null?void 0:ct.toAffine();return at?c(at.x)===Y:!1}return{CURVE:e,getPublicKey:x,getSharedSecret:S,sign:R,verify:P,ProjectivePoint:l,Signature:w,utils:v}}let uo=class extends no{constructor(e,n){super(),this.finished=!1,this.destroyed=!1,ns(e);const r=Pn(n);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,i=new Uint8Array(o);i.set(r.length>o?e.create().update(r).digest():r);for(let a=0;anew uo(t,e).update(n).digest();ho.create=(t,e)=>new uo(t,e);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Ms(t){return{hash:t,hmac:(e,...n)=>ho(t,e,ss(...n)),randomBytes:ro}}function js(t,e){const n=r=>qs({...t,...Ms(r)});return Object.freeze({...n(e),create:n})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ve=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),_e=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),po=BigInt(1),De=BigInt(2),Nr=(t,e)=>(t+e/De)/e;function go(t){const e=Ve,n=BigInt(3),r=BigInt(6),o=BigInt(11),i=BigInt(22),a=BigInt(23),c=BigInt(44),s=BigInt(88),l=t*t*t%e,u=l*l*t%e,f=ft(u,n,e)*u%e,g=ft(f,n,e)*u%e,p=ft(g,De,e)*l%e,y=ft(p,o,e)*p%e,d=ft(y,i,e)*y%e,h=ft(d,c,e)*d%e,w=ft(h,s,e)*h%e,v=ft(w,c,e)*d%e,x=ft(v,n,e)*u%e,$=ft(x,a,e)*y%e,S=ft($,r,e)*l%e,E=ft(S,De,e);if(!An.eql(An.sqr(E),t))throw new Error("Cannot find square root");return E}const An=ks(Ve,void 0,void 0,{sqrt:go}),we=js({a:BigInt(0),b:BigInt(7),Fp:An,n:_e,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=_e,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-po*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=n,a=BigInt("0x100000000000000000000000000000000"),c=Nr(i*t,e),s=Nr(-r*t,e);let l=X(t-c*n-s*o,e),u=X(-c*r-s*i,e);const f=l>a,g=u>a;if(f&&(l=e-l),g&&(u=e-u),l>a||u>a)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:f,k1:l,k2neg:g,k2:u}}}},xn),ze=BigInt(0),yo=t=>typeof t=="bigint"&&zetypeof t=="bigint"&&zeo.charCodeAt(0)));n=ne(r,r),Hr[t]=n}return xn(ne(n,...e))}const zn=t=>t.toRawBytes(!0).slice(1),Sn=t=>Vt(t,32),fn=t=>X(t,Ve),Be=t=>X(t,_e),Fn=we.ProjectivePoint,zs=(t,e,n)=>Fn.BASE.multiplyAndAddUnsafe(t,e,n);function In(t){let e=we.utils.normPrivateKeyToScalar(t),n=Fn.fromPrivateKey(e);return{scalar:n.hasEvenY()?e:Be(-e),bytes:zn(n)}}function wo(t){if(!yo(t))throw new Error("bad x: need 0 < x < p");const e=fn(t*t),n=fn(e*t+BigInt(7));let r=go(n);r%De!==ze&&(r=fn(-r));const o=new Fn(t,r,po);return o.assertValidity(),o}function bo(...t){return Be(it(Ke("BIP0340/challenge",...t)))}function Fs(t){return In(t).bytes}function Zs(t,e,n=ro(32)){const r=tt("message",t),{bytes:o,scalar:i}=In(e),a=tt("auxRand",n,32),c=Sn(i^it(Ke("BIP0340/aux",a))),s=Ke("BIP0340/nonce",c,o,r),l=Be(it(s));if(l===ze)throw new Error("sign failed: k is zero");const{bytes:u,scalar:f}=In(l),g=bo(u,o,r),p=new Uint8Array(64);if(p.set(u,0),p.set(Sn(Be(f+g*i)),32),!mo(p,r,o))throw new Error("sign: Invalid signature produced");return p}function mo(t,e,n){const r=tt("signature",t,64),o=tt("message",e),i=tt("publicKey",n,32);try{const a=wo(it(i)),c=it(r.subarray(0,32));if(!yo(c))return!1;const s=it(r.subarray(32,64));if(!Vs(s))return!1;const l=bo(Sn(c),zn(a),o),u=zs(a,s,Be(-l));return!(!u||!u.hasEvenY()||u.toAffine().x!==c)}catch{return!1}}const xe={getPublicKey:Fs,sign:Zs,verify:mo,utils:{randomPrivateKey:we.utils.randomPrivateKey,lift_x:wo,pointToBytes:zn,numberToBytesBE:Vt,bytesToNumberBE:it,taggedHash:Ke,mod:X}},dn=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Zn=t=>t instanceof Uint8Array,te=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),Et=(t,e)=>t<<32-e|t>>>e,Gs=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!Gs)throw new Error("Non little-endian hardware is not supported");const Ws=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function Q(t){if(!Zn(t))throw new Error("Uint8Array expected");let e="";for(let n=0;nr+o.length,0));let n=0;return t.forEach(r=>{if(!Zn(r))throw new Error("Uint8Array expected");e.set(r,n),n+=r.length}),e}class xo{clone(){return this._cloneInto()}}const Ys=t=>Object.prototype.toString.call(t)==="[object Object]"&&t.constructor===Object;function Js(t,e){if(e!==void 0&&(typeof e!="object"||!Ys(e)))throw new Error("Options should be object or undefined");return Object.assign(t,e)}function ie(t){const e=r=>t().update(oe(r)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}function Gn(t=32){if(dn&&typeof dn.getRandomValues=="function")return dn.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}function $n(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function Xs(t){if(typeof t!="boolean")throw new Error(`Expected boolean, not ${t}`)}function Yt(t,...e){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function Qs(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");$n(t.outputLen),$n(t.blockLen)}function ta(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function ea(t,e){Yt(t);const n=e.outputLen;if(t.length>o&i),c=Number(n&i),s=r?4:0,l=r?0:4;t.setUint32(e+s,a,r),t.setUint32(e+l,c,r)}class Wn extends xo{constructor(e,n,r,o){super(),this.blockLen=e,this.outputLen=n,this.padOffset=r,this.isLE=o,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=te(this.buffer)}update(e){ot.exists(this);const{view:n,buffer:r,blockLen:o}=this;e=oe(e);const i=e.length;for(let a=0;ao-a&&(this.process(r,0),a=0);for(let f=a;fu.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;ft&e^~t&n,oa=(t,e,n)=>t&e^t&n^e&n,ia=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),_t=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Dt=new Uint32Array(64);class vo extends Wn{constructor(){super(64,32,8,!1),this.A=_t[0]|0,this.B=_t[1]|0,this.C=_t[2]|0,this.D=_t[3]|0,this.E=_t[4]|0,this.F=_t[5]|0,this.G=_t[6]|0,this.H=_t[7]|0}get(){const{A:e,B:n,C:r,D:o,E:i,F:a,G:c,H:s}=this;return[e,n,r,o,i,a,c,s]}set(e,n,r,o,i,a,c,s){this.A=e|0,this.B=n|0,this.C=r|0,this.D=o|0,this.E=i|0,this.F=a|0,this.G=c|0,this.H=s|0}process(e,n){for(let f=0;f<16;f++,n+=4)Dt[f]=e.getUint32(n,!1);for(let f=16;f<64;f++){const g=Dt[f-15],p=Dt[f-2],y=Et(g,7)^Et(g,18)^g>>>3,d=Et(p,17)^Et(p,19)^p>>>10;Dt[f]=d+Dt[f-7]+y+Dt[f-16]|0}let{A:r,B:o,C:i,D:a,E:c,F:s,G:l,H:u}=this;for(let f=0;f<64;f++){const g=Et(c,6)^Et(c,11)^Et(c,25),p=u+g+ra(c,s,l)+ia[f]+Dt[f]|0,d=(Et(r,2)^Et(r,13)^Et(r,22))+oa(r,o,i)|0;u=l,l=s,s=c,c=a+p|0,a=i,i=o,o=r,r=p+d|0}r=r+this.A|0,o=o+this.B|0,i=i+this.C|0,a=a+this.D|0,c=c+this.E|0,s=s+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(r,o,i,a,c,s,l,u)}roundClean(){Dt.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class sa extends vo{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}const Ut=ie(()=>new vo);ie(()=>new sa);/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */function se(t){if(!Number.isSafeInteger(t))throw new Error(`Wrong integer: ${t}`)}function Bt(...t){const e=(o,i)=>a=>o(i(a)),n=Array.from(t).reverse().reduce((o,i)=>o?e(o,i.encode):i.encode,void 0),r=t.reduce((o,i)=>o?e(o,i.decode):i.decode,void 0);return{encode:n,decode:r}}function Ct(t){return{encode:e=>{if(!Array.isArray(e)||e.length&&typeof e[0]!="number")throw new Error("alphabet.encode input should be an array of numbers");return e.map(n=>{if(se(n),n<0||n>=t.length)throw new Error(`Digit index outside alphabet: ${n} (alphabet: ${t.length})`);return t[n]})},decode:e=>{if(!Array.isArray(e)||e.length&&typeof e[0]!="string")throw new Error("alphabet.decode input should be array of strings");return e.map(n=>{if(typeof n!="string")throw new Error(`alphabet.decode: not string element=${n}`);const r=t.indexOf(n);if(r===-1)throw new Error(`Unknown letter: "${n}". Allowed: ${t}`);return r})}}}function kt(t=""){if(typeof t!="string")throw new Error("join separator should be string");return{encode:e=>{if(!Array.isArray(e)||e.length&&typeof e[0]!="string")throw new Error("join.encode input should be array of strings");for(let n of e)if(typeof n!="string")throw new Error(`join.encode: non-string input=${n}`);return e.join(t)},decode:e=>{if(typeof e!="string")throw new Error("join.decode input should be string");return e.split(t)}}}function Fe(t,e="="){if(se(t),typeof e!="string")throw new Error("padding chr should be string");return{encode(n){if(!Array.isArray(n)||n.length&&typeof n[0]!="string")throw new Error("padding.encode input should be array of strings");for(let r of n)if(typeof r!="string")throw new Error(`padding.encode: non-string input=${r}`);for(;n.length*t%8;)n.push(e);return n},decode(n){if(!Array.isArray(n)||n.length&&typeof n[0]!="string")throw new Error("padding.encode input should be array of strings");for(let o of n)if(typeof o!="string")throw new Error(`padding.decode: non-string input=${o}`);let r=n.length;if(r*t%8)throw new Error("Invalid padding: string should have whole number of bytes");for(;r>0&&n[r-1]===e;r--)if(!((r-1)*t%8))throw new Error("Invalid padding: string has too much padding");return n.slice(0,r)}}}function Bo(t){if(typeof t!="function")throw new Error("normalize fn should be function");return{encode:e=>e,decode:e=>t(e)}}function Rr(t,e,n){if(e<2)throw new Error(`convertRadix: wrong from=${e}, base cannot be less than 2`);if(n<2)throw new Error(`convertRadix: wrong to=${n}, base cannot be less than 2`);if(!Array.isArray(t))throw new Error("convertRadix: data should be array");if(!t.length)return[];let r=0;const o=[],i=Array.from(t);for(i.forEach(a=>{if(se(a),a<0||a>=e)throw new Error(`Wrong integer: ${a}`)});;){let a=0,c=!0;for(let s=r;se?Ao(e,t%e):t,Pe=(t,e)=>t+(e-Ao(t,e));function Tn(t,e,n,r){if(!Array.isArray(t))throw new Error("convertRadix2: data should be array");if(e<=0||e>32)throw new Error(`convertRadix2: wrong from=${e}`);if(n<=0||n>32)throw new Error(`convertRadix2: wrong to=${n}`);if(Pe(e,n)>32)throw new Error(`convertRadix2: carry overflow from=${e} to=${n} carryBits=${Pe(e,n)}`);let o=0,i=0;const a=2**n-1,c=[];for(const s of t){if(se(s),s>=2**e)throw new Error(`convertRadix2: invalid data word=${s} from=${e}`);if(o=o<32)throw new Error(`convertRadix2: carry overflow pos=${i} from=${e}`);for(i+=e;i>=n;i-=n)c.push((o>>i-n&a)>>>0);o&=2**i-1}if(o=o<=e)throw new Error("Excess padding");if(!r&&o)throw new Error(`Non-zero padding: ${o}`);return r&&i>0&&c.push(o>>>0),c}function aa(t){return se(t),{encode:e=>{if(!(e instanceof Uint8Array))throw new Error("radix.encode input should be Uint8Array");return Rr(Array.from(e),2**8,t)},decode:e=>{if(!Array.isArray(e)||e.length&&typeof e[0]!="number")throw new Error("radix.decode input should be array of strings");return Uint8Array.from(Rr(e,t,2**8))}}}function Ft(t,e=!1){if(se(t),t<=0||t>32)throw new Error("radix2: bits should be in (0..32]");if(Pe(8,t)>32||Pe(t,8)>32)throw new Error("radix2: carry overflow");return{encode:n=>{if(!(n instanceof Uint8Array))throw new Error("radix2.encode input should be Uint8Array");return Tn(Array.from(n),8,t,!e)},decode:n=>{if(!Array.isArray(n)||n.length&&typeof n[0]!="number")throw new Error("radix2.decode input should be array of strings");return Uint8Array.from(Tn(n,t,8,e))}}}function Or(t){if(typeof t!="function")throw new Error("unsafeWrapper fn should be function");return function(...e){try{return t.apply(null,e)}catch{}}}function ca(t,e){if(se(t),typeof e!="function")throw new Error("checksum fn should be function");return{encode(n){if(!(n instanceof Uint8Array))throw new Error("checksum.encode: input should be Uint8Array");const r=e(n).slice(0,t),o=new Uint8Array(n.length+t);return o.set(n),o.set(r,n.length),o},decode(n){if(!(n instanceof Uint8Array))throw new Error("checksum.decode: input should be Uint8Array");const r=n.slice(0,-t),o=e(r).slice(0,t),i=n.slice(-t);for(let a=0;at.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1")));const Lt=Bt(Ft(6),Ct("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),Fe(6),kt("")),da=Bt(Ft(6),Ct("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),Fe(6),kt("")),Yn=t=>Bt(aa(58),Ct(t),kt("")),qe=Yn("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");Yn("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ");Yn("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");const _r=[0,2,3,5,6,7,9,10,11],ua={encode(t){let e="";for(let n=0;nBt(ca(4,e=>t(t(e))),qe),Ln=Bt(Ct("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),kt("")),Dr=[996825010,642813549,513874426,1027748829,705979059];function ve(t){const e=t>>25;let n=(t&33554431)<<5;for(let r=0;r>r&1)===1&&(n^=Dr[r]);return n}function Kr(t,e,n=1){const r=t.length;let o=1;for(let i=0;i126)throw new Error(`Invalid prefix (${t})`);o=ve(o)^a>>5}o=ve(o);for(let i=0;ig)throw new TypeError(`Length ${p} exceeds limit ${g}`);return u=u.toLowerCase(),`${u}1${Ln.encode(f)}${Kr(u,f,e)}`}function c(u,f=90){if(typeof u!="string")throw new Error(`bech32.decode input should be string, not ${typeof u}`);if(u.length<8||f!==!1&&u.length>f)throw new TypeError(`Wrong string length: ${u.length} (${u}). Expected (8..${f})`);const g=u.toLowerCase();if(u!==g&&u!==u.toUpperCase())throw new Error("String must be lowercase or uppercase");u=g;const p=u.lastIndexOf("1");if(p===0||p===-1)throw new Error('Letter "1" must be present between prefix and data only');const y=u.slice(0,p),d=u.slice(p+1);if(d.length<6)throw new Error("Data must be at least 6 characters long");const h=Ln.decode(d).slice(0,-6),w=Kr(y,h,e);if(!d.endsWith(w))throw new Error(`Invalid checksum in ${u}: expected "${w}"`);return{prefix:y,words:h}}const s=Or(c);function l(u){const{prefix:f,words:g}=c(u,!1);return{prefix:f,words:g,bytes:r(g)}}return{encode:a,decode:c,decodeToBytes:l,decodeUnsafe:s,fromWords:r,fromWordsUnsafe:i,toWords:o}}const pe=So("bech32");So("bech32m");const pa={encode:t=>new TextDecoder().decode(t),decode:t=>new TextEncoder().encode(t)},ga=Bt(Ft(4),Ct("0123456789abcdef"),kt(""),Bo(t=>{if(typeof t!="string"||t.length%2)throw new TypeError(`hex.decode: expected string, got ${typeof t} with length ${t.length}`);return t.toLowerCase()})),ya={utf8:pa,hex:ga,base16:la,base32:fa,base64:Lt,base64url:da,base58:qe,base58xmr:ua};`${Object.keys(ya).join(", ")}`;function un(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`positive integer expected, not ${t}`)}function Pr(t){if(typeof t!="boolean")throw new Error(`boolean expected, not ${t}`)}function wa(t){return t instanceof Uint8Array||t!=null&&typeof t=="object"&&t.constructor.name==="Uint8Array"}function $t(t,...e){if(!wa(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error(`Uint8Array expected of length ${e}, not of length=${t.length}`)}/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */const et=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),ba=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!ba)throw new Error("Non little-endian hardware is not supported");function ma(t,e){if(e==null||typeof e!="object")throw new Error("options must be defined");return Object.assign(t,e)}function Ea(t,e){if(t.length!==e.length)return!1;let n=0;for(let r=0;r(Object.assign(e,t),e),jt=16,va=283;function Jn(t){return t<<1^va&-(t>>7)}function fe(t,e){let n=0;for(;e>0;e>>=1)n^=t&-(e&1),t=Jn(t);return n}const Un=(()=>{let t=new Uint8Array(256);for(let n=0,r=1;n<256;n++,r^=Jn(r))t[n]=r;const e=new Uint8Array(256);e[0]=99;for(let n=0;n<255;n++){let r=t[255-n];r|=r<<8,e[t[n]]=(r^r>>4^r>>5^r>>6^r>>7^99)&255}return e})(),Ba=Un.map((t,e)=>Un.indexOf(e)),Aa=t=>t<<24|t>>>8,hn=t=>t<<8|t>>>24;function Io(t,e){if(t.length!==256)throw new Error("Wrong sbox length");const n=new Uint32Array(256).map((l,u)=>e(t[u])),r=n.map(hn),o=r.map(hn),i=o.map(hn),a=new Uint32Array(256*256),c=new Uint32Array(256*256),s=new Uint16Array(256*256);for(let l=0;l<256;l++)for(let u=0;u<256;u++){const f=l*256+u;a[f]=n[l]^r[u],c[f]=o[l]^i[u],s[f]=t[l]<<8|t[u]}return{sbox:t,sbox2:s,T0:n,T1:r,T2:o,T3:i,T01:a,T23:c}}const Xn=Io(Un,t=>fe(t,3)<<24|t<<16|t<<8|fe(t,2)),$o=Io(Ba,t=>fe(t,11)<<24|fe(t,13)<<16|fe(t,9)<<8|fe(t,14)),Sa=(()=>{const t=new Uint8Array(16);for(let e=0,n=1;e<16;e++,n=Jn(n))t[e]=n;return t})();function To(t){$t(t);const e=t.length;if(![16,24,32].includes(e))throw new Error(`aes: wrong key size: should be 16, 24 or 32, got: ${e}`);const{sbox2:n}=Xn,r=et(t),o=r.length,i=c=>vt(n,c,c,c,c),a=new Uint32Array(e+28);a.set(r);for(let c=o;c6&&c%o===4&&(s=i(s)),a[c]=a[c-o]^s}return a}function Ia(t){const e=To(t),n=e.slice(),r=e.length,{sbox2:o}=Xn,{T0:i,T1:a,T2:c,T3:s}=$o;for(let l=0;l>>8&255]^c[f>>>16&255]^s[f>>>24]}return n}function Mt(t,e,n,r,o,i){return t[n<<8&65280|r>>>8&255]^e[o>>>8&65280|i>>>24&255]}function vt(t,e,n,r,o){return t[e&255|n&65280]|t[r>>>16&255|o>>>16&65280]<<16}function qr(t,e,n,r,o){const{sbox2:i,T01:a,T23:c}=Xn;let s=0;e^=t[s++],n^=t[s++],r^=t[s++],o^=t[s++];const l=t.length/4-2;for(let y=0;y16)throw new Error(`aes/pcks5: wrong padding byte: ${r}`);const o=t.subarray(0,-r);for(let i=0;i{const c=To(e),{b:s,o:l,out:u}=La(i,o,a),f=et(n);let g=f[0],p=f[1],y=f[2],d=f[3],h=0;for(;h+4<=s.length;)g^=s[h+0],p^=s[h+1],y^=s[h+2],d^=s[h+3],{s0:g,s1:p,s2:y,s3:d}=qr(c,g,p,y,d),l[h++]=g,l[h++]=p,l[h++]=y,l[h++]=d;if(o){const w=Ca(i.subarray(h*4));g^=w[0],p^=w[1],y^=w[2],d^=w[3],{s0:g,s1:p,s2:y,s3:d}=qr(c,g,p,y,d),l[h++]=g,l[h++]=p,l[h++]=y,l[h++]=d}return c.fill(0),u},decrypt:(i,a)=>{Ta(i);const c=Ia(e),s=et(n),l=Lo(i.length,a),u=et(i),f=et(l);let g=s[0],p=s[1],y=s[2],d=s[3];for(let h=0;h+4<=u.length;){const w=g,v=p,x=y,$=d;g=u[h+0],p=u[h+1],y=u[h+2],d=u[h+3];const{s0:S,s1:E,s2:B,s3:A}=$a(c,g,p,y,d);f[h++]=S^w,f[h++]=E^v,f[h++]=B^x,f[h++]=A^$}return c.fill(0),Ua(l,o)}}}),Co=t=>Uint8Array.from(t.split("").map(e=>e.charCodeAt(0))),ka=Co("expand 16-byte k"),Na=Co("expand 32-byte k"),Ha=et(ka),ko=et(Na);ko.slice();function M(t,e){return t<>>32-e}function Cn(t){return t.byteOffset%4===0}const Le=64,Ra=16,No=2**32-1,Mr=new Uint32Array;function Oa(t,e,n,r,o,i,a,c){const s=o.length,l=new Uint8Array(Le),u=et(l),f=Cn(o)&&Cn(i),g=f?et(o):Mr,p=f?et(i):Mr;for(let y=0;y=No)throw new Error("arx: counter overflow");const d=Math.min(Le,s-y);if(f&&d===Le){const h=y/4;if(y%4!==0)throw new Error("arx: invalid block position");for(let w=0,v;w{$t(c),$t(s),$t(l);const g=l.length;if(u||(u=new Uint8Array(g)),$t(u),un(f),f<0||f>=No)throw new Error("arx: counter overflow");if(u.length0;)p.pop().fill(0);return u}}function Da(t,e,n,r,o,i=20){let a=t[0],c=t[1],s=t[2],l=t[3],u=e[0],f=e[1],g=e[2],p=e[3],y=e[4],d=e[5],h=e[6],w=e[7],v=o,x=n[0],$=n[1],S=n[2],E=a,B=c,A=s,N=l,U=u,T=f,H=g,R=p,P=y,b=d,m=h,I=w,C=v,L=x,k=$,D=S;for(let Z=0;Zo?e.create().update(r).digest():r);for(let a=0;anew Ro(t,e).update(n).digest();zt.create=(t,e)=>new Ro(t,e);function Ka(t,e,n){return ot.hash(t),zt(t,oe(n),oe(e))}const pn=new Uint8Array([0]),jr=new Uint8Array;function Pa(t,e,n,r=32){if(ot.hash(t),ot.number(r),r>255*t.outputLen)throw new Error("Length should be <= 255*HashLen");const o=Math.ceil(r/t.outputLen);n===void 0&&(n=jr);const i=new Uint8Array(o*t.outputLen),a=zt.create(t,e),c=a._cloneInto(),s=new Uint8Array(a.outputLen);for(let l=0;l{for(var n in e)qa(t,n,{get:e[n],enumerable:!0})},le=Symbol("verified"),Ma=t=>t instanceof Object;function Qn(t){if(!Ma(t)||typeof t.kind!="number"||typeof t.content!="string"||typeof t.created_at!="number"||typeof t.pubkey!="string"||!t.pubkey.match(/^[a-f0-9]{64}$/)||!Array.isArray(t.tags))return!1;for(let e=0;eZa,QueueNode:()=>Oo,binarySearch:()=>tr,insertEventIntoAscendingList:()=>Fa,insertEventIntoDescendingList:()=>za,normalizeURL:()=>Va,utf8Decoder:()=>Tt,utf8Encoder:()=>yt});var Tt=new TextDecoder("utf-8"),yt=new TextEncoder;function Va(t){t.indexOf("://")===-1&&(t="wss://"+t);let e=new URL(t);return e.pathname=e.pathname.replace(/\/+/g,"/"),e.pathname.endsWith("/")&&(e.pathname=e.pathname.slice(0,-1)),(e.port==="80"&&e.protocol==="ws:"||e.port==="443"&&e.protocol==="wss:")&&(e.port=""),e.searchParams.sort(),e.hash="",e.toString()}function za(t,e){const[n,r]=tr(t,o=>e.id===o.id?0:e.created_at===o.created_at?-1:o.created_at-e.created_at);return r||t.splice(n,0,e),t}function Fa(t,e){const[n,r]=tr(t,o=>e.id===o.id?0:e.created_at===o.created_at?-1:e.created_at-o.created_at);return r||t.splice(n,0,e),t}function tr(t,e){let n=0,r=t.length-1;for(;n<=r;){const o=Math.floor((n+r)/2),i=e(t[o]);if(i===0)return[o,!0];i<0?r=o-1:n=o+1}return[n,!1]}var Oo=class{constructor(t){q(this,"value");q(this,"next",null);q(this,"prev",null);this.value=t}},Za=class{constructor(){q(this,"first");q(this,"last");this.first=null,this.last=null}enqueue(t){const e=new Oo(t);return this.last?this.last===this.first?(this.last=e,this.last.prev=this.first,this.first.next=e):(e.prev=this.last,this.last.next=e,this.last=e):(this.first=e,this.last=e),!0}dequeue(){if(!this.first)return null;if(this.first===this.last){const e=this.first;return this.first=null,this.last=null,e.value}const t=this.first;return this.first=t.next,t.value}},Ga=class{generateSecretKey(){return xe.utils.randomPrivateKey()}getPublicKey(t){return Q(xe.getPublicKey(t))}finalizeEvent(t,e){const n=t;return n.pubkey=Q(xe.getPublicKey(e)),n.id=Re(n),n.sig=Q(xe.sign(Re(n),e)),n[le]=!0,n}verifyEvent(t){if(typeof t[le]=="boolean")return t[le];const e=Re(t);if(e!==t.id)return t[le]=!1,!1;try{const n=xe.verify(t.sig,e,t.pubkey);return t[le]=n,n}catch{return t[le]=!1,!1}}};function _o(t){if(!Qn(t))throw new Error("can't serialize event with wrong or missing properties");return JSON.stringify([0,t.pubkey,t.created_at,t.kind,t.tags,t.content])}function Re(t){let e=Ut(yt.encode(_o(t)));return Q(e)}var Ze=new Ga,Wa=Ze.generateSecretKey,Do=Ze.getPublicKey,wt=Ze.finalizeEvent,er=Ze.verifyEvent,Ya={};V(Ya,{Application:()=>Xc,BadgeAward:()=>ic,BadgeDefinition:()=>zc,BlockedRelaysList:()=>Lc,BookmarkList:()=>Ic,Bookmarksets:()=>Mc,Calendar:()=>il,CalendarEventRSVP:()=>sl,ChannelCreation:()=>Vo,ChannelHideMessage:()=>Zo,ChannelMessage:()=>Fo,ChannelMetadata:()=>zo,ChannelMuteUser:()=>Go,ClassifiedListing:()=>el,ClientAuth:()=>Yo,CommunitiesList:()=>$c,CommunityDefinition:()=>ll,CommunityPostApproval:()=>gc,Contacts:()=>nc,CreateOrUpdateProduct:()=>Gc,CreateOrUpdateStall:()=>Zc,Curationsets:()=>jc,Date:()=>rl,DirectMessageRelaysList:()=>Nc,DraftClassifiedListing:()=>nl,DraftLong:()=>Yc,Emojisets:()=>Jc,EncryptedDirectMessage:()=>rc,EventDeletion:()=>oc,FileMetadata:()=>lc,FileServerPreference:()=>Hc,Followsets:()=>Kc,GenericRepost:()=>ac,Genericlists:()=>Pc,GiftWrap:()=>Wo,HTTPAuth:()=>or,Handlerinformation:()=>cl,Handlerrecommendation:()=>al,Highlights:()=>vc,InterestsList:()=>Cc,Interestsets:()=>Fc,JobFeedback:()=>bc,JobRequest:()=>yc,JobResult:()=>wc,Label:()=>pc,LightningPubRPC:()=>Oc,LiveChatMessage:()=>fc,LiveEvent:()=>Qc,LongFormArticle:()=>Wc,Metadata:()=>Qa,Mutelist:()=>Bc,NWCWalletInfo:()=>Rc,NWCWalletRequest:()=>Jo,NWCWalletResponse:()=>_c,NostrConnect:()=>Dc,OpenTimestamps:()=>cc,Pinlist:()=>Ac,PrivateDirectMessage:()=>sc,ProblemTracker:()=>dc,ProfileBadges:()=>Vc,PublicChatsList:()=>Tc,Reaction:()=>rr,RecommendRelay:()=>ec,RelayList:()=>Sc,Relaysets:()=>qc,Report:()=>uc,Reporting:()=>hc,Repost:()=>nr,Seal:()=>jo,SearchRelaysList:()=>Uc,ShortTextNote:()=>tc,Time:()=>ol,UserEmojiList:()=>kc,UserStatuses:()=>tl,Zap:()=>xc,ZapGoal:()=>mc,ZapRequest:()=>Ec,classifyKind:()=>Ja,isEphemeralKind:()=>qo,isKind:()=>Xa,isParameterizedReplaceableKind:()=>Mo,isRegularKind:()=>Ko,isReplaceableKind:()=>Po});function Ko(t){return 1e3<=t&&t<1e4||[1,2,4,5,6,7,8,16,40,41,42,43,44].includes(t)}function Po(t){return[0,3].includes(t)||1e4<=t&&t<2e4}function qo(t){return 2e4<=t&&t<3e4}function Mo(t){return 3e4<=t&&t<4e4}function Ja(t){return Ko(t)?"regular":Po(t)?"replaceable":qo(t)?"ephemeral":Mo(t)?"parameterized":"unknown"}function Xa(t,e){const n=e instanceof Array?e:[e];return Qn(t)&&n.includes(t.kind)||!1}var Qa=0,tc=1,ec=2,nc=3,rc=4,oc=5,nr=6,rr=7,ic=8,jo=13,sc=14,ac=16,Vo=40,zo=41,Fo=42,Zo=43,Go=44,cc=1040,Wo=1059,lc=1063,fc=1311,dc=1971,uc=1984,hc=1984,pc=1985,gc=4550,yc=5999,wc=6999,bc=7e3,mc=9041,Ec=9734,xc=9735,vc=9802,Bc=1e4,Ac=10001,Sc=10002,Ic=10003,$c=10004,Tc=10005,Lc=10006,Uc=10007,Cc=10015,kc=10030,Nc=10050,Hc=10096,Rc=13194,Oc=21e3,Yo=22242,Jo=23194,_c=23195,Dc=24133,or=27235,Kc=3e4,Pc=30001,qc=30002,Mc=30003,jc=30004,Vc=30008,zc=30009,Fc=30015,Zc=30017,Gc=30018,Wc=30023,Yc=30024,Jc=30030,Xc=30078,Qc=30311,tl=30315,el=30402,nl=30403,rl=31922,ol=31923,il=31924,sl=31925,al=31989,cl=31990,ll=34550,fl={};V(fl,{getHex64:()=>ir,getInt:()=>Xo,getSubscriptionId:()=>dl,matchEventId:()=>ul,matchEventKind:()=>pl,matchEventPubkey:()=>hl});function ir(t,e){let n=e.length+3,r=t.indexOf(`"${e}":`)+n,o=t.slice(r).indexOf('"')+r+1;return t.slice(o,o+64)}function Xo(t,e){let n=e.length,r=t.indexOf(`"${e}":`)+n+3,o=t.slice(r),i=Math.min(o.indexOf(","),o.indexOf("}"));return parseInt(o.slice(0,i),10)}function dl(t){let e=t.slice(0,22).indexOf('"EVENT"');if(e===-1)return null;let n=t.slice(e+7+1).indexOf('"');if(n===-1)return null;let r=e+7+1+n,o=t.slice(r+1,80).indexOf('"');if(o===-1)return null;let i=r+1+o;return t.slice(r+1,i)}function ul(t,e){return e===ir(t,"id")}function hl(t,e){return e===ir(t,"pubkey")}function pl(t,e){return e===Xo(t,"kind")}var gl={};V(gl,{makeAuthEvent:()=>yl});function yl(t,e){return{kind:Yo,created_at:Math.floor(Date.now()/1e3),tags:[["relay",t],["challenge",e]],content:""}}var wl;try{wl=WebSocket}catch{}var bl;try{bl=WebSocket}catch{}var ml={};V(ml,{BECH32_REGEX:()=>Qo,Bech32MaxSize:()=>sr,NostrTypeGuard:()=>El,decode:()=>Ge,encodeBytes:()=>Ye,naddrEncode:()=>$l,neventEncode:()=>Il,noteEncode:()=>Al,nprofileEncode:()=>Sl,npubEncode:()=>Bl,nsecEncode:()=>vl});var El={isNProfile:t=>/^nprofile1[a-z\d]+$/.test(t||""),isNEvent:t=>/^nevent1[a-z\d]+$/.test(t||""),isNAddr:t=>/^naddr1[a-z\d]+$/.test(t||""),isNSec:t=>/^nsec1[a-z\d]{58}$/.test(t||""),isNPub:t=>/^npub1[a-z\d]{58}$/.test(t||""),isNote:t=>/^note1[a-z\d]+$/.test(t||""),isNcryptsec:t=>/^ncryptsec1[a-z\d]+$/.test(t||"")},sr=5e3,Qo=/[\x21-\x7E]{1,83}1[023456789acdefghjklmnpqrstuvwxyz]{6,}/;function xl(t){const e=new Uint8Array(4);return e[0]=t>>24&255,e[1]=t>>16&255,e[2]=t>>8&255,e[3]=t&255,e}function Ge(t){var o,i,a,c,s,l,u;let{prefix:e,words:n}=pe.decode(t,sr),r=new Uint8Array(pe.fromWords(n));switch(e){case"nprofile":{let f=gn(r);if(!((o=f[0])!=null&&o[0]))throw new Error("missing TLV 0 for nprofile");if(f[0][0].length!==32)throw new Error("TLV 0 should be 32 bytes");return{type:"nprofile",data:{pubkey:Q(f[0][0]),relays:f[1]?f[1].map(g=>Tt.decode(g)):[]}}}case"nevent":{let f=gn(r);if(!((i=f[0])!=null&&i[0]))throw new Error("missing TLV 0 for nevent");if(f[0][0].length!==32)throw new Error("TLV 0 should be 32 bytes");if(f[2]&&f[2][0].length!==32)throw new Error("TLV 2 should be 32 bytes");if(f[3]&&f[3][0].length!==4)throw new Error("TLV 3 should be 4 bytes");return{type:"nevent",data:{id:Q(f[0][0]),relays:f[1]?f[1].map(g=>Tt.decode(g)):[],author:(a=f[2])!=null&&a[0]?Q(f[2][0]):void 0,kind:(c=f[3])!=null&&c[0]?parseInt(Q(f[3][0]),16):void 0}}}case"naddr":{let f=gn(r);if(!((s=f[0])!=null&&s[0]))throw new Error("missing TLV 0 for naddr");if(!((l=f[2])!=null&&l[0]))throw new Error("missing TLV 2 for naddr");if(f[2][0].length!==32)throw new Error("TLV 2 should be 32 bytes");if(!((u=f[3])!=null&&u[0]))throw new Error("missing TLV 3 for naddr");if(f[3][0].length!==4)throw new Error("TLV 3 should be 4 bytes");return{type:"naddr",data:{identifier:Tt.decode(f[0][0]),pubkey:Q(f[2][0]),kind:parseInt(Q(f[3][0]),16),relays:f[1]?f[1].map(g=>Tt.decode(g)):[]}}}case"nsec":return{type:e,data:r};case"npub":case"note":return{type:e,data:Q(r)};default:throw new Error(`unknown prefix ${e}`)}}function gn(t){let e={},n=t;for(;n.length>0;){let r=n[0],o=n[1],i=n.slice(2,2+o);if(n=n.slice(2+o),i.lengthyt.encode(n))});return We("nprofile",e)}function Il(t){let e;t.kind!==void 0&&(e=xl(t.kind));let n=ar({0:[re(t.id)],1:(t.relays||[]).map(r=>yt.encode(r)),2:t.author?[re(t.author)]:[],3:e?[new Uint8Array(e)]:[]});return We("nevent",n)}function $l(t){let e=new ArrayBuffer(4);new DataView(e).setUint32(0,t.kind,!1);let n=ar({0:[yt.encode(t.identifier)],1:(t.relays||[]).map(r=>yt.encode(r)),2:[re(t.pubkey)],3:[new Uint8Array(e)]});return We("naddr",n)}function ar(t){let e=[];return Object.entries(t).reverse().forEach(([n,r])=>{r.forEach(o=>{let i=new Uint8Array(o.length+2);i.set([parseInt(n)],0),i.set([o.length],1),i.set(o,2),e.push(i)})}),It(...e)}var Tl={};V(Tl,{decrypt:()=>Ll,encrypt:()=>ti});async function ti(t,e,n){const r=t instanceof Uint8Array?Q(t):t,o=we.getSharedSecret(r,"02"+e),i=ei(o);let a=Uint8Array.from(Gn(16)),c=yt.encode(n),s=Uo(i,a).encrypt(c),l=Lt.encode(new Uint8Array(s)),u=Lt.encode(new Uint8Array(a.buffer));return`${l}?iv=${u}`}async function Ll(t,e,n){const r=t instanceof Uint8Array?Q(t):t;let[o,i]=n.split("?iv="),a=we.getSharedSecret(r,"02"+e),c=ei(a),s=Lt.decode(i),l=Lt.decode(o),u=Uo(c,s).decrypt(l);return Tt.decode(u)}function ei(t){return t.slice(1,33)}var Ul={};V(Ul,{NIP05_REGEX:()=>cr,isNip05:()=>Cl,isValid:()=>Hl,queryProfile:()=>ni,searchDomain:()=>Nl,useFetchImplementation:()=>kl});var cr=/^(?:([\w.+-]+)@)?([\w_-]+(\.[\w_-]+)+)$/,Cl=t=>cr.test(t||""),Je;try{Je=fetch}catch{}function kl(t){Je=t}async function Nl(t,e=""){try{const n=`https://${t}/.well-known/nostr.json?name=${e}`,r=await Je(n,{redirect:"manual"});if(r.status!==200)throw Error("Wrong response code");return(await r.json()).names}catch{return{}}}async function ni(t){var o;const e=t.match(cr);if(!e)return null;const[,n="_",r]=e;try{const i=`https://${r}/.well-known/nostr.json?name=${n}`,a=await Je(i,{redirect:"manual"});if(a.status!==200)throw Error("Wrong response code");const c=await a.json(),s=c.names[n];return s?{pubkey:s,relays:(o=c.relays)==null?void 0:o[s]}:null}catch{return null}}async function Hl(t,e){const n=await ni(e);return n?n.pubkey===t:!1}var Rl={};V(Rl,{parse:()=>Ol});function Ol(t){const e={reply:void 0,root:void 0,mentions:[],profiles:[],quotes:[]};let n,r;for(let o=t.tags.length-1;o>=0;o--){const i=t.tags[o];if(i[0]==="e"&&i[1]){const[a,c,s,l,u]=i,f={id:c,relays:s?[s]:[],author:u};if(l==="root"){e.root=f;continue}if(l==="reply"){e.reply=f;continue}if(l==="mention"){e.mentions.push(f);continue}n?r=f:n=f,e.mentions.push(f);continue}if(i[0]==="q"&&i[1]){const[a,c,s]=i;e.quotes.push({id:c,relays:s?[s]:[]})}if(i[0]==="p"&&i[1]){e.profiles.push({pubkey:i[1],relays:i[2]?[i[2]]:[]});continue}}return e.root||(e.root=r||n||e.reply),e.reply||(e.reply=n||e.root),[e.reply,e.root].forEach(o=>{if(!o)return;let i=e.mentions.indexOf(o);if(i!==-1&&e.mentions.splice(i,1),o.author){let a=e.profiles.find(c=>c.pubkey===o.author);a&&a.relays&&(o.relays||(o.relays=[]),a.relays.forEach(c=>{var s;((s=o.relays)==null?void 0:s.indexOf(c))===-1&&o.relays.push(c)}),a.relays=o.relays)}}),e.mentions.forEach(o=>{if(o.author){let i=e.profiles.find(a=>a.pubkey===o.author);i&&i.relays&&(o.relays||(o.relays=[]),i.relays.forEach(a=>{o.relays.indexOf(a)===-1&&o.relays.push(a)}),i.relays=o.relays)}}),e}var _l={};V(_l,{fetchRelayInformation:()=>Kl,useFetchImplementation:()=>Dl});var ri;try{ri=fetch}catch{}function Dl(t){ri=t}async function Kl(t){return await(await fetch(t.replace("ws://","http://").replace("wss://","https://"),{headers:{Accept:"application/nostr+json"}})).json()}var Pl={};V(Pl,{fastEventHash:()=>ii,getPow:()=>oi,minePow:()=>ql});function oi(t){let e=0;for(let n=0;n<64;n+=8){const r=parseInt(t.substring(n,n+8),16);if(r===0)e+=32;else{e+=Math.clz32(r);break}}return e}function ql(t,e){let n=0;const r=t,o=["nonce",n.toString(),e.toString()];for(r.tags.push(o);;){const i=Math.floor(new Date().getTime()/1e3);if(i!==r.created_at&&(n=0,r.created_at=i),o[1]=(++n).toString(),r.id=ii(r),oi(r.id)>=e)break}return r}function ii(t){return Q(Ut(yt.encode(JSON.stringify([0,t.pubkey,t.created_at,t.kind,t.tags,t.content]))))}var Ml={};V(Ml,{finishRepostEvent:()=>jl,getRepostedEvent:()=>Vl,getRepostedEventPointer:()=>si});function jl(t,e,n,r){return wt({kind:nr,tags:[...t.tags??[],["e",e.id,n],["p",e.pubkey]],content:t.content===""?"":JSON.stringify(e),created_at:t.created_at},r)}function si(t){if(t.kind!==nr)return;let e,n;for(let r=t.tags.length-1;r>=0&&(e===void 0||n===void 0);r--){const o=t.tags[r];o.length>=2&&(o[0]==="e"&&e===void 0?e=o:o[0]==="p"&&n===void 0&&(n=o))}if(e!==void 0)return{id:e[1],relays:[e[2],n==null?void 0:n[2]].filter(r=>typeof r=="string"),author:n==null?void 0:n[1]}}function Vl(t,{skipVerification:e}={}){const n=si(t);if(n===void 0||t.content==="")return;let r;try{r=JSON.parse(t.content)}catch{return}if(r.id===n.id&&!(!e&&!er(r)))return r}var zl={};V(zl,{NOSTR_URI_REGEX:()=>Xe,parse:()=>Zl,test:()=>Fl});var Xe=new RegExp(`nostr:(${Qo.source})`);function Fl(t){return typeof t=="string"&&new RegExp(`^${Xe.source}$`).test(t)}function Zl(t){const e=t.match(new RegExp(`^${Xe.source}$`));if(!e)throw new Error(`Invalid Nostr URI: ${t}`);return{uri:e[0],value:e[1],decoded:Ge(e[1])}}var Gl={};V(Gl,{finishReactionEvent:()=>Wl,getReactedEventPointer:()=>Yl});function Wl(t,e,n){const r=e.tags.filter(o=>o.length>=2&&(o[0]==="e"||o[0]==="p"));return wt({...t,kind:rr,tags:[...t.tags??[],...r,["e",e.id],["p",e.pubkey]],content:t.content??"+"},n)}function Yl(t){if(t.kind!==rr)return;let e,n;for(let r=t.tags.length-1;r>=0&&(e===void 0||n===void 0);r--){const o=t.tags[r];o.length>=2&&(o[0]==="e"&&e===void 0?e=o:o[0]==="p"&&n===void 0&&(n=o))}if(!(e===void 0||n===void 0))return{id:e[1],relays:[e[2],n[2]].filter(r=>r!==void 0),author:n[1]}}var Jl={};V(Jl,{matchAll:()=>Xl,regex:()=>lr,replaceAll:()=>Ql});var lr=()=>new RegExp(`\\b${Xe.source}\\b`,"g");function*Xl(t){const e=t.matchAll(lr());for(const n of e)try{const[r,o]=n;yield{uri:r,value:o,decoded:Ge(o),start:n.index,end:n.index+r.length}}catch{}}function Ql(t,e){return t.replaceAll(lr(),(n,r)=>e({uri:n,value:r,decoded:Ge(r)}))}var tf={};V(tf,{channelCreateEvent:()=>ef,channelHideMessageEvent:()=>of,channelMessageEvent:()=>rf,channelMetadataEvent:()=>nf,channelMuteUserEvent:()=>sf});var ef=(t,e)=>{let n;if(typeof t.content=="object")n=JSON.stringify(t.content);else if(typeof t.content=="string")n=t.content;else return;return wt({kind:Vo,tags:[...t.tags??[]],content:n,created_at:t.created_at},e)},nf=(t,e)=>{let n;if(typeof t.content=="object")n=JSON.stringify(t.content);else if(typeof t.content=="string")n=t.content;else return;return wt({kind:zo,tags:[["e",t.channel_create_event_id],...t.tags??[]],content:n,created_at:t.created_at},e)},rf=(t,e)=>{const n=[["e",t.channel_create_event_id,t.relay_url,"root"]];return t.reply_to_channel_message_event_id&&n.push(["e",t.reply_to_channel_message_event_id,t.relay_url,"reply"]),wt({kind:Fo,tags:[...n,...t.tags??[]],content:t.content,created_at:t.created_at},e)},of=(t,e)=>{let n;if(typeof t.content=="object")n=JSON.stringify(t.content);else if(typeof t.content=="string")n=t.content;else return;return wt({kind:Zo,tags:[["e",t.channel_message_event_id],...t.tags??[]],content:n,created_at:t.created_at},e)},sf=(t,e)=>{let n;if(typeof t.content=="object")n=JSON.stringify(t.content);else if(typeof t.content=="string")n=t.content;else return;return wt({kind:Go,tags:[["p",t.pubkey_to_mute],...t.tags??[]],content:n,created_at:t.created_at},e)},af={};V(af,{EMOJI_SHORTCODE_REGEX:()=>ai,matchAll:()=>cf,regex:()=>fr,replaceAll:()=>lf});var ai=/:(\w+):/,fr=()=>new RegExp(`\\B${ai.source}\\B`,"g");function*cf(t){const e=t.matchAll(fr());for(const n of e)try{const[r,o]=n;yield{shortcode:r,name:o,start:n.index,end:n.index+r.length}}catch{}}function lf(t,e){return t.replaceAll(fr(),(n,r)=>e({shortcode:n,name:r}))}var ff={};V(ff,{useFetchImplementation:()=>df,validateGithub:()=>uf});var dr;try{dr=fetch}catch{}function df(t){dr=t}async function uf(t,e,n){try{return await(await dr(`https://gist.github.com/${e}/${n}/raw`)).text()===`Verifying that I control the following Nostr public key: ${t}`}catch{return!1}}var hf={};V(hf,{decrypt:()=>gr,encrypt:()=>pr,getConversationKey:()=>ur,v2:()=>bf});var ci=1,li=65535;function ur(t,e){const n=we.getSharedSecret(t,"02"+e).subarray(1,33);return Ka(Ut,n,"nip44-v2")}function fi(t,e){const n=Pa(Ut,t,e,76);return{chacha_key:n.subarray(0,32),chacha_nonce:n.subarray(32,44),hmac_key:n.subarray(44,76)}}function hr(t){if(!Number.isSafeInteger(t)||t<1)throw new Error("expected positive integer");if(t<=32)return 32;const e=1<li)throw new Error("invalid plaintext size: must be between 1 and 65535 bytes");const e=new Uint8Array(2);return new DataView(e.buffer).setUint16(0,t,!1),e}function gf(t){const e=yt.encode(t),n=e.length,r=pf(n),o=new Uint8Array(hr(n)-n);return It(r,e,o)}function yf(t){const e=new DataView(t.buffer).getUint16(0),n=t.subarray(2,2+e);if(eli||n.length!==e||t.length!==2+hr(e))throw new Error("invalid padding");return Tt.decode(n)}function di(t,e,n){if(n.length!==32)throw new Error("AAD associated data must be 32 bytes");const r=It(n,e);return zt(Ut,t,r)}function wf(t){if(typeof t!="string")throw new Error("payload must be a valid string");const e=t.length;if(e<132||e>87472)throw new Error("invalid payload length: "+e);if(t[0]==="#")throw new Error("unknown encryption version");let n;try{n=Lt.decode(t)}catch(i){throw new Error("invalid base64: "+i.message)}const r=n.length;if(r<99||r>65603)throw new Error("invalid data length: "+r);const o=n[0];if(o!==2)throw new Error("unknown encryption version "+o);return{nonce:n.subarray(1,33),ciphertext:n.subarray(33,-32),mac:n.subarray(-32)}}function pr(t,e,n=Gn(32)){const{chacha_key:r,chacha_nonce:o,hmac_key:i}=fi(e,n),a=gf(t),c=Ho(r,o,a),s=di(i,c,n);return Lt.encode(It(new Uint8Array([2]),n,c,s))}function gr(t,e){const{nonce:n,ciphertext:r,mac:o}=wf(t),{chacha_key:i,chacha_nonce:a,hmac_key:c}=fi(e,n),s=di(c,r,n);if(!Ea(s,o))throw new Error("invalid MAC");const l=Ho(i,a,r);return yf(l)}var bf={utils:{getConversationKey:ur,calcPaddedLen:hr},encrypt:pr,decrypt:gr},mf={};V(mf,{makeNwcRequestEvent:()=>xf,parseConnectionString:()=>Ef});function Ef(t){const{pathname:e,searchParams:n}=new URL(t),r=e,o=n.get("relay"),i=n.get("secret");if(!r||!o||!i)throw new Error("invalid connection string");return{pubkey:r,relay:o,secret:i}}async function xf(t,e,n){const o=await ti(e,t,JSON.stringify({method:"pay_invoice",params:{invoice:n}})),i={kind:Jo,created_at:Math.round(Date.now()/1e3),content:o,tags:[["p",t]]};return wt(i,e)}var vf={};V(vf,{getZapEndpoint:()=>Af,makeZapReceipt:()=>$f,makeZapRequest:()=>Sf,useFetchImplementation:()=>Bf,validateZapRequest:()=>If});var yr;try{yr=fetch}catch{}function Bf(t){yr=t}async function Af(t){try{let e="",{lud06:n,lud16:r}=JSON.parse(t.content);if(n){let{words:a}=pe.decode(n,1e3),c=pe.fromWords(a);e=Tt.decode(c)}else if(r){let[a,c]=r.split("@");e=new URL(`/.well-known/lnurlp/${a}`,`https://${c}`).toString()}else return null;let i=await(await yr(e)).json();if(i.allowsNostr&&i.nostrPubkey)return i.callback}catch{}return null}function Sf({profile:t,event:e,amount:n,relays:r,comment:o=""}){if(!n)throw new Error("amount not given");if(!t)throw new Error("profile not given");let i={kind:9734,created_at:Math.round(Date.now()/1e3),content:o,tags:[["p",t],["amount",n.toString()],["relays",...r]]};return e&&i.tags.push(["e",e]),i}function If(t){let e;try{e=JSON.parse(t)}catch{return"Invalid zap request JSON."}if(!Qn(e))return"Zap request is not a valid Nostr event.";if(!er(e))return"Invalid signature on zap request.";let n=e.tags.find(([i,a])=>i==="p"&&a);if(!n)return"Zap request doesn't have a 'p' tag.";if(!n[1].match(/^[a-f0-9]{64}$/))return"Zap request 'p' tag is not valid hex.";let r=e.tags.find(([i,a])=>i==="e"&&a);return r&&!r[1].match(/^[a-f0-9]{64}$/)?"Zap request 'e' tag is not valid hex.":e.tags.find(([i,a])=>i==="relays"&&a)?null:"Zap request doesn't have a 'relays' tag."}function $f({zapRequest:t,preimage:e,bolt11:n,paidAt:r}){let o=JSON.parse(t),i=o.tags.filter(([c])=>c==="e"||c==="p"||c==="a"),a={kind:9735,created_at:Math.round(r.getTime()/1e3),content:"",tags:[...i,["P",o.pubkey],["bolt11",n],["description",t]]};return e&&a.tags.push(["preimage",e]),a}var Tf={};V(Tf,{createRumor:()=>yi,createSeal:()=>wi,createWrap:()=>bi,unwrapEvent:()=>mi,unwrapManyEvents:()=>Cf,wrapEvent:()=>kn,wrapManyEvents:()=>Uf});var Lf=2*24*60*60,ui=()=>Math.round(Date.now()/1e3),hi=()=>Math.round(ui()-Math.random()*Lf),pi=(t,e)=>ur(t,e),gi=(t,e,n)=>pr(JSON.stringify(t),pi(e,n)),Vr=(t,e)=>JSON.parse(gr(t.content,pi(e,t.pubkey)));function yi(t,e){const n={created_at:ui(),content:"",tags:[],...t,pubkey:Do(e)};return n.id=Re(n),n}function wi(t,e,n){return wt({kind:jo,content:gi(t,e,n),created_at:hi(),tags:[]},e)}function bi(t,e){const n=Wa();return wt({kind:Wo,content:gi(t,n,e),created_at:hi(),tags:[["p",e]]},n)}function kn(t,e,n){const r=yi(t,e),o=wi(r,e,n);return bi(o,n)}function Uf(t,e,n){if(!n||n.length===0)throw new Error("At least one recipient is required.");const r=Do(e),o=[kn(t,e,r)];return n.forEach(i=>{o.push(kn(t,e,i))}),o}function mi(t,e){const n=Vr(t,e);return Vr(n,e)}function Cf(t,e){let n=[];return t.forEach(r=>{n.push(mi(r,e))}),n.sort((r,o)=>r.created_at-o.created_at),n}var kf={};V(kf,{getToken:()=>Nf,hashPayload:()=>wr,unpackEventFromToken:()=>xi,validateEvent:()=>$i,validateEventKind:()=>Bi,validateEventMethodTag:()=>Si,validateEventPayloadTag:()=>Ii,validateEventTimestamp:()=>vi,validateEventUrlTag:()=>Ai,validateToken:()=>Hf});var Ei="Nostr ";async function Nf(t,e,n,r=!1,o){const i={kind:or,tags:[["u",t],["method",e]],created_at:Math.round(new Date().getTime()/1e3),content:""};o&&i.tags.push(["payload",wr(o)]);const a=await n(i);return(r?Ei:"")+Lt.encode(yt.encode(JSON.stringify(a)))}async function Hf(t,e,n){const r=await xi(t).catch(i=>{throw i});return await $i(r,e,n).catch(i=>{throw i})}async function xi(t){if(!t)throw new Error("Missing token");t=t.replace(Ei,"");const e=Tt.decode(Lt.decode(t));if(!e||e.length===0||!e.startsWith("{"))throw new Error("Invalid token");return JSON.parse(e)}function vi(t){return t.created_at?Math.round(new Date().getTime()/1e3)-t.created_at<60:!1}function Bi(t){return t.kind===or}function Ai(t,e){const n=t.tags.find(r=>r[0]==="u");return n?n.length>0&&n[1]===e:!1}function Si(t,e){const n=t.tags.find(r=>r[0]==="method");return n?n.length>0&&n[1].toLowerCase()===e.toLowerCase():!1}function wr(t){const e=Ut(yt.encode(JSON.stringify(t)));return Q(e)}function Ii(t,e){const n=t.tags.find(o=>o[0]==="payload");if(!n)return!1;const r=wr(e);return n.length>0&&n[1]===r}async function $i(t,e,n,r){if(!er(t))throw new Error("Invalid nostr event, signature invalid");if(!Bi(t))throw new Error("Invalid nostr event, kind invalid");if(!vi(t))throw new Error("Invalid nostr event, created_at timestamp invalid");if(!Ai(t,e))throw new Error("Invalid nostr event, url tag invalid");if(!Si(t,n))throw new Error("Invalid nostr event, method tag invalid");if(r&&typeof r=="object"&&Object.keys(r).length>0&&!Ii(t,r))throw new Error("Invalid nostr event, payload tag does not match request body hash");return!0}function Rf(t,e,n,r){ot.hash(t);const o=Js({dkLen:32,asyncTick:10},r),{c:i,dkLen:a,asyncTick:c}=o;if(ot.number(i),ot.number(a),ot.number(c),i<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const s=oe(e),l=oe(n),u=new Uint8Array(a),f=zt.create(t,s),g=f._cloneInto().update(l);return{c:i,dkLen:a,asyncTick:c,DK:u,PRF:f,PRFSalt:g}}function Of(t,e,n,r,o){return t.destroy(),e.destroy(),r&&r.destroy(),o.fill(0),n}function _f(t,e,n,r){const{c:o,dkLen:i,DK:a,PRF:c,PRFSalt:s}=Rf(t,e,n,r);let l;const u=new Uint8Array(4),f=te(u),g=new Uint8Array(c.outputLen);for(let p=1,y=0;y>Nn&Ue)}:{h:Number(t>>Nn&Ue)|0,l:Number(t&Ue)|0}}function Df(t,e=!1){let n=new Uint32Array(t.length),r=new Uint32Array(t.length);for(let o=0;oBigInt(t>>>0)<>>0),Pf=(t,e,n)=>t>>>n,qf=(t,e,n)=>t<<32-n|e>>>n,Mf=(t,e,n)=>t>>>n|e<<32-n,jf=(t,e,n)=>t<<32-n|e>>>n,Vf=(t,e,n)=>t<<64-n|e>>>n-32,zf=(t,e,n)=>t>>>n-32|e<<64-n,Ff=(t,e)=>e,Zf=(t,e)=>t,Gf=(t,e,n)=>t<>>32-n,Wf=(t,e,n)=>e<>>32-n,Yf=(t,e,n)=>e<>>64-n,Jf=(t,e,n)=>t<>>64-n;function Xf(t,e,n,r){const o=(e>>>0)+(r>>>0);return{h:t+n+(o/2**32|0)|0,l:o|0}}const Qf=(t,e,n)=>(t>>>0)+(e>>>0)+(n>>>0),td=(t,e,n,r)=>e+n+r+(t/2**32|0)|0,ed=(t,e,n,r)=>(t>>>0)+(e>>>0)+(n>>>0)+(r>>>0),nd=(t,e,n,r,o)=>e+n+r+o+(t/2**32|0)|0,rd=(t,e,n,r,o)=>(t>>>0)+(e>>>0)+(n>>>0)+(r>>>0)+(o>>>0),od=(t,e,n,r,o,i)=>e+n+r+o+i+(t/2**32|0)|0,K={fromBig:Ti,split:Df,toBig:Kf,shrSH:Pf,shrSL:qf,rotrSH:Mf,rotrSL:jf,rotrBH:Vf,rotrBL:zf,rotr32H:Ff,rotr32L:Zf,rotlSH:Gf,rotlSL:Wf,rotlBH:Yf,rotlBL:Jf,add:Xf,add3L:Qf,add3H:td,add4L:ed,add4H:nd,add5H:od,add5L:rd},[id,sd]=K.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))),Kt=new Uint32Array(80),Pt=new Uint32Array(80);class Qe extends Wn{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:n,Bh:r,Bl:o,Ch:i,Cl:a,Dh:c,Dl:s,Eh:l,El:u,Fh:f,Fl:g,Gh:p,Gl:y,Hh:d,Hl:h}=this;return[e,n,r,o,i,a,c,s,l,u,f,g,p,y,d,h]}set(e,n,r,o,i,a,c,s,l,u,f,g,p,y,d,h){this.Ah=e|0,this.Al=n|0,this.Bh=r|0,this.Bl=o|0,this.Ch=i|0,this.Cl=a|0,this.Dh=c|0,this.Dl=s|0,this.Eh=l|0,this.El=u|0,this.Fh=f|0,this.Fl=g|0,this.Gh=p|0,this.Gl=y|0,this.Hh=d|0,this.Hl=h|0}process(e,n){for(let x=0;x<16;x++,n+=4)Kt[x]=e.getUint32(n),Pt[x]=e.getUint32(n+=4);for(let x=16;x<80;x++){const $=Kt[x-15]|0,S=Pt[x-15]|0,E=K.rotrSH($,S,1)^K.rotrSH($,S,8)^K.shrSH($,S,7),B=K.rotrSL($,S,1)^K.rotrSL($,S,8)^K.shrSL($,S,7),A=Kt[x-2]|0,N=Pt[x-2]|0,U=K.rotrSH(A,N,19)^K.rotrBH(A,N,61)^K.shrSH(A,N,6),T=K.rotrSL(A,N,19)^K.rotrBL(A,N,61)^K.shrSL(A,N,6),H=K.add4L(B,T,Pt[x-7],Pt[x-16]),R=K.add4H(H,E,U,Kt[x-7],Kt[x-16]);Kt[x]=R|0,Pt[x]=H|0}let{Ah:r,Al:o,Bh:i,Bl:a,Ch:c,Cl:s,Dh:l,Dl:u,Eh:f,El:g,Fh:p,Fl:y,Gh:d,Gl:h,Hh:w,Hl:v}=this;for(let x=0;x<80;x++){const $=K.rotrSH(f,g,14)^K.rotrSH(f,g,18)^K.rotrBH(f,g,41),S=K.rotrSL(f,g,14)^K.rotrSL(f,g,18)^K.rotrBL(f,g,41),E=f&p^~f&d,B=g&y^~g&h,A=K.add5L(v,S,B,sd[x],Pt[x]),N=K.add5H(A,w,$,E,id[x],Kt[x]),U=A|0,T=K.rotrSH(r,o,28)^K.rotrBH(r,o,34)^K.rotrBH(r,o,39),H=K.rotrSL(r,o,28)^K.rotrBL(r,o,34)^K.rotrBL(r,o,39),R=r&i^r&c^i&c,P=o&a^o&s^a&s;w=d|0,v=h|0,d=p|0,h=y|0,p=f|0,y=g|0,{h:f,l:g}=K.add(l|0,u|0,N|0,U|0),l=c|0,u=s|0,c=i|0,s=a|0,i=r|0,a=o|0;const b=K.add3L(U,H,P);r=K.add3H(b,N,T,R),o=b|0}({h:r,l:o}=K.add(this.Ah|0,this.Al|0,r|0,o|0)),{h:i,l:a}=K.add(this.Bh|0,this.Bl|0,i|0,a|0),{h:c,l:s}=K.add(this.Ch|0,this.Cl|0,c|0,s|0),{h:l,l:u}=K.add(this.Dh|0,this.Dl|0,l|0,u|0),{h:f,l:g}=K.add(this.Eh|0,this.El|0,f|0,g|0),{h:p,l:y}=K.add(this.Fh|0,this.Fl|0,p|0,y|0),{h:d,l:h}=K.add(this.Gh|0,this.Gl|0,d|0,h|0),{h:w,l:v}=K.add(this.Hh|0,this.Hl|0,w|0,v|0),this.set(r,o,i,a,c,s,l,u,f,g,p,y,d,h,w,v)}roundClean(){Kt.fill(0),Pt.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class ad extends Qe{constructor(){super(),this.Ah=-1942145080,this.Al=424955298,this.Bh=1944164710,this.Bl=-1982016298,this.Ch=502970286,this.Cl=855612546,this.Dh=1738396948,this.Dl=1479516111,this.Eh=258812777,this.El=2077511080,this.Fh=2011393907,this.Fl=79989058,this.Gh=1067287976,this.Gl=1780299464,this.Hh=286451373,this.Hl=-1848208735,this.outputLen=28}}class cd extends Qe{constructor(){super(),this.Ah=573645204,this.Al=-64227540,this.Bh=-1621794909,this.Bl=-934517566,this.Ch=596883563,this.Cl=1867755857,this.Dh=-1774684391,this.Dl=1497426621,this.Eh=-1775747358,this.El=-1467023389,this.Fh=-1101128155,this.Fl=1401305490,this.Gh=721525244,this.Gl=746961066,this.Hh=246885852,this.Hl=-2117784414,this.outputLen=32}}class ld extends Qe{constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}}const Hn=ie(()=>new Qe);ie(()=>new ad);ie(()=>new cd);ie(()=>new ld);function Li(t){if(typeof t!="string")throw new TypeError(`Invalid mnemonic type: ${typeof t}`);return t.normalize("NFKD")}function fd(t){const e=Li(t),n=e.split(" ");if(![12,15,18,21,24].includes(n.length))throw new Error("Invalid mnemonic");return{nfkd:e,words:n}}const dd=t=>Li(`mnemonic${t}`);function ud(t,e=""){return _f(Hn,fd(t).nfkd,dd(e),{c:2048,dkLen:64})}const hd=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),Ui=Uint8Array.from({length:16},(t,e)=>e),pd=Ui.map(t=>(9*t+5)%16);let br=[Ui],mr=[pd];for(let t=0;t<4;t++)for(let e of[br,mr])e.push(e[t].map(n=>hd[n]));const Ci=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(t=>new Uint8Array(t)),gd=br.map((t,e)=>t.map(n=>Ci[e][n])),yd=mr.map((t,e)=>t.map(n=>Ci[e][n])),wd=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),bd=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),Ce=(t,e)=>t<>>32-e;function zr(t,e,n,r){return t===0?e^n^r:t===1?e&n|~e&r:t===2?(e|~n)^r:t===3?e&r|n&~r:e^(n|~r)}const ke=new Uint32Array(16);class md extends Wn{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:n,h2:r,h3:o,h4:i}=this;return[e,n,r,o,i]}set(e,n,r,o,i){this.h0=e|0,this.h1=n|0,this.h2=r|0,this.h3=o|0,this.h4=i|0}process(e,n){for(let p=0;p<16;p++,n+=4)ke[p]=e.getUint32(n,!0);let r=this.h0|0,o=r,i=this.h1|0,a=i,c=this.h2|0,s=c,l=this.h3|0,u=l,f=this.h4|0,g=f;for(let p=0;p<5;p++){const y=4-p,d=wd[p],h=bd[p],w=br[p],v=mr[p],x=gd[p],$=yd[p];for(let S=0;S<16;S++){const E=Ce(r+zr(p,i,c,l)+ke[w[S]]+d,x[S])+f|0;r=f,f=l,l=Ce(c,10)|0,c=i,i=E}for(let S=0;S<16;S++){const E=Ce(o+zr(y,a,s,u)+ke[v[S]]+h,$[S])+g|0;o=g,g=u,u=Ce(s,10)|0,s=a,a=E}}this.set(this.h1+c+u|0,this.h2+l+g|0,this.h3+f+o|0,this.h4+r+a|0,this.h0+i+s|0)}roundClean(){ke.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}const Ed=ie(()=>new md);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const ki=BigInt(0),tn=BigInt(1),xd=BigInt(2),en=t=>t instanceof Uint8Array,vd=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function ge(t){if(!en(t))throw new Error("Uint8Array expected");let e="";for(let n=0;nr+o.length,0));let n=0;return t.forEach(r=>{if(!en(r))throw new Error("Uint8Array expected");e.set(r,n),n+=r.length}),e}function Ad(t,e){if(t.length!==e.length)return!1;for(let n=0;nki;t>>=tn,e+=1);return e}function $d(t,e){return t>>BigInt(e)&tn}const Td=(t,e,n)=>t|(n?tn:ki)<(xd<new Uint8Array(t),Fr=t=>Uint8Array.from(t);function Ri(t,e,n){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");let r=yn(t),o=yn(t),i=0;const a=()=>{r.fill(1),o.fill(0),i=0},c=(...f)=>n(o,r,...f),s=(f=yn())=>{o=c(Fr([0]),f),r=c(),f.length!==0&&(o=c(Fr([1]),f),r=c())},l=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let f=0;const g=[];for(;f{a(),s(f);let p;for(;!(p=g(l()));)s();return a(),p}}const Ld={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function Ie(t,e,n={}){const r=(o,i,a)=>{const c=Ld[i];if(typeof c!="function")throw new Error(`Invalid validator "${i}", expected function`);const s=t[o];if(!(a&&s===void 0)&&!c(s,t))throw new Error(`Invalid param ${String(o)}=${s} (${typeof s}), expected ${i}`)};for(const[o,i]of Object.entries(e))r(o,i,!1);for(const[o,i]of Object.entries(n))r(o,i,!0);return t}const Ud=Object.freeze(Object.defineProperty({__proto__:null,bitGet:$d,bitLen:Id,bitMask:vr,bitSet:Td,bytesToHex:ge,bytesToNumberBE:ee,bytesToNumberLE:xr,concatBytes:Ae,createHmacDrbg:Ri,ensureBytes:ht,equalBytes:Ad,hexToBytes:ye,hexToNumber:Er,numberToBytesBE:de,numberToBytesLE:Hi,numberToHexUnpadded:Ni,numberToVarBytesBE:Bd,utf8ToBytes:Sd,validateObject:Ie},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const W=BigInt(0),F=BigInt(1),Jt=BigInt(2),Cd=BigInt(3),Rn=BigInt(4),Zr=BigInt(5),Gr=BigInt(8);BigInt(9);BigInt(16);function rt(t,e){const n=t%e;return n>=W?n:e+n}function kd(t,e,n){if(n<=W||e 0");if(n===F)return W;let r=F;for(;e>W;)e&F&&(r=r*t%n),t=t*t%n,e>>=F;return r}function dt(t,e,n){let r=t;for(;e-- >W;)r*=r,r%=n;return r}function On(t,e){if(t===W||e<=W)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let n=rt(t,e),r=e,o=W,i=F;for(;n!==W;){const c=r/n,s=r%n,l=o-i*c;r=n,n=s,o=i,i=l}if(r!==F)throw new Error("invert: does not exist");return rt(o,e)}function Nd(t){const e=(t-F)/Jt;let n,r,o;for(n=t-F,r=0;n%Jt===W;n/=Jt,r++);for(o=Jt;o(r[o]="function",r),e);return Ie(t,n)}function _d(t,e,n){if(n 0");if(n===W)return t.ONE;if(n===F)return e;let r=t.ONE,o=e;for(;n>W;)n&F&&(r=t.mul(r,o)),o=t.sqr(o),n>>=F;return r}function Dd(t,e){const n=new Array(e.length),r=e.reduce((i,a,c)=>t.is0(a)?i:(n[c]=i,t.mul(i,a)),t.ONE),o=t.inv(r);return e.reduceRight((i,a,c)=>t.is0(a)?i:(n[c]=t.mul(i,n[c]),t.mul(i,a)),o),n}function Br(t,e){const n=e!==void 0?e:t.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function Kd(t,e,n=!1,r={}){if(t<=W)throw new Error(`Expected Fp ORDER > 0, got ${t}`);const{nBitLength:o,nByteLength:i}=Br(t,e);if(i>2048)throw new Error("Field lengths over 2048 bytes are not supported");const a=Hd(t),c=Object.freeze({ORDER:t,BITS:o,BYTES:i,MASK:vr(o),ZERO:W,ONE:F,create:s=>rt(s,t),isValid:s=>{if(typeof s!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof s}`);return W<=s&&ss===W,isOdd:s=>(s&F)===F,neg:s=>rt(-s,t),eql:(s,l)=>s===l,sqr:s=>rt(s*s,t),add:(s,l)=>rt(s+l,t),sub:(s,l)=>rt(s-l,t),mul:(s,l)=>rt(s*l,t),pow:(s,l)=>_d(c,s,l),div:(s,l)=>rt(s*On(l,t),t),sqrN:s=>s*s,addN:(s,l)=>s+l,subN:(s,l)=>s-l,mulN:(s,l)=>s*l,inv:s=>On(s,t),sqrt:r.sqrt||(s=>a(c,s)),invertBatch:s=>Dd(c,s),cmov:(s,l,u)=>u?l:s,toBytes:s=>n?Hi(s,i):de(s,i),fromBytes:s=>{if(s.length!==i)throw new Error(`Fp.fromBytes: expected ${i}, got ${s.length}`);return n?xr(s):ee(s)}});return Object.freeze(c)}function Pd(t,e,n=!1){t=ht("privateHash",t);const r=t.length,o=Br(e).nByteLength+8;if(o<24||r1024)throw new Error(`hashToPrivateScalar: expected ${o}-1024 bytes of input, got ${r}`);const i=n?xr(t):ee(t);return rt(i,e-F)+F}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const qd=BigInt(0),wn=BigInt(1);function Md(t,e){const n=(o,i)=>{const a=i.negate();return o?a:i},r=o=>{const i=Math.ceil(e/o)+1,a=2**(o-1);return{windows:i,windowSize:a}};return{constTimeNegate:n,unsafeLadder(o,i){let a=t.ZERO,c=o;for(;i>qd;)i&wn&&(a=a.add(c)),c=c.double(),i>>=wn;return a},precomputeWindow(o,i){const{windows:a,windowSize:c}=r(i),s=[];let l=o,u=l;for(let f=0;f>=p,h>s&&(h-=g,a+=wn);const w=d,v=d+Math.abs(h)-1,x=y%2!==0,$=h<0;h===0?u=u.add(n(x,i[w])):l=l.add(n($,i[v]))}return{p:l,f:u}},wNAFCached(o,i,a,c){const s=o._WINDOW_SIZE||1;let l=i.get(o);return l||(l=this.precomputeWindow(o,s),s!==1&&i.set(o,c(l))),this.wNAF(s,l,a)}}}function Oi(t){return Od(t.Fp),Ie(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Br(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function jd(t){const e=Oi(t);Ie(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:n,Fp:r,a:o}=e;if(n){if(!r.eql(o,r.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof n!="object"||typeof n.beta!="bigint"||typeof n.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}const{bytesToNumberBE:Vd,hexToBytes:zd}=Ud,Qt={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(t){const{Err:e}=Qt;if(t.length<2||t[0]!==2)throw new e("Invalid signature integer tag");const n=t[1],r=t.subarray(2,n+2);if(!n||r.length!==n)throw new e("Invalid signature integer: wrong length");if(r[0]&128)throw new e("Invalid signature integer: negative");if(r[0]===0&&!(r[1]&128))throw new e("Invalid signature integer: unnecessary leading zero");return{d:Vd(r),l:t.subarray(n+2)}},toSig(t){const{Err:e}=Qt,n=typeof t=="string"?zd(t):t;if(!(n instanceof Uint8Array))throw new Error("ui8a expected");let r=n.length;if(r<2||n[0]!=48)throw new e("Invalid signature tag");if(n[1]!==r-2)throw new e("Invalid signature: incorrect length");const{d:o,l:i}=Qt._parseInt(n.subarray(2)),{d:a,l:c}=Qt._parseInt(i);if(c.length)throw new e("Invalid signature: left bytes after parsing");return{r:o,s:a}},hexFromSig(t){const e=l=>Number.parseInt(l[0],16)&8?"00"+l:l,n=l=>{const u=l.toString(16);return u.length&1?`0${u}`:u},r=e(n(t.s)),o=e(n(t.r)),i=r.length/2,a=o.length/2,c=n(i),s=n(a);return`30${n(a+i+4)}02${s}${o}02${c}${r}`}},St=BigInt(0),pt=BigInt(1);BigInt(2);const Wr=BigInt(3);BigInt(4);function Fd(t){const e=jd(t),{Fp:n}=e,r=e.toBytes||((y,d,h)=>{const w=d.toAffine();return Ae(Uint8Array.from([4]),n.toBytes(w.x),n.toBytes(w.y))}),o=e.fromBytes||(y=>{const d=y.subarray(1),h=n.fromBytes(d.subarray(0,n.BYTES)),w=n.fromBytes(d.subarray(n.BYTES,2*n.BYTES));return{x:h,y:w}});function i(y){const{a:d,b:h}=e,w=n.sqr(y),v=n.mul(w,y);return n.add(n.add(v,n.mul(y,d)),h)}if(!n.eql(n.sqr(e.Gy),i(e.Gx)))throw new Error("bad generator point: equation left != right");function a(y){return typeof y=="bigint"&&Stn.eql(x,n.ZERO);return v(h)&&v(w)?f.ZERO:new f(h,w,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(d){const h=n.invertBatch(d.map(w=>w.pz));return d.map((w,v)=>w.toAffine(h[v])).map(f.fromAffine)}static fromHex(d){const h=f.fromAffine(o(ht("pointHex",d)));return h.assertValidity(),h}static fromPrivateKey(d){return f.BASE.multiply(s(d))}_setWindowSize(d){this._WINDOW_SIZE=d,l.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint)return;throw new Error("bad point: ZERO")}const{x:d,y:h}=this.toAffine();if(!n.isValid(d)||!n.isValid(h))throw new Error("bad point: x or y not FE");const w=n.sqr(h),v=i(d);if(!n.eql(w,v))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:d}=this.toAffine();if(n.isOdd)return!n.isOdd(d);throw new Error("Field doesn't support isOdd")}equals(d){u(d);const{px:h,py:w,pz:v}=this,{px:x,py:$,pz:S}=d,E=n.eql(n.mul(h,S),n.mul(x,v)),B=n.eql(n.mul(w,S),n.mul($,v));return E&&B}negate(){return new f(this.px,n.neg(this.py),this.pz)}double(){const{a:d,b:h}=e,w=n.mul(h,Wr),{px:v,py:x,pz:$}=this;let S=n.ZERO,E=n.ZERO,B=n.ZERO,A=n.mul(v,v),N=n.mul(x,x),U=n.mul($,$),T=n.mul(v,x);return T=n.add(T,T),B=n.mul(v,$),B=n.add(B,B),S=n.mul(d,B),E=n.mul(w,U),E=n.add(S,E),S=n.sub(N,E),E=n.add(N,E),E=n.mul(S,E),S=n.mul(T,S),B=n.mul(w,B),U=n.mul(d,U),T=n.sub(A,U),T=n.mul(d,T),T=n.add(T,B),B=n.add(A,A),A=n.add(B,A),A=n.add(A,U),A=n.mul(A,T),E=n.add(E,A),U=n.mul(x,$),U=n.add(U,U),A=n.mul(U,T),S=n.sub(S,A),B=n.mul(U,N),B=n.add(B,B),B=n.add(B,B),new f(S,E,B)}add(d){u(d);const{px:h,py:w,pz:v}=this,{px:x,py:$,pz:S}=d;let E=n.ZERO,B=n.ZERO,A=n.ZERO;const N=e.a,U=n.mul(e.b,Wr);let T=n.mul(h,x),H=n.mul(w,$),R=n.mul(v,S),P=n.add(h,w),b=n.add(x,$);P=n.mul(P,b),b=n.add(T,H),P=n.sub(P,b),b=n.add(h,v);let m=n.add(x,S);return b=n.mul(b,m),m=n.add(T,R),b=n.sub(b,m),m=n.add(w,v),E=n.add($,S),m=n.mul(m,E),E=n.add(H,R),m=n.sub(m,E),A=n.mul(N,b),E=n.mul(U,R),A=n.add(E,A),E=n.sub(H,A),A=n.add(H,A),B=n.mul(E,A),H=n.add(T,T),H=n.add(H,T),R=n.mul(N,R),b=n.mul(U,b),H=n.add(H,R),R=n.sub(T,R),R=n.mul(N,R),b=n.add(b,R),T=n.mul(H,b),B=n.add(B,T),T=n.mul(m,b),E=n.mul(P,E),E=n.sub(E,T),T=n.mul(P,H),A=n.mul(m,A),A=n.add(A,T),new f(E,B,A)}subtract(d){return this.add(d.negate())}is0(){return this.equals(f.ZERO)}wNAF(d){return p.wNAFCached(this,l,d,h=>{const w=n.invertBatch(h.map(v=>v.pz));return h.map((v,x)=>v.toAffine(w[x])).map(f.fromAffine)})}multiplyUnsafe(d){const h=f.ZERO;if(d===St)return h;if(c(d),d===pt)return this;const{endo:w}=e;if(!w)return p.unsafeLadder(this,d);let{k1neg:v,k1:x,k2neg:$,k2:S}=w.splitScalar(d),E=h,B=h,A=this;for(;x>St||S>St;)x&pt&&(E=E.add(A)),S&pt&&(B=B.add(A)),A=A.double(),x>>=pt,S>>=pt;return v&&(E=E.negate()),$&&(B=B.negate()),B=new f(n.mul(B.px,w.beta),B.py,B.pz),E.add(B)}multiply(d){c(d);let h=d,w,v;const{endo:x}=e;if(x){const{k1neg:$,k1:S,k2neg:E,k2:B}=x.splitScalar(h);let{p:A,f:N}=this.wNAF(S),{p:U,f:T}=this.wNAF(B);A=p.constTimeNegate($,A),U=p.constTimeNegate(E,U),U=new f(n.mul(U.px,x.beta),U.py,U.pz),w=A.add(U),v=N.add(T)}else{const{p:$,f:S}=this.wNAF(h);w=$,v=S}return f.normalizeZ([w,v])[0]}multiplyAndAddUnsafe(d,h,w){const v=f.BASE,x=(S,E)=>E===St||E===pt||!S.equals(v)?S.multiplyUnsafe(E):S.multiply(E),$=x(this,h).add(x(d,w));return $.is0()?void 0:$}toAffine(d){const{px:h,py:w,pz:v}=this,x=this.is0();d==null&&(d=x?n.ONE:n.inv(v));const $=n.mul(h,d),S=n.mul(w,d),E=n.mul(v,d);if(x)return{x:n.ZERO,y:n.ZERO};if(!n.eql(E,n.ONE))throw new Error("invZ was invalid");return{x:$,y:S}}isTorsionFree(){const{h:d,isTorsionFree:h}=e;if(d===pt)return!0;if(h)return h(f,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:d,clearCofactor:h}=e;return d===pt?this:h?h(f,this):this.multiplyUnsafe(e.h)}toRawBytes(d=!0){return this.assertValidity(),r(f,this,d)}toHex(d=!0){return ge(this.toRawBytes(d))}}f.BASE=new f(e.Gx,e.Gy,n.ONE),f.ZERO=new f(n.ZERO,n.ONE,n.ZERO);const g=e.nBitLength,p=Md(f,e.endo?Math.ceil(g/2):g);return{CURVE:e,ProjectivePoint:f,normPrivateKeyToScalar:s,weierstrassEquation:i,isWithinCurveOrder:a}}function Zd(t){const e=Oi(t);return Ie(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function Gd(t){const e=Zd(t),{Fp:n,n:r}=e,o=n.BYTES+1,i=2*n.BYTES+1;function a(b){return Stge(de(b,e.nByteLength));function y(b){const m=r>>pt;return b>m}function d(b){return y(b)?c(-b):b}const h=(b,m,I)=>ee(b.slice(m,I));class w{constructor(m,I,C){this.r=m,this.s=I,this.recovery=C,this.assertValidity()}static fromCompact(m){const I=e.nByteLength;return m=ht("compactSignature",m,I*2),new w(h(m,0,I),h(m,I,2*I))}static fromDER(m){const{r:I,s:C}=Qt.toSig(ht("DER",m));return new w(I,C)}assertValidity(){if(!g(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!g(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(m){return new w(this.r,this.s,m)}recoverPublicKey(m){const{r:I,s:C,recovery:L}=this,k=B(ht("msgHash",m));if(L==null||![0,1,2,3].includes(L))throw new Error("recovery id invalid");const D=L===2||L===3?I+e.n:I;if(D>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const O=L&1?"03":"02",Z=l.fromHex(O+p(D)),Y=s(D),st=c(-k*Y),gt=c(C*Y),J=l.BASE.multiplyAndAddUnsafe(Z,st,gt);if(!J)throw new Error("point at infinify");return J.assertValidity(),J}hasHighS(){return y(this.s)}normalizeS(){return this.hasHighS()?new w(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return ye(this.toDERHex())}toDERHex(){return Qt.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return ye(this.toCompactHex())}toCompactHex(){return p(this.r)+p(this.s)}}const v={isValidPrivateKey(b){try{return u(b),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const b=e.randomBytes(n.BYTES+8),m=Pd(b,r);return de(m,e.nByteLength)},precompute(b=8,m=l.BASE){return m._setWindowSize(b),m.multiply(BigInt(3)),m}};function x(b,m=!0){return l.fromPrivateKey(b).toRawBytes(m)}function $(b){const m=b instanceof Uint8Array,I=typeof b=="string",C=(m||I)&&b.length;return m?C===o||C===i:I?C===2*o||C===2*i:b instanceof l}function S(b,m,I=!0){if($(b))throw new Error("first arg must be private key");if(!$(m))throw new Error("second arg must be public key");return l.fromHex(m).multiply(u(b)).toRawBytes(I)}const E=e.bits2int||function(b){const m=ee(b),I=b.length*8-e.nBitLength;return I>0?m>>BigInt(I):m},B=e.bits2int_modN||function(b){return c(E(b))},A=vr(e.nBitLength);function N(b){if(typeof b!="bigint")throw new Error("bigint expected");if(!(St<=b&&bnt in I))throw new Error("sign() legacy options not supported");const{hash:C,randomBytes:L}=e;let{lowS:k,prehash:D,extraEntropy:O}=I;k==null&&(k=!0),b=ht("msgHash",b),D&&(b=ht("prehashed msgHash",C(b)));const Z=B(b),Y=u(m),st=[N(Y),N(Z)];if(O!=null){const nt=O===!0?L(n.BYTES):O;st.push(ht("extraEntropy",nt,n.BYTES))}const gt=Ae(...st),J=Z;function Zt(nt){const at=E(nt);if(!g(at))return;const be=s(at),ct=l.BASE.multiply(at).toAffine(),j=c(ct.x);if(j===St)return;const lt=c(be*c(J+j*Y));if(lt===St)return;let me=(ct.x===j?0:2)|Number(ct.y&pt),Ee=lt;return k&&y(lt)&&(Ee=d(lt),me^=1),new w(j,Ee,me)}return{seed:gt,k2sig:Zt}}const T={lowS:e.lowS,prehash:!1},H={lowS:e.lowS,prehash:!1};function R(b,m,I=T){const{seed:C,k2sig:L}=U(b,m,I),k=e;return Ri(k.hash.outputLen,k.nByteLength,k.hmac)(C,L)}l.BASE._setWindowSize(8);function P(b,m,I,C=H){var ct;const L=b;if(m=ht("msgHash",m),I=ht("publicKey",I),"strict"in C)throw new Error("options.strict was renamed to lowS");const{lowS:k,prehash:D}=C;let O,Z;try{if(typeof L=="string"||L instanceof Uint8Array)try{O=w.fromDER(L)}catch(j){if(!(j instanceof Qt.Err))throw j;O=w.fromCompact(L)}else if(typeof L=="object"&&typeof L.r=="bigint"&&typeof L.s=="bigint"){const{r:j,s:lt}=L;O=new w(j,lt)}else throw new Error("PARSE");Z=l.fromHex(I)}catch(j){if(j.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(k&&O.hasHighS())return!1;D&&(m=e.hash(m));const{r:Y,s:st}=O,gt=B(m),J=s(st),Zt=c(gt*J),nt=c(Y*J),at=(ct=l.BASE.multiplyAndAddUnsafe(Z,Zt,nt))==null?void 0:ct.toAffine();return at?c(at.x)===Y:!1}return{CURVE:e,getPublicKey:x,getSharedSecret:S,sign:R,verify:P,ProjectivePoint:l,Signature:w,utils:v}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Wd(t){return{hash:t,hmac:(e,...n)=>zt(t,e,It(...n)),randomBytes:Gn}}function Yd(t,e){const n=r=>Gd({...t,...Wd(r)});return Object.freeze({...n(e),create:n})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const _i=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Yr=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Jd=BigInt(1),_n=BigInt(2),Jr=(t,e)=>(t+e/_n)/e;function Xd(t){const e=_i,n=BigInt(3),r=BigInt(6),o=BigInt(11),i=BigInt(22),a=BigInt(23),c=BigInt(44),s=BigInt(88),l=t*t*t%e,u=l*l*t%e,f=dt(u,n,e)*u%e,g=dt(f,n,e)*u%e,p=dt(g,_n,e)*l%e,y=dt(p,o,e)*p%e,d=dt(y,i,e)*y%e,h=dt(d,c,e)*d%e,w=dt(h,s,e)*h%e,v=dt(w,c,e)*d%e,x=dt(v,n,e)*u%e,$=dt(x,a,e)*y%e,S=dt($,r,e)*l%e,E=dt(S,_n,e);if(!Dn.eql(Dn.sqr(E),t))throw new Error("Cannot find square root");return E}const Dn=Kd(_i,void 0,void 0,{sqrt:Xd}),xt=Yd({a:BigInt(0),b:BigInt(7),Fp:Dn,n:Yr,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=Yr,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-Jd*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=n,a=BigInt("0x100000000000000000000000000000000"),c=Jr(i*t,e),s=Jr(-r*t,e);let l=rt(t-c*n-s*o,e),u=rt(-c*r-s*i,e);const f=l>a,g=u>a;if(f&&(l=e-l),g&&(u=e-u),l>a||u>a)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:f,k1:l,k2neg:g,k2:u}}}},Ut);BigInt(0);xt.ProjectivePoint;const Ne=xt.ProjectivePoint,bn=ha(Ut);function Xr(t){return BigInt(`0x${Q(t)}`)}function Qd(t){return re(t.toString(16).padStart(64,"0"))}const tu=Eo("Bitcoin seed"),mn={private:76066276,public:76067358},En=2147483648,eu=t=>Ed(Ut(t)),nu=t=>te(t).getUint32(0,!1),He=t=>{if(!Number.isSafeInteger(t)||t<0||t>2**32-1)throw new Error(`Invalid number=${t}. Should be from 0 to 2 ** 32 - 1`);const e=new Uint8Array(4);return te(e).setUint32(0,t,!1),e};class qt{get fingerprint(){if(!this.pubHash)throw new Error("No publicKey set!");return nu(this.pubHash)}get identifier(){return this.pubHash}get pubKeyHash(){return this.pubHash}get privateKey(){return this.privKeyBytes||null}get publicKey(){return this.pubKey||null}get privateExtendedKey(){const e=this.privateKey;if(!e)throw new Error("No private key");return bn.encode(this.serialize(this.versions.private,It(new Uint8Array([0]),e)))}get publicExtendedKey(){if(!this.pubKey)throw new Error("No public key");return bn.encode(this.serialize(this.versions.public,this.pubKey))}static fromMasterSeed(e,n=mn){if(Yt(e),8*e.length<128||8*e.length>512)throw new Error(`HDKey: wrong seed length=${e.length}. Should be between 128 and 512 bits; 256 bits is advised)`);const r=zt(Hn,tu,e);return new qt({versions:n,chainCode:r.slice(32),privateKey:r.slice(0,32)})}static fromExtendedKey(e,n=mn){const r=bn.decode(e),o=te(r),i=o.getUint32(0,!1),a={versions:n,depth:r[4],parentFingerprint:o.getUint32(5,!1),index:o.getUint32(9,!1),chainCode:r.slice(13,45)},c=r.slice(45),s=c[0]===0;if(i!==n[s?"private":"public"])throw new Error("Version mismatch");return s?new qt({...a,privateKey:c.slice(1)}):new qt({...a,publicKey:c})}static fromJSON(e){return qt.fromExtendedKey(e.xpriv)}constructor(e){if(this.depth=0,this.index=0,this.chainCode=null,this.parentFingerprint=0,!e||typeof e!="object")throw new Error("HDKey.constructor must not be called directly");if(this.versions=e.versions||mn,this.depth=e.depth||0,this.chainCode=e.chainCode,this.index=e.index||0,this.parentFingerprint=e.parentFingerprint||0,!this.depth&&(this.parentFingerprint||this.index))throw new Error("HDKey: zero depth with non-zero index/parent fingerprint");if(e.publicKey&&e.privateKey)throw new Error("HDKey: publicKey and privateKey at same time.");if(e.privateKey){if(!xt.utils.isValidPrivateKey(e.privateKey))throw new Error("Invalid private key");this.privKey=typeof e.privateKey=="bigint"?e.privateKey:Xr(e.privateKey),this.privKeyBytes=Qd(this.privKey),this.pubKey=xt.getPublicKey(e.privateKey,!0)}else if(e.publicKey)this.pubKey=Ne.fromHex(e.publicKey).toRawBytes(!0);else throw new Error("HDKey: no public or private key provided");this.pubHash=eu(this.pubKey)}derive(e){if(!/^[mM]'?/.test(e))throw new Error('Path must start with "m" or "M"');if(/^[mM]'?$/.test(e))return this;const n=e.replace(/^[mM]'?\//,"").split("/");let r=this;for(const o of n){const i=/^(\d+)('?)$/.exec(o);if(!i||i.length!==3)throw new Error(`Invalid child index: ${o}`);let a=+i[1];if(!Number.isSafeInteger(a)||a>=En)throw new Error("Invalid index");i[2]==="'"&&(a+=En),r=r.deriveChild(a)}return r}deriveChild(e){if(!this.pubKey||!this.chainCode)throw new Error("No publicKey or chainCode set");let n=He(e);if(e>=En){const c=this.privateKey;if(!c)throw new Error("Could not derive hardened child key");n=It(new Uint8Array([0]),c,n)}else n=It(this.pubKey,n);const r=zt(Hn,this.chainCode,n),o=Xr(r.slice(0,32)),i=r.slice(32);if(!xt.utils.isValidPrivateKey(o))throw new Error("Tweak bigger than curve order");const a={versions:this.versions,chainCode:i,depth:this.depth+1,parentFingerprint:this.fingerprint,index:e};try{if(this.privateKey){const c=rt(this.privKey+o,xt.CURVE.n);if(!xt.utils.isValidPrivateKey(c))throw new Error("The tweak was out of range or the resulted private key is invalid");a.privateKey=c}else{const c=Ne.fromHex(this.pubKey).add(Ne.fromPrivateKey(o));if(c.equals(Ne.ZERO))throw new Error("The tweak was equal to negative P, which made the result key invalid");a.publicKey=c.toRawBytes(!0)}return new qt(a)}catch{return this.deriveChild(e+1)}}sign(e){if(!this.privateKey)throw new Error("No privateKey set!");return Yt(e,32),xt.sign(e,this.privKey).toCompactRawBytes()}verify(e,n){if(Yt(e,32),Yt(n,64),!this.publicKey)throw new Error("No publicKey set!");let r;try{r=xt.Signature.fromCompact(n)}catch{return!1}return xt.verify(r,e,this.publicKey)}wipePrivateData(){return this.privKey=void 0,this.privKeyBytes&&(this.privKeyBytes.fill(0),this.privKeyBytes=void 0),this}toJSON(){return{xpriv:this.privateExtendedKey,xpub:this.publicExtendedKey}}serialize(e,n){if(!this.chainCode)throw new Error("No chainCode set");return Yt(n,33),It(He(e),new Uint8Array([this.depth]),He(this.parentFingerprint),He(this.index),this.chainCode,n)}}var ru="m/44'/1237'";function ou(t,e,n=0){let o=qt.fromMasterSeed(ud(t,e)).derive(`${ru}/${n}'`),i=o.privateExtendedKey,a=o.publicExtendedKey;if(!i&&!a)throw new Error("could not derive extended key pair");return{privateExtendedKey:i,publicExtendedKey:a}}function Qr(t,e=0){let n=qt.fromExtendedKey(t),r=t.slice(0,4),o=n.deriveChild(0).deriveChild(e),i=Q(o.publicKey.slice(1));if(!i)throw new Error("could not derive public key");if(r==="xprv"){let a=o.privateKey;if(!a)throw new Error("could not derive private key");return{privateKey:a,publicKey:i}}return{publicKey:i}}var iu=Object.getOwnPropertyDescriptor,su=(t,e,n,r)=>{for(var o=r>1?void 0:r?iu(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(o=a(o)||o);return o};let Kn=class extends Pi{constructor(){super(...arguments);q(this,"$notify");q(this,"$route");q(this,"$router");q(this,"activeDid","");q(this,"agentDid","");q(this,"apiServer","");q(this,"endDateInput");q(this,"endTimeInput");q(this,"errorMessage","");q(this,"fullClaim",{"@context":"https://schema.org","@type":"PlanAction",name:"",description:""});q(this,"imageUrl","");q(this,"includeLocation",!1);q(this,"isHiddenSave",!1);q(this,"isHiddenSpinner",!0);q(this,"lastClaimJwtId","");q(this,"latitude",0);q(this,"longitude",0);q(this,"numAccounts",0);q(this,"projectId","");q(this,"projectIssuerDid","");q(this,"sendToTrustroots",!1);q(this,"sendToTripHopping",!1);q(this,"showGeneralAdvanced",!1);q(this,"startDateInput");q(this,"startTimeInput");q(this,"zoneName",nn.local().zoneName);q(this,"zoom",2)}errNote(n){this.$notify({group:"alert",type:"danger",title:"Error",text:n},5e3)}async mounted(){this.numAccounts=await Qi();const n=await Ar();this.activeDid=n.activeDid||"",this.apiServer=n.apiServer||"",this.showGeneralAdvanced=!!n.showGeneralAdvanced,this.projectId=this.$route.query.projectId||"",this.projectId&&(this.numAccounts===0?this.errNote("There was a problem loading your account info."):this.loadProject(this.activeDid))}async loadProject(n){var i,a,c;const r=this.apiServer+"/api/claim/byHandle/"+encodeURIComponent(this.projectId),o=await Te(n);try{const s=await this.axios.get(r,{headers:o});if(s.status===200){if(this.projectIssuerDid=s.data.issuer,this.fullClaim=s.data.claim,this.imageUrl=s.data.claim.image||"",this.lastClaimJwtId=s.data.id,(i=this.fullClaim)!=null&&i.location&&(this.includeLocation=!0,this.latitude=this.fullClaim.location.geo.latitude,this.longitude=this.fullClaim.location.geo.longitude),(c=(a=this.fullClaim)==null?void 0:a.agent)!=null&&c.identifier&&(this.agentDid=this.fullClaim.agent.identifier),this.fullClaim.startTime){const l=nn.fromISO(this.fullClaim.startTime).toLocal();this.startDateInput=l.toFormat("yyyy-MM-dd"),this.startTimeInput=l.toFormat("HH:mm")}if(this.fullClaim.endTime){const l=nn.fromISO(this.fullClaim.endTime).toLocal();this.endDateInput=l.toFormat("yyyy-MM-dd"),this.endTimeInput=l.toFormat("HH:mm")}}}catch(s){console.error("Got error retrieving that project",s),this.errNote("There was an error retrieving that project.")}}openImageDialog(){this.$refs.imageDialog.open(n=>{this.imageUrl=n},"PlanAction")}confirmDeleteImage(){this.$notify({group:"modal",type:"confirm",title:"Are you sure you want to delete the image?",text:"",onYes:this.deleteImage},-1)}async deleteImage(){if(this.imageUrl)try{const n=await Te(this.activeDid);window.location.hostname==="localhost"&&!Sr.includes("localhost")&&console.log("Using shared image API server, so only users on that server can play with images.");const r=await this.axios.delete(Sr+"/image/"+encodeURIComponent(this.imageUrl),{headers:n});if(r.status!==204){console.error("Problem deleting image:",r),this.$notify({group:"alert",type:"danger",title:"Error",text:"There was a problem deleting the image."},5e3);return}this.imageUrl=""}catch(n){console.error("Error deleting image:",n),n.response.status===404?(console.log("The image was already deleted:",n),this.imageUrl=""):this.$notify({group:"alert",type:"danger",title:"Error",text:"There was an error deleting the image."},5e3)}}async saveProject(){var c,s,l,u,f;const n=this.fullClaim;if(this.projectId&&(n.lastClaimId=this.lastClaimJwtId),this.agentDid?n.agent={identifier:this.agentDid}:delete n.agent,this.imageUrl?n.image=this.imageUrl:delete n.image,this.includeLocation?!this.latitude||!this.longitude?(this.$notify({group:"alert",type:"danger",title:"Location Error",text:"The location was invalid so it was not set."},5e3),delete n.location):n.location={geo:{"@type":"GeoCoordinates",latitude:this.latitude,longitude:this.longitude}}:delete n.location,this.startDateInput)try{const g=this.startTimeInput||"00:00:00",p=this.startDateInput+" "+g;n.startTime=new Date(p).toISOString()}catch{delete n.startTime,this.$notify({group:"alert",type:"danger",title:"Date Error",text:"The start date was invalid so it was not set."},5e3)}else delete n.startTime;if(this.endDateInput)try{const g=this.endTimeInput||"23:59:59",p=this.endDateInput+" "+g;n.endTime=new Date(p).toISOString()}catch{delete n.endTime,this.$notify({group:"alert",type:"danger",title:"Date Error",text:"The end date was invalid so it was not set."},5e3)}else delete n.endTime;const r=await ts(this.activeDid,n),o=JSON.stringify({jwtEncoded:r}),i=this.apiServer+"/api/v2/claim",a=await Te(this.activeDid);try{const g=await this.axios.post(i,o,{headers:a});if((s=(c=g.data)==null?void 0:c.success)!=null&&s.handleId){this.$notify({group:"alert",type:"success",title:"Saved",text:"The project was saved successfully."},3e3),this.errorMessage="";const p=encodeURIComponent(g.data.success.handleId);if(this.sendToTrustroots||this.sendToTripHopping)if(this.latitude&&this.longitude){let y;this.sendToTrustroots&&(y=await this.signSomePayload(),this.sendToNostrPartner("NOSTR-EVENT-TRUSTROOTS","Trustroots",g.data.success.claimId,y.signedEvent,y.publicExtendedKey)),this.sendToTripHopping&&(y||(y=await this.signSomePayload()),this.sendToNostrPartner("NOSTR-EVENT-TRIPHOPPING","TripHopping",g.data.success.claimId,y.signedEvent,y.publicExtendedKey))}else this.$notify({group:"alert",type:"danger",title:"Partner Error",text:"A partner was selected but the location was not set, so it was not sent to any partner."},5e3);this.$router.push({path:"/project/"+p})}else console.error("Got unexpected 'data' inside response from server",g),this.$notify({group:"alert",type:"danger",title:"Error Saving Idea",text:"Server did not save the idea. Try again."},5e3)}catch(g){let p="There was an error saving the project.";const y=g;y?(console.error("Got error from server",y),Object.prototype.hasOwnProperty.call(y,"message")?(p=((f=(u=(l=y.response)==null?void 0:l.data)==null?void 0:u.error)==null?void 0:f.message)||p,this.$notify({group:"alert",type:"danger",title:"User Message",text:p},5e3)):this.$notify({group:"alert",type:"danger",title:"Server Message",text:JSON.stringify(y.toJSON())},5e3)):(console.error("Here's the full error trying to save the claim:",g),this.$notify({group:"alert",type:"danger",title:"Claim Error",text:g},5e3)),this.errorMessage=p}}async signSomePayload(){var g,p,y;const n=await es(this.activeDid),r=(y=(p=(g=n==null?void 0:n.derivationPath)==null?void 0:g.split)==null?void 0:p.call(g,"/"))==null?void 0:y.reverse()[0],o=r==null?void 0:r.replace(/'/g,""),i=Number(o||0),a=ou(n==null?void 0:n.mnemonic,"",i),c=a==null?void 0:a.publicExtendedKey,s=a==null?void 0:a.privateExtendedKey,l=Qr(s).privateKey;return{signedEvent:wt({kind:30402,tags:[[]],content:"",created_at:0},l),publicExtendedKey:c}}async sendToNostrPartner(n,r,o,i,a){var c,s,l;try{let u=qi;const f=await Ar();f.partnerApiServer&&(u=f.partnerApiServer);const g=u+"/api/partner/link",p=window.location.origin+"/claim/"+o,y=this.fullClaim.name+" - see "+p,d=Qr(a).publicKey,h={kind:i.kind,tags:i.tags,content:i.content,created_at:i.created_at,pubkey:d},w=_o(h),v={jwtId:o,linkCode:n,inputJson:JSON.stringify(y),pubKeyHex:d,pubKeyImage:w,pubKeySigHex:i.sig},x=await Te(this.activeDid),$=await this.axios.post(g,v,{headers:x});$.status===201?this.$notify({group:"alert",type:"success",title:`Sent to ${r}`,text:`The project info was sent to ${r}.`},5e3):this.$notify({group:"alert",type:"danger",title:`Failed Sending to ${r}`,text:JSON.stringify($.data)},5e3)}catch(u){console.error(`Error sending to ${r}`,u);let f=`There was an error sending to ${r}.`;(l=(s=(c=u.response)==null?void 0:c.data)==null?void 0:s.error)!=null&&l.message&&(f=u.response.data.error.message),this.$notify({group:"alert",type:"danger",title:`Error Sending to ${r}`,text:f},7e3)}}async onSaveProjectClick(){this.isHiddenSave=!0,this.isHiddenSpinner=!1,this.numAccounts===0?console.error("Error: there is no account."):this.saveProject()}confirmEraseLatLong(){this.$notify({group:"modal",type:"confirm",title:"Erase Marker",text:"Are you sure you don't want to mark a location? This will erase the current location.",onYes:async()=>{this.eraseLatLong()}},-1)}eraseLatLong(){this.latitude=0,this.longitude=0,this.includeLocation=!1}onCancelClick(){this.$router.back()}showNostrPartnerInfo(){this.$notify({group:"alert",type:"info",title:"About Nostr Events",text:"This will submit this project to a partner on the nostr network. It will contain your public key data which may allow correlation, so don't allow this if you're not comfortable with that."},7e3)}};Kn=su([Mi({components:{ImageMethodDialog:Ji,LMap:Yi,LMarker:Wi,LTileLayer:Gi,QuickNav:Xi}})],Kn);const au={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},cu={id:"ViewBreadcrumb",class:"mb-8"},lu={class:"text-lg text-center font-light relative px-7"},fu={class:"flex justify-center mt-4"},du={key:0,class:"flex justify-between"},uu=["href"],hu=["src"],pu={key:1},gu={class:"mb-4"},yu={key:0},wu={class:"text-xs text-slate-500 italic"},bu={class:"flex items-center mt-4"},mu=["disabled"],Eu={class:"flex w-full justify-end items-center"},xu={class:"w-full flex justify-end items-center"},vu={class:"flex items-center"},Bu=["disabled"],Au={key:0,class:"mb-4 aspect-video"},Su={key:1,class:"items-center mb-4"},Iu={class:"mt-8"},$u={class:"grid grid-cols-1 sm:grid-cols-2 gap-2"},Tu=["disabled"];function Lu(t,e,n,r,o,i){var g;const a=ce("QuickNav"),c=ce("font-awesome"),s=ce("ImageMethodDialog"),l=ce("l-tile-layer"),u=ce("l-marker"),f=ce("l-map");return Gt(),ae(Fi,null,[Nt(a,{selected:"Projects"}),_("section",au,[_("div",cu,[_("h1",lu,[_("button",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:e[0]||(e[0]=p=>t.$router.back())},[Nt(c,{icon:"chevron-left",class:"fa-fw"})]),e[19]||(e[19]=rn(" Edit Project Idea "))])]),_("div",null,on(t.errorMessage),1),bt(_("input",{"onUpdate:modelValue":e[1]||(e[1]=p=>t.fullClaim.name=p),type:"text",placeholder:"Idea Name",class:"block w-full rounded border border-slate-400 mb-4 px-3 py-2"},null,512),[[Ht,t.fullClaim.name]]),_("div",fu,[t.imageUrl?(Gt(),ae("span",du,[_("a",{href:t.imageUrl,target:"_blank",class:"text-blue-500 ml-4"},[_("img",{src:t.imageUrl,class:"h-24 rounded-xl"},null,8,hu)],8,uu),Nt(c,{icon:"trash-can",class:"text-red-500 fa-fw ml-8 mt-10",onClick:t.confirmDeleteImage},null,8,["onClick"])])):(Gt(),ae("span",pu,[Nt(c,{icon:"camera",class:"bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-2 rounded-md",onClick:t.openImageDialog},null,8,["onClick"])]))]),Nt(s,{ref:"imageDialog"},null,512),bt(_("input",{"onUpdate:modelValue":e[2]||(e[2]=p=>t.agentDid=p),type:"text",placeholder:"Other Authorized Representative",class:"mt-4 block w-full rounded border border-slate-400 px-3 py-2"},null,512),[[Ht,t.agentDid]]),_("div",gu,[t.activeDid!=t.projectIssuerDid&&t.agentDid!=t.projectIssuerDid?(Gt(),ae("p",yu,[e[20]||(e[20]=_("span",{class:"text-red-500"},"Beware!",-1)),e[21]||(e[21]=rn(" If you save this, the original project owner will no longer be able to edit it. ")),_("button",{class:"text-blue-500",onClick:e[3]||(e[3]=p=>t.agentDid=t.projectIssuerDid)}," Click here to make the original owner an authorized representative. ")])):$e("",!0)]),bt(_("textarea",{"onUpdate:modelValue":e[4]||(e[4]=p=>t.fullClaim.description=p),placeholder:"Description",class:"block w-full rounded border border-slate-400 px-3 py-2",rows:"5",maxlength:"5000"},null,512),[[Ht,t.fullClaim.description]]),e[28]||(e[28]=_("div",{class:"text-xs text-slate-500 italic"}," If you want to be contacted, be sure to include your contact information -- just remember that this information is public and saved in a public history. ",-1)),_("div",wu,on((g=t.fullClaim.description)==null?void 0:g.length)+"/5000 max. characters ",1),bt(_("input",{"onUpdate:modelValue":e[5]||(e[5]=p=>t.fullClaim.url=p),placeholder:"Website",autocapitalize:"none",class:"block w-full rounded border border-slate-400 mt-4 px-3 py-2"},null,512),[[Ht,t.fullClaim.url]]),_("div",null,[_("div",bu,[e[22]||(e[22]=_("span",{class:"mr-2"},"Starts At",-1)),bt(_("input",{"onUpdate:modelValue":e[6]||(e[6]=p=>t.startDateInput=p),placeholder:"Start Date",type:"date",class:"rounded border border-slate-400 px-3 py-2"},null,512),[[Ht,t.startDateInput]]),bt(_("input",{"onUpdate:modelValue":e[7]||(e[7]=p=>t.startTimeInput=p),disabled:!t.startDateInput,placeholder:"Start Time",type:"time",class:"rounded border border-slate-400 ml-2 px-3 py-2"},null,8,mu),[[Ht,t.startTimeInput]])]),_("div",Eu,[_("span",xu,on(t.zoneName)+" time zone ",1)]),_("div",vu,[e[23]||(e[23]=_("div",{class:"mr-2"},[_("span",null,"Ends at")],-1)),bt(_("input",{"onUpdate:modelValue":e[8]||(e[8]=p=>t.endDateInput=p),placeholder:"End Date",type:"date",class:"ml-2 rounded border border-slate-400 px-3 py-2"},null,512),[[Ht,t.endDateInput]]),bt(_("input",{"onUpdate:modelValue":e[9]||(e[9]=p=>t.endTimeInput=p),disabled:!t.endDateInput,placeholder:"End Time",type:"time",class:"rounded border border-slate-400 ml-2 px-3 py-2"},null,8,Bu),[[Ht,t.endTimeInput]])])]),_("div",{class:"flex items-center mt-4",onClick:e[11]||(e[11]=p=>t.includeLocation=!t.includeLocation)},[bt(_("input",{"onUpdate:modelValue":e[10]||(e[10]=p=>t.includeLocation=p),type:"checkbox",class:"mr-2"},null,512),[[Ir,t.includeLocation]]),e[24]||(e[24]=_("label",{for:"includeLocation"},"Include Location",-1))]),t.includeLocation?(Gt(),ae("div",Au,[e[25]||(e[25]=_("p",{class:"text-sm mb-2 text-slate-500"}," For your security, choose a location nearby but not exactly at the place. ",-1)),Nt(f,{ref:"map",zoom:t.zoom,"onUpdate:zoom":e[13]||(e[13]=p=>t.zoom=p),center:[0,0],class:"!z-40 rounded-md",onClick:e[14]||(e[14]=p=>{t.latitude=p.latlng.lat,t.longitude=p.latlng.lng})},{default:Vi(()=>[Nt(l,{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png","layer-type":"base",name:"OpenStreetMap"}),t.latitude&&t.longitude?(Gt(),Zi(u,{key:0,"lat-lng":[t.latitude,t.longitude],onClick:e[12]||(e[12]=p=>t.confirmEraseLatLong())},null,8,["lat-lng"])):$e("",!0)]),_:1},8,["zoom"])])):$e("",!0),t.showGeneralAdvanced&&t.includeLocation?(Gt(),ae("div",Su,[_("div",{class:"flex",onClick:e[16]||(e[16]=p=>t.sendToTrustroots=!t.sendToTrustroots)},[bt(_("input",{"onUpdate:modelValue":e[15]||(e[15]=p=>t.sendToTrustroots=p),type:"checkbox",class:"mr-2"},null,512),[[Ir,t.sendToTrustroots]]),e[26]||(e[26]=_("label",null,"Send to Trustroots",-1)),Nt(c,{icon:"circle-info",class:"text-blue-500 ml-2 cursor-pointer",onClick:zi(t.showNostrPartnerInfo,["stop"])},null,8,["onClick"])])])):$e("",!0),_("div",Iu,[_("div",$u,[_("button",{disabled:t.isHiddenSave,class:"block w-full text-center text-lg font-bold uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md mb-2",onClick:e[17]||(e[17]=p=>t.onSaveProjectClick())},[_("span",{class:$r({hidden:t.isHiddenSave})},"Save Project",2),_("span",{class:$r({hidden:t.isHiddenSpinner})},e[27]||(e[27]=[_("i",{class:"fa-solid fa-spinner fa-spin-pulse"},null,-1),rn(" Saving...")]),2)],8,Tu),_("button",{type:"button",class:"block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md",onClick:e[18]||(e[18]=p=>t.onCancelClick())}," Cancel ")])])])],64)}const Wu=ji(Kn,[["render",Lu]]);export{Wu as default}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/NewIdentifierView-BYGrWVRA.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/NewIdentifierView-BYGrWVRA.js deleted file mode 100644 index e70178f..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/NewIdentifierView-BYGrWVRA.js +++ /dev/null @@ -1 +0,0 @@ -var v=Object.defineProperty;var x=(t,e,s)=>e in t?v(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var d=(t,e,s)=>x(t,typeof e!="symbol"?e+"":e,s);import"./dexie-export-import-aIN45iyB.js";import{V as g,C as w,_,h as c,j as r,k as n,F as y,z as u,B as f}from"./main.common-DD7dqhZp.js";import{R as b}from"./index-ryzpKtgI.js";import{Q as k}from"./QuickNav-C8jPGtUY.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var $=Object.getOwnPropertyDescriptor,C=(t,e,s,l)=>{for(var o=l>1?void 0:l?$(e,s):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(o=a(o)||o);return o};let m=class extends g{constructor(){super(...arguments);d(this,"loading",!0);d(this,"$router")}async mounted(){await b(),this.loading=!1,setTimeout(()=>{this.$router.push({name:"home"})},1e3)}};m=C([w({components:{QuickNav:k}})],m);const N={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},V={class:"mb-8"},h={class:"text-lg text-center font-light relative px-7"},I={class:"flex justify-center py-12"},B={key:0},Q={key:1};function j(t,e,s,l,o,i){const a=u("QuickNav"),p=u("font-awesome");return f(),c(y,null,[r(a),n("section",N,[n("div",V,[n("div",h,[n("h1",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:e[0]||(e[0]=A=>t.$router.back())},[r(p,{icon:"chevron-left",class:"fa-fw"})])]),e[1]||(e[1]=n("h1",{id:"ViewHeading",class:"text-4xl text-center font-light pt-4 mb-8"}," Your Identity ",-1))]),n("div",I,[e[4]||(e[4]=n("div",null,null,-1)),t.loading?(f(),c("div",B,[e[2]||(e[2]=n("span",{class:"text-xl"},"Creating... ",-1)),r(p,{icon:"spinner",class:"fa-spin fa-spin-pulse",color:"green",size:"128"})])):(f(),c("div",Q,[e[3]||(e[3]=n("span",{class:"text-xl"},"Created!",-1)),r(p,{icon:"burst",class:"fa-beat px-12",color:"green",style:{"--fa-animation-duration":"1s","--fa-animation-direction":"reverse","--fa-animation-iteration-count":"1","--fa-beat-scale":"6"}})])),e[5]||(e[5]=n("div",null,null,-1))])])],64)}const T=_(m,[["render",j]]);export{T as default}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/OfferDetailsView-DojQCzul.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/OfferDetailsView-DojQCzul.js deleted file mode 100644 index cd83732..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/OfferDetailsView-DojQCzul.js +++ /dev/null @@ -1 +0,0 @@ -var F=Object.defineProperty;var G=(e,t,i)=>t in e?F(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var s=(e,t,i)=>G(e,typeof t!="symbol"?t+"":t,i);import{V as Y,e as Q,d as z,C as H,_ as J,h as m,j as u,k as n,m as V,o as f,t as g,s as v,y as q,q as B,w as W,n as M,F as L,z as b,B as h}from"./main.common-DD7dqhZp.js";import{Q as K}from"./QuickNav-C8jPGtUY.js";import{T as X}from"./TopMessage-ZWDDjman.js";import{l as Z,h as _,i as ee,a0 as te,au as ie,as as re,av as oe,a4 as se}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var ne=Object.getOwnPropertyDescriptor,ae=(e,t,i,r)=>{for(var p=r>1?void 0:r?ne(t,i):t,a=e.length-1,d;a>=0;a--)(d=e[a])&&(p=d(p)||p);return p};let C=class extends Y{constructor(){super(...arguments);s(this,"$notify");s(this,"$route");s(this,"$router");s(this,"activeDid","");s(this,"apiServer","");s(this,"amountInput","0");s(this,"descriptionOfCondition","");s(this,"descriptionOfItem","");s(this,"destinationPathAfter","");s(this,"hideBackButton",!1);s(this,"message","");s(this,"offeredToProject",!1);s(this,"offeredToRecipient",!1);s(this,"offererDid");s(this,"offerId","");s(this,"prevCredToEdit");s(this,"projectId","");s(this,"projectName","a project");s(this,"recipientDid","");s(this,"recipientName","");s(this,"showGeneralAdvanced",!1);s(this,"unitCode","HUR");s(this,"validThroughDateInput","");s(this,"libsUtil",Z)}async mounted(){try{await this.loadPreviousOffer(),await this.initializeFormValues(),await this.loadAccountSettings(),await this.loadRecipientInfo(),await this.loadProjectInfo()}catch(i){console.error("Error in mounted:",i),this.$notify({group:"alert",type:"danger",title:"Error",text:i.message||"There was an error loading the offer details."},5e3)}}async loadPreviousOffer(){try{this.prevCredToEdit=this.$route.query.prevCredToEdit?JSON.parse(this.$route.query.prevCredToEdit):void 0}catch{this.$notify({group:"alert",type:"danger",title:"Retrieval Error",text:"The previous record isn't available for editing. If you submit, you'll create a new record."},5e3)}}async initializeFormValues(){var p,a,d,l,c,y,o,T,I,w,O,x,$,j,D,k,E,P,N,S,A,U,R;const i=(d=(a=(p=this.prevCredToEdit)==null?void 0:p.claim)==null?void 0:a.includesObject)==null?void 0:d.amountOfThisGood;this.amountInput=this.$route.query.amountInput||(i?String(i):"")||this.amountInput,this.unitCode=this.$route.query.unitCode||((y=(c=(l=this.prevCredToEdit)==null?void 0:l.claim)==null?void 0:c.includesObject)==null?void 0:y.unitCode)||this.unitCode,this.descriptionOfCondition=((T=(o=this.prevCredToEdit)==null?void 0:o.claim)==null?void 0:T.description)||this.descriptionOfCondition,this.descriptionOfItem=this.$route.query.description||((O=(w=(I=this.prevCredToEdit)==null?void 0:I.claim)==null?void 0:w.itemOffered)==null?void 0:O.description)||this.descriptionOfItem,this.destinationPathAfter=this.$route.query.destinationPathAfter||"",this.hideBackButton=this.$route.query.hideBackButton==="true",this.message=this.$route.query.message||"";let r;((D=(j=($=(x=this.prevCredToEdit)==null?void 0:x.claim)==null?void 0:$.itemOffered)==null?void 0:j.isPartOf)==null?void 0:D["@type"])==="PlanAction"&&(r=(P=(E=(k=this.prevCredToEdit)==null?void 0:k.claim)==null?void 0:E.itemOffered)==null?void 0:P.isPartOf),this.projectId=this.$route.query.projectId||(r==null?void 0:r.identifier)||this.projectId,this.projectName=this.$route.query.projectName||(r==null?void 0:r.name)||this.projectName,this.recipientDid=this.$route.query.recipientDid||((A=(S=(N=this.prevCredToEdit)==null?void 0:N.claim)==null?void 0:S.recipient)==null?void 0:A.identifier),this.recipientName=this.$route.query.recipientName||"",this.validThroughDateInput=((R=(U=this.prevCredToEdit)==null?void 0:U.claim)==null?void 0:R.validThrough)||this.validThroughDateInput}async loadAccountSettings(){const i=await Q();this.apiServer=i.apiServer??"",this.activeDid=i.activeDid??"",this.showGeneralAdvanced=i.showGeneralAdvanced??!1}async loadRecipientInfo(){if(this.recipientDid&&!this.recipientName){const i=await z.contacts.toArray(),r=await _();this.recipientName=ee(this.recipientDid,this.activeDid,r,i)}this.offeredToProject=!!this.projectId,this.offeredToRecipient=!this.offeredToProject&&!!this.recipientDid}async loadProjectInfo(){if(this.projectId&&!this.projectName){const i=await te(this.projectId,this.axios,this.apiServer,this.activeDid);this.projectName=i!=null&&i.name?"the project: "+i.name:"a project"}}changeUnitCode(){const i=Object.keys(this.libsUtil.UNIT_SHORT),r=i.indexOf(this.unitCode);this.unitCode=i[(r+1)%i.length]}increment(){this.amountInput=`${(parseFloat(this.amountInput)||0)+1}`}decrement(){this.amountInput=`${Math.max(0,(parseFloat(this.amountInput)||1)-1)}`}cancel(){this.destinationPathAfter?this.$router.push({path:this.destinationPathAfter}):this.$router.back()}cancelBack(){this.$router.back()}async confirm(){if(!this.activeDid){this.$notify({group:"alert",type:"danger",title:"Error",text:"You must select an identifier before you can record a offer."},2e3);return}if(parseFloat(this.amountInput)<0){this.$notify({group:"alert",type:"danger",text:"You may not send a negative number.",title:""},2e3);return}if(!this.descriptionOfItem&&!parseFloat(this.amountInput)){this.$notify({group:"alert",type:"danger",title:"Error",text:`You must enter a description or some number of ${this.libsUtil.UNIT_LONG[this.unitCode]}.`},2e3);return}this.$notify({group:"alert",type:"toast",text:"Recording the offer...",title:""},1e3),await this.recordOffer()}notifyUserOfProject(){this.projectId?this.$notify({group:"alert",type:"warning",title:"Error",text:"You cannot assign both to a project and to a recipient."},3e3):this.$notify({group:"alert",type:"warning",title:"Error",text:"To assign to a project, you must open this page through a project."},3e3)}notifyUserOfRecipient(){this.recipientDid?this.$notify({group:"alert",type:"warning",title:"Error",text:"You cannot assign both to a recipient and to a project."},3e3):this.$notify({group:"alert",type:"warning",title:"Error",text:"To assign to a recipient, you must open this page from a contact."},3e3)}async recordOffer(){var i,r,p;try{const a=this.offeredToRecipient?this.recipientDid:void 0,d=this.offeredToProject?this.projectId:void 0;let l;if(this.prevCredToEdit?l=await ie(this.axios,this.apiServer,this.prevCredToEdit,this.activeDid,this.descriptionOfItem,parseFloat(this.amountInput),this.unitCode,this.descriptionOfCondition,this.validThroughDateInput,a,d):l=await re(this.axios,this.apiServer,this.activeDid,this.descriptionOfItem,parseFloat(this.amountInput),this.unitCode,this.descriptionOfCondition,this.validThroughDateInput,a,d),l.type==="error"||this.isCreationError(l.response)){const c=this.getCreationErrorMessage(l);console.error("Error with offer creation result:",l),this.$notify({group:"alert",type:"danger",title:"Error",text:c||"There was an error creating the offer."},5e3)}else this.$notify({group:"alert",type:"success",title:"Success",text:"That offer was recorded."},5e3),localStorage.removeItem("imageUrl"),this.destinationPathAfter?this.$router.push({path:this.destinationPathAfter}):this.$router.back()}catch(a){console.error("Error with offer recordation caught:",a);const d=a.userMessage||((p=(r=(i=a.response)==null?void 0:i.data)==null?void 0:r.error)==null?void 0:p.message)||"There was an error recording the offer.";this.$notify({group:"alert",type:"danger",title:"Error",text:d},5e3)}}constructOfferParam(){var d,l;const i=this.offeredToRecipient?this.recipientDid:void 0,r=this.offeredToProject?this.projectId:void 0,p=oe((d=this.prevCredToEdit)==null?void 0:d.claim,this.activeDid,i,this.descriptionOfItem,parseFloat(this.amountInput),this.unitCode,this.descriptionOfCondition,r,this.validThroughDateInput,(l=this.prevCredToEdit)==null?void 0:l.id);return JSON.stringify(p)}isCreationError(i){var r;return i.status!==201||((r=i.data)==null?void 0:r.error)}getCreationErrorMessage(i){var r,p,a,d,l;return((r=i.error)==null?void 0:r.userMessage)||((p=i.error)==null?void 0:p.error)||((l=(d=(a=i.response)==null?void 0:a.data)==null?void 0:d.error)==null?void 0:l.message)}explainData(){this.$notify({group:"alert",type:"success",title:"Data Sharing",text:se},7e3)}};C=ae([H({components:{QuickNav:K,TopMessage:X}})],C);const de={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},le={key:0,class:"text-lg text-center font-light relative px-7"},pe={class:"text-xl font-bold text-center mb-4"},ce={class:"flex flex-row justify-center"},ue={class:"flex flex-row mt-2"},he={class:"flex flex-row mt-2"},fe={class:"rounded-l border border-r-0 border-slate-400 bg-slate-200 text-center px-2 py-2"},me={class:"h-7 mt-4 flex"},ge={class:"text-sm mt-1"},ye={class:"h-7 mt-4 flex"},ve={class:"text-sm mt-1"},be={key:1,class:"mt-4 flex"},Ce={class:"text-center mb-2 mt-6 italic"},Te={class:"grid grid-cols-1 sm:grid-cols-2 gap-2"};function Ie(e,t,i,r,p,a){const d=b("QuickNav"),l=b("TopMessage"),c=b("font-awesome"),y=b("router-link");return h(),m(L,null,[u(d),u(l),n("section",de,[e.hideBackButton?V("",!0):(h(),m("div",le,[n("h1",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:t[0]||(t[0]=o=>e.cancelBack())},[u(c,{icon:"chevron-left",class:"fa-fw"})])])),t[18]||(t[18]=n("h1",{class:"text-4xl text-center font-light px-4 mb-4"},"What Is Offered",-1)),n("h1",pe,[n("span",null," Offer to "+g(e.offeredToProject?e.projectName:e.offeredToRecipient?e.recipientName:"someone not named"),1)]),f(n("textarea",{"onUpdate:modelValue":t[1]||(t[1]=o=>e.descriptionOfItem=o),class:"block w-full rounded border border-slate-400 mb-2 px-3 py-2",placeholder:"What is offered","data-testId":"itemDescription"},null,512),[[v,e.descriptionOfItem]]),n("div",ce,[n("span",{class:"rounded-l border border-r-0 border-slate-400 bg-slate-200 text-center text-blue-500 px-2 py-2 w-20",onClick:t[2]||(t[2]=o=>e.changeUnitCode())},g(e.libsUtil.UNIT_SHORT[e.unitCode]||e.unitCode),1),n("div",{class:"border border-r-0 border-slate-400 bg-slate-200 px-4 py-2",onClick:t[3]||(t[3]=o=>e.amountInput==="0"?null:e.decrement())},[u(c,{icon:"chevron-left"})]),f(n("input",{"onUpdate:modelValue":t[4]||(t[4]=o=>e.amountInput=o),type:"number",class:"border border-r-0 border-slate-400 px-2 py-2 text-center w-20","data-testId":"inputOfferAmount"},null,512),[[v,e.amountInput]]),n("div",{class:"rounded-r border border-slate-400 bg-slate-200 px-4 py-2",onClick:t[5]||(t[5]=o=>e.increment())},[u(c,{icon:"chevron-right"})])]),n("div",ue,[t[15]||(t[15]=n("span",{class:"rounded-l border border-r-0 border-slate-400 bg-slate-200 text-center px-2 py-2"}," Conditions ",-1)),f(n("textarea",{"onUpdate:modelValue":t[6]||(t[6]=o=>e.descriptionOfCondition=o),class:"w-full border border-slate-400 px-3 py-2 rounded-r",placeholder:"Prerequisites, other people to include, etc."},null,512),[[v,e.descriptionOfCondition]])]),n("div",he,[n("span",fe,g(e.validThroughDateInput?"":"No")+" Expiration ",1),f(n("input",{"onUpdate:modelValue":t[7]||(t[7]=o=>e.validThroughDateInput=o),type:"date",class:"w-full rounded border border-slate-400 px-3 py-2 rounded-r"},null,512),[[v,e.validThroughDateInput]])]),n("div",me,[e.projectId&&!e.offeredToRecipient?f((h(),m("input",{key:0,"onUpdate:modelValue":t[8]||(t[8]=o=>e.offeredToProject=o),type:"checkbox",class:"h-6 w-6 mr-2"},null,512)),[[B,e.offeredToProject]]):(h(),q(c,{key:1,icon:"square",class:"bg-slate-500 text-slate-500 h-5 w-5 px-0.5 py-0.5 mr-2 rounded",onClick:t[9]||(t[9]=o=>e.notifyUserOfProject())})),n("label",ge,g(e.projectId?"This is offered to "+e.projectName:"No project was chosen"),1)]),n("div",ye,[e.recipientDid&&!e.offeredToProject?f((h(),m("input",{key:0,"onUpdate:modelValue":t[10]||(t[10]=o=>e.offeredToRecipient=o),type:"checkbox",class:"h-6 w-6 mr-2"},null,512)),[[B,e.offeredToRecipient]]):(h(),q(c,{key:1,icon:"square",class:"bg-slate-500 text-slate-500 h-5 w-5 px-0.5 py-0.5 mr-2 rounded",onClick:t[11]||(t[11]=o=>e.notifyUserOfRecipient())})),n("label",ve,g(e.recipientDid?"This is offered to "+e.recipientName:"No recipient was chosen."),1)]),e.showGeneralAdvanced?(h(),m("div",be,[u(y,{to:{name:"claim-add-raw",query:{claim:e.constructOfferParam()}},class:"text-blue-500"},{default:W(()=>t[16]||(t[16]=[M(" Edit & Submit Raw ")])),_:1},8,["to"])])):V("",!0),n("p",Ce,[t[17]||(t[17]=M(" Sign & Send to publish to the world ")),u(c,{icon:"circle-info",class:"pl-2 text-blue-500 cursor-pointer",onClick:t[12]||(t[12]=o=>e.explainData())})]),n("div",Te,[n("button",{class:"block w-full text-center text-lg font-bold uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md",onClick:t[13]||(t[13]=(...o)=>e.confirm&&e.confirm(...o))}," Sign & Send "),n("button",{class:"block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md",onClick:t[14]||(t[14]=(...o)=>e.cancel&&e.cancel(...o))}," Cancel ")])])],64)}const Ne=J(C,[["render",Ie]]);export{Ne as default}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/OfferDialog-DDi7ax_Z.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/OfferDialog-DDi7ax_Z.js deleted file mode 100644 index 9fc64de..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/OfferDialog-DDi7ax_Z.js +++ /dev/null @@ -1 +0,0 @@ -var x=Object.defineProperty;var D=(t,e,r)=>e in t?x(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var i=(t,e,r)=>D(t,typeof e!="symbol"?e+"":e,r);import{a1 as I,C as U,V as O,e as $,_ as N,z as g,h as b,m as y,B as v,k as a,o as w,s as C,t as j,j as m,w as S,n as E}from"./main.common-DD7dqhZp.js";import{l as k,as as T,ar as V}from"./index-ryzpKtgI.js";var M=Object.defineProperty,H=Object.getOwnPropertyDescriptor,h=(t,e,r,s)=>{for(var o=s>1?void 0:s?H(e,r):e,p=t.length-1,l;p>=0;p--)(l=t[p])&&(o=(s?l(e,r,o):l(o))||o);return s&&o&&M(e,r,o),o};let u=class extends O{constructor(){super(...arguments);i(this,"$notify");i(this,"projectId");i(this,"projectName");i(this,"activeDid","");i(this,"apiServer","");i(this,"amountInput","0");i(this,"amountUnitCode","HUR");i(this,"description","");i(this,"expirationDateInput","");i(this,"recipientDid","");i(this,"recipientName","");i(this,"visible",!1);i(this,"libsUtil",k)}async open(r,s){try{this.recipientDid=r,this.recipientName=s;const o=await $();this.apiServer=o.apiServer||"",this.activeDid=o.activeDid||""}catch(o){console.error("Error retrieving settings from database:",o),this.$notify({group:"alert",type:"danger",title:"Error",text:o.message||"There was an error retrieving your settings."},-1)}this.visible=!0}close(){this.visible=!1}changeUnitCode(){const r=Object.keys(this.libsUtil.UNIT_SHORT),s=r.indexOf(this.amountUnitCode);this.amountUnitCode=r[(s+1)%r.length]}increment(){this.amountInput=`${(parseFloat(this.amountInput)||0)+1}`}decrement(){this.amountInput=`${Math.max(0,(parseFloat(this.amountInput)||1)-1)}`}cancel(){this.close(),this.eraseValues()}eraseValues(){this.description="",this.amountInput="0",this.amountUnitCode="HUR"}async confirm(){this.close(),this.$notify({group:"alert",type:"toast",text:"Recording the offer...",title:""},1e3),this.recordOffer(this.description,parseFloat(this.amountInput),this.amountUnitCode,this.expirationDateInput).then(()=>{this.description="",this.amountInput="0"})}async recordOffer(r,s,o="HUR",p){var l,c,n;if(!this.activeDid){this.$notify({group:"alert",type:"danger",title:"Error",text:"You must select an identity before you can record an offer."},7e3);return}if(!r&&!s){this.$notify({group:"alert",type:"danger",title:"Error",text:`You must enter a description or some number of ${this.libsUtil.UNIT_LONG[o]}.`},-1);return}try{const d=await T(this.axios,this.apiServer,this.activeDid,r,s,o,"",p,this.recipientDid,this.projectId);if(d.type==="error"||this.isOfferCreationError(d.response)){const f=this.getOfferCreationErrorMessage(d);console.error("Error with offer creation result:",d),this.$notify({group:"alert",type:"danger",title:"Error",text:f||"There was an error creating the offer."},-1)}else this.$notify({group:"alert",type:"success",title:"Success",text:"That offer was recorded."},5e3)}catch(d){console.error("Error with offer recordation caught:",d);const f=d.userMessage||((n=(c=(l=d.response)==null?void 0:l.data)==null?void 0:c.error)==null?void 0:n.message)||"There was an error recording the offer.";this.$notify({group:"alert",type:"danger",title:"Error",text:f},-1)}}isOfferCreationError(r){var s;return r.status!==201||((s=r.data)==null?void 0:s.error)}getOfferCreationErrorMessage(r){var s,o;return V(r)||((s=r.error)==null?void 0:s.userMessage)||((o=r.error)==null?void 0:o.error)}};h([I],u.prototype,"projectId",2);h([I],u.prototype,"projectName",2);u=h([U],u);const R={key:0,class:"dialog-overlay"},F={class:"dialog"},A={class:"flex flex-row mt-2"},B={class:"mt-4 flex justify-center"},P={class:"grid grid-cols-1 sm:grid-cols-2 gap-2"};function Y(t,e,r,s,o,p){const l=g("font-awesome"),c=g("router-link");return t.visible?(v(),b("div",R,[a("div",F,[e[8]||(e[8]=a("h1",{class:"text-xl font-bold text-center mb-4"},"Offer Help",-1)),w(a("input",{"onUpdate:modelValue":e[0]||(e[0]=n=>t.description=n),type:"text","data-testId":"inputDescription",class:"block w-full rounded border border-slate-400 mb-2 px-3 py-2",placeholder:"Description of what is offered"},null,512),[[C,t.description]]),a("div",A,[a("span",{class:"rounded-l border border-r-0 border-slate-400 bg-slate-200 w-1/3 text-center text-blue-500 px-2 py-2",onClick:e[1]||(e[1]=n=>t.changeUnitCode())},j(t.libsUtil.UNIT_SHORT[t.amountUnitCode]),1),t.amountInput!=="0"?(v(),b("div",{key:0,class:"border border-r-0 border-slate-400 bg-slate-200 px-4 py-2",onClick:e[2]||(e[2]=n=>t.decrement())},[m(l,{icon:"chevron-left"})])):y("",!0),w(a("input",{"onUpdate:modelValue":e[3]||(e[3]=n=>t.amountInput=n),"data-testId":"inputOfferAmount",type:"number",class:"w-full border border-r-0 border-slate-400 px-2 py-2 text-center"},null,512),[[C,t.amountInput]]),a("div",{class:"rounded-r border border-slate-400 bg-slate-200 px-4 py-2",onClick:e[4]||(e[4]=n=>t.increment())},[m(l,{icon:"chevron-right"})])]),a("div",B,[a("span",null,[m(c,{to:{name:"offer-details",query:{amountInput:t.amountInput,description:t.description,offererDid:t.activeDid,projectId:t.projectId,projectName:t.projectName,recipientDid:t.recipientDid,recipientName:t.recipientName,unitCode:t.amountUnitCode}},class:"text-blue-500"},{default:S(()=>e[7]||(e[7]=[E(" Conditions & more options... ")])),_:1},8,["to"])])]),e[9]||(e[9]=a("p",{class:"text-center mt-6 mb-2 italic"}," Sign & Send to publish to the world ",-1)),a("div",P,[a("button",{class:"block w-full text-center text-lg font-bold uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md",onClick:e[5]||(e[5]=(...n)=>t.confirm&&t.confirm(...n))}," Sign & Send "),a("button",{class:"block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md",onClick:e[6]||(e[6]=(...n)=>t.cancel&&t.cancel(...n))}," Cancel ")])])])):y("",!0)}const J=N(u,[["render",Y]]);export{J as O}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/OnboardMeetingListView-d6saebIJ.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/OnboardMeetingListView-d6saebIJ.js deleted file mode 100644 index cf54f44..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/OnboardMeetingListView-d6saebIJ.js +++ /dev/null @@ -1 +0,0 @@ -var S=Object.defineProperty;var $=(t,e,s)=>e in t?S(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var r=(t,e,s)=>$(t,typeof e!="symbol"?e+"":e,s);import{V as C,e as N,l as c,G as O,C as E,_ as I,h as g,j as m,k as a,m as x,t as k,p as L,F as P,E as V,o as j,s as F,Y as R,z as f,B as p}from"./main.common-DD7dqhZp.js";import{Q as T}from"./QuickNav-C8jPGtUY.js";import{T as Y}from"./TopMessage-ZWDDjman.js";import{g as u,e as v,ar as y,aw as _}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var A=Object.getOwnPropertyDescriptor,B=(t,e,s,n)=>{for(var l=n>1?void 0:n?A(e,s):e,d=t.length-1,o;d>=0;d--)(o=t[d])&&(l=o(l)||l);return l};let b=class extends C{constructor(){super(...arguments);r(this,"$notify");r(this,"$router");r(this,"activeDid","");r(this,"apiServer","");r(this,"attendingMeeting",null);r(this,"firstName","");r(this,"isLoading",!1);r(this,"isRegistered",!1);r(this,"meetings",[]);r(this,"password","");r(this,"selectedMeeting",null);r(this,"showPasswordDialog",!1)}async created(){const s=await N();this.activeDid=s.activeDid||"",this.apiServer=s.apiServer||"",this.firstName=s.firstName||"",this.isRegistered=!!s.isRegistered,await this.fetchMeetings()}async fetchMeetings(){var s,n,l;this.isLoading=!0;try{const d=await u(this.activeDid),o=await this.axios.get(this.apiServer+"/api/partner/groupOnboardMember",{headers:d});if((s=o.data)!=null&&s.data){const i=o.data.data.groupId,M=await u(this.activeDid),D=await this.axios.get(this.apiServer+"/api/partner/groupOnboard/"+i,{headers:M});if((n=D.data)!=null&&n.data){this.attendingMeeting=D.data.data;return}else c("Error fetching meeting for user after saying they are in one.",!0)}const w=await u(this.activeDid),h=await this.axios.get(this.apiServer+"/api/partner/groupsOnboarding",{headers:w});(l=h.data)!=null&&l.data&&(this.meetings=h.data.data)}catch(d){c("Error fetching meetings: "+v(d),!0),this.$notify({group:"alert",type:"danger",title:"Error",text:y(d)||"Failed to fetch meetings."},5e3)}finally{this.isLoading=!1}}promptPassword(s){this.password="",this.selectedMeeting=s,this.showPasswordDialog=!0,O(()=>{const n=this.$refs.passwordInput;n&&n.focus()})}cancelPasswordDialog(){this.password="",this.selectedMeeting=null,this.showPasswordDialog=!1}async submitPassword(){if(!this.selectedMeeting){c("No meeting selected when prompting for password, which should never happen.",!0);return}try{const s={name:this.firstName,did:this.activeDid,isRegistered:this.isRegistered},n=JSON.stringify(s),l=await _(n,this.password),d=await u(this.activeDid),o=await this.axios.post(this.apiServer+"/api/partner/groupOnboardMember",{groupId:this.selectedMeeting.groupId,content:l},{headers:d});if(o.data&&o.data.success)this.$router.push({name:"onboard-meeting-members",params:{groupId:this.selectedMeeting.groupId.toString()},query:{password:this.password,memberId:o.data.memberId}}),this.cancelPasswordDialog();else throw{response:o}}catch(s){c("Error joining meeting: "+v(s),!0),this.$notify({group:"alert",type:"danger",title:"Error",text:y(s)||"You failed to join the meeting."},5e3)}}async leaveMeeting(){this.$notify({group:"modal",type:"confirm",title:"Leave Meeting",text:"Are you sure you want to leave this meeting?",onYes:async()=>{try{const s=await u(this.activeDid);await this.axios.delete(this.apiServer+"/api/partner/groupOnboardMember",{headers:s}),this.attendingMeeting=null,await this.fetchMeetings(),this.$notify({group:"alert",type:"success",title:"Success",text:"You left the meeting."},5e3)}catch(s){c("Error leaving meeting: "+v(s),!0),this.$notify({group:"alert",type:"danger",title:"Error",text:y(s)||"You failed to leave the meeting."},5e3)}}},-1)}};b=B([E({components:{QuickNav:T,TopMessage:Y}})],b);const Q={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},H={key:0,class:"flex justify-center items-center py-8"},K={key:1},U={class:"flex justify-between items-center"},q={class:"text-xl font-medium"},z={key:2,class:"space-y-4"},G=["onClick"],J={class:"text-xl font-medium"},W={key:0,class:"text-center text-gray-500 py-8"},X={key:3,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4"},Z={class:"bg-white rounded-lg p-6 max-w-sm w-full"},ee={class:"flex justify-end space-x-4"};function te(t,e,s,n,l,d){const o=f("QuickNav"),w=f("TopMessage"),h=f("font-awesome");return p(),g(P,null,[m(o,{selected:"Contacts"}),m(w),a("section",Q,[e[8]||(e[8]=a("h1",{id:"ViewHeading",class:"text-4xl text-center font-light mb-8"}," Onboarding Meetings ",-1)),t.isLoading?(p(),g("div",H,[m(h,{icon:"spinner",class:"fa-spin-pulse"})])):t.attendingMeeting?(p(),g("div",K,[e[6]||(e[6]=a("p",null,"You are in this meeting.",-1)),a("div",{class:"p-4 bg-white rounded-lg shadow hover:shadow-md transition-shadow cursor-pointer",onClick:e[1]||(e[1]=i=>t.promptPassword(t.attendingMeeting))},[a("div",U,[a("h2",q,k(t.attendingMeeting.name),1),a("button",{class:"text-red-600 hover:text-red-700 p-2",title:"Leave Meeting",onClick:e[0]||(e[0]=L((...i)=>t.leaveMeeting&&t.leaveMeeting(...i),["stop"]))},[m(h,{icon:"right-from-bracket"})])])])])):(p(),g("div",z,[(p(!0),g(P,null,V(t.meetings,i=>(p(),g("div",{key:i.groupId,class:"p-4 bg-white rounded-lg shadow hover:shadow-md transition-shadow cursor-pointer",onClick:M=>t.promptPassword(i)},[a("h2",J,k(i.name),1)],8,G))),128)),t.meetings.length===0?(p(),g("p",W," No onboarding meetings available ")):x("",!0)])),t.showPasswordDialog?(p(),g("div",X,[a("div",Z,[e[7]||(e[7]=a("h3",{class:"text-lg font-medium mb-4"},"Enter Meeting Password",-1)),j(a("input",{ref:"passwordInput","onUpdate:modelValue":e[2]||(e[2]=i=>t.password=i),type:"text",class:"w-full px-3 py-2 border rounded-md mb-4",placeholder:"Enter password",onKeyup:e[3]||(e[3]=R((...i)=>t.submitPassword&&t.submitPassword(...i),["enter"]))},null,544),[[F,t.password]]),a("div",ee,[a("button",{class:"px-4 py-2 bg-gray-200 rounded hover:bg-gray-300",onClick:e[4]||(e[4]=(...i)=>t.cancelPasswordDialog&&t.cancelPasswordDialog(...i))}," Cancel "),a("button",{class:"px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700",onClick:e[5]||(e[5]=(...i)=>t.submitPassword&&t.submitPassword(...i))}," Submit ")])])])):x("",!0)])],64)}const pe=I(b,[["render",te]]);export{pe as default}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/OnboardMeetingMembersView-BWzSX9QC.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/OnboardMeetingMembersView-BWzSX9QC.js deleted file mode 100644 index ef1f71d..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/OnboardMeetingMembersView-BWzSX9QC.js +++ /dev/null @@ -1 +0,0 @@ -var N=Object.defineProperty;var _=(r,t,e)=>t in r?N(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var o=(r,t,e)=>_(r,typeof t!="symbol"?t+"":t,e);import{V as k,e as x,l as h,C as S,_ as $,h as l,j as m,k as c,y as R,t as T,F as I,z as g,B as p}from"./main.common-DD7dqhZp.js";import{Q as O}from"./QuickNav-C8jPGtUY.js";import{T as L}from"./TopMessage-ZWDDjman.js";import{M as E}from"./MembersList-BOHRjd7y.js";import{U as V}from"./UserNameDialog-BV49F4GW.js";import{R as C,g as u,ar as f,e as b,aw as w}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var F=Object.getOwnPropertyDescriptor,A=(r,t,e,i)=>{for(var s=i>1?void 0:i?F(t,e):t,n=r.length-1,a;n>=0;n--)(a=r[n])&&(s=a(s)||s);return s};let M=class extends k{constructor(){super(...arguments);o(this,"activeDid","");o(this,"apiServer","");o(this,"errorMessage","");o(this,"firstName","");o(this,"isRegistered",!1);o(this,"isLoading",!0);o(this,"$route");o(this,"$router");o(this,"userNameDialog")}get groupId(){return this.$route.params.groupId||""}get password(){return this.$route.query.password||""}async created(){var i;if(!this.groupId){this.errorMessage="The group info is missing. Go back and try again.";return}if(!this.password){this.errorMessage="The password is missing. Go back and try again.";return}const e=await x();this.activeDid=e.activeDid||"",this.apiServer=e.apiServer||"",this.firstName=e.firstName||"",this.isRegistered=e.isRegistered||!1;try{this.activeDid||(this.activeDid=await C(),this.isRegistered=!1);const s=await u(this.activeDid),a=(i=(await this.axios.get(`${this.apiServer}/api/partner/groupOnboardMember`,{headers:s})).data)==null?void 0:i.data;a?String(a.groupId)!==this.groupId?(this.errorMessage="You are already in a different meeting. Reload or go back and try again.",this.isLoading=!1):this.firstName?await this.updateMemberInMeeting(this.firstName):this.$refs.userNameDialog.open(this.updateMemberInMeeting):this.firstName?await this.addMemberToMeeting(this.firstName):this.$refs.userNameDialog.open(this.addMemberToMeeting)}catch(s){this.errorMessage=f(s)||"There was an error checking for that meeting. Reload or go back and try again.",h("Error checking meeting: "+b(s),!0),this.isLoading=!1}}async addMemberToMeeting(e){e!=null&&(this.firstName=e);const i={name:this.firstName,did:this.activeDid,isRegistered:this.isRegistered},s=JSON.stringify(i),n=await w(s,this.password),a=await u(this.activeDid);try{await this.axios.post(`${this.apiServer}/api/partner/groupOnboardMember`,{groupId:this.groupId,content:n},{headers:a})}catch(d){h("Error adding member to meeting: "+b(d),!0),this.errorMessage=f(d)||"You're not in a meeting and couldn't be added to this one. Reload or go back and try again."}this.isLoading=!1}async updateMemberInMeeting(e){e!=null&&(this.firstName=e);const i={name:this.firstName,did:this.activeDid,isRegistered:this.isRegistered},s=JSON.stringify(i),n=await w(s,this.password),a=await u(this.activeDid);try{await this.axios.put(`${this.apiServer}/api/partner/groupOnboardMember`,{content:n},{headers:a})}catch(d){h("Error updating member in meeting: "+b(d),!0),this.errorMessage=f(d)||"There was an error updating your name. Reload or go back and try again."}this.isLoading=!1}handleError(e){this.errorMessage=e}};M=A([S({components:{QuickNav:O,TopMessage:L,MembersList:E,UserNameDialog:V}})],M);const B={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},U={key:0,class:"mt-16 text-center text-4xl bg-slate-400 text-white w-14 py-2.5 rounded-full mx-auto"},Q={key:1},z={class:"text-center text-red-600 py-8"};function j(r,t,e,i,s,n){const a=g("QuickNav"),d=g("TopMessage"),v=g("font-awesome"),y=g("MembersList"),D=g("UserNameDialog");return p(),l(I,null,[m(a,{selected:"Contacts"}),m(d),c("section",B,[t[1]||(t[1]=c("h1",{id:"ViewHeading",class:"text-4xl text-center font-light mb-8"}," Meeting Members ",-1)),r.isLoading?(p(),l("div",U,[m(v,{icon:"spinner",class:"fa-spin-pulse"})])):r.errorMessage?(p(),l("div",Q,[c("div",z,T(r.errorMessage),1),t[0]||(t[0]=c("div",{class:"text-center"}," For authorization, wait for your meeting organizer to approve you. ",-1))])):(p(),R(y,{key:2,password:r.password,onError:r.handleError},null,8,["password","onError"]))]),m(D,{ref:"userNameDialog","callback-on-cancel":!0,"sharing-explanation":"This is encrypted and shared only with people in this meeting."},null,512)],64)}const te=$(M,[["render",j]]);export{te as default}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/OnboardMeetingSetupView-BbhzMP8b.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/OnboardMeetingSetupView-BbhzMP8b.js deleted file mode 100644 index 3809b5d..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/OnboardMeetingSetupView-BbhzMP8b.js +++ /dev/null @@ -1 +0,0 @@ -var N=Object.defineProperty;var S=(t,e,r)=>e in t?N(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var d=(t,e,r)=>S(t,typeof e!="symbol"?e+"":e,r);import{V as I,e as $,l as D,C as T,_ as F,h as g,j as p,k as n,m,t as w,x as L,n as v,p as A,o as M,s as b,y as V,w as P,F as H,z as c,B as u}from"./main.common-DD7dqhZp.js";import{Q as R}from"./QuickNav-C8jPGtUY.js";import{T as j}from"./TopMessage-ZWDDjman.js";import{M as B}from"./MembersList-BOHRjd7y.js";import{g as y,aw as U,e as C,ar as x}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var q=Object.getOwnPropertyDescriptor,Q=(t,e,r,o)=>{for(var i=o>1?void 0:o?q(e,r):e,l=t.length-1,a;l>=0;l--)(a=t[l])&&(i=a(i)||i);return i};let O=class extends I{constructor(){super(...arguments);d(this,"$notify");d(this,"currentMeeting",null);d(this,"newOrUpdatedMeeting",null);d(this,"activeDid","");d(this,"apiServer","");d(this,"isDeleting",!1);d(this,"isLoading",!0);d(this,"isRegistered",!1);d(this,"showDeleteConfirm",!1);d(this,"fullName","")}get minDateTime(){const e=new Date;return e.setMinutes(e.getMinutes()+5),this.formatDateForInput(e)}async created(){const e=await $();this.activeDid=e.activeDid||"",this.apiServer=e.apiServer||"",this.fullName=e.firstName||"",this.isRegistered=!!e.isRegistered,await this.fetchCurrentMeeting(),this.isLoading=!1}isInCreateMode(){return this.newOrUpdatedMeeting!=null&&this.currentMeeting==null}isInEditOrCreateMode(){return this.newOrUpdatedMeeting!=null}getDefaultExpirationTime(){const e=new Date;return e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),e.setHours(e.getHours()+1),e.setHours(e.getHours()+2),this.formatDateForInput(e)}formatDateForInput(e){const r=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),i=String(e.getDate()).padStart(2,"0"),l=String(e.getHours()).padStart(2,"0"),a=String(e.getMinutes()).padStart(2,"0");return`${r}-${o}-${i}T${l}:${a}`}blankMeeting(){var e;return{name:"",expiresAt:this.getDefaultExpirationTime(),userFullName:this.fullName,password:((e=this.currentMeeting)==null?void 0:e.password)||""}}async fetchCurrentMeeting(){var e,r;try{const o=await y(this.activeDid),i=await this.axios.get(this.apiServer+"/api/partner/groupOnboard",{headers:o});(e=i==null?void 0:i.data)!=null&&e.data?this.currentMeeting={...i.data.data,userFullName:this.fullName,password:((r=this.currentMeeting)==null?void 0:r.password)||""}:this.newOrUpdatedMeeting=this.blankMeeting()}catch{this.newOrUpdatedMeeting=this.blankMeeting()}}async createMeeting(){this.isLoading=!0;try{if(!this.newOrUpdatedMeeting)throw Error("There was no meeting data to create. We should never get here.");const e=new Date(this.newOrUpdatedMeeting.expiresAt);if(e<=new Date){this.$notify({group:"alert",type:"warning",title:"Invalid Time",text:"Select a future time for the meeting expiration."},5e3);return}if(!this.newOrUpdatedMeeting.userFullName){this.$notify({group:"alert",type:"warning",title:"Invalid Name",text:"Please enter your name."},5e3);return}if(!this.newOrUpdatedMeeting.password){this.$notify({group:"alert",type:"warning",title:"Invalid Password",text:"Please enter a password."},5e3);return}const o={name:this.newOrUpdatedMeeting.userFullName,did:this.activeDid,isRegistered:this.isRegistered},i=await U(JSON.stringify(o),this.newOrUpdatedMeeting.password),l=await y(this.activeDid),a=await this.axios.post(this.apiServer+"/api/partner/groupOnboard",{name:this.newOrUpdatedMeeting.name,expiresAt:e.toISOString(),content:i},{headers:l});if(a.data&&a.data.success)this.currentMeeting={...this.newOrUpdatedMeeting,groupId:a.data.success.groupId},this.newOrUpdatedMeeting=null,this.$notify({group:"alert",type:"success",title:"Success",text:"Meeting created."},3e3);else throw{response:a}}catch(e){D("Error creating meeting: "+C(e),!0);const r=x(e);this.$notify({group:"alert",type:"danger",title:"Error",text:r||"Failed to create meeting. Try reloading or submitting again."},5e3)}finally{this.isLoading=!1}}formatExpirationTime(e){const r=new Date(e),o=new Date,i=Math.round((r.getTime()-o.getTime())/(1e3*60*60));return i<0?"Expired":i<1?"Less than an hour":i===1?"1 hour":`${i} hours`}confirmDelete(){this.showDeleteConfirm=!0}async deleteMeeting(){this.isDeleting=!0;try{const e=await y(this.activeDid);await this.axios.delete(this.apiServer+"/api/partner/groupOnboard",{headers:e}),this.currentMeeting=null,this.newOrUpdatedMeeting=this.blankMeeting(),this.showDeleteConfirm=!1,this.$notify({group:"alert",type:"success",title:"Success",text:"Meeting deleted successfully."},3e3)}catch(e){console.error("Error deleting meeting:",e),this.$notify({group:"alert",type:"danger",title:"Error",text:x(e)||"Failed to delete meeting."},5e3)}finally{this.isDeleting=!1}}startEditing(){if(this.currentMeeting){const e=new Date(this.currentMeeting.expiresAt);this.newOrUpdatedMeeting={name:this.currentMeeting.name,expiresAt:this.formatDateForInput(e),userFullName:this.currentMeeting.userFullName||"",password:this.currentMeeting.password||""}}else console.error("There is no current meeting to edit. We should never get here.")}cancelEditing(){this.newOrUpdatedMeeting=null}async updateMeeting(){var e;if(this.isLoading=!0,!this.newOrUpdatedMeeting)throw Error("There was no meeting data to update.");try{const r=new Date(this.newOrUpdatedMeeting.expiresAt);if(r<=new Date){this.$notify({group:"alert",type:"warning",title:"Invalid Time",text:"Select a future time for the meeting expiration."},5e3);return}if(!this.newOrUpdatedMeeting.userFullName){this.$notify({group:"alert",type:"warning",title:"Invalid Name",text:"Please enter your name."},5e3);return}if(!this.newOrUpdatedMeeting.password){this.$notify({group:"alert",type:"warning",title:"Invalid Password",text:"Please enter a password."},5e3);return}const i={name:this.newOrUpdatedMeeting.userFullName,did:this.activeDid,isRegistered:this.isRegistered},l=await U(JSON.stringify(i),this.newOrUpdatedMeeting.password),a=await y(this.activeDid),h=await this.axios.put(this.apiServer+"/api/partner/groupOnboard",{name:this.newOrUpdatedMeeting.name,expiresAt:r.toISOString(),content:l},{headers:a});if(h.data&&h.data.success)this.currentMeeting={...this.newOrUpdatedMeeting,groupId:((e=this.currentMeeting)==null?void 0:e.groupId)||-1},this.newOrUpdatedMeeting=null;else throw{response:h}}catch(r){D("Error updating meeting: "+C(r),!0);const o=x(r);this.$notify({group:"alert",type:"danger",title:"Error",text:o||"Failed to update meeting. Try reloading or submitting again."},5e3)}finally{this.isLoading=!1}}onboardMeetingMembersLink(){var e,r;return this.currentMeeting?`/onboard-meeting-members/${(e=this.currentMeeting)==null?void 0:e.groupId}?password=${encodeURIComponent(((r=this.currentMeeting)==null?void 0:r.password)||"")}`:""}handleMembersError(e){this.$notify({group:"alert",type:"danger",title:"Error",text:e},5e3)}};O=Q([T({components:{QuickNav:R,TopMessage:j,MembersList:B}})],O);const Y={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},z={key:0,class:"mt-8 p-4 border rounded-lg bg-white shadow"},J={class:"flex items-center justify-between mb-4"},W={class:"flex items-center"},G={class:"sr-only"},K=["disabled"],X={class:"sr-only"},Z={class:"space-y-2"},_={key:0,class:"mt-4"},ee={key:1,class:"text-red-600"},te={key:1,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4"},ne={class:"bg-white rounded-lg p-6 max-w-sm w-full"},re={class:"flex justify-between space-x-4"},ie={key:2,class:"mt-8"},se={class:"text-2xl mb-4"},oe=["min"],ae=["disabled"],de={key:3,class:"mt-8 p-4 border rounded-lg bg-white shadow"},le={key:4},ue={class:"flex justify-center items-center h-full"};function ge(t,e,r,o,i,l){const a=c("QuickNav"),h=c("TopMessage"),f=c("font-awesome"),k=c("router-link"),E=c("MembersList");return u(),g(H,null,[p(a,{selected:"Contacts"}),p(h),n("section",Y,[e[22]||(e[22]=n("h1",{id:"ViewHeading",class:"text-4xl text-center font-light"}," Onboarding Meeting ",-1)),!t.isLoading&&t.currentMeeting!=null&&!t.isInEditOrCreateMode()?(u(),g("div",z,[n("div",J,[n("div",W,[e[10]||(e[10]=n("h2",{class:"text-2xl"},"Current Meeting",-1)),n("button",{class:"mb-4 text-blue-600 hover:text-blue-800 transition-colors duration-200 ml-2",title:"Edit Meeting",onClick:e[0]||(e[0]=(...s)=>t.startEditing&&t.startEditing(...s))},[p(f,{icon:"pen",class:"fa-fw"}),n("span",G,w(t.isInCreateMode()?"Create Meeting":"Edit Meeting"),1)])]),n("button",{class:L(["text-red-600 hover:text-red-800 transition-colors duration-200",{"opacity-50 cursor-not-allowed":t.isDeleting}]),disabled:t.isDeleting,title:"Delete Meeting",onClick:e[1]||(e[1]=(...s)=>t.confirmDelete&&t.confirmDelete(...s))},[p(f,{icon:"trash-can",class:"fa-fw"}),n("span",X,w(t.isDeleting?"Deleting...":"Delete Meeting"),1)],10,K)]),n("div",Z,[n("p",null,[e[11]||(e[11]=n("strong",null,"Name:",-1)),v(" "+w(t.currentMeeting.name),1)]),n("p",null,[e[12]||(e[12]=n("strong",null,"Expires:",-1)),v(" "+w(t.formatExpirationTime(t.currentMeeting.expiresAt)),1)]),t.currentMeeting.password?(u(),g("div",_,e[13]||(e[13]=[n("p",{class:"text-gray-600"}," Share the password with the people you want to onboard. ",-1)]))):(u(),g("div",ee," Your copy of the password is not saved. Edit the meeting, or delete it and create a new meeting. "))])])):m("",!0),t.showDeleteConfirm?(u(),g("div",te,[n("div",ne,[e[14]||(e[14]=n("h3",{class:"text-lg font-medium mb-4"},"Delete Meeting?",-1)),e[15]||(e[15]=n("p",{class:"text-gray-600 mb-6"}," This action cannot be undone. Are you sure you want to delete this meeting? ",-1)),n("div",re,[n("button",{class:"px-4 py-2 bg-slate-500 text-white rounded hover:bg-slate-700",onClick:e[2]||(e[2]=s=>t.showDeleteConfirm=!1)}," Cancel "),n("button",{class:"px-4 py-2 bg-red-600 text-white rounded hover:bg-red-700",onClick:e[3]||(e[3]=(...s)=>t.deleteMeeting&&t.deleteMeeting(...s))}," Delete ")])])])):m("",!0),!t.isLoading&&t.isInEditOrCreateMode()&&t.newOrUpdatedMeeting!=null?(u(),g("div",ie,[n("h2",se,w(t.isInCreateMode()?"Create New Meeting":"Edit Meeting"),1),n("form",{class:"space-y-4",onSubmit:e[9]||(e[9]=A(s=>t.isInCreateMode()?t.createMeeting():t.updateMeeting(),["prevent"]))},[n("div",null,[e[16]||(e[16]=n("label",{for:"meetingName",class:"block text-sm font-medium text-gray-700"},"Meeting Name",-1)),M(n("input",{id:"meetingName","onUpdate:modelValue":e[4]||(e[4]=s=>t.newOrUpdatedMeeting.name=s),type:"text",required:"",class:"mt-1 block w-full rounded-md border border-gray-300 px-3 py-2 shadow-sm focus:border-blue-500 focus:outline-none",placeholder:"Enter meeting name"},null,512),[[b,t.newOrUpdatedMeeting.name]])]),n("div",null,[e[17]||(e[17]=n("label",{for:"expirationTime",class:"block text-sm font-medium text-gray-700"},"Meeting Expiration Time",-1)),M(n("input",{id:"expirationTime","onUpdate:modelValue":e[5]||(e[5]=s=>t.newOrUpdatedMeeting.expiresAt=s),type:"datetime-local",required:"",min:t.minDateTime,class:"mt-1 block w-full rounded-md border border-gray-300 px-3 py-2 shadow-sm focus:border-blue-500 focus:outline-none"},null,8,oe),[[b,t.newOrUpdatedMeeting.expiresAt]])]),n("div",null,[e[18]||(e[18]=n("label",{for:"password",class:"block text-sm font-medium text-gray-700"},"Meeting Password",-1)),M(n("input",{id:"password","onUpdate:modelValue":e[6]||(e[6]=s=>t.newOrUpdatedMeeting.password=s),type:"text",required:"",class:"mt-1 block w-full rounded-md border border-gray-300 px-3 py-2 shadow-sm focus:border-blue-500 focus:outline-none",placeholder:"Enter meeting password"},null,512),[[b,t.newOrUpdatedMeeting.password]])]),n("div",null,[e[19]||(e[19]=n("label",{for:"userName",class:"block text-sm font-medium text-gray-700"},"Your Name",-1)),M(n("input",{id:"userName","onUpdate:modelValue":e[7]||(e[7]=s=>t.newOrUpdatedMeeting.userFullName=s),type:"text",required:"",class:"mt-1 block w-full rounded-md border border-gray-300 px-3 py-2 shadow-sm focus:border-blue-500 focus:outline-none",placeholder:"Your name"},null,512),[[b,t.newOrUpdatedMeeting.userFullName]])]),n("button",{type:"submit",class:"w-full bg-gradient-to-b from-green-400 to-green-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-4 py-2 rounded-md hover:from-green-500 hover:to-green-800",disabled:t.isLoading},w(t.isLoading?t.isInCreateMode()?"Creating...":"Updating...":t.isInCreateMode()?"Create Meeting":"Update Meeting"),9,ae),t.isInEditOrCreateMode()?(u(),g("button",{key:0,type:"button",class:"w-full bg-slate-500 text-white px-4 py-2 rounded-md hover:bg-slate-600",onClick:e[8]||(e[8]=(...s)=>t.cancelEditing&&t.cancelEditing(...s))}," Cancel ")):m("",!0)],32)])):m("",!0),!t.isLoading&&t.currentMeeting!=null&&t.currentMeeting.password?(u(),g("div",de,[e[21]||(e[21]=n("div",{class:"flex items-center justify-between mb-4"},[n("h2",{class:"text-2xl"},"Meeting Members")],-1)),t.currentMeeting.password?(u(),V(k,{key:0,to:t.onboardMeetingMembersLink(),class:"inline-block text-blue-600",target:"_blank"},{default:P(()=>[e[20]||(e[20]=v(" • Open shortcut page for members ")),p(f,{icon:"external-link"})]),_:1},8,["to"])):m("",!0),p(E,{password:t.currentMeeting.password||"","show-organizer-tools":!0,class:"mt-4",onError:t.handleMembersError},null,8,["password","onError"])])):t.isLoading?(u(),g("div",le,[n("div",ue,[p(f,{icon:"spinner",class:"fa-spin-pulse"})])])):m("",!0)])],64)}const ve=F(O,[["render",ge]]);export{ve as default}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/OnboardingDialog-DBDPRnmU.css b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/OnboardingDialog-DBDPRnmU.css deleted file mode 100644 index fff4c2b..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/OnboardingDialog-DBDPRnmU.css +++ /dev/null @@ -1 +0,0 @@ -.dialog-overlay{z-index:40;position:fixed;top:0;left:0;right:0;bottom:0;background-color:#00000080;display:flex;justify-content:center;align-items:center;padding:1.5rem}.dialog{background-color:#fff;padding:1rem;border-radius:.5rem;width:100%;max-width:500px} diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/OnboardingDialog-DKHXNqS_.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/OnboardingDialog-DKHXNqS_.js deleted file mode 100644 index 35384ac..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/OnboardingDialog-DKHXNqS_.js +++ /dev/null @@ -1 +0,0 @@ -var w=Object.defineProperty;var c=(o,t,i)=>t in o?w(o,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):o[t]=i;var r=(o,t,i)=>c(o,typeof t!="symbol"?t+"":t,i);import{C as v,V as x,e as k,d as C,u as y,_ as O,z as $,h as g,m,B as p,k as e,n as s,j as l,t as D}from"./main.common-DD7dqhZp.js";import{$ as h}from"./index-ryzpKtgI.js";var N=Object.getOwnPropertyDescriptor,T=(o,t,i,a)=>{for(var d=a>1?void 0:a?N(t,i):t,b=o.length-1,n;b>=0;b--)(n=o[b])&&(d=n(d)||d);return d};let f=class extends x{constructor(){super(...arguments);r(this,"$notify");r(this,"$router");r(this,"activeDid","");r(this,"firstContactName",null);r(this,"givenName","");r(this,"isRegistered",!1);r(this,"numContacts",0);r(this,"page",h.Home);r(this,"visible",!1)}async open(i){this.page=i;const a=await k();this.activeDid=a.activeDid||"",this.isRegistered=!!a.isRegistered;const d=await C.contacts.toArray();this.numContacts=d.length,this.numContacts>0&&(this.firstContactName=d[0].name),this.visible=!0,this.page===h.Create&&await y(this.activeDid,{finishedOnboarding:!0})}async onClickClose(i,a){this.visible=!1,i&&(await y(this.activeDid,{finishedOnboarding:!0}),a&&this.$router.push({name:"home"}))}};f=T([v({computed:{OnboardPage(){return h}},components:{OnboardPage:h}})],f);const P={key:0,class:"dialog-overlay"},S={key:0,class:"dialog"},A={class:"text-xl font-bold text-center mb-4 relative"},I={key:0,class:"mt-4"},j={key:0},V={class:"bg-green-600 text-white rounded-full"},_={key:1,class:"mt-4"},B={class:"mt-4 flex items-center"},F={class:"mt-8"},H={class:"grid grid-cols-1 sm:grid-cols-2 gap-2"},R={key:1,class:"dialog"},Y={class:"text-xl font-bold text-center mb-4 relative"},z={class:"mt-4 flex items-center"},E={class:"mt-8"},W={class:"grid grid-cols-1 sm:grid-cols-2 gap-2"},G={key:2,class:"dialog"},L={class:"text-xl font-bold text-center mb-4 relative"},M={class:"relative"},q={class:"bg-green-600 text-white rounded-full"},J={class:"mt-4 flex items-center"},K={class:"mt-4"},Q={class:"mt-8"},U={class:"grid grid-cols-1 sm:grid-cols-2 gap-2"};function X(o,t,i,a,d,b){const n=$("font-awesome");return o.visible?(p(),g("div",P,[o.page===o.OnboardPage.Home?(p(),g("div",S,[e("h1",A,[t[9]||(t[9]=s(" Welcome to Time Safari ")),t[10]||(t[10]=e("br",null,null,-1)),t[11]||(t[11]=s(" - Showcasing Gratitude & Magnifying Time ")),e("div",{class:"text-lg text-center leading-none absolute right-0 -top-1",onClick:t[0]||(t[0]=u=>o.onClickClose(!0))},[l(n,{icon:"xmark",class:"w-[1em]"})])]),o.isRegistered?(p(),g("p",I,[t[12]||(t[12]=s(" You can now log things that you've seen: ")),o.numContacts>0?(p(),g("span",j," click on any name (like "+D(o.firstContactName)+") or ",1)):m("",!0),t[13]||(t[13]=s(" click on the ")),e("span",V,[l(n,{icon:"plus",class:"fa-fw"})]),t[14]||(t[14]=s(" button to express your appreciation for... whatever -- maybe thanks for showing you all these fascinating stories of ")),t[15]||(t[15]=e("em",null,"gratitude",-1)),t[16]||(t[16]=s(". "))])):(p(),g("p",_," The feed underneath this pop-up shows the latest gifts that others have recognized. Once someone registers you, you can log your appreciation, too. ")),t[19]||(t[19]=e("p",{class:"mt-4"}," The more you illuminate cool things people are doing, the more you attract people to work with you. ",-1)),e("p",B,[t[17]||(t[17]=s(" The ")),l(n,{icon:"house-chimney",class:"ml-1 mr-1 text-lg text-white bg-slate-400 px-2 py-2 rounded"}),t[18]||(t[18]=s(" button below brings you back to this feed screen. "))]),e("div",F,[e("div",H,[e("button",{type:"button","data-testId":"closeOnboardingAndFinish",class:"block w-full text-center text-md bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md mb-2",onClick:t[1]||(t[1]=u=>o.onClickClose(!0))}," That's enough help, thanks. "),e("button",{type:"button",class:"block w-full text-center text-md bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md mb-2",onClick:t[2]||(t[2]=u=>o.$router.push({name:"discover"}))}," Show me more! ")])]),t[20]||(t[20]=e("p",{class:"mt-4 flex items-center"},[s(" To see these instructions and more, click above on "),e("span",{class:"ml-1 mr-1 text-xs uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-1 rounded-md"}," Help ")],-1))])):m("",!0),o.page===o.OnboardPage.Discover?(p(),g("div",R,[e("h1",Y,[t[21]||(t[21]=s(" Offer to Interesting Events & People ")),e("div",{class:"text-lg text-center leading-none absolute right-0 -top-1",onClick:t[3]||(t[3]=u=>o.onClickClose(!0))},[l(n,{icon:"xmark",class:"w-[1em]"})])]),t[24]||(t[24]=e("p",null," Once you've seen things that others have given or done, you may find ways you want to contribute, too. It turns out others have proposed activities together, and this page is where you find projects. ",-1)),t[25]||(t[25]=e("p",{class:"mt-4"},' Search for a topic, or search around your neighborhod under "Nearby". ',-1)),t[26]||(t[26]=e("p",{class:"mt-4"}," When you find some that seem interesting, you can offer your help. You are welcome to make your offer conditional, for example if they get 2 other people to help besides you. ",-1)),e("p",z,[t[22]||(t[22]=s(" The ")),l(n,{icon:"magnifying-glass",class:"ml-1 mr-1 text-lg text-white bg-slate-400 px-2 py-2 rounded"}),t[23]||(t[23]=s(" button below brings you to this discovery screen. "))]),e("div",E,[e("div",W,[e("button",{type:"button","data-testId":"closeOnboardingAndFinish",class:"block w-full text-center text-md bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md mb-2",onClick:t[4]||(t[4]=u=>o.onClickClose(!0))}," No more help, thanks. "),e("button",{type:"button",class:"block w-full text-center text-md bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md mb-2",onClick:t[5]||(t[5]=u=>o.$router.push({name:"projects"}))}," Show me even more. ")])])])):m("",!0),o.page===o.OnboardPage.Create?(p(),g("div",G,[e("h1",L,[t[27]||(t[27]=s(" Fish for Others with Your Projects ")),e("div",{class:"text-lg text-center leading-none absolute right-0 -top-1",onClick:t[6]||(t[6]=u=>o.onClickClose(!0))},[l(n,{icon:"xmark",class:"w-[1em]"})])]),e("p",M,[t[28]||(t[28]=s(" Now you can take a turn: click on the ")),e("span",q,[l(n,{icon:"plus",class:"fa-fw"})]),t[29]||(t[29]=s(" button to throw out projects of your own... anything you'd like to see happen. If your first idea doesn't catch anyone, try, try again... and let others know that this is a good place to find help. "))]),e("p",J,[t[30]||(t[30]=s(" The ")),l(n,{icon:"hand",class:"ml-1 mr-1 text-lg text-white bg-slate-400 px-2 py-2 rounded"}),t[31]||(t[31]=s(" button below brings you here to see your ideas. "))]),e("p",K,[t[32]||(t[32]=s(" By the way, one good way to get to know your neighbors and their interests is to offer time directly to them. You can do this on the contacts screen ")),l(n,{icon:"users",class:"text-slate-500"}),t[33]||(t[33]=s(" which is a great way to get to know a neighbor's interests. "))]),e("div",Q,[e("div",U,[e("button",{type:"button","data-testId":"closeOnboardingAndFinish",class:"block w-full text-center text-md bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md mb-2",onClick:t[7]||(t[7]=u=>o.onClickClose(!0,!0))},t[34]||(t[34]=[s(" Let's go! "),e("br",null,null,-1),s(" See & record gratitude. ")])),e("button",{type:"button",class:"block w-full text-center text-md bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md mb-2",onClick:t[8]||(t[8]=u=>o.$router.push({name:"help"}))}," I want to read more Help. ")])])])):m("",!0)])):m("",!0)}const st=O(f,[["render",X]]);export{st as O}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/PhotoDialog-DZbf20A6.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/PhotoDialog-DZbf20A6.js deleted file mode 100644 index 6443d0e..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/PhotoDialog-DZbf20A6.js +++ /dev/null @@ -1,20 +0,0 @@ -var Li=Object.defineProperty;var Ri=(t,a,i)=>a in t?Li(t,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[a]=i;var A=(t,a,i)=>Ri(t,typeof a!="symbol"?a+"":a,i);import{N as qi,f as $t,j as P,O as Wi,an as Hi,G as Si,C as _i,ar as Ii,V as Pi,e as Xi,a as Vt,a6 as Yi,_ as Ui,z as yt,h as R,m as kt,B as q,k as B,w as $i}from"./main.common-DD7dqhZp.js";import{ah as Vi}from"./index-ryzpKtgI.js";/*! - * Cropper.js v1.6.1 - * https://fengyuanchen.github.io/cropperjs - * - * Copyright 2015-present Chen Fengyuan - * Released under the MIT license - * - * Date: 2023-09-17T03:44:19.860Z - */function Ft(t,a){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);a&&(e=e.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),i.push.apply(i,e)}return i}function hi(t){for(var a=1;at.length)&&(a=t.length);for(var i=0,e=new Array(a);i
',da=Number.isNaN||_.isNaN;function v(t){return typeof t=="number"&&!da(t)}var si=function(t){return t>0&&t<1/0};function jt(t){return typeof t>"u"}function tt(t){return Mt(t)==="object"&&t!==null}var ma=Object.prototype.hasOwnProperty;function at(t){if(!tt(t))return!1;try{var a=t.constructor,i=a.prototype;return a&&i&&ma.call(i,"isPrototypeOf")}catch{return!1}}function T(t){return typeof t=="function"}var ha=Array.prototype.slice;function ji(t){return Array.from?Array.from(t):ha.call(t)}function z(t,a){return t&&T(a)&&(Array.isArray(t)||v(t.length)?ji(t).forEach(function(i,e){a.call(t,i,e,t)}):tt(t)&&Object.keys(t).forEach(function(i){a.call(t,t[i],i,t)})),t}var w=Object.assign||function(t){for(var a=arguments.length,i=new Array(a>1?a-1:0),e=1;e0&&i.forEach(function(n){tt(n)&&Object.keys(n).forEach(function(o){t[o]=n[o]})}),t},ua=/\.\d*(?:0|9){12}\d*$/;function nt(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return ua.test(t)?Math.round(t*a)/a:t}var va=/^width|height|left|top|marginLeft|marginTop$/;function V(t,a){var i=t.style;z(a,function(e,n){va.test(n)&&v(e)&&(e="".concat(e,"px")),i[n]=e})}function ga(t,a){return t.classList?t.classList.contains(a):t.className.indexOf(a)>-1}function M(t,a){if(a){if(v(t.length)){z(t,function(e){M(e,a)});return}if(t.classList){t.classList.add(a);return}var i=t.className.trim();i?i.indexOf(a)<0&&(t.className="".concat(i," ").concat(a)):t.className=a}}function S(t,a){if(a){if(v(t.length)){z(t,function(i){S(i,a)});return}if(t.classList){t.classList.remove(a);return}t.className.indexOf(a)>=0&&(t.className=t.className.replace(a,""))}}function et(t,a,i){if(a){if(v(t.length)){z(t,function(e){et(e,a,i)});return}i?M(t,a):S(t,a)}}var fa=/([a-z\d])([A-Z])/g;function _t(t){return t.replace(fa,"$1-$2").toLowerCase()}function Lt(t,a){return tt(t[a])?t[a]:t.dataset?t.dataset[a]:t.getAttribute("data-".concat(_t(a)))}function mt(t,a,i){tt(i)?t[a]=i:t.dataset?t.dataset[a]=i:t.setAttribute("data-".concat(_t(a)),i)}function xa(t,a){if(tt(t[a]))try{delete t[a]}catch{t[a]=void 0}else if(t.dataset)try{delete t.dataset[a]}catch{t.dataset[a]=void 0}else t.removeAttribute("data-".concat(_t(a)))}var zi=/\s\s*/,Mi=function(){var t=!1;if(ft){var a=!1,i=function(){},e=Object.defineProperty({},"once",{get:function(){return t=!0,a},set:function(n){a=n}});_.addEventListener("test",i,e),_.removeEventListener("test",i,e)}return t}();function W(t,a,i){var e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=i;a.trim().split(zi).forEach(function(o){if(!Mi){var p=t.listeners;p&&p[o]&&p[o][i]&&(n=p[o][i],delete p[o][i],Object.keys(p[o]).length===0&&delete p[o],Object.keys(p).length===0&&delete t.listeners)}t.removeEventListener(o,n,e)})}function L(t,a,i){var e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=i;a.trim().split(zi).forEach(function(o){if(e.once&&!Mi){var p=t.listeners,l=p===void 0?{}:p;n=function(){delete l[o][i],t.removeEventListener(o,n,e);for(var c=arguments.length,s=new Array(c),r=0;rMath.abs(i)&&(i=u)})}),i}function vt(t,a){var i=t.pageX,e=t.pageY,n={endX:i,endY:e};return a?n:hi({startX:i,startY:e},n)}function ya(t){var a=0,i=0,e=0;return z(t,function(n){var o=n.startX,p=n.startY;a+=o,i+=p,e+=1}),a/=e,i/=e,{pageX:a,pageY:i}}function F(t){var a=t.aspectRatio,i=t.height,e=t.width,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",o=si(e),p=si(i);if(o&&p){var l=i*a;n==="contain"&&l>e||n==="cover"&&l90?{width:c,height:l}:{width:l,height:c}}function ja(t,a,i,e){var n=a.aspectRatio,o=a.naturalWidth,p=a.naturalHeight,l=a.rotate,c=l===void 0?0:l,s=a.scaleX,r=s===void 0?1:s,d=a.scaleY,u=d===void 0?1:d,h=i.aspectRatio,x=i.naturalWidth,f=i.naturalHeight,k=e.fillColor,C=k===void 0?"transparent":k,y=e.imageSmoothingEnabled,X=y===void 0?!0:y,O=e.imageSmoothingQuality,m=O===void 0?"low":O,g=e.maxWidth,j=g===void 0?1/0:g,H=e.maxHeight,I=H===void 0?1/0:H,Q=e.minWidth,G=Q===void 0?0:Q,Y=e.minHeight,U=Y===void 0?0:Y,Z=document.createElement("canvas"),D=Z.getContext("2d"),ht=F({aspectRatio:h,width:j,height:I}),It=F({aspectRatio:h,width:G,height:U},"cover"),bt=Math.min(ht.width,Math.max(It.width,x)),wt=Math.min(ht.height,Math.max(It.height,f)),Pt=F({aspectRatio:n,width:j,height:I}),Xt=F({aspectRatio:n,width:G,height:U},"cover"),Yt=Math.min(Pt.width,Math.max(Xt.width,o)),Ut=Math.min(Pt.height,Math.max(Xt.height,p)),Ti=[-Yt/2,-Ut/2,Yt,Ut];return Z.width=nt(bt),Z.height=nt(wt),D.fillStyle=C,D.fillRect(0,0,bt,wt),D.save(),D.translate(bt/2,wt/2),D.rotate(c*Math.PI/180),D.scale(r,u),D.imageSmoothingEnabled=X,D.imageSmoothingQuality=m,D.drawImage.apply(D,[t].concat(ui(Ti.map(function(Ni){return Math.floor(nt(Ni))})))),D.restore(),Z}var Di=String.fromCharCode;function za(t,a,i){var e="";i+=a;for(var n=a;n0;)i.push(Di.apply(null,ji(n.subarray(0,e)))),n=n.subarray(e);return"data:".concat(a,";base64,").concat(btoa(i.join("")))}function Ba(t){var a=new DataView(t),i;try{var e,n,o;if(a.getUint8(0)===255&&a.getUint8(1)===216)for(var p=a.byteLength,l=2;l+1=8&&(o=s+d)}}}if(o){var u=a.getUint16(o,e),h,x;for(x=0;x=0?n:yi),height:Math.max(i.offsetHeight,o>=0?o:ki)};this.containerData=p,V(e,{width:p.width,height:p.height}),M(t,N),S(e,N)},initCanvas:function(){var t=this.containerData,a=this.imageData,i=this.options.viewMode,e=Math.abs(a.rotate)%180===90,n=e?a.naturalHeight:a.naturalWidth,o=e?a.naturalWidth:a.naturalHeight,p=n/o,l=t.width,c=t.height;t.height*p>t.width?i===3?l=t.height*p:c=t.width/p:i===3?c=t.width/p:l=t.height*p;var s={aspectRatio:p,naturalWidth:n,naturalHeight:o,width:l,height:c};this.canvasData=s,this.limited=i===1||i===2,this.limitCanvas(!0,!0),s.width=Math.min(Math.max(s.width,s.minWidth),s.maxWidth),s.height=Math.min(Math.max(s.height,s.minHeight),s.maxHeight),s.left=(t.width-s.width)/2,s.top=(t.height-s.height)/2,s.oldLeft=s.left,s.oldTop=s.top,this.initialCanvasData=w({},s)},limitCanvas:function(t,a){var i=this.options,e=this.containerData,n=this.canvasData,o=this.cropBoxData,p=i.viewMode,l=n.aspectRatio,c=this.cropped&&o;if(t){var s=Number(i.minCanvasWidth)||0,r=Number(i.minCanvasHeight)||0;p>1?(s=Math.max(s,e.width),r=Math.max(r,e.height),p===3&&(r*l>s?s=r*l:r=s/l)):p>0&&(s?s=Math.max(s,c?o.width:0):r?r=Math.max(r,c?o.height:0):c&&(s=o.width,r=o.height,r*l>s?s=r*l:r=s/l));var d=F({aspectRatio:l,width:s,height:r});s=d.width,r=d.height,n.minWidth=s,n.minHeight=r,n.maxWidth=1/0,n.maxHeight=1/0}if(a)if(p>(c?0:1)){var u=e.width-n.width,h=e.height-n.height;n.minLeft=Math.min(0,u),n.minTop=Math.min(0,h),n.maxLeft=Math.max(0,u),n.maxTop=Math.max(0,h),c&&this.limited&&(n.minLeft=Math.min(o.left,o.left+(o.width-n.width)),n.minTop=Math.min(o.top,o.top+(o.height-n.height)),n.maxLeft=o.left,n.maxTop=o.top,p===2&&(n.width>=e.width&&(n.minLeft=Math.min(0,u),n.maxLeft=Math.max(0,u)),n.height>=e.height&&(n.minTop=Math.min(0,h),n.maxTop=Math.max(0,h))))}else n.minLeft=-n.width,n.minTop=-n.height,n.maxLeft=e.width,n.maxTop=e.height},renderCanvas:function(t,a){var i=this.canvasData,e=this.imageData;if(a){var n=ka({width:e.naturalWidth*Math.abs(e.scaleX||1),height:e.naturalHeight*Math.abs(e.scaleY||1),degree:e.rotate||0}),o=n.width,p=n.height,l=i.width*(o/i.naturalWidth),c=i.height*(p/i.naturalHeight);i.left-=(l-i.width)/2,i.top-=(c-i.height)/2,i.width=l,i.height=c,i.aspectRatio=o/p,i.naturalWidth=o,i.naturalHeight=p,this.limitCanvas(!0,!1)}(i.width>i.maxWidth||i.widthi.maxHeight||i.heighta.width?n.height=n.width/i:n.width=n.height*i),this.cropBoxData=n,this.limitCropBox(!0,!0),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),n.width=Math.max(n.minWidth,n.width*e),n.height=Math.max(n.minHeight,n.height*e),n.left=a.left+(a.width-n.width)/2,n.top=a.top+(a.height-n.height)/2,n.oldLeft=n.left,n.oldTop=n.top,this.initialCropBoxData=w({},n)},limitCropBox:function(t,a){var i=this.options,e=this.containerData,n=this.canvasData,o=this.cropBoxData,p=this.limited,l=i.aspectRatio;if(t){var c=Number(i.minCropBoxWidth)||0,s=Number(i.minCropBoxHeight)||0,r=p?Math.min(e.width,n.width,n.width+n.left,e.width-n.left):e.width,d=p?Math.min(e.height,n.height,n.height+n.top,e.height-n.top):e.height;c=Math.min(c,e.width),s=Math.min(s,e.height),l&&(c&&s?s*l>c?s=c/l:c=s*l:c?s=c/l:s&&(c=s*l),d*l>r?d=r/l:r=d*l),o.minWidth=Math.min(c,r),o.minHeight=Math.min(s,d),o.maxWidth=r,o.maxHeight=d}a&&(p?(o.minLeft=Math.max(0,n.left),o.minTop=Math.max(0,n.top),o.maxLeft=Math.min(e.width,n.left+n.width)-o.width,o.maxTop=Math.min(e.height,n.top+n.height)-o.height):(o.minLeft=0,o.minTop=0,o.maxLeft=e.width-o.width,o.maxTop=e.height-o.height))},renderCropBox:function(){var t=this.options,a=this.containerData,i=this.cropBoxData;(i.width>i.maxWidth||i.widthi.maxHeight||i.height=a.width&&i.height>=a.height?fi:Ht),V(this.cropBox,w({width:i.width,height:i.height},ct({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),ot(this.element,At,this.getData())}},Oa={initPreview:function(){var t=this.element,a=this.crossOrigin,i=this.options.preview,e=a?this.crossOriginUrl:this.url,n=t.alt||"The image to preview",o=document.createElement("img");if(a&&(o.crossOrigin=a),o.src=e,o.alt=n,this.viewBox.appendChild(o),this.viewBoxImage=o,!!i){var p=i;typeof i=="string"?p=t.ownerDocument.querySelectorAll(i):i.querySelector&&(p=[i]),this.previews=p,z(p,function(l){var c=document.createElement("img");mt(l,ut,{width:l.offsetWidth,height:l.offsetHeight,html:l.innerHTML}),a&&(c.crossOrigin=a),c.src=e,c.alt=n,c.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',l.innerHTML="",l.appendChild(c)})}},resetPreview:function(){z(this.previews,function(t){var a=Lt(t,ut);V(t,{width:a.width,height:a.height}),t.innerHTML=a.html,xa(t,ut)})},preview:function(){var t=this.imageData,a=this.canvasData,i=this.cropBoxData,e=i.width,n=i.height,o=t.width,p=t.height,l=i.left-a.left-t.left,c=i.top-a.top-t.top;!this.cropped||this.disabled||(V(this.viewBoxImage,w({width:o,height:p},ct(w({translateX:-l,translateY:-c},t)))),z(this.previews,function(s){var r=Lt(s,ut),d=r.width,u=r.height,h=d,x=u,f=1;e&&(f=d/e,x=n*f),n&&x>u&&(f=u/n,h=e*f,x=u),V(s,{width:h,height:x}),V(s.getElementsByTagName("img")[0],w({width:o*f,height:p*f},ct(w({translateX:-l*f,translateY:-c*f},t))))}))}},Ta={bind:function(){var t=this.element,a=this.options,i=this.cropper;T(a.cropstart)&&L(t,Tt,a.cropstart),T(a.cropmove)&&L(t,Ot,a.cropmove),T(a.cropend)&&L(t,Et,a.cropend),T(a.crop)&&L(t,At,a.crop),T(a.zoom)&&L(t,Nt,a.zoom),L(i,Jt,this.onCropStart=this.cropStart.bind(this)),a.zoomable&&a.zoomOnWheel&&L(i,ni,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),a.toggleDragModeOnDblclick&&L(i,Kt,this.onDblclick=this.dblclick.bind(this)),L(t.ownerDocument,ti,this.onCropMove=this.cropMove.bind(this)),L(t.ownerDocument,ii,this.onCropEnd=this.cropEnd.bind(this)),a.responsive&&L(window,ei,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,a=this.options,i=this.cropper;T(a.cropstart)&&W(t,Tt,a.cropstart),T(a.cropmove)&&W(t,Ot,a.cropmove),T(a.cropend)&&W(t,Et,a.cropend),T(a.crop)&&W(t,At,a.crop),T(a.zoom)&&W(t,Nt,a.zoom),W(i,Jt,this.onCropStart),a.zoomable&&a.zoomOnWheel&&W(i,ni,this.onWheel,{passive:!1,capture:!0}),a.toggleDragModeOnDblclick&&W(i,Kt,this.onDblclick),W(t.ownerDocument,ti,this.onCropMove),W(t.ownerDocument,ii,this.onCropEnd),a.responsive&&W(window,ei,this.onResize)}},Na={resize:function(){if(!this.disabled){var t=this.options,a=this.container,i=this.containerData,e=a.offsetWidth/i.width,n=a.offsetHeight/i.height,o=Math.abs(e-1)>Math.abs(n-1)?e:n;if(o!==1){var p,l;t.restore&&(p=this.getCanvasData(),l=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(z(p,function(c,s){p[s]=c*o})),this.setCropBoxData(z(l,function(c,s){l[s]=c*o})))}}},dblclick:function(){this.disabled||this.options.dragMode===wi||this.setDragMode(ga(this.dragBox,Dt)?bi:St)},wheel:function(t){var a=this,i=Number(this.options.wheelZoomRatio)||.1,e=1;this.disabled||(t.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){a.wheeling=!1},50),t.deltaY?e=t.deltaY>0?1:-1:t.wheelDelta?e=-t.wheelDelta/120:t.detail&&(e=t.detail>0?1:-1),this.zoom(-e*i,t)))},cropStart:function(t){var a=t.buttons,i=t.button;if(!(this.disabled||(t.type==="mousedown"||t.type==="pointerdown"&&t.pointerType==="mouse")&&(v(a)&&a!==1||v(i)&&i!==0||t.ctrlKey))){var e=this.options,n=this.pointers,o;t.changedTouches?z(t.changedTouches,function(p){n[p.identifier]=vt(p)}):n[t.pointerId||0]=vt(t),Object.keys(n).length>1&&e.zoomable&&e.zoomOnTouch?o=xi:o=Lt(t.target,dt),pa.test(o)&&ot(this.element,Tt,{originalEvent:t,action:o})!==!1&&(t.preventDefault(),this.action=o,this.cropping=!1,o===gi&&(this.cropping=!0,M(this.dragBox,gt)))}},cropMove:function(t){var a=this.action;if(!(this.disabled||!a)){var i=this.pointers;t.preventDefault(),ot(this.element,Ot,{originalEvent:t,action:a})!==!1&&(t.changedTouches?z(t.changedTouches,function(e){w(i[e.identifier]||{},vt(e,!0))}):w(i[t.pointerId||0]||{},vt(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var a=this.action,i=this.pointers;t.changedTouches?z(t.changedTouches,function(e){delete i[e.identifier]}):delete i[t.pointerId||0],a&&(t.preventDefault(),Object.keys(i).length||(this.action=""),this.cropping&&(this.cropping=!1,et(this.dragBox,gt,this.cropped&&this.options.modal)),ot(this.element,Et,{originalEvent:t,action:a}))}}},La={change:function(t){var a=this.options,i=this.canvasData,e=this.containerData,n=this.cropBoxData,o=this.pointers,p=this.action,l=a.aspectRatio,c=n.left,s=n.top,r=n.width,d=n.height,u=c+r,h=s+d,x=0,f=0,k=e.width,C=e.height,y=!0,X;!l&&t.shiftKey&&(l=r&&d?r/d:1),this.limited&&(x=n.minLeft,f=n.minTop,k=x+Math.min(e.width,i.width,i.left+i.width),C=f+Math.min(e.height,i.height,i.top+i.height));var O=o[Object.keys(o)[0]],m={x:O.endX-O.startX,y:O.endY-O.startY},g=function(j){switch(j){case K:u+m.x>k&&(m.x=k-u);break;case J:c+m.xC&&(m.y=C-h);break}};switch(p){case Ht:c+=m.x,s+=m.y;break;case K:if(m.x>=0&&(u>=k||l&&(s<=f||h>=C))){y=!1;break}g(K),r+=m.x,r<0&&(p=J,r=-r,c-=r),l&&(d=r/l,s+=(n.height-d)/2);break;case $:if(m.y<=0&&(s<=f||l&&(c<=x||u>=k))){y=!1;break}g($),d-=m.y,s+=m.y,d<0&&(p=it,d=-d,s-=d),l&&(r=d*l,c+=(n.width-r)/2);break;case J:if(m.x<=0&&(c<=x||l&&(s<=f||h>=C))){y=!1;break}g(J),r-=m.x,c+=m.x,r<0&&(p=K,r=-r,c-=r),l&&(d=r/l,s+=(n.height-d)/2);break;case it:if(m.y>=0&&(h>=C||l&&(c<=x||u>=k))){y=!1;break}g(it),d+=m.y,d<0&&(p=$,d=-d,s-=d),l&&(r=d*l,c+=(n.width-r)/2);break;case pt:if(l){if(m.y<=0&&(s<=f||u>=k)){y=!1;break}g($),d-=m.y,s+=m.y,r=d*l}else g($),g(K),m.x>=0?uf&&(d-=m.y,s+=m.y):(d-=m.y,s+=m.y);r<0&&d<0?(p=lt,d=-d,r=-r,s-=d,c-=r):r<0?(p=st,r=-r,c-=r):d<0&&(p=rt,d=-d,s-=d);break;case st:if(l){if(m.y<=0&&(s<=f||c<=x)){y=!1;break}g($),d-=m.y,s+=m.y,r=d*l,c+=n.width-r}else g($),g(J),m.x<=0?c>x?(r-=m.x,c+=m.x):m.y<=0&&s<=f&&(y=!1):(r-=m.x,c+=m.x),m.y<=0?s>f&&(d-=m.y,s+=m.y):(d-=m.y,s+=m.y);r<0&&d<0?(p=rt,d=-d,r=-r,s-=d,c-=r):r<0?(p=pt,r=-r,c-=r):d<0&&(p=lt,d=-d,s-=d);break;case lt:if(l){if(m.x<=0&&(c<=x||h>=C)){y=!1;break}g(J),r-=m.x,c+=m.x,d=r/l}else g(it),g(J),m.x<=0?c>x?(r-=m.x,c+=m.x):m.y>=0&&h>=C&&(y=!1):(r-=m.x,c+=m.x),m.y>=0?h=0&&(u>=k||h>=C)){y=!1;break}g(K),r+=m.x,d=r/l}else g(it),g(K),m.x>=0?u=0&&h>=C&&(y=!1):r+=m.x,m.y>=0?h0?p=m.y>0?rt:pt:m.x<0&&(c-=r,p=m.y>0?lt:st),m.y<0&&(s-=d),this.cropped||(S(this.cropBox,N),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}y&&(n.width=r,n.height=d,n.left=c,n.top=s,this.action=p,this.renderCropBox()),z(o,function(j){j.startX=j.endX,j.startY=j.endY})}},Ra={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&M(this.dragBox,gt),S(this.cropBox,N),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=w({},this.initialImageData),this.canvasData=w({},this.initialCanvasData),this.cropBoxData=w({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(w(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),S(this.dragBox,gt),M(this.cropBox,N)),this},replace:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&t&&(this.isImg&&(this.element.src=t),a?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,z(this.previews,function(i){i.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,S(this.cropper,Gt)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,M(this.cropper,Gt)),this},destroy:function(){var t=this.element;return t[b]?(t[b]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.canvasData,e=i.left,n=i.top;return this.moveTo(jt(t)?t:e+Number(t),jt(a)?a:n+Number(a))},moveTo:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.canvasData,e=!1;return t=Number(t),a=Number(a),this.ready&&!this.disabled&&this.options.movable&&(v(t)&&(i.left=t,e=!0),v(a)&&(i.top=a,e=!0),e&&this.renderCanvas(!0)),this},zoom:function(t,a){var i=this.canvasData;return t=Number(t),t<0?t=1/(1-t):t=1+t,this.zoomTo(i.width*t/i.naturalWidth,null,a)},zoomTo:function(t,a,i){var e=this.options,n=this.canvasData,o=n.width,p=n.height,l=n.naturalWidth,c=n.naturalHeight;if(t=Number(t),t>=0&&this.ready&&!this.disabled&&e.zoomable){var s=l*t,r=c*t;if(ot(this.element,Nt,{ratio:t,oldRatio:o/l,originalEvent:i})===!1)return this;if(i){var d=this.pointers,u=Ci(this.cropper),h=d&&Object.keys(d).length?ya(d):{pageX:i.pageX,pageY:i.pageY};n.left-=(s-o)*((h.pageX-u.left-n.left)/o),n.top-=(r-p)*((h.pageY-u.top-n.top)/p)}else at(a)&&v(a.x)&&v(a.y)?(n.left-=(s-o)*((a.x-n.left)/o),n.top-=(r-p)*((a.y-n.top)/p)):(n.left-=(s-o)/2,n.top-=(r-p)/2);n.width=s,n.height=r,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return t=Number(t),v(t)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var a=this.imageData.scaleY;return this.scale(t,v(a)?a:1)},scaleY:function(t){var a=this.imageData.scaleX;return this.scale(v(a)?a:1,t)},scale:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.imageData,e=!1;return t=Number(t),a=Number(a),this.ready&&!this.disabled&&this.options.scalable&&(v(t)&&(i.scaleX=t,e=!0),v(a)&&(i.scaleY=a,e=!0),e&&this.renderCanvas(!0,!0)),this},getData:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,a=this.options,i=this.imageData,e=this.canvasData,n=this.cropBoxData,o;if(this.ready&&this.cropped){o={x:n.left-e.left,y:n.top-e.top,width:n.width,height:n.height};var p=i.width/i.naturalWidth;if(z(o,function(s,r){o[r]=s/p}),t){var l=Math.round(o.y+o.height),c=Math.round(o.x+o.width);o.x=Math.round(o.x),o.y=Math.round(o.y),o.width=c-o.x,o.height=l-o.y}}else o={x:0,y:0,width:0,height:0};return a.rotatable&&(o.rotate=i.rotate||0),a.scalable&&(o.scaleX=i.scaleX||1,o.scaleY=i.scaleY||1),o},setData:function(t){var a=this.options,i=this.imageData,e=this.canvasData,n={};if(this.ready&&!this.disabled&&at(t)){var o=!1;a.rotatable&&v(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,o=!0),a.scalable&&(v(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,o=!0),v(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var p=i.width/i.naturalWidth;v(t.x)&&(n.left=t.x*p+e.left),v(t.y)&&(n.top=t.y*p+e.top),v(t.width)&&(n.width=t.width*p),v(t.height)&&(n.height=t.height*p),this.setCropBoxData(n)}return this},getContainerData:function(){return this.ready?w({},this.containerData):{}},getImageData:function(){return this.sized?w({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,a={};return this.ready&&z(["left","top","width","height","naturalWidth","naturalHeight"],function(i){a[i]=t[i]}),a},setCanvasData:function(t){var a=this.canvasData,i=a.aspectRatio;return this.ready&&!this.disabled&&at(t)&&(v(t.left)&&(a.left=t.left),v(t.top)&&(a.top=t.top),v(t.width)?(a.width=t.width,a.height=t.width/i):v(t.height)&&(a.height=t.height,a.width=t.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var t=this.cropBoxData,a;return this.ready&&this.cropped&&(a={left:t.left,top:t.top,width:t.width,height:t.height}),a||{}},setCropBoxData:function(t){var a=this.cropBoxData,i=this.options.aspectRatio,e,n;return this.ready&&this.cropped&&!this.disabled&&at(t)&&(v(t.left)&&(a.left=t.left),v(t.top)&&(a.top=t.top),v(t.width)&&t.width!==a.width&&(e=!0,a.width=t.width),v(t.height)&&t.height!==a.height&&(n=!0,a.height=t.height),i&&(e?a.height=a.width/i:n&&(a.width=a.height*i)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var a=this.canvasData,i=ja(this.image,this.imageData,a,t);if(!this.cropped)return i;var e=this.getData(t.rounded),n=e.x,o=e.y,p=e.width,l=e.height,c=i.width/Math.floor(a.naturalWidth);c!==1&&(n*=c,o*=c,p*=c,l*=c);var s=p/l,r=F({aspectRatio:s,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),d=F({aspectRatio:s,width:t.minWidth||0,height:t.minHeight||0},"cover"),u=F({aspectRatio:s,width:t.width||(c!==1?i.width:p),height:t.height||(c!==1?i.height:l)}),h=u.width,x=u.height;h=Math.min(r.width,Math.max(d.width,h)),x=Math.min(r.height,Math.max(d.height,x));var f=document.createElement("canvas"),k=f.getContext("2d");f.width=nt(h),f.height=nt(x),k.fillStyle=t.fillColor||"transparent",k.fillRect(0,0,h,x);var C=t.imageSmoothingEnabled,y=C===void 0?!0:C,X=t.imageSmoothingQuality;k.imageSmoothingEnabled=y,X&&(k.imageSmoothingQuality=X);var O=i.width,m=i.height,g=n,j=o,H,I,Q,G,Y,U;g<=-p||g>O?(g=0,H=0,Q=0,Y=0):g<=0?(Q=-g,g=0,H=Math.min(O,p+g),Y=H):g<=O&&(Q=0,H=Math.min(p,O-g),Y=H),H<=0||j<=-l||j>m?(j=0,I=0,G=0,U=0):j<=0?(G=-j,j=0,I=Math.min(m,l+j),U=I):j<=m&&(G=0,I=Math.min(l,m-j),U=I);var Z=[g,j,H,I];if(Y>0&&U>0){var D=h/p;Z.push(Q*D,G*D,Y*D,U*D)}return k.drawImage.apply(k,[i].concat(ui(Z.map(function(ht){return Math.floor(nt(ht))})))),f},setAspectRatio:function(t){var a=this.options;return!this.disabled&&!jt(t)&&(a.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var a=this.options,i=this.dragBox,e=this.face;if(this.ready&&!this.disabled){var n=t===St,o=a.movable&&t===bi;t=n||o?t:wi,a.dragMode=t,mt(i,dt,t),et(i,Dt,n),et(i,Bt,o),a.cropBoxMovable||(mt(e,dt,t),et(e,Dt,n),et(e,Bt,o))}return this}},qa=_.Cropper,Bi=function(){function t(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Fi(this,t),!a||!la.test(a.tagName))throw new Error("The first argument is required and must be an or element.");this.element=a,this.options=w({},pi,at(i)&&i),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return Qi(t,[{key:"init",value:function(){var a=this.element,i=a.tagName.toLowerCase(),e;if(!a[b]){if(a[b]=this,i==="img"){if(this.isImg=!0,e=a.getAttribute("src")||"",this.originalUrl=e,!e)return;e=a.src}else i==="canvas"&&window.HTMLCanvasElement&&(e=a.toDataURL());this.load(e)}}},{key:"load",value:function(a){var i=this;if(a){this.url=a,this.imageData={};var e=this.element,n=this.options;if(!n.rotatable&&!n.scalable&&(n.checkOrientation=!1),!n.checkOrientation||!window.ArrayBuffer){this.clone();return}if(sa.test(a)){ra.test(a)?this.read(Ca(a)):this.clone();return}var o=new XMLHttpRequest,p=this.clone.bind(this);this.reloading=!0,this.xhr=o,o.onabort=p,o.onerror=p,o.ontimeout=p,o.onprogress=function(){o.getResponseHeader("content-type")!==oi&&o.abort()},o.onload=function(){i.read(o.response)},o.onloadend=function(){i.reloading=!1,i.xhr=null},n.checkCrossOrigin&&ri(a)&&e.crossOrigin&&(a=li(a)),o.open("GET",a,!0),o.responseType="arraybuffer",o.withCredentials=e.crossOrigin==="use-credentials",o.send()}}},{key:"read",value:function(a){var i=this.options,e=this.imageData,n=Ba(a),o=0,p=1,l=1;if(n>1){this.url=Da(a,oi);var c=Aa(n);o=c.rotate,p=c.scaleX,l=c.scaleY}i.rotatable&&(e.rotate=o),i.scalable&&(e.scaleX=p,e.scaleY=l),this.clone()}},{key:"clone",value:function(){var a=this.element,i=this.url,e=a.crossOrigin,n=i;this.options.checkCrossOrigin&&ri(i)&&(e||(e="anonymous"),n=li(i)),this.crossOrigin=e,this.crossOriginUrl=n;var o=document.createElement("img");e&&(o.crossOrigin=e),o.src=n||i,o.alt=a.alt||"The image to crop",this.image=o,o.onload=this.start.bind(this),o.onerror=this.stop.bind(this),M(o,Zt),a.parentNode.insertBefore(o,a.nextSibling)}},{key:"start",value:function(){var a=this,i=this.image;i.onload=null,i.onerror=null,this.sizing=!0;var e=_.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(_.navigator.userAgent),n=function(l,c){w(a.imageData,{naturalWidth:l,naturalHeight:c,aspectRatio:l/c}),a.initialImageData=w({},a.imageData),a.sizing=!1,a.sized=!0,a.build()};if(i.naturalWidth&&!e){n(i.naturalWidth,i.naturalHeight);return}var o=document.createElement("img"),p=document.body||document.documentElement;this.sizingImage=o,o.onload=function(){n(o.width,o.height),e||p.removeChild(o)},o.src=i.src,e||(o.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",p.appendChild(o))}},{key:"stop",value:function(){var a=this.image;a.onload=null,a.onerror=null,a.parentNode.removeChild(a),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var a=this.element,i=this.options,e=this.image,n=a.parentNode,o=document.createElement("div");o.innerHTML=ca;var p=o.querySelector(".".concat(b,"-container")),l=p.querySelector(".".concat(b,"-canvas")),c=p.querySelector(".".concat(b,"-drag-box")),s=p.querySelector(".".concat(b,"-crop-box")),r=s.querySelector(".".concat(b,"-face"));this.container=n,this.cropper=p,this.canvas=l,this.dragBox=c,this.cropBox=s,this.viewBox=p.querySelector(".".concat(b,"-view-box")),this.face=r,l.appendChild(e),M(a,N),n.insertBefore(p,a.nextSibling),S(e,Zt),this.initPreview(),this.bind(),i.initialAspectRatio=Math.max(0,i.initialAspectRatio)||NaN,i.aspectRatio=Math.max(0,i.aspectRatio)||NaN,i.viewMode=Math.max(0,Math.min(3,Math.round(i.viewMode)))||0,M(s,N),i.guides||M(s.getElementsByClassName("".concat(b,"-dashed")),N),i.center||M(s.getElementsByClassName("".concat(b,"-center")),N),i.background&&M(p,"".concat(b,"-bg")),i.highlight||M(r,aa),i.cropBoxMovable&&(M(r,Bt),mt(r,dt,Ht)),i.cropBoxResizable||(M(s.getElementsByClassName("".concat(b,"-line")),N),M(s.getElementsByClassName("".concat(b,"-point")),N)),this.render(),this.ready=!0,this.setDragMode(i.dragMode),i.autoCrop&&this.crop(),this.setData(i.data),T(i.ready)&&L(a,ai,i.ready,{once:!0}),ot(a,ai)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var a=this.cropper.parentNode;a&&a.removeChild(this.cropper),S(this.element,N)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=qa,t}},{key:"setDefaults",value:function(a){w(pi,at(a)&&a)}}]),t}();w(Bi.prototype,Ea,Oa,Ta,Na,La,Ra);function Wa(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function xt(){this._types=Object.create(null),this._extensions=Object.create(null);for(let t=0;t{if(!Ei||document.querySelector(a)){n();return}function o(p){p.addEventListener("load",e),p.addEventListener("error",n),p.addEventListener("abort",n)}switch(t){case"js":{const p=document.createElement("script");p.async=!0,p.src=i,o(p),document.head.appendChild(p);break}case"css":{const p=document.createElement("link");p.id=a,p.rel="stylesheet",p.href=i,o(p),document.head.appendChild(p);break}case"style":{const p=document.createElement("style");p.id=a,o(p),document.head.appendChild(p),p.appendChild(document.createTextNode(i));break}}})}function ci({mode:t,dataURI:a}){return t==="round"?"image/png":Ua(a)}function di(t){const a=document.createElement("canvas"),i=a.getContext("2d");if(!i)return a;const{width:e,height:n}=t;return a.width=e,a.height=n,i.imageSmoothingEnabled=!0,i.drawImage(t,0,0,e,n),i.globalCompositeOperation="destination-in",i.beginPath(),i.arc(e/2,n/2,Math.min(e,n)/2,0,2*Math.PI,!0),i.fill(),a}function mi(t,a={}){if(!Ai(t))return a;const{mode:i,width:e,height:n}=t;switch(i){case"fixedSize":case"round":{a.width=e,a.height=n;break}}return a}const $a={img:{type:String,required:!0,default:""},boxStyle:{type:Object,required:!1,default:()=>({})},options:{type:Object,required:!1,default:()=>({})},presetMode:{type:Object,required:!1,default:()=>({})}},Va=`/*! - * Cropper.js v1.6.1 - * https://fengyuanchen.github.io/cropperjs - * - * Copyright 2015-present Chen Fengyuan - * Released under the MIT license - * - * Date: 2023-09-17T03:44:17.565Z - */.cropper-container{direction:ltr;font-size:0;line-height:0;position:relative;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.cropper-container img{backface-visibility:hidden;display:block;height:100%;image-orientation:0deg;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.cropper-wrap-box,.cropper-canvas,.cropper-drag-box,.cropper-crop-box,.cropper-modal{bottom:0;left:0;position:absolute;right:0;top:0}.cropper-wrap-box,.cropper-canvas{overflow:hidden}.cropper-drag-box{background-color:#fff;opacity:0}.cropper-modal{background-color:#000;opacity:.5}.cropper-view-box{display:block;height:100%;outline:1px solid #39f;outline-color:#3399ffbf;overflow:hidden;width:100%}.cropper-dashed{border:0 dashed #eee;display:block;opacity:.5;position:absolute}.cropper-dashed.dashed-h{border-bottom-width:1px;border-top-width:1px;height:calc(100% / 3);left:0;top:calc(100% / 3);width:100%}.cropper-dashed.dashed-v{border-left-width:1px;border-right-width:1px;height:100%;left:calc(100% / 3);top:0;width:calc(100% / 3)}.cropper-center{display:block;height:0;left:50%;opacity:.75;position:absolute;top:50%;width:0}.cropper-center:before,.cropper-center:after{background-color:#eee;content:" ";display:block;position:absolute}.cropper-center:before{height:1px;left:-3px;top:0;width:7px}.cropper-center:after{height:7px;left:0;top:-3px;width:1px}.cropper-face,.cropper-line,.cropper-point{display:block;height:100%;opacity:.1;position:absolute;width:100%}.cropper-face{background-color:#fff;left:0;top:0}.cropper-line{background-color:#39f}.cropper-line.line-e{cursor:ew-resize;right:-3px;top:0;width:5px}.cropper-line.line-n{cursor:ns-resize;height:5px;left:0;top:-3px}.cropper-line.line-w{cursor:ew-resize;left:-3px;top:0;width:5px}.cropper-line.line-s{bottom:-3px;cursor:ns-resize;height:5px;left:0}.cropper-point{background-color:#39f;height:5px;opacity:.75;width:5px}.cropper-point.point-e{cursor:ew-resize;margin-top:-3px;right:-3px;top:50%}.cropper-point.point-n{cursor:ns-resize;left:50%;margin-left:-3px;top:-3px}.cropper-point.point-w{cursor:ew-resize;left:-3px;margin-top:-3px;top:50%}.cropper-point.point-s{bottom:-3px;cursor:s-resize;left:50%;margin-left:-3px}.cropper-point.point-ne{cursor:nesw-resize;right:-3px;top:-3px}.cropper-point.point-nw{cursor:nwse-resize;left:-3px;top:-3px}.cropper-point.point-sw{bottom:-3px;cursor:nesw-resize;left:-3px}.cropper-point.point-se{bottom:-3px;cursor:nwse-resize;height:20px;opacity:1;right:-3px;width:20px}@media (min-width: 768px){.cropper-point.point-se{height:15px;width:15px}}@media (min-width: 992px){.cropper-point.point-se{height:10px;width:10px}}@media (min-width: 1200px){.cropper-point.point-se{height:5px;opacity:.75;width:5px}}.cropper-point.point-se:before{background-color:#39f;bottom:-50%;content:" ";display:block;height:200%;opacity:0;position:absolute;right:-50%;width:200%}.cropper-invisible{opacity:0}.cropper-bg{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC)}.cropper-hide{display:block;height:0;position:absolute;width:0}.cropper-hidden{display:none!important}.cropper-move{cursor:move}.cropper-crop{cursor:crosshair}.cropper-disabled .cropper-drag-box,.cropper-disabled .cropper-face,.cropper-disabled .cropper-line,.cropper-disabled .cropper-point{cursor:not-allowed} -`,Fa=`.vue--picture-cropper__wrap{width:100%;height:100%;margin:0}.vue--picture-cropper__img{display:block;width:auto;height:auto;max-width:100%;max-height:100%}.vue--picture-cropper__wrap-round .cropper-view-box,.vue--picture-cropper__wrap-round .cropper-face{border-radius:50%} -`;Oi({type:"style",id:"cropperjs",resource:Va}).catch(t=>{console.log(t)});Oi({type:"style",id:"vue-picture-cropper",resource:Fa}).catch(t=>{console.log(t)});let E;const Qa=qi({name:"VuePictureCropper",props:$a,setup(t){const a=$t(),i=$t("");async function e(){await Si();const s=window.setInterval(()=>{if(a.value)try{E=new Bi(a.value,t.options),window.clearInterval(s),o(),i.value=ci({mode:t.presetMode.mode,dataURI:t.img}),a.value.addEventListener("ready",()=>{n()})}catch(r){console.log(r)}},10)}function n(){if(!Ai(t.presetMode))return;const{mode:s,width:r,height:d}=t.presetMode;switch(s){case"fixedSize":case"round":{E.setCropBoxData({width:r,height:d});break}}}function o(){E.getDataURL=p,E.getBlob=l,E.getFile=c}function p(s={}){s=mi(t.presetMode,s);try{let r=E.getCroppedCanvas(s);return t.presetMode.mode==="round"&&(r=di(r)),r.toDataURL(i.value)}catch{return""}}async function l(s={}){return s=mi(t.presetMode,s),new Promise(r=>{try{let d=E.getCroppedCanvas(s);t.presetMode.mode==="round"&&(d=di(d)),d.toBlob(u=>{r(u)},i.value)}catch{r(null)}})}async function c(s={}){const{fileName:r}=s,d=i.value.replace(/image\//,""),u=r?`${r}.${d}`:`cropped-${Date.now()}.${d}`,h=await l(s);return h?new File([h],u,{type:i.value}):null}return Wi(()=>t.img,async()=>{if(!E){await e();return}try{E.replace(t.img),i.value=ci({mode:t.presetMode.mode,dataURI:t.img}),o()}catch(s){console.log(s)}},{immediate:!0}),Hi(()=>{E&&(E.destroy(),E=null)}),()=>P("div",{class:`vue--picture-cropper__wrap ${t.presetMode.mode==="round"?"vue--picture-cropper__wrap-round":""}`,style:t.boxStyle},[P("img",{ref:a,class:"vue--picture-cropper__img",src:t.img},null)])}});var Ga=Object.getOwnPropertyDescriptor,Za=(t,a,i,e)=>{for(var n=e>1?void 0:e?Ga(a,i):a,o=t.length-1,p;o>=0;o--)(p=t[o])&&(n=p(n)||n);return n};let Rt=class extends Pi{constructor(){super(...arguments);A(this,"$notify");A(this,"activeDeviceNumber",0);A(this,"activeDid","");A(this,"blob");A(this,"claimType","");A(this,"crop",!1);A(this,"fileName");A(this,"mirror",!1);A(this,"numDevices",0);A(this,"setImageCallback",()=>{});A(this,"showRetry",!0);A(this,"uploading",!1);A(this,"visible",!1);A(this,"URL",window.URL||window.webkitURL)}async mounted(){try{const i=await Xi();this.activeDid=i.activeDid||""}catch(i){console.error("Error retrieving settings from database:",i),this.$notify({group:"alert",type:"danger",title:"Error",text:i.message||"There was an error retrieving your settings."},-1)}}open(i,e,n,o,p){this.visible=!0,this.claimType=e,this.crop=!!n;const l=document.querySelector("#QuickNav");l&&(l.style.display="none"),this.setImageCallback=i,o?(this.blob=o,this.fileName=p,this.showRetry=!1):(this.blob=void 0,this.fileName=void 0,this.showRetry=!0)}close(){this.visible=!1;const i=document.querySelector("#QuickNav");i&&(i.style.display=""),this.blob=void 0}async cameraStarted(){const i=this.$refs.camera;if(i){this.numDevices=(await i.devices(["videoinput"])).length,this.mirror=i.facingMode==="user";const e=i.currentDeviceID(),n=await i.devices(["videoinput"]);this.activeDeviceNumber=n.findIndex(o=>o.deviceId===e)}}async switchCamera(){const i=this.$refs.camera;this.activeDeviceNumber=(this.activeDeviceNumber+1)%this.numDevices;const e=await(i==null?void 0:i.devices(["videoinput"]));await(i==null?void 0:i.changeCamera(e[this.activeDeviceNumber].deviceId))}async takeImage(){var c,s,r,d,u,h;const i=this.$refs.camera;let e=(c=i==null?void 0:i.resolution)==null?void 0:c.height,n=(s=i==null?void 0:i.resolution)==null?void 0:s.width;const o=n/e,p=window.innerWidth/window.innerHeight;o>1&&p<1?(e=(r=i==null?void 0:i.resolution)==null?void 0:r.width,n=(d=i==null?void 0:i.resolution)==null?void 0:d.height):o<1&&p>1&&(e=(u=i==null?void 0:i.resolution)==null?void 0:u.width,n=(h=i==null?void 0:i.resolution)==null?void 0:h.height);const l=n/e;if(lt.close())},[P(p,{icon:"xmark",class:"w-[1em]"})])]),t.uploading?(q(),R("div",oe,[P(p,{icon:"spinner",class:"fa-spin fa-3x text-center block px-12 py-12"})])):t.blob?(q(),R("div",pe,[t.crop?(q(),R("div",se,[P(l,{"box-style":{backgroundColor:"#f8f8f8",margin:"auto"},img:t.createBlobURL(t.blob),options:{viewMode:1,dragMode:"crop",aspectRatio:9/9},class:"max-h-[90vh] max-w-[90vw] object-contain"},null,8,["img"])])):(q(),R("div",re,[B("div",le,[B("img",{src:t.createBlobURL(t.blob),class:"mt-2 rounded max-h-[90vh] max-w-[90vw] object-contain"},null,8,ce)])])),B("div",de,[B("button",{class:"bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white py-1 px-2 rounded-md",onClick:a[1]||(a[1]=(...s)=>t.uploadImage&&t.uploadImage(...s))},a[7]||(a[7]=[B("span",null,"Upload",-1)]))]),t.showRetry?(q(),R("div",me,[B("button",{class:"bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white py-1 px-2 rounded-md",onClick:a[2]||(a[2]=(...s)=>t.retryImage&&t.retryImage(...s))},a[8]||(a[8]=[B("span",null,"Retry",-1)]))])):kt("",!0)])):(q(),R("div",he,[P(c,{ref:"camera","facing-mode":"environment",autoplay:"",onStarted:a[6]||(a[6]=s=>t.cameraStarted())},{default:$i(()=>[B("div",ue,[B("button",{class:"bg-blue-500 hover:bg-blue-700 text-white font-bold p-3 rounded-full text-2xl leading-none",onClick:a[3]||(a[3]=s=>t.takeImage())},[P(p,{icon:"camera",class:"w-[1em]"})])]),B("div",ve,[B("button",{class:"bg-blue-500 hover:bg-blue-700 text-white font-bold p-3 rounded-full text-2xl leading-none",onClick:a[4]||(a[4]=s=>t.swapMirrorClass())},[P(p,{icon:"left-right",class:"w-[1em]"})])]),t.numDevices>1?(q(),R("div",ge,[B("button",{class:"bg-blue-500 hover:bg-blue-700 text-white font-bold p-3 rounded-full text-2xl leading-none",onClick:a[5]||(a[5]=s=>t.switchCamera())},[P(p,{icon:"rotate",class:"w-[1em]"})])])):kt("",!0)]),_:1},512)],512))])])):kt("",!0)}const ke=Ui(Rt,[["render",fe]]);export{ke as P}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/PhotoDialog-VFFukDsZ.css b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/PhotoDialog-VFFukDsZ.css deleted file mode 100644 index 05b157b..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/PhotoDialog-VFFukDsZ.css +++ /dev/null @@ -1 +0,0 @@ -.dialog-overlay{z-index:60;position:fixed;top:0;left:0;right:0;bottom:0;background-color:#00000080;display:flex;justify-content:center;align-items:center;padding:1.5rem}.dialog{background-color:#fff;padding:1rem;border-radius:.5rem;width:100%;max-width:700px}.mirror-video{transform:scaleX(-1);-webkit-transform:scaleX(-1);-moz-transform:scaleX(-1);-ms-transform:scaleX(-1);-o-transform:scaleX(-1)} diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ProjectIcon-ChPLhl-Y.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ProjectIcon-ChPLhl-Y.js deleted file mode 100644 index 5ac4918..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ProjectIcon-ChPLhl-Y.js +++ /dev/null @@ -1 +0,0 @@ -var K=Object.defineProperty;var N=(o,n,t)=>n in o?K(o,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[n]=t;var O=(o,n,t)=>N(o,typeof n!="symbol"?n+"":n,t);import{a1 as v,C as $,V as U,_ as V,h as F,B as L,k as W}from"./main.common-DD7dqhZp.js";function H(o,n,t){return parseInt(o.substr(n,t),16)}function E(o){return o|=0,o<0?"00":o<16?"0"+o.toString(16):o<256?o.toString(16):"ff"}function A(o,n,t){return t=t<0?t+6:t>6?t-6:t,E(255*(t<1?o+(n-o)*t:t<3?n:t<4?o+(n-o)*(4-t):o))}function Z(o){if(/^#[0-9a-f]{3,8}$/i.test(o)){let n;const t=o.length;if(t<6){const r=o[1],s=o[2],i=o[3],e=o[4]||"";n="#"+r+r+s+s+i+i+e+e}return(t==7||t>8)&&(n=o),n}}function q(o,n,t){let r;if(n==0){const s=E(t*255);r=s+s+s}else{const s=t<=.5?t*(n+1):t+n-t*n,i=t*2-s;r=A(i,s,o*6+2)+A(i,s,o*6)+A(i,s,o*6-2)}return"#"+r}function y(o,n,t){const r=[.55,.5,.5,.46,.6,.55,.55],s=r[o*6+.5|0];return t=t<.5?t*s*2:s+(t-.5)*(1-s)*2,q(o,n,t)}const Y=typeof window<"u"?window:typeof self<"u"?self:typeof global<"u"?global:{},R={V:"jdenticon_config",n:"config"};var J={};function X(o,n){const t=typeof o=="object"&&o||J[R.n]||Y[R.V]||{},r=t.lightness||{},s=t.saturation||{},i="color"in s?s.color:s,e=s.grayscale,u=t.backColor,a=t.padding;function f(d,c){let p=r[d];return p&&p.length>1||(p=c),function(h){return h=p[0]+h*(p[1]-p[0]),h<0?0:h>1?1:h}}function g(d){const c=t.hues;let p;return c&&c.length>0&&(p=c[0|.999*d*c.length]),typeof p=="number"?(p/360%1+1)%1:d}return{W:g,o:typeof i=="number"?i:.5,D:typeof e=="number"?e:0,p:f("color",[.4,.8]),F:f("grayscale",[.3,.9]),G:Z(u),X:typeof o=="number"?o:typeof a=="number"?a:n}}class T{constructor(n,t){this.x=n,this.y=t}}class D{constructor(n,t,r,s){this.q=n,this.t=t,this.H=r,this.Y=s}I(n,t,r,s){const i=this.q+this.H,e=this.t+this.H,u=this.Y;return u===1?new T(i-t-(s||0),this.t+n):u===2?new T(i-n-(r||0),e-t-(s||0)):u===3?new T(this.q+t,e-n-(r||0)):new T(this.q+n,this.t+t)}}const Q=new D(0,0,0,0);class z{constructor(n){this.J=n,this.u=Q}g(n,t){const r=t?-2:2,s=[];for(let i=t?n.length-2:0;i=0;i+=r)s.push(this.u.I(n[i],n[i+1]));this.J.g(s)}h(n,t,r,s){const i=this.u.I(n,t,r,r);this.J.h(i,r,s)}i(n,t,r,s,i){this.g([n,t,n+r,t,n+r,t+s,n,t+s],i)}j(n,t,r,s,i,e){const u=[n+r,t,n+r,t+s,n,t+s,n,t];u.splice((i||0)%4*2,2),this.g(u,e)}K(n,t,r,s,i){this.g([n+r/2,t,n+r,t+s/2,n+r/2,t+s,n,t+s/2],i)}}function x(o,n,t,r){o=o%14;let s,i,e,u,a,f;o?o==1?(e=0|t*.5,u=0|t*.8,n.j(t-e,0,e,u,2)):o==2?(e=0|t/3,n.i(e,e,t-e,t-e)):o==3?(a=t*.1,f=t<6?1:t<8?2:0|t*.25,a=a>1?0|a:a>.5?1:a,n.i(f,f,t-a-f,t-a-f)):o==4?(i=0|t*.15,e=0|t*.5,n.h(t-e-i,t-e-i,e)):o==5?(a=t*.1,f=a*4,f>3&&(f=0|f),n.i(0,0,t,t),n.g([f,f,t-a,f,f+(t-f-a)/2,t-a],!0)):o==6?n.g([0,0,t,0,t,t*.7,t*.4,t*.4,t*.7,t,0,t]):o==7?n.j(t/2,t/2,t/2,t/2,3):o==8?(n.i(0,0,t,t/2),n.i(0,t/2,t/2,t/2),n.j(t/2,t/2,t/2,t/2,1)):o==9?(a=t*.14,f=t<4?1:t<6?2:0|t*.35,a=t<8?a:0|a,n.i(0,0,t,t),n.i(f,f,t-f-a,t-f-a,!0)):o==10?(a=t*.12,f=a*3,n.i(0,0,t,t),n.h(f,f,t-a-f,!0)):o==11?n.j(t/2,t/2,t/2,t/2,3):o==12?(i=t*.25,n.i(0,0,t,t),n.K(i,i,t-i,t-i,!0)):!r&&(i=t*.4,e=t*1.2,n.h(i,i,e)):(s=t*.42,n.g([0,0,t,0,t,t-s*2,t-s,t,0,t]))}function k(o,n,t){o=o%4;let r;o?o==1?n.j(0,t/2,t,t/2,0):o==2?n.K(0,0,t,t):(r=t/6,n.h(r,r,t-2*r)):n.j(0,0,t,t,0)}function l(o,n){return o=n.W(o),[y(o,n.D,n.F(0)),y(o,n.o,n.p(.5)),y(o,n.D,n.F(1)),y(o,n.o,n.p(1)),y(o,n.o,n.p(0))]}function tt(o,n,t){const r=X(t,.08);r.G&&o.m(r.G);let s=o.k;const i=.5+s*r.X|0;s-=i*2;const e=new z(o),u=0|s/4,a=0|i+s/2-u*2,f=0|i+s/2-u*2;function g(S,_,B,w,P){const M=H(n,B,1);let G=w?H(n,w,1):0;o.L(c[p[S]]);for(let C=0;C=0){for(let _=0;_=0)return!0}}for(let S=0;S<3;S++)h=H(n,8+S,1)%c.length,(m([0,4])||m([2,3]))&&(h=1),p.push(h);g(0,k,2,3,[[1,0],[2,0],[2,3],[1,3],[0,1],[3,1],[3,2],[0,2]]),g(1,k,4,5,[[0,0],[3,0],[3,3],[0,3]]),g(2,x,1,null,[[1,1],[2,1],[2,2],[1,2]]),o.finish()}function nt(o){var r=0,s=0,i=encodeURI(o)+"%80",e=[],u,a=[],f=1732584193,g=4023233417,d=~f,c=~g,p=3285377520,h=[f,g,d,c,p],m=0,S="";function _(B,w){return B<>>32-w}for(;r>2]=e[s>>2]|(i[r]=="%"?parseInt(i.substring(r+1,r+=3),16):i.charCodeAt(r++))<<(3-(s&3))*8;for(u=((s+7>>6)+1)*16,e[u-1]=s*8-8;m>3]>>>(7-(r&7))*4&15).toString(16);return S}function ot(o){return/^[0-9a-f]{11,}$/i.test(o)&&o}function rt(o){return nt(o==null?"":""+o)}typeof document<"u"&&document.querySelectorAll.bind(document);function I(o){return(o*10+.5|0)/10}class st{constructor(){this.v=""}g(n){let t="";for(let r=0;r'}m(n,t){t&&(this.C+='')}P(n,t){this.C+=''}toString(){return this.C+""}}function at(o,n,t){const r=new ft(n);return tt(new it(r),ot(o)||rt(o),t),r.toString()}var ut=Object.defineProperty,ht=Object.getOwnPropertyDescriptor,j=(o,n,t,r)=>{for(var s=r>1?void 0:r?ht(n,t):n,i=o.length-1,e;i>=0;i--)(e=o[i])&&(s=(r?e(n,t,s):e(s))||s);return r&&s&&ut(n,t,s),s};const ct={lightness:{color:[1,1],grayscale:[1,1]},saturation:{color:0,grayscale:0},backColor:"#0000"};let b=class extends U{constructor(){super(...arguments);O(this,"entityId","");O(this,"iconSize",0);O(this,"imageUrl","");O(this,"linkToFull",!1)}generateIdenticon(){if(this.imageUrl)return``;{const t=this.entityId?void 0:ct;return at(this.entityId,this.iconSize,t)}}};j([v],b.prototype,"entityId",2);j([v],b.prototype,"iconSize",2);j([v],b.prototype,"imageUrl",2);j([v],b.prototype,"linkToFull",2);b=j([$],b);const pt=["href"],gt=["innerHTML"],dt=["innerHTML"];function St(o,n,t,r,s,i){return o.linkToFull&&o.imageUrl?(L(),F("a",{key:0,href:o.imageUrl,target:"_blank",class:"h-full w-full object-contain"},[W("div",{class:"h-full w-full object-contain",innerHTML:o.generateIdenticon()},null,8,gt)],8,pt)):(L(),F("div",{key:1,class:"h-full w-full object-contain",innerHTML:o.generateIdenticon()},null,8,dt))}const It=V(b,[["render",St]]);export{It as P}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ProjectViewView-BqC9uWSO.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ProjectViewView-BqC9uWSO.js deleted file mode 100644 index 21dd785..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ProjectViewView-BqC9uWSO.js +++ /dev/null @@ -1 +0,0 @@ -var W=Object.defineProperty;var q=(e,t,s)=>t in e?W(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var a=(e,t,s)=>q(e,typeof t!="symbol"?t+"":t,s);import{C as N,V as M,_ as V,z as w,h as n,m as u,B as r,k as i,t as m,j as c,F as C,E as D,n as y,e as z,d as Q,l as Y}from"./main.common-DD7dqhZp.js";import{G as K}from"./GiftedDialog-DmRkVexW.js";import{O as X}from"./OfferDialog-DDi7ax_Z.js";import{T as Z}from"./TopMessage-ZWDDjman.js";import{Q as ee}from"./QuickNav-C8jPGtUY.js";import{E as te}from"./EntityIcon-DciUb57i.js";import{P as ie}from"./ProjectIcon-ChPLhl-Y.js";import{s as J,i as se,l as oe,h as ne,g as T,ay as re,B as L,az as le,w as ae,j as de,aA as ce,C as A,m as he,p as fe,q as ue,u as pe,v as me}from"./index-ryzpKtgI.js";import{R as ge}from"./index-BtEdi1q-.js";import{u as ye}from"./index-CZnn7ED5.js";import{_ as ve}from"./blank-square-D9dGgMJw.js";import"./index-BGoTPXII.js";import"./_isString-B7bbuhPA.js";import"./concat-Ro2w9qwP.js";import"./set-BrilI7kO.js";import"./sort-DzTCGCnH.js";var be=Object.getOwnPropertyDescriptor,we=(e,t,s,l)=>{for(var h=l>1?void 0:l?be(t,s):t,p=e.length-1,d;p>=0;p--)(d=e[p])&&(h=d(h)||h);return h};let S=class extends M{constructor(){super(...arguments);a(this,"$notify");a(this,"isOpen",!1);a(this,"roleName","");a(this,"visibleToDids",[]);a(this,"allContacts",[]);a(this,"activeDid","");a(this,"allMyDids",[]);a(this,"canShare",!1);a(this,"windowLocation",window.location.href);a(this,"R",ge);a(this,"serverUtil",J)}created(){this.canShare=!!navigator.share}open(s,l,h,p,d){this.roleName=s,this.visibleToDids=l,this.allContacts=h,this.activeDid=p,this.allMyDids=d,this.isOpen=!0}close(){this.isOpen=!1}didInfo(s){return se(s,this.activeDid,this.allMyDids,this.allContacts)}copyToClipboard(s,l){ye().copy(l).then(()=>{this.$notify({group:"alert",type:"toast",title:"Copied",text:(s||"That")+" was copied to the clipboard."},2e3)})}onClickShareClaim(){this.copyToClipboard("A link to this page",this.windowLocation),window.navigator.share({title:"Help Connect Me",text:"I'm trying to find the people who recorded this. Can you help me?",url:this.windowLocation})}};S=we([N],S);const ke={key:0,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},Ce={class:"bg-white rounded-lg p-6 max-w-2xl w-full mx-4"},Te={class:"flex justify-between items-center mb-4"},De={class:"text-xl font-bold capitalize"},je={class:"mb-4"},Ie={class:"mb-4"},$e={key:0},xe={key:1},_e={key:0},Pe={key:1},Ue={class:"ml-4"},Le={class:"text-sm"},Se={key:0},Be=["href"],Ee={class:"mt-4"},Oe={key:0},Fe={key:1},Re={class:"flex justify-end"};function Ge(e,t,s,l,h,p){const d=w("font-awesome");return e.isOpen?(r(),n("div",ke,[i("div",Ce,[i("div",Te,[i("h2",De,m(e.roleName)+" Details",1),i("button",{class:"text-gray-500 hover:text-gray-700",onClick:t[0]||(t[0]=(...g)=>e.close&&e.close(...g))},[c(d,{icon:"times"})])]),i("div",je,[i("p",Ie,[e.R.isEmpty(e.visibleToDids)?(r(),n("span",$e," The "+m(e.roleName)+" is not visible to you or any of your contacts. ",1)):(r(),n("span",xe," The "+m(e.roleName)+" is not visible to you. ",1))]),e.R.isEmpty(e.visibleToDids)?(r(),n("div",_e,t[4]||(t[4]=[i("p",{class:"mt-2"}," You can ask one of your contacts to take a look and see if their contacts can see more details. Someone is connected to people closer to them; if you don't know who to ask, try the person who registered you. ",-1)]))):(r(),n("div",Pe,[t[5]||(t[5]=i("p",{class:"mb-2"}," They are visible to some of your contacts. If you'd like an introduction, ask them if they'll tell you more. ",-1)),i("div",Ue,[i("ul",null,[(r(!0),n(C,null,D(e.visibleToDids,(g,f)=>(r(),n("li",{key:f,class:"list-disc ml-4 mb-2"},[i("div",Le,[i("span",null,[y(m(e.didInfo(g))+" ",1),e.serverUtil.isEmptyOrHiddenDid(g)?u("",!0):(r(),n("span",Se,[i("a",{href:`/did/${g}`,target:"_blank",class:"text-blue-500"},[c(d,{icon:"arrow-up-right-from-square",class:"fa-fw"})],8,Be)]))])])]))),128))])])])),i("div",Ee,[e.canShare?(r(),n("span",Oe,[t[6]||(t[6]=y(" If you'd like an introduction, ")),i("a",{class:"text-blue-500",onClick:t[1]||(t[1]=g=>e.onClickShareClaim())},"click here to share the information with them and ask if they'll tell you more about the "+m(e.roleName)+".",1)])):(r(),n("span",Fe,[t[7]||(t[7]=y(" If you'd like an introduction, ")),i("a",{class:"text-blue-500",onClick:t[2]||(t[2]=g=>e.copyToClipboard("A link to this page",e.windowLocation))},"click here to copy this page, paste it into a message, and ask if they'll tell you more about the "+m(e.roleName)+".",1)]))])]),i("div",Re,[i("button",{class:"bg-blue-500 text-white px-4 py-2 rounded hover:bg-blue-600",onClick:t[3]||(t[3]=(...g)=>e.close&&e.close(...g))}," Close ")])])])):u("",!0)}const He=V(S,[["render",Ge]]);var Ae=Object.getOwnPropertyDescriptor,Ne=(e,t,s,l)=>{for(var h=l>1?void 0:l?Ae(t,s):t,p=e.length-1,d;p>=0;p--)(d=e[p])&&(h=d(h)||h);return h};let B=class extends M{constructor(){super(...arguments);a(this,"$notify");a(this,"$router");a(this,"activeDid","");a(this,"agentDid","");a(this,"agentDidVisibleToDids",[]);a(this,"allMyDids",[]);a(this,"allContacts",[]);a(this,"apiServer","");a(this,"isRegistered",!1);a(this,"description","");a(this,"endTime","");a(this,"expanded",!1);a(this,"fulfilledByThis",null);a(this,"fulfillersToThis",[]);a(this,"fulfillersToHitLimit",!1);a(this,"imageUrl","");a(this,"issuer","");a(this,"issuerInfoObject",null);a(this,"issuerVisibleToDids",[]);a(this,"latitude",0);a(this,"longitude",0);a(this,"name","");a(this,"projectId","");a(this,"startTime","");a(this,"url","");a(this,"givesToThis",[]);a(this,"givesHitLimit",!1);a(this,"givesProvidedByThis",[]);a(this,"givesProvidedByHitLimit",!1);a(this,"offersToThis",[]);a(this,"offersHitLimit",!1);a(this,"checkingConfirmationForJwtId","");a(this,"recentlyCheckedAndUnconfirmableJwts",[]);a(this,"truncatedDesc","");a(this,"truncateLength",40);a(this,"libsUtil",oe);a(this,"serverUtil",J)}async created(){const s=await z();this.activeDid=s.activeDid||"",this.apiServer=s.apiServer||"",this.allContacts=await Q.contacts.toArray(),this.isRegistered=!!s.isRegistered;try{this.allMyDids=await ne()}catch(h){Y("Error retrieving all account DIDs on home page:"+h,!0),this.$notify({group:"alert",type:"danger",title:"Error Loading Profile",text:"See the Help page to fix problems with your personal data."},5e3)}const l=window.location.pathname.substring(9);l&&(this.projectId=decodeURIComponent(l)),this.loadProject(this.projectId,this.activeDid)}async loadProject(s,l){var d,g,f,x,_,j,P,U,I,o,b,k,E,O,F,R;this.projectId=s;const h=this.apiServer+"/api/claim/byHandle/"+encodeURIComponent(s),p=await T(l);try{const v=await this.axios.get(h,{headers:p});if(v.status===200){const G=(d=v.data.claim)==null?void 0:d.startTime;if(G!=null){const $=new Date(G);this.startTime=$.toLocaleDateString()+" "+$.toLocaleTimeString()}const H=(g=v.data.claim)==null?void 0:g.endTime;if(H!=null){const $=new Date(H);this.endTime=$.toLocaleDateString()+" "+$.toLocaleTimeString()}this.agentDid=(x=(f=v.data.claim)==null?void 0:f.agent)==null?void 0:x.identifier,this.agentDidVisibleToDids=((j=(_=v.data.claim)==null?void 0:_.agent)==null?void 0:j.identifierVisibleToDids)||[],this.imageUrl=(P=v.data.claim)==null?void 0:P.image,this.issuer=v.data.issuer,this.issuerInfoObject=re(this.issuer,this.activeDid,this.allMyDids,this.allContacts),this.issuerVisibleToDids=v.data.issuerVisibleToDids||[],this.name=((U=v.data.claim)==null?void 0:U.name)||"(no name)",this.description=((I=v.data.claim)==null?void 0:I.description)||"(no description)",this.truncatedDesc=this.description.slice(0,this.truncateLength),this.latitude=((k=(b=(o=v.data.claim)==null?void 0:o.location)==null?void 0:b.geo)==null?void 0:k.latitude)||0,this.longitude=((F=(O=(E=v.data.claim)==null?void 0:E.location)==null?void 0:O.geo)==null?void 0:F.longitude)||0,this.url=((R=v.data.claim)==null?void 0:R.url)||""}else console.error("Error getting project:",v),this.$notify({group:"alert",type:"danger",title:"Error",text:"There was a problem getting that project."},5e3)}catch(v){console.error("Error retrieving project:",v),this.$notify({group:"alert",type:"danger",title:"Error",text:"Something went wrong retrieving that project."},5e3)}this.givesToThis=[],this.loadGives(),this.givesProvidedByThis=[],this.loadGivesProvidedBy(),this.offersToThis=[],this.loadOffers(),this.fulfillersToThis=[],this.loadPlanFulfillersTo(),this.fulfilledByThis=null,this.loadPlanFulfilledBy()}async loadGives(){const s=this.apiServer+"/api/v2/report/givesToPlans?planIds="+encodeURIComponent(JSON.stringify([this.projectId]));let l="";this.givesToThis.length>0&&(l="&beforeId="+this.givesToThis[this.givesToThis.length-1].jwtId);const h=s+l,p=await T(this.activeDid);try{const d=await this.axios.get(h,{headers:p});d.status===200&&d.data.data?(this.givesToThis=this.givesToThis.concat(d.data.data),this.givesHitLimit=d.data.hitLimit):this.$notify({group:"alert",type:"danger",title:"Error",text:"Failed to retrieve more gives to this project."},5e3)}catch(d){const g=d;this.$notify({group:"alert",type:"danger",title:"Error",text:"Something went wrong retrieving more gives to this project."},5e3),console.error("Something went wrong retrieving more gives to this project:",g.message)}}async loadGivesProvidedBy(){const s=this.apiServer+"/api/v2/report/givesProvidedBy?providerId="+encodeURIComponent(this.projectId);let l="";this.givesProvidedByThis.length>0&&(l="&beforeId="+this.givesProvidedByThis[this.givesProvidedByThis.length-1].jwtId);const h=s+l,p=await T(this.activeDid);try{const d=await this.axios.get(h,{headers:p});d.status===200?(this.givesProvidedByThis=this.givesProvidedByThis.concat(d.data.data),this.givesProvidedByHitLimit=d.data.hitLimit):this.$notify({group:"alert",type:"danger",title:"Error",text:"Failed to retrieve gives that were provided by this project."},5e3)}catch(d){const g=d;this.$notify({group:"alert",type:"danger",title:"Error",text:"Something went wrong retrieving gives that were provided by this project."},5e3),console.error("Something went wrong retrieving gives that were provided by this project:",g.message)}}async loadOffers(){const s=this.apiServer+"/api/v2/report/offersToPlans?planIds="+encodeURIComponent(JSON.stringify([this.projectId]));let l="";this.offersToThis.length>0&&(l="&beforeId="+this.offersToThis[this.offersToThis.length-1].jwtId);const h=s+l,p=await T(this.activeDid);try{const d=await this.axios.get(h,{headers:p});d.status===200&&d.data.data?(this.offersToThis=this.offersToThis.concat(d.data.data),this.offersHitLimit=d.data.hitLimit):this.$notify({group:"alert",type:"danger",title:"Error",text:"Failed to retrieve more offers to this project."},5e3)}catch(d){const g=d;this.$notify({group:"alert",type:"danger",title:"Error",text:"Something went wrong retrieving more offers to this project."},5e3),console.error("Something went wrong retrieving more offers to this project:",g.message)}}async loadPlanFulfillersTo(){const s=this.apiServer+"/api/v2/report/planFulfillersToPlan?planHandleId="+encodeURIComponent(this.projectId);let l="";this.fulfillersToThis.length>0&&(l="&beforeId="+this.fulfillersToThis[this.fulfillersToThis.length-1].jwtId);const h=s+l,p=await T(this.activeDid);try{const d=await this.axios.get(h,{headers:p});d.status===200?(this.fulfillersToThis=this.fulfillersToThis.concat(d.data.data),this.fulfillersToHitLimit=d.data.hitLimit):this.$notify({group:"alert",type:"danger",title:"Error",text:"Failed to retrieve more plans that fullfill this project."},5e3)}catch(d){const g=d;this.$notify({group:"alert",type:"danger",title:"Error",text:"Something went wrong retrieving more plans that fulfull this project."},5e3),console.error("Something went wrong retrieving more plans that fulfill this project:",g.message)}}async loadPlanFulfilledBy(){const s=this.apiServer+"/api/v2/report/planFulfilledByPlan?planHandleId="+encodeURIComponent(this.projectId),l=await T(this.activeDid);try{const h=await this.axios.get(s,{headers:l});h.status===200?this.fulfilledByThis=h.data.data:this.$notify({group:"alert",type:"danger",title:"Error",text:"Failed to retrieve plans fulfilled by this project."},5e3)}catch(h){const p=h;this.$notify({group:"alert",type:"danger",title:"Error",text:"Something went wrong retrieving plans fulfilled by this project."},5e3),console.error("Error retrieving plans fulfilled by this project:",p.message)}}onEditClick(){const s={name:"new-edit-project",query:{projectId:this.projectId}};this.$router.push(s)}expandText(){this.expanded=!0}collapseText(){this.expanded=!1}async onClickLoadProject(s){const l={path:"/project/"+encodeURIComponent(s)};this.$router.push(l),this.loadProject(s,this.activeDid)}getOpenStreetMapUrl(){return"https://www.openstreetmap.org/?mlat="+this.latitude+"&mlon="+this.longitude+"#map=15/"+this.latitude+"/"+this.longitude}openGiftDialogToProject(s){this.$refs.giveDialogToThis.open(s,void 0,void 0,((s==null?void 0:s.name)||"Someone not named")+" gave to this project")}openGiftDialogFromProject(){this.$refs.giveDialogFromThis.open(void 0,{did:this.activeDid,name:"You"},void 0,"This project gave to you")}openOfferDialog(){this.$refs.customOfferDialog.open()}onClickAllContactsGifting(){const s={name:"contact-gift",query:{projectId:this.projectId}};this.$router.push(s)}onClickLoadClaim(s){const l={path:"/claim/"+encodeURIComponent(s)};this.$router.push(l)}checkIsFulfillable(s){const l={...L,claim:s.fullClaim,claimType:"Offer",issuer:s.offeredByDid};return le(l)}onClickFulfillGiveToOffer(s){const l={...L,claim:s.fullClaim,issuer:s.offeredByDid},h={did:ae(l)};this.$refs.giveDialogToThis.open(h,void 0,s.handleId,"Given by "+((h==null?void 0:h.name)||"someone not named"))}addScheme(s){return de(s)?s:"https://"+s}domainForWebsite(s){try{const l=new URL(s).hostname;return l?s.endsWith(l)?l:l+"...":s}catch{return s}}checkIsConfirmable(s,l){const h={...L,claim:s.fullClaim,claimType:"GiveAction",issuer:s.issuerDid};return ce(this.isRegistered,h,this.activeDid,l)}shallowNotifyWhyCannotConfirm(s){const l=this.recentlyCheckedAndUnconfirmableJwts.includes(s.jwtId)?[this.activeDid]:[];A(this.$notify,this.isRegistered,"GiveAction",s,this.activeDid,l)}async deepCheckConfirmable(s){this.checkingConfirmationForJwtId=s.jwtId;const l=await he(this.apiServer,s.jwtId,s.issuerDid,this.activeDid);this.checkIsConfirmable(s,l==null?void 0:l.confirmerIdList)?this.confirmConfirmClaim(s):(this.recentlyCheckedAndUnconfirmableJwts=[...this.recentlyCheckedAndUnconfirmableJwts,s.jwtId],A(this.$notify,this.isRegistered,"GiveAction",s,this.activeDid,l==null?void 0:l.confirmerIdList)),this.checkingConfirmationForJwtId=""}confirmConfirmClaim(s){this.$notify({group:"modal",type:"confirm",title:"Confirm",text:"Do you personally confirm that this is true?",onYes:async()=>{await this.confirmClaim(s)}},-1)}async confirmClaim(s){var d;const h={"@context":"https://schema.org","@type":"AgreeAction",object:fe(ue(pe(s.fullClaim,s.jwtId,s.handleId)))},p=await me(h,this.activeDid,this.apiServer,this.axios);if(p.type==="success")this.$notify({group:"alert",type:"success",title:"Success",text:"Confirmation submitted."},5e3),this.recentlyCheckedAndUnconfirmableJwts=[...this.recentlyCheckedAndUnconfirmableJwts,s.jwtId];else{console.error("Got error submitting the confirmation:",p);const g=((d=p.error)==null?void 0:d.error)||"There was a problem submitting the confirmation.";this.$notify({group:"alert",type:"danger",title:"Error",text:g},5e3)}}openHiddenDidDialog(){this.$refs.hiddenDidDialog.open("creator",this.issuerVisibleToDids,this.allContacts,this.activeDid,this.allMyDids)}};B=Ne([N({components:{EntityIcon:te,GiftedDialog:K,HiddenDidDialog:He,OfferDialog:X,ProjectIcon:ie,QuickNav:ee,TopMessage:Z}})],B);const Me={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},Ve={id:"ViewBreadcrumb"},Je={class:"text-center text-lg font-light relative px-7"},We={class:"text-center text-xl font-semibold"},qe={class:"bg-slate-100 rounded-md overflow-hidden px-4 py-3 mt-4"},ze={class:"pb-4 flex gap-4"},Qe={class:"pt-1"},Ye={class:"overflow-hidden"},Ke={class:"text-sm mb-3"},Xe={class:"truncate"},Ze={key:0},et=["href"],tt={key:1},it={key:0},st={key:1},ot={key:2},nt=["href"],rt={key:3},lt=["href"],at={class:"text-sm text-slate-500"},dt={key:0},ct={key:1},ht={class:"grid items-start grid-cols-1 sm:grid-cols-2 gap-4 mt-4"},ft={key:0,class:"bg-slate-100 px-4 py-3 rounded-md"},ut={class:"text-center"},pt=["onClick"],mt={key:0,class:"text-center"},gt={key:0,class:"bg-slate-100 px-4 py-3 rounded-md"},yt={class:"text-center"},vt={key:0},bt={class:"grid grid-cols-4 sm:grid-cols-5 md:grid-cols-6 gap-x-3 gap-y-5 text-center mb-5 mt-2"},wt=["onClick"],kt={class:"text-xs text-blue-500 font-medium text-ellipsis whitespace-nowrap overflow-hidden cursor-pointer"},Ct={class:"grid items-start grid-cols-1 sm:grid-cols-3 gap-4 mt-4"},Tt={class:"bg-slate-100 px-4 py-3 rounded-md"},Dt={key:0},jt={class:"text-center"},It={key:1},$t={key:2,class:"text-sm border-t border-slate-300"},xt={class:"flex justify-between gap-4"},_t={key:0,class:"whitespace-nowrap"},Pt={key:0,class:"text-slate-500"},Ut={class:"flex justify-between"},Lt=["onClick"],St=["onClick"],Bt={key:3,class:"text-center text-blue-500"},Et={class:"bg-slate-100 px-4 py-3 rounded-md","data-testId":"gives-to"},Ot={key:0},Ft={class:"text-center"},Rt={key:1},Gt={key:2,class:"text-sm border-t border-slate-300"},Ht={class:"flex justify-between gap-4"},At={key:0,class:"whitespace-nowrap"},Nt={class:"text-slate-500"},Mt={key:0,class:"text-slate-500"},Vt={class:"flex justify-between"},Jt=["onClick"],Wt=["onClick"],qt={key:1},zt=["onClick"],Qt={key:1,class:"flex justify-center"},Yt=["href"],Kt=["src"],Xt={key:3,class:"text-center text-blue-500"},Zt={class:"bg-slate-100 px-4 py-3 rounded-md","data-testId":"gives-from"},ei={key:0},ti={class:"text-center"},ii={key:1},si={key:2,class:"text-sm border-t border-slate-300"},oi={class:"flex justify-between gap-4"},ni={key:0,class:"whitespace-nowrap"},ri={class:"text-slate-500"},li={key:0,class:"text-slate-500"},ai={class:"flex justify-between"},di=["onClick"],ci=["onClick"],hi={key:1},fi=["onClick"],ui={key:1,class:"flex justify-center"},pi=["href"],mi=["src"],gi={key:3,class:"text-center"};function yi(e,t,s,l,h,p){var I;const d=w("QuickNav"),g=w("TopMessage"),f=w("font-awesome"),x=w("ProjectIcon"),_=w("EntityIcon"),j=w("GiftedDialog"),P=w("OfferDialog"),U=w("HiddenDidDialog");return r(),n(C,null,[c(d),c(g),i("section",Me,[i("div",Ve,[i("div",null,[i("h1",Je,[i("button",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:t[0]||(t[0]=o=>e.$router.back())},[c(f,{icon:"chevron-left",class:"fa-fw"})]),t[18]||(t[18]=y(" Project Idea "))]),i("h2",We,[y(m(e.name)+" ",1),e.activeDid===e.issuer||e.activeDid===e.agentDid?(r(),n("button",{key:0,title:"Edit","data-testId":"editClaimButton",onClick:t[1]||(t[1]=o=>e.onEditClick())},[c(f,{icon:"pen",class:"text-sm text-blue-500 ml-2 mb-1"})])):u("",!0)])])]),i("div",qe,[i("div",null,[i("div",ze,[i("div",Qe,[c(x,{"entity-id":e.projectId,"icon-size":64,"image-url":e.imageUrl,"link-to-full":!0,class:"block border border-slate-300 rounded-md max-h-16 max-w-16"},null,8,["entity-id","image-url"])]),i("div",Ye,[i("div",Ke,[i("div",Xe,[c(f,{icon:"user",class:"fa-fw text-slate-400"}),y(" "+m((I=e.issuerInfoObject)==null?void 0:I.displayName)+" ",1),e.serverUtil.isEmptyOrHiddenDid(e.issuer)?e.serverUtil.isHiddenDid(e.issuer)?(r(),n("span",tt,[c(f,{icon:"info-circle",class:"fa-fw text-blue-500 cursor-pointer",onClick:t[2]||(t[2]=o=>e.openHiddenDidDialog())})])):u("",!0):(r(),n("span",Ze,[i("a",{href:`/did/${e.issuer}`,target:"_blank",class:"text-blue-500"},[c(f,{icon:"arrow-up-right-from-square",class:"fa-fw"})],8,et)]))]),e.startTime?(r(),n("div",it,[c(f,{icon:"calendar",class:"fa-fw text-slate-400"}),y(" Starts "+m(e.startTime),1)])):u("",!0),e.endTime?(r(),n("div",st,[c(f,{icon:"calendar",class:"fa-fw text-slate-400"}),y(" Ends "+m(e.endTime),1)])):u("",!0),e.latitude||e.longitude?(r(),n("div",ot,[c(f,{icon:"location-dot",class:"fa-fw text-slate-400"}),i("a",{href:e.getOpenStreetMapUrl(),target:"_blank",class:"underline text-blue-500"},[t[19]||(t[19]=y("Map View ")),c(f,{icon:"arrow-up-right-from-square",class:"fa-fw text-blue-500"})],8,nt)])):u("",!0),e.url?(r(),n("div",rt,[c(f,{icon:"globe",class:"fa-fw text-slate-400"}),i("a",{href:e.addScheme(e.url),target:"_blank",class:"underline text-blue-500"},[y(m(e.domainForWebsite(e.url))+" ",1),c(f,{icon:"arrow-up-right-from-square",class:"fa-fw"})],8,lt)])):u("",!0)])])]),i("div",at,[e.expanded?(r(),n("div",ct,[y(m(e.description)+" ",1),i("a",{class:"uppercase text-xs font-semibold text-slate-700",onClick:t[4]||(t[4]=(...o)=>e.collapseText&&e.collapseText(...o))},"- Read Less")])):(r(),n("div",dt,[y(m(e.truncatedDesc)+" ",1),e.description.length>=e.truncateLength?(r(),n("a",{key:0,class:"uppercase text-xs font-semibold text-slate-700",onClick:t[3]||(t[3]=(...o)=>e.expandText&&e.expandText(...o))},"... Read More")):u("",!0)]))]),i("a",{class:"cursor-pointer",onClick:t[5]||(t[5]=o=>e.onClickLoadClaim(e.projectId))},[c(f,{icon:"file-lines",class:"pl-2 pt-1 text-blue-500"})])])]),i("div",ht,[i("div",null,[e.fulfillersToThis.length>0?(r(),n("div",ft,[t[20]||(t[20]=i("h3",{class:"text-sm uppercase font-semibold mt-3"}," Projects That Contribute To This ",-1)),i("div",ut,[(r(!0),n(C,null,D(e.fulfillersToThis,o=>(r(),n("div",{key:o.handleId},[i("button",{class:"text-blue-500",onClick:b=>e.onClickLoadProject(o.handleId)},m(o.name),9,pt)]))),128)),e.fulfillersToHitLimit?(r(),n("div",mt,[i("button",{onClick:t[6]||(t[6]=o=>e.loadPlanFulfillersTo())},"Load More")])):u("",!0)])])):u("",!0)]),i("div",null,[e.fulfilledByThis?(r(),n("div",gt,[t[21]||(t[21]=i("h3",{class:"text-sm uppercase font-semibold mb-3"}," Projects Getting Contributions From This ",-1)),i("div",yt,[i("button",{class:"text-blue-500",onClick:t[7]||(t[7]=o=>e.onClickLoadProject(e.fulfilledByThis.handleId))},m(e.fulfilledByThis.name),1)])])):u("",!0)])]),e.activeDid&&e.isRegistered?(r(),n("div",vt,[t[24]||(t[24]=i("div",{class:"text-center"},[i("p",{class:"mt-2 mt-4 text-center"},"Record a contribution from:")],-1)),i("ul",bt,[i("li",{onClick:t[8]||(t[8]=o=>e.openGiftDialogToProject({name:"you",did:e.activeDid}))},[c(f,{icon:"hand",class:"fa-fw text-blue-500 text-5xl cursor-pointer"}),t[22]||(t[22]=i("h3",{class:"mt-5 text-xs text-blue-500 font-medium text-ellipsis whitespace-nowrap overflow-hidden cursor-pointer"}," You ",-1))]),i("li",{onClick:t[9]||(t[9]=o=>e.openGiftDialogToProject())},t[23]||(t[23]=[i("img",{src:ve,class:"mx-auto border border-blue-300 rounded-md mb-1 cursor-pointer"},null,-1),i("h3",{class:"text-xs text-blue-500 italic font-medium text-ellipsis whitespace-nowrap overflow-hidden cursor-pointer"}," Unnamed/Unknown ",-1)])),(r(!0),n(C,null,D(e.allContacts.slice(0,5),o=>(r(),n("li",{key:o.did,onClick:b=>e.openGiftDialogToProject(o)},[c(_,{contact:o,"icon-size":64,class:"mx-auto border border-blue-300 rounded-md mb-1 cursor-pointer"},null,8,["contact"]),i("h3",kt,m(o.name||"(no name)"),1)],8,wt))),128)),i("li",null,[e.allContacts.length>=5?(r(),n("span",{key:0,class:"flex align-bottom text-xs text-blue-500 mt-12 cursor-pointer",onClick:t[10]||(t[10]=o=>e.onClickAllContactsGifting())}," ... or someone else... ")):u("",!0)])]),c(j,{ref:"giveDialogToThis","to-project-id":e.projectId},null,8,["to-project-id"])])):u("",!0),i("div",Ct,[i("div",Tt,[e.activeDid&&e.isRegistered?(r(),n("div",Dt,[i("div",jt,[i("button",{"data-testId":"offerButton",class:"block w-full bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1 rounded-md",onClick:t[11]||(t[11]=o=>e.openOfferDialog())}," Offer to this (maybe with conditions)... ")])])):u("",!0),c(P,{ref:"customOfferDialog","project-id":e.projectId,"project-name":e.name},null,8,["project-id","project-name"]),t[27]||(t[27]=i("h3",{class:"text-lg font-bold mb-3 mt-4"},"Offered To This Idea",-1)),e.offersToThis.length===0?(r(),n("div",It,[t[25]||(t[25]=y(" (None yet. Wanna ")),i("span",{class:"cursor-pointer text-blue-500",onClick:t[12]||(t[12]=o=>e.openOfferDialog())},"offer something... especially if others join you"),t[26]||(t[26]=y("?) "))])):(r(),n("ul",$t,[(r(!0),n(C,null,D(e.offersToThis,o=>(r(),n("li",{key:o.jwtId,class:"py-1.5 border-b border-slate-300"},[i("div",xt,[i("span",null,[c(f,{icon:"user",class:"fa-fw text-slate-400"}),y(" "+m(e.serverUtil.didInfo(o.offeredByDid,e.activeDid,e.allMyDids,e.allContacts)),1)]),o.amount?(r(),n("span",_t,[c(f,{icon:e.libsUtil.iconForUnitCode(o.unit),class:"fa-fw text-slate-400"},null,8,["icon"]),y(m(o.amount),1)])):u("",!0)]),o.objectDescription?(r(),n("div",Pt,[c(f,{icon:"comment",class:"fa-fw text-slate-400"}),y(" "+m(o.objectDescription),1)])):u("",!0),i("div",Ut,[i("a",{class:"cursor-pointer",onClick:b=>e.onClickLoadClaim(o.jwtId)},[c(f,{icon:"file-lines",class:"pl-2 pt-1 text-blue-500"})],8,Lt),e.checkIsFulfillable(o)?(r(),n("a",{key:0,onClick:b=>e.onClickFulfillGiveToOffer(o)},[c(f,{icon:"hand-holding-heart",class:"text-blue-500 cursor-pointer"})],8,St)):u("",!0)])]))),128))])),e.offersHitLimit?(r(),n("div",Bt,[i("button",{onClick:t[13]||(t[13]=o=>e.loadOffers())},"Load More")])):u("",!0)]),i("div",Et,[e.activeDid&&e.isRegistered?(r(),n("div",Ot,[i("div",Ft,[i("button",{class:"block w-full bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1rounded-md",onClick:t[14]||(t[14]=o=>e.openGiftDialogToProject())}," Given To This... ")])])):u("",!0),t[28]||(t[28]=i("h3",{class:"text-lg font-bold mb-3 mt-4"},"Given To This Idea",-1)),e.givesToThis.length===0?(r(),n("div",Rt," (None yet. If you've seen something, say something by clicking a contact above.) ")):(r(),n("ul",Gt,[(r(!0),n(C,null,D(e.givesToThis,o=>{var b;return r(),n("li",{key:o.jwtId,class:"py-1.5 border-b border-slate-300"},[i("div",Ht,[i("span",null,[c(f,{icon:"user",class:"fa-fw text-slate-400"}),y(" "+m(e.serverUtil.didInfo(o.agentDid,e.activeDid,e.allMyDids,e.allContacts)),1)]),o.amount?(r(),n("span",At,[c(f,{icon:e.libsUtil.iconForUnitCode(o.unit),class:"fa-fw text-slate-400"},null,8,["icon"]),y(m(o.amount),1)])):u("",!0)]),i("div",Nt,[c(f,{icon:"calendar",class:"fa-fw text-slate-400"}),y(" "+m((b=o.issuedAt)==null?void 0:b.substring(0,10)),1)]),o.description?(r(),n("div",Mt,[c(f,{icon:"comment",class:"fa-fw text-slate-400"}),y(" "+m(o.description),1)])):u("",!0),i("div",Vt,[i("a",{onClick:k=>e.onClickLoadClaim(o.jwtId)},[c(f,{icon:"file-lines",class:"text-blue-500 cursor-pointer"})],8,Jt),e.checkIsConfirmable(o)&&!e.recentlyCheckedAndUnconfirmableJwts.includes(o.jwtId)?(r(),n("a",{key:0,onClick:k=>e.deepCheckConfirmable(o)},[c(f,{icon:"circle-check",class:"text-blue-500 cursor-pointer"})],8,Wt)):e.checkingConfirmationForJwtId===o.jwtId?(r(),n("a",qt,[c(f,{icon:"spinner",class:"fa-spin-pulse"})])):(r(),n("a",{key:2,onClick:k=>e.shallowNotifyWhyCannotConfirm(o)},[c(f,{icon:"circle-check",class:"text-slate-500 cursor-pointer"})],8,zt))]),o.fullClaim.image?(r(),n("div",Qt,[i("a",{href:o.fullClaim.image,target:"_blank"},[i("img",{src:o.fullClaim.image,class:"h-24 mt-2 rounded-xl"},null,8,Kt)],8,Yt)])):u("",!0)])}),128))])),e.givesHitLimit?(r(),n("div",Xt,[i("button",{onClick:t[15]||(t[15]=o=>e.loadGives())},"Load More")])):u("",!0)]),i("div",Zt,[e.activeDid&&e.isRegistered?(r(),n("div",ei,[i("div",ti,[i("button",{class:"block w-full bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1 rounded-md",onClick:t[16]||(t[16]=o=>e.openGiftDialogFromProject())}," Given By This... ")])])):u("",!0),c(j,{ref:"giveDialogFromThis","from-project-id":e.projectId},null,8,["from-project-id"]),t[29]||(t[29]=i("h3",{class:"text-lg font-bold mb-3 mt-4"}," Benefitted From This Project ",-1)),e.givesProvidedByThis.length===0?(r(),n("div",ii,"(None yet.)")):(r(),n("ul",si,[(r(!0),n(C,null,D(e.givesProvidedByThis,o=>{var b;return r(),n("li",{key:o.jwtId,class:"py-1.5 border-b border-slate-300"},[i("div",oi,[i("span",null,m(e.serverUtil.didInfo(o.recipientDid,e.activeDid,e.allMyDids,e.allContacts)),1),o.amount?(r(),n("span",ni,[c(f,{icon:e.libsUtil.iconForUnitCode(o.unit),class:"fa-fw text-slate-400"},null,8,["icon"]),y(m(o.amount),1)])):u("",!0)]),i("div",ri,[c(f,{icon:"calendar",class:"fa-fw text-slate-400"}),y(" "+m((b=o.issuedAt)==null?void 0:b.substring(0,10)),1)]),o.description?(r(),n("div",li,[c(f,{icon:"comment",class:"fa-fw text-slate-400"}),y(" "+m(o.description),1)])):u("",!0),i("div",ai,[i("a",{onClick:k=>e.onClickLoadClaim(o.jwtId)},[c(f,{icon:"file-lines",class:"text-blue-500 cursor-pointer"})],8,di),e.checkIsConfirmable(o)&&!e.recentlyCheckedAndUnconfirmableJwts.includes(o.jwtId)?(r(),n("a",{key:0,onClick:k=>e.deepCheckConfirmable(o)},[c(f,{icon:"circle-check",class:"text-blue-500 cursor-pointer"})],8,ci)):e.checkingConfirmationForJwtId===o.jwtId?(r(),n("a",hi,[c(f,{icon:"spinner",class:"fa-spin-pulse"})])):(r(),n("a",{key:2,onClick:k=>e.shallowNotifyWhyCannotConfirm(o)},[c(f,{icon:"circle-check",class:"text-slate-500 cursor-pointer"})],8,fi))]),o.fullClaim.image?(r(),n("div",ui,[i("a",{href:o.fullClaim.image,target:"_blank"},[i("img",{src:o.fullClaim.image,class:"h-24 mt-2 rounded-xl"},null,8,mi)],8,pi)])):u("",!0)])}),128))])),e.givesProvidedByHitLimit?(r(),n("div",gi,[i("button",{onClick:t[17]||(t[17]=o=>e.loadGivesProvidedBy())},"Load More")])):u("",!0)])])]),c(U,{ref:"hiddenDidDialog"},null,512)],64)}const Fi=V(B,[["render",yi]]);export{Fi as default}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ProjectsView-qIPma1jV.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ProjectsView-qIPma1jV.js deleted file mode 100644 index 80806ad..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/ProjectsView-qIPma1jV.js +++ /dev/null @@ -1 +0,0 @@ -var L=Object.defineProperty;var S=(e,o,s)=>o in e?L(e,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[o]=s;var d=(e,o,s)=>S(e,typeof o!="symbol"?o+"":o,s);import{V as M,e as T,d as B,C as F,_ as H,h as i,j as c,k as n,m as g,y as P,x as _,w as C,F as D,z as y,B as r,n as f,E as N,t as m}from"./main.common-DD7dqhZp.js";import{E as R}from"./EntityIcon-DciUb57i.js";import{I as A}from"./InfiniteScroll-DZwFAI4R.js";import{Q as E}from"./QuickNav-C8jPGtUY.js";import{O as U}from"./OnboardingDialog-DKHXNqS_.js";import{P as V}from"./ProjectIcon-ChPLhl-Y.js";import{T as z}from"./TopMessage-ZWDDjman.js";import{U as Y}from"./UserNameDialog-BV49F4GW.js";import{l as Q,i as q,h as J,$ as K,g as $,a0 as W}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var X=Object.getOwnPropertyDescriptor,Z=(e,o,s,a)=>{for(var l=a>1?void 0:a?X(o,s):o,u=e.length-1,p;u>=0;u--)(p=e[u])&&(l=p(l)||l);return l};let x=class extends M{constructor(){super(...arguments);d(this,"$notify");d(this,"$router");d(this,"activeDid","");d(this,"allContacts",[]);d(this,"allMyDids",[]);d(this,"apiServer","");d(this,"givenName","");d(this,"isLoading",!1);d(this,"isRegistered",!1);d(this,"offers",[]);d(this,"projectNameFromHandleId",{});d(this,"projects",[]);d(this,"showOffers",!1);d(this,"showProjects",!0);d(this,"libsUtil",Q);d(this,"didInfo",q)}errNote(s){this.$notify({group:"alert",type:"danger",title:"Error",text:s},5e3)}async mounted(){try{const s=await T();this.activeDid=s.activeDid||"",this.apiServer=s.apiServer||"",this.isRegistered=!!s.isRegistered,this.givenName=s.firstName||"",this.allContacts=await B.contacts.toArray(),this.allMyDids=await J(),s.finishedOnboarding||this.$refs.onboardingDialog.open(K.Create),this.allMyDids.length===0?(console.error("No accounts found."),this.errNote("You need an identifier to load your projects.")):await this.loadProjects()}catch(s){console.error("Error initializing:",s),this.errNote("Something went wrong loading your projects.")}}async projectDataLoader(s){try{const a=await $(this.activeDid,this.$notify);this.isLoading=!0;const l=await this.axios.get(s,{headers:a});if(l.status===200&&l.data.data){const u=l.data.data;for(const p of u){const{name:w,description:v,handleId:h,image:k,issuerDid:b,rowId:j}=p;this.projects.push({name:w,description:v,image:k,handleId:h,issuerDid:b,rowId:j})}}else console.error("Bad server response & data for plans:",l.status,l.data),this.errNote("Failed to get projects from the server.")}catch(a){console.error("Got error loading plans:",a.message||a),this.errNote("Got an error loading projects.")}finally{this.isLoading=!1}}async loadMoreProjectData(s){if(this.projects.length>0&&s){const a=this.projects[this.projects.length-1];await this.loadProjects(`beforeId=${a.rowId}`)}}async loadProjects(s=""){const a=`${this.apiServer}/api/v2/report/plansByIssuer?${s}`;await this.projectDataLoader(a)}onClickLoadProject(s){const a={path:"/project/"+encodeURIComponent(s)};this.$router.push(a)}onClickNewProject(){const s={name:"new-edit-project"};this.$router.push(s)}onClickLoadClaim(s){const a={path:"/claim/"+encodeURIComponent(s)};this.$router.push(a)}async offerDataLoader(s){const a=await $(this.activeDid);try{this.isLoading=!0;const l=await this.axios.get(s,{headers:a});if(l.status===200&&l.data.data)for(const u of l.data.data){if(u.fulfillsPlanHandleId){const p=await W(u.fulfillsPlanHandleId,this.axios,this.apiServer,this.activeDid),w=p==null?void 0:p.name;this.projectNameFromHandleId[u.fulfillsPlanHandleId]=w}this.offers=this.offers.concat([u])}else console.error("Bad server response & data for offers:",l.status,l.data),this.$notify({group:"alert",type:"danger",title:"Error",text:"Failed to get offers from the server."},5e3)}catch(l){console.error("Got error loading offers:",l.message||l),this.$notify({group:"alert",type:"danger",title:"Error",text:"Got an error loading offers."},5e3)}finally{this.isLoading=!1}}async loadMoreOfferData(s){if(this.offers.length>0&&s){const a=this.offers[this.offers.length-1];await this.loadOffers(`&beforeId=${a.jwtId}`)}}async loadOffers(s=""){const a=`${this.apiServer}/api/v2/report/offers?offeredByDid=${this.activeDid}${s}`;await this.offerDataLoader(a)}showNameThenIdDialog(){this.givenName?this.promptForShareMethod():this.$refs.userNameDialog.open(()=>{this.promptForShareMethod()})}promptForShareMethod(){this.$notify({group:"modal",type:"confirm",title:"Are you nearby with cameras?",text:"If so, we'll use those with QR codes to share.",onCancel:async()=>{},onNo:async()=>{this.$router.push({name:"share-my-contact-info"})},onYes:async()=>{this.$router.push({name:"contact-qr"})},noText:"we will share another way",yesText:"we are nearby with cameras"},-1)}computedOfferTabClassNames(){return{"inline-block":!0,"py-3":!0,"rounded-t-lg":!0,"border-b-2":!0,active:this.showOffers,"text-black":this.showOffers,"border-black":this.showOffers,"font-semibold":this.showOffers,"text-blue-600":!this.showOffers,"border-transparent":!this.showOffers,"hover:border-slate-400":!this.showOffers}}computedProjectTabClassNames(){return{"inline-block":!0,"py-3":!0,"rounded-t-lg":!0,"border-b-2":!0,active:this.showProjects,"text-black":this.showProjects,"border-black":this.showProjects,"font-semibold":this.showProjects,"text-blue-600":!this.showProjects,"border-transparent":!this.showProjects,"hover:border-slate-400":!this.showProjects}}};x=Z([F({components:{EntityIcon:R,InfiniteScroll:A,QuickNav:E,OnboardingDialog:U,ProjectIcon:V,TopMessage:z,UserNameDialog:Y}})],x);const ee={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},te={class:"text-center text-slate-500 border-b border-slate-300 mt-8"},oe={class:"flex flex-wrap justify-center gap-4 -mb-px"},se={key:1,class:"fixed left-6 bottom-24 text-center text-4xl leading-none bg-slate-400 text-white w-14 py-2.5 rounded-full"},ne={key:0,class:"text-center py-4"},re={id:"listOffers",class:"border-t border-slate-300"},ae={class:"block py-4 flex gap-4"},ie={key:0,class:"flex-none"},le={key:1,class:"flex-none w-12"},de={class:"text-sm"},ce={key:0},he={key:0},ue={key:1},fe={key:2},me={class:"text-sm text-slate-400"},pe={key:0},ge={key:1},ye={key:1},we={key:0},be={key:1},ve=["onClick"],ke={key:0,class:"text-center py-4"},je={key:0},Pe={key:1},Ce={id:"listProjects",class:"border-t border-slate-300"},De=["onClick"],xe={class:"flex-none"},Ie={class:"grow overflow-hidden"},_e={class:"text-base font-semibold"},Ne={class:"text-sm truncate"};function $e(e,o,s,a,l,u){const p=y("QuickNav"),w=y("TopMessage"),v=y("OnboardingDialog"),h=y("font-awesome"),k=y("router-link"),b=y("ProjectIcon"),j=y("EntityIcon"),I=y("InfiniteScroll"),O=y("UserNameDialog");return r(),i(D,null,[c(p,{selected:"Projects"}),c(w),n("section",ee,[o[12]||(o[12]=n("h1",{id:"ViewHeading",class:"text-4xl text-center font-light"}," Your Project Ideas ",-1)),c(v,{ref:"onboardingDialog"},null,512),n("div",te,[n("ul",oe,[n("li",null,[n("a",{href:"#",class:_(e.computedOfferTabClassNames()),onClick:o[0]||(o[0]=t=>{e.offers=[],e.projects=[],e.showOffers=!0,e.showProjects=!1,e.loadOffers()})}," Offers ",2)]),n("li",null,[n("a",{href:"#",class:_(e.computedProjectTabClassNames()),onClick:o[1]||(o[1]=t=>{e.offers=[],e.projects=[],e.showOffers=!1,e.showProjects=!0,e.loadProjects()})}," Projects ",2)])])]),e.isRegistered&&e.showProjects?(r(),i("button",{key:0,class:"fixed right-6 top-24 text-center text-4xl leading-none bg-green-600 text-white w-14 py-2.5 rounded-full",onClick:o[2]||(o[2]=t=>e.onClickNewProject())},[c(h,{icon:"plus",class:"fa-fw"})])):g("",!0),e.isLoading?(r(),i("div",se,[c(h,{icon:"spinner",class:"fa-spin-pulse"})])):g("",!0),e.showOffers?(r(),P(I,{key:2,onReachedBottom:e.loadMoreOfferData},{default:C(()=>[e.offers.length===0?(r(),i("div",ne,[o[5]||(o[5]=f(" You have not offered anything. ")),o[6]||(o[6]=n("br",null,null,-1)),c(k,{to:"/discover",class:"text-blue-600"},{default:C(()=>o[4]||(o[4]=[f(" Look for projects worth some of your time. ")])),_:1})])):g("",!0),n("ul",re,[(r(!0),i(D,null,N(e.offers,t=>(r(),i("li",{key:t.handleId,class:"border-b border-slate-300"},[n("div",ae,[t.fulfillsPlanHandleId?(r(),i("div",ie,[c(b,{"entity-id":t.fulfillsPlanHandleId,"icon-size":48,class:"inline-block align-middle border border-slate-300 rounded-md max-h-12 max-w-12"},null,8,["entity-id"])])):g("",!0),t.recipientDid?(r(),i("div",le,[c(j,{"entity-id":t.recipientDid,"icon-size":48,class:"inline-block align-middle border border-slate-300 rounded-md"},null,8,["entity-id"])])):g("",!0),n("div",null,[n("div",null," To "+m(t.fulfillsPlanHandleId?e.projectNameFromHandleId[t.fulfillsPlanHandleId]:e.didInfo(t.recipientDid,e.activeDid,e.allMyDids,e.allContacts)),1),n("div",null,m(t.objectDescription),1),n("span",de,[t.amount?(r(),i("span",ce,[c(h,{icon:e.libsUtil.iconForUnitCode(t.unit),class:"fa-fw text-slate-400"},null,8,["icon"]),t.amountGiven>=t.amount?(r(),i("span",he,[c(h,{icon:"check-circle",class:"fa-fw text-green-500"}),f(" All "+m(t.amount)+" given ",1)])):(r(),i("span",ue,[c(h,{icon:"triangle-exclamation",class:"fa-fw text-yellow-500"}),f(" "+m(t.amountGiven?"":"All")+" "+m(t.amount-(t.amountGiven||0))+" remaining ",1)])),t.amountGiven>0?(r(),i("span",fe,[n("span",me,[f(" ("+m(t.amountGiven)+" given, ",1),t.amountGivenConfirmed>=t.amountGiven?(r(),i("span",pe," all ")):(r(),i("span",ge,[t.amountGiven>=t.amount?(r(),P(h,{key:0,icon:"triangle-exclamation",class:"fa-fw text-yellow-300"})):g("",!0),f(" "+m(t.amountGivenConfirmed||0),1)])),o[7]||(o[7]=f(" of that is confirmed) "))])])):g("",!0)])):(r(),i("span",ye,[t.nonAmountGivenConfirmed?(r(),i("span",we,[c(h,{icon:"check-circle",class:"fa-fw text-green-500"}),f(" "+m(t.nonAmountGivenConfirmed)+" "+m(t.nonAmountGivenConfirmed==1?"give":"gives")+" are confirmed. ",1)])):(r(),i("span",be,[c(h,{icon:"triangle-exclamation",class:"fa-fw text-yellow-500"}),o[8]||(o[8]=n("span",{class:"text-sm"},"Not confirmed by anyone",-1))]))])),n("a",{onClick:G=>e.onClickLoadClaim(t.jwtId)},[c(h,{icon:"file-lines",class:"pl-2 text-blue-500 cursor-pointer"})],8,ve)])])])]))),128))])]),_:1},8,["onReachedBottom"])):g("",!0),e.showProjects?(r(),P(I,{key:3,onReachedBottom:e.loadMoreProjectData},{default:C(()=>[e.projects.length===0?(r(),i("div",ke,[o[11]||(o[11]=f(" You have not announced any projects. ")),e.isRegistered?(r(),i("div",je,[o[9]||(o[9]=f(" Hit the big ")),c(h,{icon:"plus",class:"bg-green-600 text-white px-1.5 py-1 rounded-full"}),o[10]||(o[10]=f(" button. You'll never know until you try. "))])):(r(),i("div",Pe,[n("button",{class:"text-md font-bold bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white mt-2 px-2 py-3 rounded-md",onClick:o[3]||(o[3]=t=>e.showNameThenIdDialog())}," Get someone to onboard you. "),c(O,{ref:"userNameDialog"},null,512)]))])):g("",!0),n("ul",Ce,[(r(!0),i(D,null,N(e.projects,t=>(r(),i("li",{key:t.handleId,class:"border-b border-slate-300"},[n("a",{class:"block py-4 flex gap-4",onClick:G=>e.onClickLoadProject(t.handleId)},[n("div",xe,[c(b,{"entity-id":t.handleId,"icon-size":48,"image-url":t.image,class:"inline-block align-middle border border-slate-300 rounded-md max-h-12 max-w-12"},null,8,["entity-id","image-url"])]),n("div",Ie,[n("h2",_e,m(t.name),1),n("div",Ne,m(t.description),1)])],8,De)]))),128))])]),_:1},8,["onReachedBottom"])):g("",!0)])],64)}const ze=H(x,[["render",$e]]);export{ze as default}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/PushNotificationPermission-BPu7cCY7.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/PushNotificationPermission-BPu7cCY7.js deleted file mode 100644 index 71533f6..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/PushNotificationPermission-BPu7cCY7.js +++ /dev/null @@ -1 +0,0 @@ -var P=Object.defineProperty;var E=(i,e,t)=>e in i?P(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var p=(i,e,t)=>E(i,typeof e!="symbol"?e+"":e,t);import{C as A,V as C,e as x,D,l as u,Z as N,$ as O,_ as W,z as M,y as $,B as c,w as H,h,m as I,k as l,n as g,j as y,o as v,s as w,T as V}from"./main.common-DD7dqhZp.js";import{D as K,a as L,a6 as T,a5 as U}from"./index-ryzpKtgI.js";function R(i){const e="=".repeat((4-i.length%4)%4),t=(i+e).replace(/-/g,"+").replace(/_/g,"/"),s=window.atob(t),r=new Uint8Array(s.length);for(let n=0;n{for(var r=s>1?void 0:s?J(e,t):e,n=i.length-1,a;n>=0;n--)(a=i[n])&&(r=a(r)||r);return r};let b=class extends C{constructor(){super(...arguments);p(this,"$notify");p(this,"DAILY_CHECK_TITLE",K);p(this,"DIRECT_PUSH_TITLE",L);p(this,"callback",()=>{});p(this,"hourAm",!0);p(this,"hourInput","8");p(this,"isVisible",!1);p(this,"messageInput","");p(this,"minuteInput","00");p(this,"pushType","");p(this,"serviceWorkerReady",!1);p(this,"vapidKey","")}async open(t,s){var r;this.callback=s||this.callback,this.isVisible=!0,this.pushType=t;try{const n=await x();let a=D;if(n!=null&&n.webPushServer&&(a=n.webPushServer),a.startsWith("http://localhost"))u("Not checking for VAPID in this local environment.");else{let o="";await this.axios.get(a+"/web-push/vapid").then(d=>{var m,f;this.vapidKey=((m=d.data)==null?void 0:m.vapidKey)||"",u("Got vapid key: "+this.vapidKey),o=JSON.stringify(d.data),(f=navigator.serviceWorker)==null||f.addEventListener("controllerchange",()=>{u("New service worker is now controlling the page")})}),this.vapidKey||(this.$notify({group:"alert",type:"danger",title:"Error Setting Notifications",text:"Could not set notifications."},5e3),u("Error Setting Notifications: web push server response didn't have vapidKey: "+o,!0))}}catch(n){window.location.host.startsWith("localhost")?u("Ignoring the error getting VAPID for local development."):(u("Got an error initializing notifications: "+JSON.stringify(n),!0),this.$notify({group:"alert",type:"danger",title:"Error Setting Notifications",text:"Got an error setting notifications."},5e3))}(r=navigator.serviceWorker)==null||r.ready.then(()=>{this.serviceWorkerReady=!0}),this.pushType===this.DIRECT_PUSH_TITLE?(this.messageInput="Click to share some gratitude with the world -- even if they're unnamed.",setTimeout(function(){var n;(n=document.getElementById("push-message"))==null||n.focus()},100)):this.messageInput=""}close(){this.isVisible=!1}sendMessageToServiceWorker(t){return new Promise((s,r)=>{var n,a;if((n=navigator.serviceWorker)!=null&&n.controller){const o=new MessageChannel;o.port1.onmessage=d=>{d.data.error?r(d.data.error):s(d.data)},(a=navigator.serviceWorker)==null||a.controller.postMessage(t,[o.port2])}else r("Service worker controller not available")})}async askPermission(){var s,r;if(!("serviceWorker"in navigator&&((s=navigator.serviceWorker)!=null&&s.controller)))return Promise.reject("Service worker not available.");await N.open();const t=(r=await N.secret.get(O))==null?void 0:r.secret;return t?this.sendSecretToServiceWorker(t).then(()=>this.checkNotificationSupport()).then(()=>this.requestNotificationPermission()).catch(n=>Promise.reject(n)):Promise.reject("No secret found.")}sendSecretToServiceWorker(t){const s={type:"SEND_LOCAL_DATA",data:t};return this.sendMessageToServiceWorker(s).then(r=>{u("Response from service worker: "+JSON.stringify(r))})}checkNotificationSupport(){return"Notification"in window?(window.Notification.permission==="granted",Promise.resolve()):(this.$notify({group:"alert",type:"danger",title:"Browser Notifications Are Not Supported",text:"This browser does not support notifications."},3e3),Promise.reject("This browser does not support notifications."))}requestNotificationPermission(){return window.Notification.requestPermission().then(t=>{if(t!=="granted")throw this.$notify({group:"alert",type:"danger",title:"Error Requesting Notification Permission",text:"Allow this app permission to make notifications for personal reminders. You can adjust them at any time in your settings."},-1),new Error("Permission was not granted to this app.");return t})}checkHourInput(){const t=parseInt(this.hourInput);isNaN(t)?this.hourInput="12":t<1?(this.hourInput="12",this.hourAm=!this.hourAm):t>12?(this.hourInput="1",this.hourAm=!this.hourAm):this.hourInput=t.toString()}checkMinuteInput(){const t=parseInt(this.minuteInput);isNaN(t)?this.minuteInput="00":t<0?this.minuteInput="59":t<10?this.minuteInput="0"+t:t>59?this.minuteInput="00":this.minuteInput=t.toString()}async turnOnNotifications(){let t=()=>{};return this.askPermission().then(s=>(u("Permission granted: "+JSON.stringify(s)),this.subscribeToPush())).then(()=>{var s;return u("Subscribed successfully."),(s=navigator.serviceWorker)==null?void 0:s.ready}).then(s=>s.pushManager.getSubscription()).then(async s=>{if(s){t=await this.$notify({group:"alert",type:"info",title:"Notification Setup Underway",text:"Setting up notifications for interesting activity, which takes about 10 seconds. If you don't see a final confirmation, check the 'Troubleshoot' page."},-1);const r=T(this.hourInput),o=(this.hourAm?r===12?0:r:r===12?12:r+12)%24+Math.round(new Date().getTimezoneOffset()/60),d=(o+(o<0?24:0))%24,f=T(this.minuteInput)+Math.round(new Date().getTimezoneOffset()%60),S=(f+(f<0?60:0))%60,k={notifyTime:{utcHour:d,minute:S},notifyType:this.pushType,message:this.messageInput,...s.toJSON()};return await this.sendSubscriptionToServer(k),u("Subscription data sent to server with endpoint: "+s.endpoint),k}else throw new Error("Subscription object is not available.")}).then(async s=>{u("Subscription data sent to server and all finished successfully."),await U(s,!0),t(),setTimeout(()=>{this.$notify({group:"alert",type:"success",title:"Notification Is On",text:"You should see at least one on your device; if not, check the 'Troubleshoot' link."},7e3)},500);const r=this.hourInput+":"+this.minuteInput+" "+(this.hourAm?"AM":"PM");this.callback(!0,r,this.messageInput)}).catch(s=>{u("Got an error setting notification permissions: string "+s.toString()+" JSON "+JSON.stringify(s),!0),this.$notify({group:"alert",type:"danger",title:"Error Setting Notification Permissions",text:"Could not set notification permissions."},3e3)})}subscribeToPush(){return new Promise((t,s)=>{var a;if(!("serviceWorker"in navigator&&"PushManager"in window)){const o="Push messaging is not supported";return console.warn(o),s(new Error(o))}if(window.Notification.permission!=="granted"){const o="Notification permission not granted";return console.warn(o),s(new Error(o))}const n={userVisibleOnly:!0,applicationServerKey:R(this.vapidKey)};(a=navigator.serviceWorker)==null||a.ready.then(o=>o.pushManager.subscribe(n)).then(o=>{u("Push subscription successful: "+JSON.stringify(o)),t()}).catch(o=>{u("Push subscription failed: "+JSON.stringify(o)+" - "+JSON.stringify(n),!0),this.$notify({group:"alert",type:"danger",title:"Error Setting Push Notifications",text:"We encountered an issue setting up push notifications. If you wish to revoke notification permissions, please do so in your browser settings."},-1),s(o)})})}sendSubscriptionToServer(t){return u("About to send subscription... "+JSON.stringify(t)),fetch("/web-push/subscribe",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then(s=>{if(!s.ok)throw console.error("Bad response subscribing to web push: ",s),new Error("Failed to send push subscription to server");u("Push subscription sent to server successfully.")})}};b=j([A],b);const B={key:0,class:"fixed z-[100] top-0 inset-x-0 w-full inset-0 h-screen flex flex-col items-center justify-center bg-slate-900/50"},Y={class:"flex w-11/12 max-w-sm mx-auto mb-3 overflow-hidden bg-white rounded-lg shadow-lg"},_={class:"w-full px-6 py-6 text-slate-900 text-center"},z={key:0,class:"text-lg mb-4"},q={key:0},G={key:1},F={key:1,class:"text-lg mb-4"},Z={key:2},Q={key:0},X={key:1},ee={class:"flex flex-row justify-center"},te={key:0},se={key:1};function ie(i,e,t,s,r,n){const a=M("font-awesome");return c(),$(V,{"enter-active-class":"transform ease-out duration-300 transition","enter-from-class":"translate-y-2 opacity-0 sm:translate-y-4","enter-to-class":"translate-y-0 opacity-100 sm:translate-y-0","leave-active-class":"transition ease-in duration-500","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:H(()=>[i.isVisible?(c(),h("div",B,[l("div",Y,[l("div",_,[i.serviceWorkerReady&&i.vapidKey?(c(),h("p",z,[i.pushType===i.DAILY_CHECK_TITLE?(c(),h("span",q," Would you like to be notified of new activity, up to once a day? ")):(c(),h("span",G," Would you like to get a reminder message once a day? "))])):(c(),h("p",F,[e[8]||(e[8]=g(" Waiting for system initialization, which may take up to 5 seconds... ")),y(a,{icon:"spinner",spin:""})])),i.serviceWorkerReady&&i.vapidKey?(c(),h("div",Z,[i.pushType===i.DAILY_CHECK_TITLE?(c(),h("div",Q,e[9]||(e[9]=[l("span",null,"Yes, send me a message when there is new data for me",-1)]))):(c(),h("div",X,[e[10]||(e[10]=l("span",null,"Yes, send me this message:",-1)),v(l("textarea",{type:"text",id:"push-message","onUpdate:modelValue":e[0]||(e[0]=o=>i.messageInput=o),class:"rounded border border-slate-400 mt-2 px-2 py-2 w-full",maxlength:"100"},null,512),[[w,i.messageInput]]),e[11]||(e[11]=l("span",{class:"w-full flex justify-between text-xs text-slate-500"},[l("span"),l("span",null,"(100 characters max)")],-1))])),l("div",null,[l("span",ee,[e[14]||(e[14]=l("span",{class:"mt-2"},"... at: ",-1)),v(l("input",{"onUpdate:modelValue":e[1]||(e[1]=o=>i.hourInput=o),type:"number",class:"rounded-l border border-r-0 border-slate-400 ml-2 mt-2 px-2 py-2 text-center w-20",onChange:e[2]||(e[2]=(...o)=>i.checkHourInput&&i.checkHourInput(...o))},null,544),[[w,i.hourInput]]),v(l("input",{"onUpdate:modelValue":e[3]||(e[3]=o=>i.minuteInput=o),type:"number",class:"border border-slate-400 mt-2 px-2 py-2 text-center w-20",onChange:e[4]||(e[4]=(...o)=>i.checkMinuteInput&&i.checkMinuteInput(...o))},null,544),[[w,i.minuteInput]]),l("span",{class:"rounded-r border border-slate-400 bg-slate-200 text-center text-blue-500 mt-2 px-2 py-2 w-20",onClick:e[5]||(e[5]=o=>i.hourAm=!i.hourAm)},[i.hourAm?(c(),h("span",te,[e[12]||(e[12]=g(" AM ")),y(a,{icon:"chevron-down"})])):(c(),h("span",se,[e[13]||(e[13]=g(" PM ")),y(a,{icon:"chevron-up"})]))])])]),l("button",{class:"block w-full text-center text-md font-bold uppercase bg-blue-600 text-white mt-2 px-2 py-2 rounded-md",onClick:e[6]||(e[6]=o=>{i.close(),i.turnOnNotifications()})}," Turn on Daily Message ")])):I("",!0),l("button",{class:"block w-full text-center text-md font-bold uppercase bg-slate-600 text-white mt-4 px-2 py-2 rounded-md",onClick:e[7]||(e[7]=o=>i.close())}," No, Not Now ")])])])):I("",!0)]),_:1})}const ue=W(b,[["render",ie],["__scopeId","data-v-745fefb0"]]);export{ue as P}; diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/PushNotificationPermission-tn0RQdqM.css b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/PushNotificationPermission-tn0RQdqM.css deleted file mode 100644 index e69de29..0000000 diff --git a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/QuickActionBvcBeginView-BOihmGgs.js b/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/QuickActionBvcBeginView-BOihmGgs.js deleted file mode 100644 index 1b03b73..0000000 --- a/android/app/build/intermediates/assets/release/mergeReleaseAssets/public/assets/QuickActionBvcBeginView-BOihmGgs.js +++ /dev/null @@ -1 +0,0 @@ -var w=Object.defineProperty;var S=(t,e,s)=>e in t?w(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var c=(t,e,s)=>S(t,typeof e!="symbol"?e+"":e,s);import{V as k,e as T,a6 as y,C as $,_ as C,h as m,j as v,k as o,o as f,q as x,n as B,s as V,F as D,z as h,B as g}from"./main.common-DD7dqhZp.js";import{D as M}from"./datetime-BDQ5ptpc.js";import{Q as _}from"./QuickNav-C8jPGtUY.js";import{T as O}from"./TopMessage-ZWDDjman.js";import{a6 as A,a2 as E,aB as P,v as N,aC as Q}from"./index-ryzpKtgI.js";import"./index-BGoTPXII.js";import"./index-CZnn7ED5.js";import"./_isString-B7bbuhPA.js";var j=Object.getOwnPropertyDescriptor,U=(t,e,s,a)=>{for(var i=a>1?void 0:a?j(e,s):e,l=t.length-1,d;l>=0;l--)(d=t[l])&&(i=d(i)||i);return i};let b=class extends k{constructor(){super(...arguments);c(this,"$notify");c(this,"$router");c(this,"attended",!0);c(this,"gaveTime",!0);c(this,"hoursStr","1");c(this,"todayOrPreviousStartDate","")}async mounted(){let s=M.now().setZone("America/Denver");s.weekday<6&&(s=s.minus({week:1}));const a=s.set({weekday:6}).set({hour:9}).startOf("hour");this.todayOrPreviousStartDate=a.toISO({suppressMilliseconds:!0})||""}async record(){var l,d;const s=await T(),a=s.activeDid||"",i=s.apiServer||"";try{const u=A(this.hoursStr);this.$notify({group:"alert",type:"toast",title:"Sent..."},1e3);let p=!1;if(this.gaveTime&&u>0){const r=await E(y,i,a,a,void 0,void 0,u,"HUR",P);r.type==="success"?p=!0:(console.error("Error sending time:",r),this.$notify({group:"alert",type:"danger",title:"Error",text:((l=r==null?void 0:r.error)==null?void 0:l.userMessage)||"There was an error sending the time."},5e3))}let n=!1;if(this.attended){const r=await N(Q(a,this.todayOrPreviousStartDate),a,i,y);r.type==="success"?n=!0:(console.error("Error sending attendance:",r),this.$notify({group:"alert",type:"danger",title:"Error",text:((d=r==null?void 0:r.error)==null?void 0:d.userMessage)||"There was an error sending the attendance."},5e3))}if(p||n){const r=p&&n?"Your attendance and time have been recorded.":p?"Your time has been recorded.":"Your attendance has been recorded.";this.$notify({group:"alert",type:"success",title:"Success",text:r},3e3),this.$router.push({path:"/quick-action-bvc"})}}catch(u){console.error("Error sending claims.",u),this.$notify({group:"alert",type:"danger",title:"Error",text:u.userMessage||"There was an error sending the claims."},5e3)}}};b=U([$({components:{QuickNav:_,TopMessage:O}})],b);const Y={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},H={class:"text-lg text-center font-light relative px-7"},F={class:"m-2 flex"},I={class:"m-2 flex"},q={key:0},z={key:1,class:"h-6"},J={key:0,class:"flex justify-center mt-4"},Z={key:1,class:"flex justify-center mt-4"};function G(t,e,s,a,i,l){const d=h("QuickNav"),u=h("TopMessage"),p=h("font-awesome");return g(),m(D,null,[v(d),v(u),o("section",Y,[o("div",H,[o("h1",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:e[0]||(e[0]=n=>t.$router.back())},[v(p,{icon:"chevron-left",class:"fa-fw"})])]),e[10]||(e[10]=o("h1",{id:"ViewHeading",class:"text-4xl text-center font-light px-4 mb-4"}," Beginning of BVC Saturday Meeting ",-1)),o("div",null,[e[8]||(e[8]=o("h2",{class:"text-2xl m-2"},"You're Here",-1)),o("div",F,[f(o("input",{"onUpdate:modelValue":e[1]||(e[1]=n=>t.attended=n),type:"checkbox",class:"h-6 w-6"},null,512),[[x,t.attended]]),e[5]||(e[5]=o("span",{class:"pb-2 pl-2 pr-2"},"Attended",-1))]),o("div",I,[f(o("input",{"onUpdate:modelValue":e[2]||(e[2]=n=>t.gaveTime=n),type:"checkbox",class:"h-6 w-6"},null,512),[[x,t.gaveTime]]),e[7]||(e[7]=o("span",{class:"pb-2 pl-2 pr-2"},"Spent Time",-1)),t.gaveTime?(g(),m("span",q,[f(o("input",{"onUpdate:modelValue":e[3]||(e[3]=n=>t.hoursStr=n),type:"text",placeholder:"How much time",size:"1",class:"border border-slate-400 h-6 px-2"},null,512),[[V,t.hoursStr]]),e[6]||(e[6]=B(" hour(s) "))])):(g(),m("span",z))])]),t.attended||t.gaveTime&&t.hoursStr&&t.hoursStr!="0"?(g(),m("div",J,[o("button",{class:"block text-center text-md font-bold bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md w-56",onClick:e[4]||(e[4]=n=>t.record())}," Sign & Send ")])):(g(),m("div",Z,e[9]||(e[9]=[o("button",{class:"block text-center text-md font-bold bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md w-56"}," Select Your Actions ",-1)])))])],64)}const ne=C(b,[["render",G]]);export{ne as default}; diff --git a/test-scripts/README.md b/test-scripts/README.md index ec1673d..cb4eb93 100644 --- a/test-scripts/README.md +++ b/test-scripts/README.md @@ -22,12 +22,14 @@ The `run-deeplink-tests.sh` script tests the app's deep link handling capabiliti 1. Generate required test files using either: Python method: + ```bash pip install mnemonic eth_account eth_keys web3 requests - python test-scripts/new_flow.py + python test-scripts/generate_data.py ``` OR TypeScript method: + ```bash npm install npm run build @@ -42,16 +44,19 @@ The `run-deeplink-tests.sh` script tests the app's deep link handling capabiliti ### Running Tests 1. Execute tests: + ```bash ./test-scripts/run-deeplink-tests.sh ``` 2. Print mode (no device needed): + ```bash ./test-scripts/run-deeplink-tests.sh -p ``` 3. Custom timeout: + ```bash ./test-scripts/run-deeplink-tests.sh -t 10 ``` @@ -59,6 +64,7 @@ The `run-deeplink-tests.sh` script tests the app's deep link handling capabiliti ### Troubleshooting If you encounter errors: + 1. Ensure `.generated` directory exists with required files 2. Check ADB is installed for device testing 3. Run with `-p` flag to verify deep link generation @@ -67,7 +73,7 @@ If you encounter errors: ### Clean Up To clean up generated files: + ```bash rm -rf .generated ``` - diff --git a/test-scripts/check-did.sh b/test-scripts/check-did.sh deleted file mode 100755 index c33f2ef..0000000 --- a/test-scripts/check-did.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash - -# Requirements: jq, python, and `pip install -r requirements.txt` -# Usage: ./check-did.sh [did] -# If no DID provided, lists all visible DIDs - -API_URL=${ENDORSER_API_URL:-"https://test-api.endorser.ch/api"} -ADMIN_DID="did:ethr:0x0000694B58C2cC69658993A90D3840C560f2F51F" -ADMIN_KEY="2b6472c026ec2aa2c4235c994a63868fc9212d18b58f6cbfe861b52e71330f5b" - -# Create verification JWT using Python (equivalent to uport-credentials) -jwt=$(python3 -c " -from eth_keys import keys -import hashlib, base64, json, time - -# Create header and payload -header = {'typ': 'JWT', 'alg': 'ES256K'} -payload = { - 'iss': '$ADMIN_DID', - 'exp': int(time.time()) + 300 # 5 minutes from now -} - -# Base64url encode header and payload -def b64url(data): - return base64.urlsafe_b64encode(json.dumps(data).encode()).decode().rstrip('=') - -header_b64 = b64url(header) -payload_b64 = b64url(payload) -message = f'{header_b64}.{payload_b64}' - -# Sign using admin key -private_key = keys.PrivateKey(bytes.fromhex('$ADMIN_KEY')) -message_hash = hashlib.sha256(message.encode()).digest() -signature = private_key.sign_msg_hash(message_hash) -signature_bytes = signature.r.to_bytes(32, 'big') + signature.s.to_bytes(32, 'big') -signature_b64 = base64.urlsafe_b64encode(signature_bytes).decode().rstrip('=') - -# Output complete JWT -print(f'{message}.{signature_b64}') -") - -REQUEST_URL="$API_URL/report/whichDidsICanSee" -echo "Making request to: $REQUEST_URL" -echo "Getting visible DIDs..." -response=$(curl -s -X GET "$REQUEST_URL" \ - -H "Authorization: Bearer $jwt" \ - -H "Content-Type: application/json") - -echo -e "\nResponse:" -echo "$response" | jq '.' - -# If specific DID provided, check if it's in the list -if [ -n "$1" ]; then - echo -e "\nChecking if DID $1 is visible..." - if echo "$response" | jq -e --arg did "$1" '.[] | select(. == $did)' > /dev/null; then - echo "✅ DID is registered and visible" - else - echo "❌ DID not found in visible list" - fi -fi \ No newline at end of file diff --git a/test-scripts/did_generator.py b/test-scripts/did_generator.py deleted file mode 100644 index dd0ab54..0000000 --- a/test-scripts/did_generator.py +++ /dev/null @@ -1,364 +0,0 @@ -""" -DID Generator Script -@author Matthew Raymer - -This script generates and registers Decentralized Identifiers (DIDs) with admin authorization. -It supports the creation of Ethereum-based DIDs (did:ethr) and handles the complete -registration flow with the endorser.ch API. - -Features: -- Ethereum keypair generation with compressed public keys -- JWT creation and signing using ES256K -- DID registration with admin authorization -- Detailed error handling and logging -- Command-line interface for admin DID input - -Dependencies: - eth_account: For Ethereum account operations - eth_keys: For key manipulation and compression - requests: For API communication - secrets: For secure random number generation - hashlib: For SHA-256 hashing - base64: For JWT encoding - argparse: For command-line argument parsing - pathlib: For path handling - dotenv: For environment variable loading - os: For environment variable access - -Usage: - python did_generator.py [options] - -Options: - --admin-did Override default admin DID - --api-url Override default API endpoint - -Environment: - Default Admin DID: did:ethr:0x0000694B58C2cC69658993A90D3840C560f2F51F - Default API URL: https://test-api.endorser.ch/api/v2/claim -""" - -from eth_account import Account -import json -import base64 -from eth_account.messages import encode_defunct -from eth_keys import keys -import time -import requests -import argparse -import secrets -import hashlib -from pathlib import Path -from dotenv import load_dotenv -import os - -# Load environment variables -load_dotenv() - -class DIDRegistration: - """ - Handles the creation and registration of DIDs with admin authorization. - - This class manages the complete lifecycle of DID creation and registration: - 1. Generating secure Ethereum keypairs with compressed public keys - 2. Creating DIDs from public keys in did:ethr format - 3. Signing registration claims with admin credentials - 4. Submitting registration to the endorser.ch API - - The registration process uses two keypairs: - 1. Admin keypair: Used to sign and authorize the registration - 2. New DID keypair: The identity being registered - - Attributes: - api_url (str): Endpoint for DID registration - admin_keypair (dict): Admin's credentials containing: - - did: Admin's DID in did:ethr format - - private_key: Admin's private key for signing - """ - - def __init__(self, admin_keypair: dict, api_url: str = None): - """ - Initialize DID registration with admin credentials. - - Args: - admin_keypair (dict): Admin's DID and private key for signing - api_url (str, optional): Override default API URL - """ - self.api_url = api_url or "https://test-api.endorser.ch/api/v2/claim" - self.admin_keypair = admin_keypair # Store full admin keypair - Account.enable_unaudited_hdwallet_features() - - def create_keypair(self) -> dict: - """ - Generate a new Ethereum keypair and associated DID. - - Creates a secure random keypair and formats it for use with the - endorser.ch API. Uses compressed public key format to match - ethers.js implementation. - - Returns: - dict: Keypair information containing: - - private_key: Raw private key without 0x prefix - - public_key: Compressed public key with 0x prefix - - address: Ethereum address - - did: Generated DID in did:ethr format - - Security: - - Uses secrets module for cryptographically secure randomness - - Implements compressed public key format - - Maintains private key security - """ - private_key = secrets.token_hex(32) - - # Create private key object and derive public key - private_key_bytes = bytes.fromhex(private_key) - private_key_obj = keys.PrivateKey(private_key_bytes) - - # Get compressed public key (like ethers.js) - public_key_obj = private_key_obj.public_key - public_key = '0x' + public_key_obj.to_compressed_bytes().hex() - - # Create account from private key (for address) - account = Account.from_key(private_key_bytes) - - return { - 'private_key': private_key, # No 0x prefix - 'public_key': public_key, # With 0x prefix, compressed format - 'address': account.address, - 'did': f"did:ethr:{account.address}" - } - - def sign_jwt(self, payload: dict, private_key: str, did: str) -> str: - """ - Sign a JWT using ES256K algorithm. - - Creates and signs a JWT following the did-jwt specification: - 1. Constructs header and payload - 2. Base64url encodes components - 3. Signs using ES256K - 4. Assembles final JWT - - Args: - payload (dict): JWT payload to sign - private_key (str): Private key for signing (without 0x prefix) - did (str): DID to use as issuer - - Returns: - str: Signed JWT string in format: header.payload.signature - - Security: - - Implements ES256K signing - - Follows did-jwt specification - - Handles message hashing correctly - """ - # Add issuer to payload like did-jwt does - full_payload = { - **payload, - "iss": did - } - - header = { - "typ": "JWT", - "alg": "ES256K" - } - - # Create the JWT segments - header_b64 = base64.urlsafe_b64encode( - json.dumps(header, separators=(',', ':')).encode() - ).decode().rstrip('=') - payload_b64 = base64.urlsafe_b64encode( - json.dumps(full_payload, separators=(',', ':')).encode() - ).decode().rstrip('=') - message = f"{header_b64}.{payload_b64}" - - # Hash the message with sha256 - message_hash = hashlib.sha256(message.encode()).digest() - - # Sign using eth_keys directly - private_key_bytes = bytes.fromhex(private_key) - private_key_obj = keys.PrivateKey(private_key_bytes) - signature = private_key_obj.sign_msg_hash(message_hash) - - # Get r and s from signature - r = signature.r.to_bytes(32, 'big') - s = signature.s.to_bytes(32, 'big') - signature_bytes = r + s - - # Format signature - signature_b64 = base64.urlsafe_b64encode(signature_bytes).decode().rstrip('=') - - return f"{message}.{signature_b64}" - - def create_jwt(self, new_did: str) -> str: - """ - Create a signed JWT for DID registration - - Args: - new_did (str): The DID being registered - """ - now = int(time.time()) - - # Create registration claim with admin as agent - register_claim = { - "@context": "https://schema.org", - "@type": "RegisterAction", - "agent": { "did": self.admin_keypair['did'] }, - "participant": { "did": new_did }, - "object": "endorser.ch" - } - - payload = { - "iat": now, - "exp": now + 300, - "sub": "RegisterAction", - "vc": { - "@context": ["https://www.w3.org/2018/credentials/v1"], - "type": ["VerifiableCredential"], - "credentialSubject": register_claim - } - } - - print(f"\nDebug - JWT payload: {json.dumps(payload, indent=2)}") - - # Sign with admin's private key - return self.sign_jwt( - payload, - self.admin_keypair['private_key'], - self.admin_keypair['did'] - ) - - def register_did(self, jwt_token: str) -> dict: - """ - Submit DID registration to the endorser.ch API. - - Handles the complete registration process: - 1. Submits JWT to API - 2. Processes response - 3. Formats result or error message - - Args: - jwt_token (str): Signed JWT for registration - - Returns: - dict: Registration result containing: - - success: Boolean indicating success - - response: API response data - - error: Error message if failed - - Security: - - Uses HTTPS for API communication - - Validates response status - - Handles errors gracefully - """ - try: - response = requests.post( - self.api_url, - json={"jwtEncoded": jwt_token}, - headers={'Content-Type': 'application/json'} - ) - - print(f"\nServer Response Status: {response.status_code}") - print(f"Server Response Body: {response.text}") - - if response.status_code in [200, 201]: - return { - 'success': True, - 'response': response.json() - } - else: - try: - error_json = response.json() - error_msg = error_json.get('error', {}).get( - 'message', 'Unknown error' - ) - return { - 'success': False, - 'error': f"Registration failed ({response.status_code}): " - f"{error_msg}", - 'response': error_json - } - except json.JSONDecodeError: - return { - 'success': False, - 'error': f"Registration failed ({response.status_code}): " - f"{response.text}", - 'response': response.text - } - except (requests.RequestException, ConnectionError) as e: - return { - 'success': False, - 'error': f"Request failed: {str(e)}" - } - -def main(): - """ - Main entry point for DID generation script. - - Handles: - 1. Command line argument parsing - 2. DID generation and registration process - 3. Result output and error display - - Usage: - python did_generator.py [options] - """ - parser = argparse.ArgumentParser( - description='Generate a DID with admin authorization' - ) - parser.add_argument( - '--admin-did', - help='Admin DID (e.g., did:ethr:0x0000...)', - required=False - ) - parser.add_argument( - '--api-url', - help='Override API URL', - default=os.getenv('ENDORSER_API_URL', 'https://test-api.endorser.ch/api/v2/claim') - ) - args = parser.parse_args() - - # Get admin credentials from environment - admin_keypair = { - 'did': os.getenv('ADMIN_DID', 'did:ethr:0x0000694B58C2cC69658993A90D3840C560f2F51F'), - 'private_key': os.getenv('ADMIN_PRIVATE_KEY', '2b6472c026ec2aa2c4235c994a63868fc9212d18b58f6cbfe861b52e71330f5b') - } - - admin_did = args.admin_did - if not admin_did: - admin_did = admin_keypair['did'] - - print(f"Admin DID: {admin_did}") - print(f"API URL: {args.api_url}") - - print('Starting DID Generation...\n') - registrar = DIDRegistration(admin_keypair, args.api_url) - - print("Generating new keypair...") - new_keypair = registrar.create_keypair() - - print("\nGenerated DID Details:") - print("----------------------") - print(f"DID: {new_keypair['did']}") - print(f"Admin DID: {admin_did}") - print(f"Address: {new_keypair['address']}") - print(f"Private Key: {new_keypair['private_key']}") - print(f"Public Key: {new_keypair['public_key']}\n") - - print("Creating JWT...") - jwt_token = registrar.create_jwt(new_keypair['did']) - - print('\nSuccessfully generated DID with admin authorization!') - print(f'Registration JWT: {jwt_token[:50]}...') - - print("\nAttempting registration...") - result = registrar.register_did(jwt_token) - if result['success']: - print("Registration successful!") - print("Response: {json.dumps(result['response'], indent=2)}") - else: - print("Registration failed!") - print(f"Error: {result['error']}") - if 'response' in result: - print(f"Full response: {json.dumps(result['response'], indent=2)}") - -if __name__ == "__main__": - main() diff --git a/test-scripts/did_generator.sh b/test-scripts/did_generator.sh deleted file mode 100755 index 3e6cc19..0000000 --- a/test-scripts/did_generator.sh +++ /dev/null @@ -1,266 +0,0 @@ -#!/bin/bash - -# Check for required commands -for cmd in openssl xxd jq curl base64; do - if ! command -v $cmd &> /dev/null; then - echo "Error: $cmd is not installed. Please install it first." - echo "On Arch Linux: sudo pacman -S $cmd" - exit 1 - fi -done - -# Load environment variables -if [ -f .env ]; then - export $(cat .env | grep -v '^#' | xargs) -fi - -# Default values -ADMIN_DID=${ADMIN_DID:-"did:ethr:0x0000694B58C2cC69658993A90D3840C560f2F51F"} -ADMIN_PRIVATE_KEY=${ADMIN_PRIVATE_KEY:-"2b6472c026ec2aa2c4235c994a63868fc9212d18b58f6cbfe861b52e71330f5b"} -API_URL=${ENDORSER_API_URL:-"https://test-api.endorser.ch/api/v2/claim"} -DEBUG=${DEBUG:-0} - -# Function to log debug info -debug_log() { - if [ "$DEBUG" = "1" ]; then - echo "$@" >&2 - fi -} - -# Function to generate a new keypair -generate_keypair() { - debug_log "Generating new keypair..." - - # Create a temporary directory for key operations - TMPDIR=$(mktemp -d) - trap 'rm -rf "$TMPDIR"' EXIT - - # Generate private key - openssl ecparam -name secp256k1 -genkey -noout > "$TMPDIR/private.pem" - - # Extract raw private key - PRIVATE_KEY=$(openssl ec -in "$TMPDIR/private.pem" -text -noout 2>/dev/null | \ - grep priv -A 3 | tail -n +2 | \ - tr -d '\n[:space:]:' | \ - sed 's/^00//') - - # Generate public key (compressed format) - PUBLIC_KEY=$(openssl ec -in "$TMPDIR/private.pem" -pubout -outform DER 2>/dev/null | \ - tail -c 65 | \ - xxd -p -c 65 | \ - sed 's/^04/02/') - - # Generate Ethereum address - ADDRESS=$(echo -n "$PUBLIC_KEY" | \ - xxd -r -p | \ - openssl dgst -sha3-256 -binary | \ - tail -c 20 | \ - xxd -p) - - # Create DID - DID="did:ethr:0x$ADDRESS" - - # Print debug info if enabled - debug_log "Generated DID Details:" - debug_log "----------------------" - debug_log "DID: $DID" - debug_log "Address: $ADDRESS" - debug_log "Private Key: $PRIVATE_KEY" - debug_log "Public Key: $PUBLIC_KEY" - - # Export variables for other functions - export DID PRIVATE_KEY PUBLIC_KEY ADDRESS - return 0 -} - -# Function to hex_to_dec -hex_to_dec() { - printf "%d" "0x$1" -} - -# Function to attempt signing with retries -attempt_signing() { - local max_attempts=5 - local attempt=1 - - while [ $attempt -le $max_attempts ]; do - debug_log "Signing attempt $attempt of $max_attempts..." - - # Sign message and get DER format signature - openssl dgst -sha256 -sign "$TMPDIR/private.pem" "$TMPDIR/message.txt" 2>/dev/null > "$TMPDIR/signature.der" - - # Convert DER signature to hex - der_sig=$(xxd -p -c 256 "$TMPDIR/signature.der") - - debug_log "Debug - Full DER signature:" - debug_log "$der_sig" - - # Parse DER structure with length checking - if [[ $der_sig =~ ^30([0-9a-f]{2})02([0-9a-f]{2})([0-9a-f]*)02([0-9a-f]{2})([0-9a-f]*)$ ]]; then - seq_len="${BASH_REMATCH[1]}" - r_len="${BASH_REMATCH[2]}" - r_val="${BASH_REMATCH[3]}" - s_len="${BASH_REMATCH[4]}" - s_val="${BASH_REMATCH[5]}" - - # Convert lengths to decimal - r_len_dec=$((16#$r_len)) - s_len_dec=$((16#$s_len)) - - debug_log "R length: $r_len_dec bytes" - debug_log "S length: $s_len_dec bytes" - - # Handle R value - if [ $r_len_dec -gt 32 ]; then - r_val=${r_val: -64} # Take last 32 bytes - elif [ $r_len_dec -lt 32 ]; then - r_val=$(printf "%064s" "$r_val" | tr ' ' '0') # Left pad - fi - - # Handle S value - if [ $s_len_dec -gt 32 ]; then - s_val=${s_val: -64} # Take last 32 bytes - elif [ $s_len_dec -lt 32 ]; then - s_val=$(printf "%064s" "$s_val" | tr ' ' '0') # Left pad - fi - - # Validate final lengths - if [ ${#r_val} -eq 64 ] && [ ${#s_val} -eq 64 ]; then - debug_log "Valid signature found on attempt $attempt" - return 0 - fi - fi - - debug_log "Invalid signature on attempt $attempt, retrying..." - attempt=$((attempt + 1)) - done - - echo "Failed to generate valid signature after $max_attempts attempts" >&2 - return 1 -} - -# Function to create and sign JWT -create_jwt() { - local now=$(date +%s) - local exp=$((now + 300)) - - # Create header (compact JSON) - local header='{"typ":"JWT","alg":"ES256K"}' - - # Create registration claim (compact JSON) - local claim="{\"iat\":$now,\"exp\":$exp,\"sub\":\"RegisterAction\",\"vc\":{\"@context\":[\"https://www.w3.org/2018/credentials/v1\"],\"type\":[\"VerifiableCredential\"],\"credentialSubject\":{\"@context\":\"https://schema.org\",\"@type\":\"RegisterAction\",\"agent\":{\"did\":\"$ADMIN_DID\"},\"participant\":{\"did\":\"$DID\"},\"object\":\"endorser.ch\"}},\"iss\":\"$ADMIN_DID\"}" - - # Base64url encode header and claim - header_b64=$(echo -n "$header" | base64 -w 0 | tr '/+' '_-' | tr -d '=') - claim_b64=$(echo -n "$claim" | base64 -w 0 | tr '/+' '_-' | tr -d '=') - - # Create message to sign - message="$header_b64.$claim_b64" - - # Create temporary directory for key operations - TMPDIR=$(mktemp -d) - trap 'rm -rf "$TMPDIR"' EXIT - - # Create private key PEM file - echo "-----BEGIN EC PRIVATE KEY-----" > "$TMPDIR/private.pem" - ( - echo "302e0201010420" # Private key header - echo -n "$ADMIN_PRIVATE_KEY" # Private key bytes - echo "a00706052b8104000a" # secp256k1 OID - ) | xxd -r -p | base64 >> "$TMPDIR/private.pem" - echo "-----END EC PRIVATE KEY-----" >> "$TMPDIR/private.pem" - - # Write message to file - echo -n "$message" > "$TMPDIR/message.txt" - - # Attempt signing with retries - if attempt_signing; then - # Create final JWT - concat_sig="${r_val}${s_val}" - signature=$(echo -n "$concat_sig" | xxd -r -p | base64 -w 0 | tr '/+' '_-' | tr -d '=') - JWT="$message.$signature" - - debug_log "Created JWT: ${JWT:0:50}..." - export JWT - return 0 - else - echo "Failed to generate valid signature" >&2 - return 1 - fi -} - -# Function to register DID -register_did() { - debug_log "Attempting registration..." - - # Create request body - body="{\"jwtEncoded\":\"$JWT\"}" - - # Send registration request - response=$(curl -s -X POST "$API_URL" \ - -H "Content-Type: application/json" \ - -d "$body") - - # Check response - if echo "$response" | jq -e '.success' >/dev/null 2>&1; then - debug_log "Registration successful!" - debug_log "Response: $(echo "$response" | jq -c '.')" - - # Output only the JSON result - debug_log "About to output JSON..." - jq -n \ - --arg did "$DID" \ - --arg private_key "$PRIVATE_KEY" \ - --arg registration_id "$(echo "$response" | jq -r '.success.registrationId')" \ - --arg claim_id "$(echo "$response" | jq -r '.success.claimId')" \ - '{ - status: "success", - did: $did, - privateKey: $private_key, - registrationId: $registration_id, - claimId: $claim_id - }' - debug_log "JSON output complete" - exit 0 - else - error_msg=$(echo "$response" | jq -r '.error.message // "Unknown error"') - debug_log "Registration failed: $error_msg" - debug_log "Full response: $(echo "$response" | jq -c '.' || echo "$response")" - - # Output error as JSON - jq -n \ - --arg error "$error_msg" \ - --arg stage "registration" \ - '{ - status: "error", - stage: $stage, - error: $error - }' - exit 1 - fi -} - -# Main execution -debug_log "Starting DID Generation..." -debug_log "Using admin DID: $ADMIN_DID" -debug_log "API URL: $API_URL" - -if ! generate_keypair; then - jq -n '{ - status: "error", - stage: "keypair", - error: "Failed to generate keypair" - }' - exit 1 -fi - -if ! create_jwt; then - jq -n '{ - status: "error", - stage: "jwt", - error: "Failed to generate valid signature" - }' - exit 1 -fi - -register_did \ No newline at end of file diff --git a/test-scripts/did_generator.ts b/test-scripts/did_generator.ts deleted file mode 100644 index 51b6bf8..0000000 --- a/test-scripts/did_generator.ts +++ /dev/null @@ -1,250 +0,0 @@ -/** - * DID Generator Script - * @author Matthew Raymer - * - * This script generates and registers Decentralized Identifiers (DIDs) with admin authorization. - * It supports the creation of Ethereum-based DIDs (did:ethr) and handles the complete - * registration flow with the endorser.ch API. - * - * Features: - * - Ethereum keypair generation using ethers.js - * - JWT creation and signing using did-jwt - * - DID registration with admin authorization - * - Detailed error handling and logging - * - Command-line interface for admin DID input - * - * Dependencies: - * did-jwt: For JWT creation and signing - * ethers: For Ethereum account operations - * node-fetch: For API communication - * commander: For CLI argument parsing - * dotenv: For environment variable loading - * - * Usage: - * npm run generate-did -- [options] - * - * Options: - * -a, --admin-did Override default admin DID - * --api-url Override default API endpoint - * - * Environment: - * Default Admin DID: did:ethr:0x0000694B58C2cC69658993A90D3840C560f2F51F - * Default API URL: https://test-api.endorser.ch/api/v2/claim - */ - -/// -// Add at the top of your file to ignore dom types -import * as didJwt from 'did-jwt'; -import { ethers } from 'ethers'; -import fetch from 'node-fetch'; -import { program } from 'commander'; -import * as dotenv from 'dotenv'; -import { config } from 'dotenv'; - -// Load environment variables -config(); - -const admin_keypair = { - did: process.env.ADMIN_DID || 'did:ethr:0x0000694B58C2cC69658993A90D3840C560f2F51F', - privateKey: process.env.ADMIN_PRIVATE_KEY || '2b6472c026ec2aa2c4235c994a63868fc9212d18b58f6cbfe861b52e71330f5b' -}; - -// Default values from environment -const DEFAULT_ADMIN_DID = admin_keypair.did; -const DEFAULT_API_URL = process.env.ENDORSER_API_URL || 'https://test-api.endorser.ch/api/v2/claim'; - -/** - * Result interface for DID creation process - */ -interface DIDCreationResult { - did: string; // The generated DID - privateKey: string; // Private key without 0x prefix - publicKey: string; // Public key with 0x prefix - isValid: boolean; // Validation status - jwt: string; // Signed JWT for registration -} - -/** - * Result interface for DID registration attempt - */ -interface RegistrationResult { - success: boolean; // Registration success status - error?: string; // Optional error message - response?: any; // Optional API response data -} - -/** - * Creates and validates a new DID with admin authorization - * - * Workflow: - * 1. Generates new Ethereum keypair using ethers.js - * 2. Creates DID from public key in did:ethr format - * 3. Constructs registration claim with: - * - Admin DID as the agent (authorizer) - * - New DID as the participant (being registered) - * 4. Signs claim as JWT using admin's private key - * - * @param adminDid - Administrator DID for authorization - * @returns Promise - Generated DID details and JWT - */ -async function createAndValidateDID(adminDid: string): Promise { - console.log('Using admin DID:', adminDid); - - // Generate new DID keypair - console.log('Generating new keypair...'); - const wallet = ethers.Wallet.createRandom(); - const did = `did:ethr:${wallet.address}`; - const privateKey = wallet.privateKey.slice(2); - const publicKey = wallet.publicKey; - - // Create registration claim with admin as agent - const registerClaim = { - "@context": "https://schema.org", - "@type": "RegisterAction", - agent: { did: adminDid }, - participant: { did: did }, - object: "endorser.ch" - }; - - const vcPayload = { - iat: Math.floor(Date.now() / 1000), - exp: Math.floor(Date.now() / 1000) + 300, - sub: "RegisterAction", - vc: { - "@context": ["https://www.w3.org/2018/credentials/v1"], - type: ["VerifiableCredential"], - credentialSubject: registerClaim - } - }; - - console.log('\nGenerated DID Details:'); - console.log('----------------------'); - console.log('DID:', did); - console.log('Admin DID:', adminDid); - console.log('Address:', wallet.address); - console.log('Private Key:', wallet.privateKey); - console.log('Public Key:', wallet.publicKey); - - console.log('\nDebug Details:'); - console.log('-------------'); - console.log('Private Key (hex):', privateKey); // Should be without 0x - console.log('Public Key (hex):', publicKey); // Should be with 0x - console.log('Header:', { - typ: "JWT", - alg: "ES256K" - }); - console.log('Payload:', vcPayload); - - // Create and sign JWT with admin's key - console.log('\nCreating JWT...'); - const signer = didJwt.SimpleSigner(admin_keypair.privateKey); // Use admin's private key - const jwt = await didJwt.createJWT(vcPayload, { - issuer: admin_keypair.did, // Admin DID as issuer - signer: signer - }); - - console.log('\nJWT Parts:'); - const [header, payload, signature] = jwt.split('.'); - console.log('Header (base64):', header); - console.log('Payload (base64):', payload); - console.log('Signature (base64):', signature); - - return { did, privateKey, publicKey, isValid: true, jwt }; -} - -/** - * Registers a DID with the endorser.ch API - * - * Workflow: - * 1. Submits JWT to API endpoint - * 2. Processes response (success/error) - * 3. Handles error cases: - * - Network errors - * - API errors (400, 401, etc) - * - Malformed responses - * - * @param jwt - Signed JWT for registration - * @returns Promise - Registration result with response/error - */ -async function registerDID(jwt: string): Promise { - try { - const response = await fetch(DEFAULT_API_URL, { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - body: JSON.stringify({ jwtEncoded: jwt }), - }); - - console.log(`\nServer Response Status: ${response.status}`); - const responseText = await response.text(); - console.log(`Server Response Body: ${responseText}`); - - if (response.ok) { - return { - success: true, - response: JSON.parse(responseText) - }; - } else { - try { - const errorJson = JSON.parse(responseText); - const errorMsg = errorJson.error?.message || 'Unknown error'; - return { - success: false, - error: `Registration failed (${response.status}): ${errorMsg}`, - response: errorJson - }; - } catch { - return { - success: false, - error: `Registration failed (${response.status}): ${responseText}`, - response: responseText - }; - } - } - } catch (e) { - return { - success: false, - error: `Request failed: ${e}` - }; - } -} - -// Command line handling -program - .name('did-generator') - .description('Generate and register a new DID') - .option('-a, --admin-did ', 'Admin DID', DEFAULT_ADMIN_DID) - .option('--api-url ', 'Override API URL', DEFAULT_API_URL) - .parse(); - -const options = program.opts(); -const adminDid = options.adminDid; // Use the option instead of args -const apiUrl = options.apiUrl; - -console.log('Starting DID Generation...\n'); -console.log('Using admin DID:', adminDid); // Log the admin DID being used - -(async () => { - try { - const result = await createAndValidateDID(adminDid); - console.log('\nSuccessfully generated DID with admin authorization!'); - console.log('Registration JWT:', result.jwt.substring(0, 50) + '...'); - - console.log('\nAttempting registration...'); - const registrationResult = await registerDID(result.jwt); - if (registrationResult.success) { - console.log('Registration successful!'); - console.log('Response:', JSON.stringify(registrationResult.response, null, 2)); - } else { - console.log('Registration failed!'); - console.log('Error:', registrationResult.error); - if (registrationResult.response) { - console.log('Full response:', JSON.stringify(registrationResult.response, null, 2)); - } - } - } catch (error) { - console.error('\nError:', error); - process.exit(1); - } -})(); \ No newline at end of file diff --git a/test-scripts/dids_seen.sh b/test-scripts/dids_seen.sh deleted file mode 100755 index 508d7e8..0000000 --- a/test-scripts/dids_seen.sh +++ /dev/null @@ -1,284 +0,0 @@ -#!/bin/bash -# DID Visibility Check Script -# @author Matthew Raymer -# -# This script checks visibility permissions for DIDs within the endorser.ch system. -# It creates a signed JWT using admin credentials and queries the visibility API. -# -# Features: -# - JWT creation and signing using ES256K-R -# - DID visibility checking -# - Environment variable support -# - Debug logging -# - Command line argument parsing -# -# Usage: -# ./dids_seen.sh [-d did_to_check] -# DEBUG=1 ./dids_seen.sh # For debug output -# -# Environment Variables: -# ADMIN_DID - Admin DID for authorization -# ADMIN_PRIVATE_KEY - Private key for signing -# ENDORSER_API_URL - API endpoint (defaults to test) -# DEBUG - Enable debug logging when set to 1 - -# Enhanced debug logging -debug_log() { - if [ "${DEBUG:-0}" = "1" ]; then - echo "DEBUG: $*" >&2 - fi -} - -# Parse command line arguments -# -d: Specific DID to check visibility for -CHECK_DID="" -while getopts "d:" opt; do - case $opt in - d) CHECK_DID="$OPTARG" ;; - \?) echo "Usage: $0 [-d did_to_check]" >&2; exit 1 ;; - esac -done - -# Load environment variables from .env file if present -# Supports: -# - ADMIN_DID -# - ADMIN_PRIVATE_KEY -# - ENDORSER_API_URL -if [ -f .env ]; then - export $(cat .env | grep -v '^#' | xargs) -fi - -# Default values for required parameters -ADMIN_DID=${ADMIN_DID:-"did:ethr:0x0000694B58C2cC69658993A90D3840C560f2F51F"} -ADMIN_PRIVATE_KEY=${ADMIN_PRIVATE_KEY:-"2b6472c026ec2aa2c4235c994a63868fc9212d18b58f6cbfe861b52e71330f5b"} -API_URL=${ENDORSER_API_URL:-"https://test-api.endorser.ch/api/report/whichDidsICanSee"} - -# Create JWT payload with: -# - Issuer (iss) -# - Subject (sub) -# - Issued At (iat) -# - Expiration (exp) -now=$(date +%s) -exp=$((now + 86400)) # 24 hours from now - -payload=$(jq -n \ - --arg iss "$ADMIN_DID" \ - --arg sub "$ADMIN_DID" \ - --arg iat "$now" \ - --arg exp "$exp" \ - '{ - iss: $iss, - sub: $sub, - iat: ($iat | tonumber), - exp: ($exp | tonumber) - }') - -# Base64url encode header and payload -# Header specifies ES256K-R algorithm for Ethereum compatibility -header='{"alg":"ES256K-R","typ":"JWT"}' -header_b64=$(echo -n "$header" | base64 -w 0 | tr '/+' '_-' | tr -d '=') -payload_b64=$(echo -n "$payload" | base64 -w 0 | tr '/+' '_-' | tr -d '=') - -# Create message to sign (header.payload) -message="$header_b64.$payload_b64" - -# Add debug points -debug_log "Creating JWT with:" -debug_log "ADMIN_DID: $ADMIN_DID" -debug_log "API_URL: $API_URL" -debug_log "Payload: $payload" -debug_log "Header base64: $header_b64" -debug_log "Payload base64: $payload_b64" -debug_log "Message to sign: $message" - -# Create temporary directory for key operations -# Uses trap to ensure cleanup on exit -TMPDIR=$(mktemp -d) -trap 'rm -rf "$TMPDIR"' EXIT - -# Create private key PEM file -# Converts raw private key to PEM format for OpenSSL -echo "-----BEGIN EC PRIVATE KEY-----" > "$TMPDIR/private.pem" -( - echo "302e0201010420" # Private key header - echo -n "$ADMIN_PRIVATE_KEY" # Private key bytes - echo "a00706052b8104000a" # secp256k1 OID -) | xxd -r -p | base64 >> "$TMPDIR/private.pem" -echo "-----END EC PRIVATE KEY-----" >> "$TMPDIR/private.pem" - -# Write message to file for signing -echo -n "$message" > "$TMPDIR/message.txt" - -# Sign message and get DER format signature -openssl dgst -sha256 -sign "$TMPDIR/private.pem" "$TMPDIR/message.txt" > "$TMPDIR/signature.der" - -# Convert DER signature to hex -der_sig=$(xxd -p -c 256 "$TMPDIR/signature.der") - -# Parse DER structure -# Extracts R and S values from signature -if [[ $der_sig =~ ^30([0-9a-f]{2})02([0-9a-f]{2})([0-9a-f]*)02([0-9a-f]{2})([0-9a-f]*)$ ]]; then - r_len="${BASH_REMATCH[2]}" - r_val="${BASH_REMATCH[3]}" - s_len="${BASH_REMATCH[4]}" - s_val="${BASH_REMATCH[5]}" - - debug_log "Raw signature values:" - debug_log " R (${#r_val} chars): $r_val" - debug_log " S (${#s_val} chars): $s_val" - - # Convert lengths to decimal - r_len_dec=$((16#$r_len)) - s_len_dec=$((16#$s_len)) - - # Handle R value padding - if [ $r_len_dec -gt 32 ]; then - r_val=${r_val: -64} # Take last 32 bytes - elif [ $r_len_dec -lt 32 ]; then - r_val=$(printf "%064s" "$r_val" | tr ' ' '0') # Left pad - fi - - # Handle S value padding - if [ $s_len_dec -gt 32 ]; then - s_val=${s_val: -64} # Take last 32 bytes - elif [ $s_len_dec -lt 32 ]; then - s_val=$(printf "%064s" "$s_val" | tr ' ' '0') # Left pad - fi - - # Ensure both values are exactly 64 characters - r_val=$(printf "%064s" "$r_val" | tr ' ' '0') - s_val=$(printf "%064s" "$s_val" | tr ' ' '0') - - debug_log "Normalized values:" - debug_log " R (${#r_val} chars): $r_val" - debug_log " S (${#s_val} chars): $s_val" - - # Create final signature - concat_sig="${r_val}${s_val}" - - # Debug the DER parsing - debug_log "DER Signature Analysis:" - debug_log " Full DER: $der_sig" - debug_log " Sequence length: ${BASH_REMATCH[1]}" - debug_log " R length: $r_len ($r_len_dec bytes)" - debug_log " S length: $s_len ($s_len_dec bytes)" - - # Debug signature components - debug_log "Signature components:" - debug_log " R value: $r_val (length: ${#r_val})" - debug_log " S value: $s_val (length: ${#s_val})" - debug_log " Concatenated: $concat_sig (length: ${#concat_sig})" - - # Try both normal and high-S value signatures - s_val_alt="" - if [ $s_len_dec -gt 32 ]; then - # Store alternative S value - s_val_alt="$s_val" - # Calculate N - s for high-S values - n="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141" - # Use Python for hex math to avoid bc issues - normalized_s=$(python3 -c " - n = int('$n', 16) - s = int('${s_val}', 16) - result = hex(n - s)[2:].zfill(64) - print(result.lower()) - " 2>/dev/null || echo "ERROR") - if [ "$normalized_s" = "ERROR" ]; then - debug_log " Failed to normalize S value" - # Keep original s_val if normalization fails - s_val_alt="" - else - s_val=$(printf "%064s" "$normalized_s" | tr ' ' '0' | tr '[:upper:]' '[:lower:]') - debug_log " Normalized S value: $s_val" - fi - fi - - # Calculate recovery bit (v) - # Try each possible recovery value (0-3) until we find one that works - for v in {0..3}; do - # Try both S values if we have an alternative - s_values=("$s_val") - if [ -n "$s_val_alt" ]; then - s_values+=("$s_val_alt") - fi - - for current_s in "${s_values[@]}"; do - concat_sig="${r_val}${current_s}" - debug_log "Trying with S value: $current_s" - - recovery_sig=$(printf "%s%02x" "$concat_sig" "$v") - debug_log "Recovery attempt $v:" - debug_log " Concatenated signature: $concat_sig" - debug_log " Recovery signature: $recovery_sig" - debug_log " Recovery signature length: ${#recovery_sig}" - - # Ensure signature is exactly 65 bytes (130 hex chars) - if [ ${#recovery_sig} -ne 130 ]; then - debug_log " Invalid signature length: ${#recovery_sig}, expected 130" - continue - fi - - # Convert hex to binary, then to base64url - signature=$(echo -n "$recovery_sig" | xxd -r -p 2>/dev/null | base64 -w 0 | tr '/+' '_-' | tr -d '=') - debug_log " Base64URL signature: $signature" - - # Create JWT with this signature - JWT="$message.$signature" - debug_log " Testing JWT: $JWT" - - # Test the JWT against the API - response=$(curl -s -X GET "$API_URL" \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer $JWT") - debug_log " API Response: $response" - - # Check if the JWT worked - if ! echo "$response" | grep -q "JWT.*failed"; then - echo "JWT Token:" - echo "$JWT" - debug_log "Success with v=$v and S=${current_s:0:8}..." - echo - echo "Export command:" - echo "export TOKEN='$JWT'" - echo - if [ -n "$CHECK_DID" ]; then - # Check if specific DID is in the list - if echo "$response" | jq -e --arg did "$CHECK_DID" 'contains([$did])' > /dev/null; then - echo "✅ DID $CHECK_DID is in the list" - exit 0 - else - echo "❌ DID $CHECK_DID is not in the list" - echo "Attempting to add visibility..." - - # Request visibility - visibility_response=$(curl -s -X POST \ - 'http://test-api.endorser.ch/api/report/canSeeMe' \ - -H "Authorization: Bearer $JWT" \ - -H "Content-Type: application/json" \ - -d "{\"did\": \"$CHECK_DID\"}") - - if echo "$visibility_response" | grep -q "error"; then - echo "❌ Failed to add visibility:" - echo "$visibility_response" | jq '.' --indent 2 - exit 1 - else - echo "✅ Successfully requested visibility. Please try checking again." - exit 0 - fi - fi - else - # Show full list of visible DIDs - echo "$response" | jq '.' --indent 2 - fi - exit 0 - fi - done - done - - echo "Error: Could not find valid recovery bit" - exit 1 -else - echo "Error: Invalid DER signature format" - echo "DER: $der_sig" - exit 1 -fi diff --git a/test-scripts/generate-test-claim.sh b/test-scripts/generate-test-claim.sh deleted file mode 100755 index c34ac6d..0000000 --- a/test-scripts/generate-test-claim.sh +++ /dev/null @@ -1,175 +0,0 @@ -#!/bin/bash - -# Source the environment with DIDs -if [ ! -f .generated/test-env.sh ]; then - echo "Error: No test environment found. Run run-deeplink-tests.sh first" - exit 1 -fi -source .generated/test-env.sh - -# Verify we have the required DIDs -if [ -z "$CONTACT1_DID" ] || [ -z "$CONTACT1_KEY" ]; then - echo "Error: Contact1 DID info not found in environment" - exit 1 -fi - -# Use CONTACT1 as the issuer since we know it's registered -REGISTERED_DID="$CONTACT1_DID" -REGISTERED_KEY="$CONTACT1_KEY" - -# Default API URL (can be overridden by environment) -API_URL=${ENDORSER_API_URL:-"https://test-api.endorser.ch/api/v2/claim"} - -# Function to sign a message using ES256K -sign_message() { - local message="$1" - local private_key="$2" - local tmpdir - - # Create temporary directory - tmpdir=$(mktemp -d) - trap 'rm -rf "$tmpdir"' EXIT - - # Debug output - echo "Signing message: $message" >&2 - echo "Using private key: $private_key" >&2 - - # Hash the message with SHA-256 - echo -n "$message" | openssl dgst -sha256 -binary > "$tmpdir/message.hash" - - # Sign the hash directly using the private key - # This avoids OpenSSL's PEM format issues with secp256k1 - python3 -c " -import sys -from eth_keys import keys -import hashlib - -# Read message hash -with open('$tmpdir/message.hash', 'rb') as f: - message_hash = f.read() - -# Create private key object -private_key_bytes = bytes.fromhex('$private_key') -private_key = keys.PrivateKey(private_key_bytes) - -# Sign the message hash -signature = private_key.sign_msg_hash(message_hash) - -# Output R and S values as hex -print(f'{hex(signature.r)[2:]:0>64}') -print(f'{hex(signature.s)[2:]:0>64}') -" > "$tmpdir/signature.txt" - - # Read R and S values - { read -r r_val; read -r s_val; } < "$tmpdir/signature.txt" - - # Debug R and S values - echo "R value: $r_val" >&2 - echo "S value: $s_val" >&2 - - # Concatenate R+S and convert to base64url - echo -n "${r_val}${s_val}" | xxd -r -p | base64 -w 0 | tr '/+' '_-' | tr -d '=' -} - -# Create a test claim payload -create_claim_payload() { - local issuer_did="$1" - - # Create a test claim matching the app's structure - cat << EOF -{ - "@context": "https://schema.org", - "@type": "TestClaim", - "identifier": "test-claim-$(date +%s)", - "name": "Test Claim", - "description": "Generated test claim", - "agent": { - "did": "$issuer_did" - } -} -EOF -} - -# Create and sign JWT -create_jwt() { - local claim="$1" - local issuer_did="$2" - local private_key="$3" - - # Create header and payload matching the app's structure - local header='{"typ":"JWT","alg":"ES256K"}' - local payload="{\"iat\":$(date +%s),\"exp\":$(($(date +%s) + 300)),\"iss\":\"$issuer_did\",\"vc\":{\"@context\":[\"https://www.w3.org/2018/credentials/v1\"],\"type\":[\"VerifiableCredential\"],\"credentialSubject\":$claim}}" - - # Base64url encode header and payload - local header_b64=$(echo -n "$header" | base64 -w 0 | tr '/+' '_-' | tr -d '=') - local payload_b64=$(echo -n "$payload" | base64 -w 0 | tr '/+' '_-' | tr -d '=') - - # Create message to sign - local message="$header_b64.$payload_b64" - - # Sign message using eth_keys (same as did-jwt library) - local signature=$(python3 -c " -from eth_keys import keys -import hashlib - -# Create private key object -private_key_bytes = bytes.fromhex('$private_key') -private_key = keys.PrivateKey(private_key_bytes) - -# Hash the message -message_hash = hashlib.sha256('$message'.encode()).digest() - -# Sign using ES256K -signature = private_key.sign_msg_hash(message_hash) - -# Format as R+S concatenated and base64url encoded -import base64 -signature_bytes = signature.r.to_bytes(32, 'big') + signature.s.to_bytes(32, 'big') -print(base64.urlsafe_b64encode(signature_bytes).decode().rstrip('=')) -") - - # Return complete JWT - echo "$message.$signature" -} - -# Function to register claim with API -register_claim() { - local jwt="$1" - - echo "Registering claim with API..." - response=$(curl -s -X POST "$API_URL" \ - -H "Content-Type: application/json" \ - -d "{\"jwtEncoded\":\"$jwt\"}") - - # Check response - if echo "$response" | jq -e '.success' >/dev/null 2>&1; then - echo "Registration successful!" - echo "Response:" - echo "$response" | jq '.' - return 0 - else - echo "Registration failed!" - echo "Error: $(echo "$response" | jq -r '.error.message // empty')" - echo "Full response:" - echo "$response" | jq '.' || echo "$response" - return 1 - fi -} - -# Main execution -echo "Generating test claim..." - -# Create claim payload -claim=$(create_claim_payload "$REGISTERED_DID") -echo "Claim payload:" -echo "$claim" | jq '.' - -# Create and sign JWT -echo "Generating signed JWT..." -jwt=$(create_jwt "$claim" "$REGISTERED_DID" "$REGISTERED_KEY") - -# Output just the JWT for piping -echo "$jwt" - -# Register the claim -register_claim "$jwt" \ No newline at end of file diff --git a/test-scripts/new_flow.py b/test-scripts/generate_data.py similarity index 100% rename from test-scripts/new_flow.py rename to test-scripts/generate_data.py diff --git a/test-scripts/new_flow.sh b/test-scripts/generate_data.sh similarity index 100% rename from test-scripts/new_flow.sh rename to test-scripts/generate_data.sh diff --git a/test-scripts/new_flow.ts b/test-scripts/generate_data.ts similarity index 100% rename from test-scripts/new_flow.ts rename to test-scripts/generate_data.ts diff --git a/test-scripts/mnemonic.txt b/test-scripts/mnemonic.txt deleted file mode 100644 index 493c172..0000000 --- a/test-scripts/mnemonic.txt +++ /dev/null @@ -1 +0,0 @@ -usage gas they pyramid walnut mammal absorb major crystal nurse element congress assist panic bomb entire area slogan film educate decrease buddy describe finish \ No newline at end of file diff --git a/test-scripts/run-deeplink-tests.sh b/test-scripts/run-deeplink-tests.sh index e9d79c7..3a35cd0 100755 --- a/test-scripts/run-deeplink-tests.sh +++ b/test-scripts/run-deeplink-tests.sh @@ -14,7 +14,7 @@ YELLOW='\033[1;33m' NC='\033[0m' # Parse command line arguments -TIMEOUT=5 +TIMEOUT=10 TEST_MODE="execute" # Default to execute mode while getopts "t:p" opt; do diff --git a/test-scripts/secp256k1-sign b/test-scripts/secp256k1-sign deleted file mode 100644 index 059190a..0000000 --- a/test-scripts/secp256k1-sign +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -# Helper script for secp256k1 signing using pure shell commands - -PRIVATE_KEY_FILE="$1" -MESSAGE_HASH_FILE="$2" - -# Load private key and message hash -PRIVATE_KEY=$(cat "$PRIVATE_KEY_FILE" | xxd -p -c 64) -MESSAGE_HASH=$(cat "$MESSAGE_HASH_FILE" | xxd -p -c 32) - -# Use secp256k1 library through Python (as a last resort) -python3 -c " -from coincurve import PrivateKey -private_key = PrivateKey(bytes.fromhex('$PRIVATE_KEY')) -signature = private_key.sign(bytes.fromhex('$MESSAGE_HASH'), hasher=None) -print(signature.hex()) -" | xxd -r -p | base64 -w 0 | tr '/+' '_-' | tr -d '=' \ No newline at end of file diff --git a/test-scripts/test-deeplinks.sh b/test-scripts/test-deeplinks.sh deleted file mode 100755 index 6bccc78..0000000 --- a/test-scripts/test-deeplinks.sh +++ /dev/null @@ -1,130 +0,0 @@ -#!/bin/bash - -# Verify required environment variables are set -required_vars=( - "CONTACT1_DID" - "CONTACT1_KEY" - "CONTACT2_DID" - "CONTACT2_KEY" - "ISSUER_DID" - "ISSUER_KEY" - "CONTACTS_JSON" -) - -for var in "${required_vars[@]}"; do - if [ -z "${!var}" ]; then - echo "Error: $var is not set" - echo "Please run: source .generated/test-env.sh" - exit 1 - fi -done - -# Color definitions -BLUE='\033[0;34m' -GREEN='\033[0;32m' -YELLOW='\033[1;33m' -PURPLE='\033[0;35m' -CYAN='\033[0;36m' -NC='\033[0m' # No Color -BOLD='\033[1m' - -# Parse command line arguments -TIMEOUT=5 -ALL_TESTS=false -TEST_MODE=${TEST_MODE:-execute} # Default to execute mode - -while getopts "t:a" opt; do - case $opt in - t) TIMEOUT=$OPTARG ;; - a) ALL_TESTS=true ;; - \?) echo "Invalid option: -$OPTARG" >&2; exit 1 ;; - esac -done - -# Check for adb and connected devices -if [ "$TEST_MODE" = "execute" ]; then - if ! command -v adb >/dev/null 2>&1; then - echo "Warning: adb not found, switching to print mode" - TEST_MODE=print - elif [ -z "$(adb devices | grep -v List | grep device)" ]; then - echo "Warning: no devices/emulators found, switching to print mode" - TEST_MODE=print - fi -fi - -# Function to encode URL parameters -urlencode() { - local string="${1}" - local strlen=${#string} - local encoded="" - local pos c o - - for (( pos=0 ; pos